/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4 (E raised 4→5 after revision pass)
 * Hallmark · genre: editorial · macrostructure: Photographic
 * H6 hero knobs: image=full-bleed, caption=lower-left, text=below
 * F3 hinnasto knobs: columns=2 (key/val), rules=every row, numbers=tabular
 * nav: N9 edge-aligned minimal (knobs: cta=text+arrow, wordmark=display-caps, padding=spacious)
 * footer: Ft1 mast-headed (knobs: wordmark=display 3xl, tagline=roman, links=inline)
 * theme: custom · vibe: "pinkki kioski, liitutaulu, kesä"
 * paper: oklch(97% 0.010 355) · accent: oklch(62% 0.19 358)
 * display: Cabinet Grotesk 800 · body: Newsreader 400
 * axes: light / display-heavy / chromatic-pink ~358°
 * enrichment: none generated — 3 user-supplied photographs, full-bleed
 * studied: no · context: inferred (audience/use/tone) · v1.1.0
 * 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");

/* ========================================================================
   Base
   ======================================================================== */

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

html,
body {
  overflow-x: clip;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  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-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

/* Focus is instant and always visible. Never transitioned. */
:focus-visible {
  outline: var(--rule-thick) solid var(--color-focus);
  outline-offset: var(--space-2xs);
}

.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(var(--space-md) * -4);
  z-index: var(--z-sticky);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-board);
  color: var(--color-chalk);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip:focus {
  top: var(--space-md);
}

/* ========================================================================
   Shared layout
   ======================================================================== */

.wrap {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}

/* Small tracked caps — the kiosk's own sign voice. */
.tag {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ========================================================================
   Nav · N9 edge-aligned minimal
   ======================================================================== */

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

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-md);
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-ink);
  white-space: nowrap;
}

.nav__wordmark:active {
  color: var(--color-accent-deep);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding-inline: var(--space-2xs);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: text-decoration-thickness var(--dur-micro) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav__cta:hover {
    text-decoration-thickness: var(--rule-thick);
  }
}

.nav__cta:active {
  color: var(--color-ink);
  text-decoration-thickness: var(--rule-thick);
}

/* ========================================================================
   Photo folds · the image edge is the divider
   ======================================================================== */

.fold {
  margin-block-start: var(--space-md);
}

.fold__figure {
  margin: 0;
  position: relative;
}

.fold__img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.fold--tall .fold__img {
  aspect-ratio: 4 / 5;
}

/* A portrait plate at full container width runs ~1400 px on a laptop — too
   much scroll for one photograph. Cap it to a screen-ish height. */
@media (min-width: 60rem) {
  .fold__img {
    max-block-size: 76svh;
  }

  .fold--tall .fold__img {
    aspect-ratio: 3 / 4;
  }
}

.fold__caption {
  padding-block-start: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
  letter-spacing: 0.01em;
}

/* ========================================================================
   Hero · H6 photographic fold, caption lower-left, text below
   ======================================================================== */

.hero {
  padding-block-end: var(--space-2xl);
}

.hero__figure {
  margin: 0;
  position: relative;
}

.hero__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Gate 44b — the fold must be a complete composition. Cap the plate so the
   image + caption resolve inside one screen and the headline starts clean. */
@media (min-width: 60rem) {
  .hero__img {
    aspect-ratio: 16 / 9;
    max-block-size: calc(100svh - 12rem);
  }
}

.hero__caption {
  padding-block-start: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
  opacity: 0;
  animation: settle var(--dur-long) var(--ease-out) 160ms forwards;
}

.hero__body {
  padding-block-start: var(--space-2xl);
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: minmax(0, 1fr);
}

.hero__display {
  font-size: var(--text-display);
  line-height: 1.04;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 16ch;
  opacity: 0;
  animation: settle var(--dur-long) var(--ease-out) forwards;
}

.hero__lede {
  font-size: var(--text-md);
  line-height: 1.55;
  max-width: 46ch;
  color: var(--color-ink-2);
}

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

@keyframes settle {
  to {
    opacity: 1;
  }
}

/* ========================================================================
   Hinnasto · the chalkboard band · F3 tabular spec sheet
   ======================================================================== */

.board {
  background: var(--color-board);
  color: var(--color-chalk);
  padding-block: var(--space-3xl) var(--space-2xl);
  margin-block-start: var(--space-2xl);
}

/* S2 hanging head — single column, no rule, no eyebrow. */
.board__head {
  font-size: var(--text-3xl);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-chalk);
  overflow-wrap: anywhere;
  min-width: 0;
}

.board__intro {
  margin-block-start: var(--space-md);
  max-width: 46ch;
  color: var(--color-chalk-2);
}

.board__groups {
  margin-block-start: var(--space-2xl);
  display: grid;
  gap: var(--space-2xl);
  grid-template-columns: minmax(0, 1fr);
}

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

.group__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-chalk-2);
  padding-block-end: var(--space-sm);
  border-block-end: var(--rule-hair) solid var(--color-rule-chalk);
}

/* No column-gap: the two cells' bottom borders must meet, so the hairline
   runs unbroken from the item name to its price — as it does on the board. */
.price {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  font-variant-numeric: tabular-nums;
}

.price dt {
  padding-block: var(--space-sm);
  padding-inline-end: var(--space-md);
  border-block-end: var(--rule-hair) solid var(--color-rule-chalk);
  min-width: 0;
  overflow-wrap: anywhere;
}

.price dd {
  margin: 0;
  padding-block: var(--space-sm);
  border-block-end: var(--rule-hair) solid var(--color-rule-chalk);
  text-align: right;
  white-space: nowrap;
  color: var(--color-chalk);
}

.group__title--next {
  margin-block-start: var(--space-xl);
}

.group__note {
  padding-block-start: var(--space-md);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-chalk-2);
  max-width: 46ch;
}

/* The rule spans the column; the measure is held on the paragraph inside,
   so the hairline reads as a section divider rather than a stub. */
.board__foot {
  margin-block-start: var(--space-2xl);
  padding-block-start: var(--space-md);
  border-block-start: var(--rule-hair) solid var(--color-rule-chalk);
  font-size: var(--text-sm);
  color: var(--color-chalk-2);
}

.board__foot p {
  max-width: 52ch;
}

/* ========================================================================
   Löydä meidät
   ======================================================================== */

.find {
  padding-block: var(--space-3xl) var(--space-2xl);
}

.find__head {
  font-size: var(--text-2xl);
  line-height: 1.1;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  min-width: 0;
}

.find__grid {
  margin-block-start: var(--space-xl);
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 60rem) {
  .find__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-3xl);
  }
}

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.facts dt {
  padding-block-start: var(--space-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.facts dd {
  margin: 0;
  padding-block: var(--space-2xs) var(--space-md);
  border-block-end: var(--rule-hair) solid var(--color-rule);
  font-size: var(--text-md);
  min-width: 0;
  overflow-wrap: anywhere;
}

.find__note {
  max-width: 46ch;
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--color-ink-2);
}

.find__action {
  margin-block-start: var(--space-md);
}

/* A number-shaped hole is honest; a made-up number is not. */
.pending {
  color: var(--color-muted);
  font-size: var(--text-base);
}

/* C3 typographic link — a word, a rule, an arrow. */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 44px;
  color: var(--color-accent-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: text-decoration-thickness var(--dur-micro) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .tlink:hover {
    text-decoration-thickness: var(--rule-thick);
  }
}

.tlink:active {
  color: var(--color-ink);
  text-decoration-thickness: var(--rule-thick);
}

/* ========================================================================
   Footer · Ft1 mast-headed
   ======================================================================== */

.foot {
  border-block-start: var(--rule-thick) solid var(--color-ink);
  padding-block: var(--space-2xl);
  background: var(--color-paper-2);
}

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

.foot__logo {
  width: 88px;
  height: auto;
  /* The supplied logo is black-on-white JPG; multiply drops the white ground. */
  mix-blend-mode: multiply;
}

/* Deliberately the body serif, not the display grotesque: the page's two loud
   type moments are the hero and HINNASTO. The sign-off closes quietly. */
.foot__statement {
  font-family: var(--font-body);
  font-size: var(--text-3xl);
  line-height: 1.05;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  min-width: 0;
}

.foot__meta {
  margin-block-start: var(--space-xl);
  padding-block-start: var(--space-md);
  border-block-start: var(--rule-hair) solid var(--color-rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.foot__link {
  white-space: nowrap;
  color: var(--color-ink-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: text-decoration-thickness var(--dur-micro) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .foot__link:hover {
    text-decoration-thickness: var(--rule-thick);
  }
}

.foot__link:active {
  color: var(--color-accent-deep);
  text-decoration-thickness: var(--rule-thick);
}

/* ========================================================================
   Small viewports
   ======================================================================== */

@media (max-width: 40rem) {
  .hero__img {
    aspect-ratio: 4 / 5;
  }

  .board__head {
    font-size: var(--text-2xl);
  }

  .foot__statement {
    font-size: var(--text-2xl);
  }

  .fold__img,
  .fold--tall .fold__img {
    aspect-ratio: 1 / 1;
  }
}

@media (pointer: coarse) {
  .nav__cta,
  .tlink {
    min-height: 48px;
  }
}

/* ========================================================================
   Reduced motion
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
  .hero__display,
  .hero__caption {
    animation-duration: 150ms;
    animation-delay: 0ms;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
