/* Hallmark · pre-emit critique: P5 H5 E5 S4 R5 V5 */
/* Hallmark · genre: editorial · macrostructure: Marquee Hero · theme: Atelier
 * tone: editorial / quiet-craft · anchor hue: 70 (warm oat) · accent: terracotta 40° at <2 %
 * H1 Marquee knobs: size=xl, alignment=left-bias, underlay=single thick rule below
 * nav: N9 Edge-aligned minimal (CTA=text+arrow) · footer: Ft1 Mast-headed (wordmark=xl, tagline=roman, links=inline)
 * section heads: S2 Hanging · features: F3 Tabular spec sheet (cols=2, rules=every row, nums=tabular)
 * CTA: C1 Outlined chip (shape=slab, density=spacious, adornment=arrow)
 * enrichment: E8 photography — 4 swappable slots awaiting the client's own photos;
 *   no stock, no generated interiors. Plus the client's papercut mark.
 * motion: 2 primitives — one orchestrated load reveal, CTA hover
 * audience: local walk-in + returning customers, Finnish · use case: varaa aika (book)
 * 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)
 */

@import url("tokens.css");

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

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

html {
  overflow-x: clip;
  -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;
  -webkit-font-smoothing: antialiased;
  padding-inline: max(0px, env(safe-area-inset-left));
}

h1, h2, h3, p, dl, dd, figure, table { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-style: normal;          /* headers are roman, always */
  font-weight: 400;
  font-variation-settings: "SOFT" 20, "WONK" 0;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  min-width: 0;
}

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

a { color: inherit; }

:where(a, button, input):focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  /* Never transitioned — the ring is instant. */
}

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

/* ── Shared ───────────────────────────────────────────────────────────── */

.page { padding-inline: var(--page-gutter); }

.rule-thick {
  border: 0;
  border-top: var(--rule-thick) solid var(--color-ink);
  margin: 0;
}

.rule-hair {
  border: 0;
  border-top: var(--rule-hair) solid var(--color-rule);
  margin: 0;
}

.label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Unconfirmed facts. Every one of these must be replaced before launch. */
.tbd {
  color: var(--color-muted);
  border-bottom: 1px dotted var(--color-accent);
  font-variant-numeric: tabular-nums;
}

.note {
  font-size: var(--text-sm);
  color: var(--color-accent);
}

/* logo-mark.png is keyed out of logo.jpg: transparent ground, ink painted
 * as oklch(19% 0.014 58) so the mark is part of the token system, not pasted on. */
.mark { height: auto; }

/* ── Nav · N9 Edge-aligned minimal ────────────────────────────────────── */
/* The space between the two ends is the design. Do not fill it with links. */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-out);
}

.nav__mark { height: var(--space-xl); width: auto; }

.nav__wordmark {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-variation-settings: "SOFT" 20, "WONK" 0;
  letter-spacing: -0.015em;
  line-height: 1;
  white-space: nowrap;
}

.nav__cta {
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding-block: var(--space-xs);
  border-bottom: 1px solid var(--color-ink);
  transition: color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav__brand:hover { color: var(--color-accent); }
  .nav__cta:hover { color: var(--color-accent); border-color: var(--color-accent); }
}

.nav__brand:active,
.nav__cta:active { color: var(--color-accent); }

/* ── Hero · H1 Marquee ────────────────────────────────────────────────── */
/* Typography only in the fold — no subhead, no CTA, no image. */

.hero {
  min-height: min(62dvh, 30rem);      /* phones: statement dominates without dead air */
  display: grid;
  align-content: end;
  padding-block: var(--space-2xl) var(--space-3xl);   /* bottom-weighted, 1.5× */
}

@media (min-width: 40rem) {
  .hero { min-height: min(78dvh, 46rem); }
}

/* One line from ~533 px up (see --text-display). Below that it breaks once, and
 * balance puts the break at the comma — the only split that doesn't strand a word. */
.hero__display {
  font-size: var(--text-display);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 12, "WONK" 0, "opsz" 96;
  text-wrap: balance;
}

/* ── Intro ────────────────────────────────────────────────────────────── */

.intro {
  display: grid;
  gap: var(--space-xl);
  padding-block: var(--space-2xl) var(--space-3xl);
}

.intro__figure { margin: 0; }

.intro__mark { width: min(15rem, 52vw); height: auto; }

.intro__lead {
  font-size: var(--text-xl);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 20ch;
}

.intro__body {
  margin-block-start: var(--space-lg);
  max-width: var(--measure);
  display: grid;
  gap: var(--space-md);
  color: var(--color-muted);
}

@media (min-width: 60rem) {
  .intro {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-2xl);
    align-items: start;
  }
}

/* ── Photographs ──────────────────────────────────────────────────────── */
/* Each .shot is a sized, cropped slot. To fill one: delete its .shot__slot
 * div and paste the <img> from the comment beside it. Nothing else changes —
 * the aspect ratio and the crop live here, not in the image file. */

.shot { margin: 0; overflow: hidden; }

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shot__slot {
  height: 100%;
  display: grid;
  place-content: center;
  gap: var(--space-2xs);
  padding: var(--space-lg);
  text-align: center;
  background: var(--color-paper-2);
  border: var(--rule-hair) dashed var(--color-rule);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shot__slot span { letter-spacing: 0.06em; text-transform: none; }

/* Full-bleed band — the page's one wide photograph. */
.shot--band { aspect-ratio: 4 / 3; }

/* An uneven pair: portrait short, landscape tall, bottoms aligned. */
.shots-pair {
  display: grid;
  gap: var(--space-lg);
  padding-block-end: var(--space-3xl);
}

.shot--portrait  { aspect-ratio: 4 / 5; }
.shot--landscape { aspect-ratio: 4 / 3; }
.shot--place     { aspect-ratio: 3 / 2; margin-block-start: var(--space-md); max-width: 34ch; }

/* The pair goes side-by-side early — stacked, a full-width 4/5 portrait
 * becomes a slab taller than the viewport by ~700 px. */
@media (min-width: 40rem) {
  .shot--band { aspect-ratio: 16 / 6; }

  .shots-pair {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-lg);
    align-items: end;
  }
}

@media (min-width: 60rem) {
  .shots-pair { gap: var(--space-xl); }
}

/* ── Section head · S2 Hanging ────────────────────────────────────────── */
/* Single column, always. No tag-left / heading-right. */

.head {
  padding-block: var(--space-3xl) var(--space-lg);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xs);
}

.head--tight { padding-block-start: var(--space-2xl); }

.head__title {
  font-size: var(--text-2xl);
  line-height: 1.1;
}

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

.price-groups {
  display: grid;
  gap: var(--space-2xl);
  padding-block-end: var(--space-2xl);
}

@media (min-width: 60rem) {
  .price-groups {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-4xl);
  }
}

.spec {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.spec caption {
  text-align: start;
  padding-block-end: var(--space-sm);
  border-block-end: 1px solid var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink);
}

.spec th,
.spec td {
  padding-block: var(--space-sm);
  border-block-end: var(--rule-hair) solid var(--color-rule-faint);
  font-weight: 400;
  vertical-align: baseline;
}

.spec th {
  text-align: start;
  font-size: var(--text-md);
}

.spec td {
  text-align: end;
  white-space: nowrap;
  padding-inline-start: var(--space-md);
}

.spec tr:last-child th,
.spec tr:last-child td { border-block-end: 0; }

/* ── Käynti — hours and place ─────────────────────────────────────────── */

.visit {
  display: grid;
  gap: var(--space-2xl);
  padding-block-end: var(--space-3xl);
}

@media (min-width: 60rem) {
  .visit {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--space-4xl);
  }
}

.hours {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--space-md);
  font-variant-numeric: tabular-nums;
  margin-block-start: var(--space-md);
  max-width: 30ch;          /* the rules track the content, not the column */
}

.hours dt,
.hours dd {
  padding-block: var(--space-sm);
  border-block-end: var(--rule-hair) solid var(--color-rule-faint);
}

.hours dd {
  margin: 0;
  text-align: end;
  white-space: nowrap;
}

.place {
  display: grid;
  gap: var(--space-md);
  font-style: normal;
  margin-block-start: var(--space-md);
}

.place p { max-width: 34ch; }

/* ── Closing CTA · C1 Outlined chip ───────────────────────────────────── */

.book {
  background: var(--color-paper-2);
  padding-block: var(--space-2xl) var(--space-4xl);
  display: grid;
  gap: var(--space-lg);
  justify-items: start;
}

.book__line {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.3;
  max-width: 26ch;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-none);
  font-size: var(--text-md);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  transition: background-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .chip:hover { background: var(--color-ink); color: var(--color-paper); }
}

.chip:active { background: var(--color-ink); color: var(--color-paper); }

/* ── Footer · Ft1 Mast-headed ─────────────────────────────────────────── */

.foot {
  border-block-start: var(--rule-thick) solid var(--color-ink);
  padding-block: var(--space-xl);
  padding-block-end: max(var(--space-2xl), env(safe-area-inset-bottom));
  display: grid;
  gap: var(--space-lg);
}

.foot__mast {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.foot__mark { width: min(6.5rem, 22vw); height: auto; }

.foot__names { min-width: 0; }

.foot__wordmark {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-variation-settings: "SOFT" 20, "WONK" 0;
  line-height: 1.05;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.foot__tagline {
  color: var(--color-muted);
  margin-block-start: var(--space-2xs);
  font-size: var(--text-sm);
}

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

.foot__link {
  white-space: nowrap;
  font-size: var(--text-sm);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--color-rule);
  transition: text-decoration-color var(--dur-micro) var(--ease-out),
              color var(--dur-micro) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .foot__link:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); }
}

.foot__link:active { color: var(--color-accent); text-decoration-color: var(--color-accent); }

.foot__meta {
  display: grid;
  gap: var(--space-2xs);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ── 404 ──────────────────────────────────────────────────────────────── */

.notfound {
  min-height: min(54dvh, 26rem);
  display: grid;
  align-content: end;
  gap: var(--space-lg);
  justify-items: start;
  padding-block: var(--space-2xl) var(--space-3xl);
}

.notfound__title {
  font-size: var(--text-display-s);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.backlink {
  white-space: nowrap;
  font-size: var(--text-md);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  text-decoration-color: var(--color-rule);
  transition: text-decoration-color var(--dur-micro) var(--ease-out),
              color var(--dur-micro) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .backlink:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); }
}

.backlink:active { color: var(--color-accent); text-decoration-color: var(--color-accent); }

/* ── One orchestrated entrance ────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: reveal var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  .reveal {
    transform: none;
    animation: reveal-reduced 150ms linear forwards;
    animation-delay: 0ms;
  }
  @keyframes reveal-reduced { to { opacity: 1; } }
}

/* ── Coarse pointers ──────────────────────────────────────────────────── */

@media (pointer: coarse) {
  .nav__cta,
  .foot__link { display: inline-flex; align-items: center; min-height: 44px; }
}
