/* Hallmark · pre-emit critique: P5 H5 E5 S4 R5 V5
 * genre: atmospheric · macrostructure: Photographic · theme: Midnight
 * tone: smoky/atmospheric · audience: paikalliset ruokailijat · use case: pöytävaraus
 * anchor hue: 40–60 (ember/char) · accent: ember oklch(66% 0.175 45), ~2% of viewport
 * axes — paper: dark (L 13%) · display: display-heavy (Bricolage Grotesque, roman) · accent: warm
 * enrichment: real photography (9 supplied plates, CC0/CC-BY) — no generated imagery
 * nav: N5 Floating pill · footer: Ft5 Statement · sticky: C4 Bottom bar
 * components — H6 photographic fold (caption=lower-right, text=lower-left)
 *              S5 bottom-anchored plate captions
 *              F6 product card grid (ratio=4/3, density=4-up, action=none)
 *              F3 tabular spec sheet (columns=3, rules=every row, numbers=tabular)
 *              C3 typographic link (hero) + C4 sticky bar (persistent CTA)
 * motion primitives (3): CTA hover-lift · dish image 1.02 · sticky-bar reveal
 * contrast: pass (40–41) · honest copy: pass (46, no invented proof) · chrome: pass (47)
 * copy status: DRAFT — kaikki liiketoimintatiedot ovat paikkamerkkejä, ks. PLACEHOLDERS.md
 */

/* ── Reset / root ─────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;               /* clip, not hidden — preserves sticky/fixed */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 300;               /* dark-mode: body weight steps down */
  font-size: var(--text-base);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}

/* Two warm blooms on the canvas — atmospheric genre, fixed, unanimated. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58vmin 58vmin at 12% 8%,
      color-mix(in oklch, var(--color-ember) 16%, transparent), transparent 70%),
    radial-gradient(52vmin 52vmin at 88% 72%,
      color-mix(in oklch, var(--color-ember-dim) 20%, transparent), transparent 72%);
}

main, .foot, .nav, .cta-bar { position: relative; z-index: var(--z-base); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-style: normal;             /* roman only — italic headers banned */
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  overflow-wrap: anywhere;        /* Finnish compounds run long */
  min-width: 0;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

.skip {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--space-md);
  z-index: var(--z-tooltip);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-ember);
  color: var(--color-paper);
  font-weight: 600;
  border-radius: var(--radius-md);
}
.skip:focus { inset-block-start: var(--space-md); }

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── Buttons & links ──────────────────────────────────────────────── */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--color-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: var(--control-h);
  padding: var(--space-xs) var(--space-lg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: var(--rule-hair) solid var(--color-edge);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;            /* affordances never wrap */
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}

.btn--fill {
  --btn-bg: var(--color-ember);
  --btn-fg: var(--color-paper);
  border-color: var(--color-ember);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1.5px); }
  .btn--fill:hover { --btn-bg: var(--color-ember-2); border-color: var(--color-ember-2); }
  .btn:not(.btn--fill):hover { border-color: var(--color-ember); color: var(--color-ember); }
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {                 /* instant — never transitioned */
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn__spin {
  display: none;
  width: 0.9em;
  height: 0.9em;
  border: 2px solid color-mix(in oklch, var(--color-paper) 45%, transparent);
  border-top-color: var(--color-paper);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}
.btn.is-loading .btn__spin { display: block; }
.btn.is-loading { pointer-events: none; opacity: 0.8; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding-block: var(--space-2xs);
  color: var(--color-ink);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: var(--rule-hair) solid var(--color-ember);
  transition: color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out);
}
.link-arrow__mark { transition: transform var(--dur-short) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover { color: var(--color-ember-2); border-color: var(--color-ember-2); }
  .link-arrow:hover .link-arrow__mark { transform: translateX(3px); }
}
.link-arrow:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }

.link-u {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-ember-dim);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .link-u:hover { text-decoration-color: var(--color-ember); }
}
.link-u:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ── N5 · Floating pill nav ───────────────────────────────────────── */

.nav {
  position: fixed;
  inset: calc(var(--space-md) + env(safe-area-inset-top)) auto auto 50%;
  transform: translateX(-50%);
  z-index: var(--z-sticky);
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  max-width: calc(100% - 2 * var(--space-md));
  padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-xs);
  background: color-mix(in oklch, var(--color-paper) 74%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  border-radius: var(--radius-pill);
}
.nav__brand:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* The mark is a white plate on purpose — the logo's black wordmark and
   linework vanish on this canvas, so the circle gives it a ground. */
.nav__mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
}

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-base);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-short) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .nav__link:hover { color: var(--color-ink); } }
.nav__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }

.nav__cta { min-height: 38px; padding-inline: var(--space-md); }

@media (min-width: 40rem) {
  .nav__links { display: flex; }
}

/* At 320px the mark alone carries the brand — keeps the pill visibly
   detached from the viewport edges instead of becoming a full-width bar. */
@media (max-width: 22rem) {
  .nav__wordmark { display: none; }
  .nav { gap: var(--space-xs); }
}

/* ── H6 · Photographic fold ───────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-content: end;
  padding: var(--space-2xl) var(--page-gutter) var(--space-3xl);
  isolation: isolate;
}

.hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

/* Two single-hue scrims: one lifts the base, one darkens the left column
   where the type sits. The bright top-right of the photograph survives. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, var(--color-scrim), transparent 64%),
    linear-gradient(to right,
      color-mix(in oklch, var(--color-scrim) 82%, transparent), transparent 56%);
}

.hero__body { display: grid; gap: var(--space-md); max-width: min(100%, 34rem); }

.hero__display {
  font-size: var(--text-display);
  /* ch resolves against the display size, so short Finnish words never
     break mid-word the way a body-sized ch cap would force them to. */
  max-width: 11ch;
}

.hero__line {
  max-width: 34ch;
  color: var(--color-ink);
  font-size: var(--text-md);
  line-height: 1.4;
}

.hero__caption {
  position: absolute;
  inset-block-end: var(--space-lg);
  inset-inline-end: var(--page-gutter);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

@media (max-width: 34rem) {
  .hero__caption { display: none; }   /* the type owns the corner at 320–544px */
}

/* ── Bands ─────────────────────────────────────────────────────────── */

.band {
  padding-inline: var(--page-gutter);
  padding-block: var(--space-3xl) var(--space-2xl);
  margin-inline: auto;
  max-width: 88rem;
}

/* Deliberately uneven rhythm — the text band breathes, the menu is tighter. */
.band--text {
  display: grid;
  gap: var(--space-xl);
  padding-block: var(--space-4xl) var(--space-3xl);
  align-items: start;
}

@media (min-width: 60rem) {
  .band--text {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-3xl);
  }
}

.statement {
  font-size: var(--text-display-s);
  text-wrap: balance;
}

.prose { max-width: var(--measure); display: grid; gap: var(--space-md); }
.prose p { color: var(--color-muted); font-size: var(--text-md); line-height: 1.6; }

.sect {
  font-size: var(--text-2xl);
  margin-block-end: var(--space-xs);
}

.sect__note {
  color: var(--color-neutral);
  font-size: var(--text-sm);
  margin-block-end: var(--space-xl);
}

/* Charcoal texture behind the sides table. */
.band--tex {
  position: relative;
  isolation: isolate;
}
.band--tex::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("photos/charcoal-grate.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.10;
  mask-image: linear-gradient(to bottom, transparent, black 22%, black 78%, transparent);
}

/* ── S5 · Bottom-anchored photo plates ────────────────────────────── */

.plate { margin: 0; }

.plate img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.plate--strip img { aspect-ratio: 32 / 9; }

.plate__cap {
  padding: var(--space-sm) var(--page-gutter) 0;
  max-width: 88rem;
  margin-inline: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-neutral);
}

@media (max-width: 40rem) {
  .plate img { aspect-ratio: 4 / 3; }
  .plate--strip img { aspect-ratio: 16 / 9; }
}

/* ── F6 · Product card grid ───────────────────────────────────────── */

.menu {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* never bare 1fr with images */
  gap: var(--space-xl) var(--space-lg);
}

@media (min-width: 34rem) {
  .menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 70rem) {
  .menu { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.dish {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-sm);
  min-width: 0;
}

.dish__media {
  overflow: hidden;
  background: var(--color-paper-2);
  border-radius: var(--radius-sm);
}

.dish__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--dur-long) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .dish:hover .dish__media img { transform: scale(1.02); }
}

.dish__name {
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.dish__note {
  color: var(--color-neutral);
  font-size: var(--text-sm);
  line-height: 1.45;
  margin-block-start: var(--space-2xs);
}

.dish__price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm);
  color: var(--color-ember);
  padding-block-start: var(--space-2xs);
  border-top: var(--rule-hair) solid var(--color-rule);
}

/* ── F3 · Tabular spec sheet ──────────────────────────────────────── */

.sheet {
  width: 100%;
  max-width: 44rem;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.sheet__cap {
  caption-side: top;
  text-align: start;
  color: var(--color-neutral);
  font-size: var(--text-sm);
  padding-block-end: var(--space-md);
}

.sheet th,
.sheet td {
  text-align: start;
  padding-block: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  vertical-align: baseline;
}

.sheet th { font-weight: 400; }
.sheet .num { color: var(--color-ember); white-space: nowrap; }
.sheet__foot { color: var(--color-neutral); font-size: var(--text-sm); }

/* Small screens: name + price on one line, note beneath. */
@media (max-width: 34rem) {
  .sheet tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: var(--space-sm);
    border-bottom: var(--rule-hair) solid var(--color-rule);
  }
  .sheet th, .sheet td { border: 0; padding-block: 0; }
  .sheet__foot { grid-column: 1 / -1; padding-block-start: var(--space-3xs); }
}

/* ── Booking ──────────────────────────────────────────────────────── */

.book { padding-block-end: var(--space-4xl); }

.book__grid { display: grid; gap: var(--space-2xl); align-items: start; }

@media (min-width: 62rem) {
  .book__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--space-3xl); }
}

.book__lead {
  max-width: 46ch;
  color: var(--color-muted);
  margin-block-end: var(--space-xl);
}

.form { display: grid; gap: var(--space-lg); }

@media (min-width: 34rem) {
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field:not(.field--half) { grid-column: 1 / -1; }
}

@media (min-width: 62rem) {
  .form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.field { display: grid; gap: var(--space-2xs); min-width: 0; }

.field__label {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field__opt { color: var(--color-neutral); font-weight: 300; }

.field__input {
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-paper-2);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  border: var(--rule-hair) solid var(--color-edge);
  border-radius: var(--radius-md);
  outline: 2px solid transparent;   /* reserved — focus swaps colour, not geometry */
  outline-offset: 1px;
  transition: border-color var(--dur-short) var(--ease-out),
              background-color var(--dur-short) var(--ease-out);
}

textarea.field__input { min-height: 5.5rem; resize: vertical; line-height: 1.5; }

.field__input::placeholder { color: var(--color-neutral); }

@media (hover: hover) and (pointer: fine) {
  .field__input:hover:not(:disabled) { border-color: var(--color-neutral); }
}

.field__input:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-ember);
  background: var(--color-paper-3);
}

.field__input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--color-rule);
}

.field.is-error .field__input { border-color: var(--color-error); }
.field.is-ok    .field__input { border-color: var(--color-success); }

.field__msg {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--color-error);
  min-height: 1lh;                  /* reserved even when empty (gate 39) */
}

.form__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
}

.form__alt { color: var(--color-muted); font-size: var(--text-sm); }

.form__status {
  grid-column: 1 / -1;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-muted);
}
.form__status.is-error   { color: var(--color-error); }
.form__status.is-success { color: var(--color-success); }

/* Info column */

.book__info {
  position: relative;
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-xl);
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.info__h {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-neutral);
  margin-block-start: var(--space-md);
}
.info__h:first-of-type { margin-block-start: 0; }

.info__list { margin: 0; display: grid; gap: var(--space-2xs); }

.info__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: 18rem;
  padding-block: var(--space-3xs);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}
.info__row dt { color: var(--color-muted); }
.info__row dd { margin: 0; }
.info__row .num { color: var(--color-ink); }

.info__addr { font-style: normal; line-height: 1.7; color: var(--color-muted); }

.info__note {
  color: var(--color-neutral);
  font-size: var(--text-sm);
  max-width: 32ch;
  margin-block-start: var(--space-md);
}

/* ── Ft5 · Statement footer ───────────────────────────────────────── */

.foot {
  padding: var(--space-3xl) var(--page-gutter) calc(var(--space-2xl) + env(safe-area-inset-bottom));
  max-width: 88rem;
  margin-inline: auto;
  display: grid;
  gap: var(--space-xl);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.foot__top {
  display: grid;
  gap: var(--space-xl);
  justify-items: start;
  align-items: center;
}

@media (min-width: 48rem) {
  .foot__top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2xl);
  }
}

.foot__stamp {
  width: clamp(9rem, 18vw, 13rem);
  height: auto;
  border-radius: 50%;
  justify-self: start;
}

@media (min-width: 48rem) {
  .foot__stamp { justify-self: end; }
}

.foot__line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 22ch;
}

.foot__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm) var(--space-lg);
  padding-block-start: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.foot__muted { color: var(--color-muted); font-size: var(--text-sm); }

.foot__credits {
  color: var(--color-neutral);
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 70ch;
}

/* ── C4 · Sticky bottom bar ───────────────────────────────────────── */

.cta-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--page-gutter)
           calc(var(--space-sm) + env(safe-area-inset-bottom));
  background: color-mix(in oklch, var(--color-paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: var(--rule-hair) solid var(--color-rule);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity var(--dur-short) var(--ease-out),
              transform var(--dur-short) var(--ease-out);
}

.cta-bar[hidden] { display: none; }
.cta-bar.is-in { opacity: 1; transform: translateY(0); }

.cta-bar__text {
  font-size: var(--text-sm);
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Reduced motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 150ms !important;
    transition-duration: 150ms !important;
  }
  .btn:hover,
  .dish:hover .dish__media img,
  .link-arrow:hover .link-arrow__mark { transform: none; }
  .cta-bar { transform: none; }
  .btn__spin { animation-duration: 900ms !important; }   /* functional loader stays */
}
