/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4
 * Hallmark · genre: editorial · macrostructure: Photographic · theme: Almanac
 * enrichment: none (real photography) · nav: N12 banner+retract (status) · footer: Ft4 dense colophon
 * tone: utilitarian, warm · anchor hue: 68 (oat) · accent hue: 42 (terracotta)
 * theme axes — paper: light · display: display-grotesk · accent: warm
 * outlier face (JetBrains Mono) carries ONE role, two slots: clock times · telephone numbers
 * contrast: pass (40–41) · slop: pass (42–45) · honest: pass (46) · chrome: pass (47)
 * tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50–57)
 */

/* ── Reset & root ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;                 /* clip, never hidden — keeps position:fixed alive */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums;
  padding-top: calc(var(--banner-h) + var(--bar-h));
  padding-bottom: env(safe-area-inset-bottom);
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
table { border-collapse: collapse; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal;               /* headers are roman. always. */
  line-height: 1.1;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}

p { margin: 0 0 var(--space-md); }
p:last-child { margin-bottom: 0; }

.tnum { font-variant-numeric: tabular-nums; }

/* ── Focus — instant, never transitioned ──────────────────────────────── */
:focus-visible {
  outline: var(--rule-bold) solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(var(--space-md) * -6);
  z-index: var(--z-tooltip);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
}
.skip:focus-visible { top: var(--space-md); }

/* ── Buttons — C1 outlined chip family ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;              /* gate 49 — affordances never wrap */
  transition: background-color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}
.btn__num { font-family: var(--font-outlier); font-weight: 400; font-size: var(--text-xs); }

.btn--accent {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
.btn--ghost { border-color: var(--color-rule); color: var(--color-ink); }

.btn--lg { padding: var(--space-sm) var(--space-lg); font-size: var(--text-base); }
.btn--lg .btn__num { font-size: var(--text-sm); }

@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover { background: var(--color-accent-deep); border-color: var(--color-accent-deep); }
  .btn--ghost:hover  { background: var(--color-paper-2); border-color: var(--color-ink); }
}
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"], .btn:disabled {
  border-color: var(--color-rule);
  background: var(--color-paper-2);
  color: var(--color-muted);
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
@media (pointer: coarse) { .btn { min-height: var(--dock-h); align-items: center; } }

/* Prose links — one hover signal, no transitioned underline. */
.link {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
@media (hover: hover) { .link:hover { text-decoration-thickness: 2px; } }
.link:active { color: var(--color-accent-deep); }

/* ── N12 · status banner + retracting masthead ────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-sticky-nav);
  transform: translateY(0);
  transition: transform var(--dur-short) var(--ease-out);
}
.nav.is-compact   { transform: translateY(calc(var(--banner-h) * -1)); }
.nav.is-dismissed { transform: none; }
.nav.is-dismissed .nav__banner { display: none; }

.nav__banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  height: var(--banner-h);
  padding-inline: clamp(var(--space-sm), 3vw, var(--space-md));
  background: var(--color-ink);
  color: var(--color-paper);
}
.nav__status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  margin: 0;
  font-family: var(--font-outlier);   /* outlier slot 1 of 2 — clock times */
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Colour is never the only signal — the text says avoinna / suljettu too. */
.nav__dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-neutral);
}
.nav__status[data-state="open"]   .nav__dot { background: var(--color-open); }
.nav__status[data-state="closed"] .nav__dot { background: var(--color-shut); }

.nav__x {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-paper);
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out);
}
@media (hover: hover) { .nav__x:hover { background: var(--color-paper-3); color: var(--color-ink); } }
.nav__x:active { transform: translateY(1px); }
.nav__x:disabled { opacity: 0.55; cursor: not-allowed; }

.nav__bar {
  height: var(--bar-h);
  background: var(--color-paper);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}
.nav__inner {
  display: flex;
  align-items: center;            /* gate 36 — rows mixing heights are centred */
  gap: clamp(var(--space-md), 3vw, var(--space-xl));
  height: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: clamp(var(--space-md), 4vw, var(--space-xl));
}
/* Links sit WITH the wordmark, not opposite it — the right-grouped
   links + button is the AI-nav fingerprint (gate 42). */
.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav__mark {
  width: 36px; height: 36px;
  border-radius: var(--radius-pill);   /* the mark is a roundel — clip its white corners */
  object-fit: cover;
}
.nav__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-md);
  line-height: 1;
  letter-spacing: -0.02em;
}
.nav__links { display: flex; gap: var(--space-lg); }
.nav__cta { margin-inline-start: auto; }
.nav__link {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  padding-block: var(--space-xs);
  border-bottom: var(--rule-bold) solid transparent;
  transition: border-color var(--dur-micro) var(--ease-out);
}
@media (hover: hover) { .nav__link:hover { border-bottom-color: var(--color-accent); } }
.nav__link:active { border-bottom-color: var(--color-accent-deep); }

@media (max-width: 52rem) {
  .nav__links { display: none; }     /* collapse the row, never the labels */
  .nav__cta .btn__num { display: none; }
}

/* ── H6 · Photographic folds ──────────────────────────────────────────── */
.fold { position: relative; }

.fold--hero {
  height: clamp(24rem, 68dvh, 40rem);
  background: var(--color-paper-3);
}
.fold--hero .fold__img { width: 100%; height: 100%; object-fit: cover; }

/* The plate sits in a corner — the photograph leads, the words annotate. */
.fold__plate {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-2xl) clamp(var(--space-md), 4vw, var(--space-xl)) var(--space-lg);
  background: linear-gradient(to top, var(--color-scrim) 34%, var(--color-scrim-0));
  color: var(--color-on-scrim);
}
.fold__title {
  max-width: 18ch;
  font-size: var(--text-display);
  color: var(--color-on-scrim);
}
.fold__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs);
  margin: var(--space-sm) 0 0;
  font-size: var(--text-sm);
  color: var(--color-on-scrim);
}
.fold__sep { opacity: 0.5; }
.fold__tel {
  font-family: var(--font-outlier);   /* outlier slot 2 of 2 — telephone numbers */
  color: var(--color-on-scrim);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}
.fold__tel:active { text-decoration-thickness: 2px; }

.fold--band { background: var(--color-paper-3); }
.fold--band .fold__img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}
.fold__cap {
  max-width: 76rem;
  margin-inline: auto;
  padding: var(--space-sm) clamp(var(--space-md), 4vw, var(--space-xl));
  background: var(--color-paper);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
@media (max-width: 40rem) {
  .fold--band .fold__img { aspect-ratio: 4 / 3; }
}

/* ── Bands ────────────────────────────────────────────────────────────── */
.band__inner {
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: clamp(var(--space-md), 4vw, var(--space-xl));
}
.band__inner--narrow { max-width: 52rem; }

/* Padding varies per band on purpose — an even rhythm reads as a template. */
.band--lede  { padding-block: var(--space-3xl) var(--space-2xl); }
.band--menu  { padding-block: var(--space-2xl) var(--space-3xl); }
.band--story { padding-block: var(--space-xl)  var(--space-3xl); }
.band--hours { padding-block: var(--space-3xl) var(--space-xl); background: var(--color-paper-2); }
.band--visit { padding-block: var(--space-2xl) var(--space-3xl); }

.h2 { font-size: var(--text-xl); margin-bottom: var(--space-lg); }

.lede {
  max-width: 48ch;
  font-size: var(--text-md);
  line-height: 1.5;
}
.lede em { font-style: italic; }     /* italic lives in body copy only */
.lede__note {
  max-width: 52ch;
  margin-top: var(--space-md);
  color: var(--color-muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.band--story p { max-width: 62ch; }
.term { font-style: italic; color: var(--color-accent); }

.band__foot {
  max-width: 56ch;
  margin-top: var(--space-lg);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* ── F3 · Tabular spec sheets ─────────────────────────────────────────── */
.sheet { width: 100%; text-align: start; }
.sheet__cap {
  max-width: 60ch;
  padding-bottom: var(--space-sm);
  border-bottom: var(--rule-bold) solid var(--color-ink);
  color: var(--color-muted);
  font-size: var(--text-sm);
  text-align: start;
}
.sheet th, .sheet td {
  padding-block: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-rule-soft);
  text-align: start;
  vertical-align: baseline;
  overflow-wrap: anywhere;
}
.sheet th {
  width: 8.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
}
.sheet__tag {
  width: 12rem;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.sheet--hours {
  max-width: 30rem;
  border-top: var(--rule-bold) solid var(--color-ink);  /* the table opens itself; it has no caption */
}
.sheet--hours th { width: 9.5rem; }
.sheet--hours td { font-family: var(--font-outlier); font-size: var(--text-sm); }

/* Today breaks the grid: an accent rule reaching into the left margin. */
.sheet--hours tr.is-today { position: relative; }
.sheet--hours tr.is-today th { color: var(--color-accent); }
.sheet--hours tr.is-today th::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--space-md) * -1);
  inset-block: var(--space-2xs);
  width: var(--rule-bold);
  background: var(--color-accent);
}

@media (max-width: 34rem) {
  .sheet th { width: 7rem; }
  .sheet__tag { display: none; }     /* the qualifier drops; the dish stays */
}

/* ── Yhteystiedot ─────────────────────────────────────────────────────── */
.visit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: var(--rule-bold) solid var(--color-ink);
}
.visit__label {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.visit__val {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  font-style: normal;                /* <address> is italic by default */
  line-height: 1.3;
}
.visit__tel {
  font-family: var(--font-outlier);  /* outlier slot 2 — telephone numbers */
  font-weight: 400;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: var(--rule-bold) solid var(--color-accent-wash);
  transition: border-color var(--dur-micro) var(--ease-out);
}
@media (hover: hover) { .visit__tel:hover { border-bottom-color: var(--color-accent); } }
.visit__tel:active { border-bottom-color: var(--color-accent-deep); }
.visit__hint { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }

/* ── Ft4 · Dense colophon ─────────────────────────────────────────────── */
.colophon {
  padding: var(--space-lg) clamp(var(--space-md), 4vw, var(--space-xl)) var(--space-2xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper);
}
.colophon p {
  max-width: 66ch;
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.colophon b { color: var(--color-ink); font-weight: 600; }
.colophon a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 0.18em; }
.colophon a:active { color: var(--color-accent-deep); }

/* ── C4 · Sticky bottom dock — touch surfaces only ────────────────────── */
.dock { display: none; }

@media (pointer: coarse) and (max-width: 52rem) {
  .dock {
    position: fixed;
    inset: auto 0 0 0;
    z-index: var(--z-sticky);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md) max(var(--space-xs), env(safe-area-inset-bottom));
    background: var(--color-paper);
    border-top: var(--rule-hair) solid var(--color-rule);
  }
  .dock__btn {
    display: grid;
    place-items: center;
    min-height: var(--dock-h);
    border: var(--rule-hair) solid var(--color-rule);
    border-radius: var(--radius-sm);
    color: var(--color-ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-base);
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
  }
  .dock__btn--accent {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-ink);
  }
  .dock__btn:active { transform: translateY(1px); }
  body { padding-bottom: calc(var(--dock-h) + var(--space-lg) + env(safe-area-inset-bottom)); }
}

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  /* The banner retract is spatial — don't shrink it, drop it. */
  .nav { transition: none; }
  .nav.is-compact { transform: none; }
}
