/* Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V4
 * genre: editorial · macrostructure: Split Studio · theme: Almanac
 * tone: editorial · anchor hue: warm oat 78 · accent: deep rust 42
 * nav: N6 Newspaper masthead (issue line below wordmark · wordmark 2xl · single rule)
 * footer: Ft4 Dense colophon (serif · paragraphs · hours + address + credits)
 * hero: H2 Split diptych (ratio 7/5 · right side photo · divider negative space)
 * section heads: S2 Hanging · features: F3 Tabular spec sheet + F4 Step sequence
 * CTA: C1 Outlined chip (rectangular · spacious · no adornment) + C4 Sticky bottom bar
 * enrichment: none — real CC0 photography supplied by the project
 * motion: 2 primitives (one orchestrated load reveal · CTA hover lift)
 * contrast: pass (40–41) · nav: N6 · footer: Ft4 · 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 / base ───────────────────────────────────────────────────────── */

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

html {
  overflow-x: clip;
  -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-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-body);
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

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

figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  line-height: var(--leading-heading);
  letter-spacing: -0.018em;
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-toast);
  background: var(--color-paper);
  color: var(--color-ink);
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-thick) solid var(--color-ink);
}

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

:focus-visible {
  outline: var(--rule-thick) solid var(--color-focus);
  outline-offset: 3px;
}

/* ── Placeholders — every unconfirmed fact is visibly marked ────────────── */

.ph {
  background: var(--color-accent-soft);
  border-bottom: var(--rule-hair) dotted var(--color-accent);
  padding-inline: 0.2em;
  color: var(--color-ink);
}

.ph-block {
  max-width: var(--measure);
  margin-block: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-inline-start: var(--rule-thick) solid var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-ink);
}

.ph-figure__box {
  display: grid;
  align-content: center;
  gap: var(--space-2xs);
  aspect-ratio: 4 / 5;
  padding: var(--space-lg);
  border: var(--rule-hair) dashed var(--color-rule);
  background: var(--color-paper-2);
  text-align: center;
}

.ph-figure__label {
  font-family: var(--font-display);
  font-size: var(--text-md);
}

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

/* ── N6 · Newspaper masthead ────────────────────────────────────────────── */

.mast {
  display: grid;
  justify-items: center;
  gap: var(--space-2xs);
  padding: var(--space-xl) var(--page-gutter) 0;
  text-align: center;
}

.mast__name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: var(--leading-heading);
}

.mast__name a {
  text-decoration: none;
}

.mast__line {
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

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

.mast__nav a {
  display: inline-block;
  white-space: nowrap;
  padding-block: var(--space-2xs);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: var(--rule-hair) solid transparent;
  transition: border-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out);
}

.mast__nav a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.mast__nav a:active {
  color: var(--color-ink);
  border-bottom-color: var(--color-ink);
}

.mast__rule {
  width: 100%;
  border: 0;
  border-top: var(--rule-hair) solid var(--color-rule);
  margin: var(--space-md) 0 0;
}

/* ── Shared section shell ───────────────────────────────────────────────── */

main {
  display: block;
}

.hero,
.section {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

/* S2 · Hanging — heading floats in negative space, no rule, single column */
.head {
  padding-block: 0 var(--space-lg);
  max-width: var(--measure);
}

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

.head__note {
  max-width: var(--measure);
  margin-top: var(--space-md);
  color: var(--color-muted);
}

.lede {
  max-width: var(--measure);
  font-size: var(--text-md);
  color: var(--color-muted);
}

/* ── C1 · Outlined chip + typographic link ──────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-lg);
  padding: var(--space-sm) var(--space-lg);
  border: var(--rule-thick) solid var(--color-ink);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

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

/* A placeholder inside a chip keeps its dotted mark but drops the band. */
.chip .ph {
  background: transparent;
  border-bottom-color: currentColor;
  color: inherit;
}

.chip:active {
  transform: translateY(1px);
}

.chip--compact {
  min-height: var(--tap-min);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
}

.chip:disabled,
.chip[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  background: transparent;
  color: var(--color-muted);
  border-color: var(--color-rule);
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .chip:hover {
    transform: translateY(-1.5px);
  }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-lg);
  white-space: nowrap;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: var(--rule-thick) solid transparent;
  transition: border-color var(--dur-short) var(--ease-out);
}

.link-arrow::after {
  content: "→";
}

.link-arrow:hover {
  border-bottom-color: var(--color-accent);
}

/* ── H2 · Split diptych hero ────────────────────────────────────────────── */

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

.hero__title {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: -0.03em;
}

.hero__text > * + * {
  margin-top: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-xl);
}

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

/* ── F3 · Tabular spec sheet — the full-width grid-break ────────────────── */

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

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

.spec__caption {
  caption-side: top;
  padding-block: 0 var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: start;
}

.spec tr {
  border-top: var(--rule-hair) solid var(--color-rule);
}

.spec tr:last-child {
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.spec th,
.spec td {
  padding-block: var(--space-md);
  padding-inline-end: var(--space-lg);
  vertical-align: baseline;
  text-align: start;
  font-weight: 400;
}

.spec th {
  font-family: var(--font-display);
  font-weight: 700;
  width: 30%;
}

.spec td {
  color: var(--color-muted);
}

.spec__price {
  width: 8ch;
  padding-inline-end: 0;
  text-align: end;
  white-space: nowrap;
}

/* ── F4 · Step sequence, paired with a photo ────────────────────────────── */

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

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

.visit__figure figcaption,
.who__figure figcaption,
.lea__figure figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-lg);
}

.steps li {
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  max-width: var(--measure);
}

.steps__no {
  display: block;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.steps h3 {
  margin-top: var(--space-2xs);
  font-size: var(--text-md);
}

.steps p {
  margin-top: var(--space-xs);
  color: var(--color-muted);
}

/* ── Asymmetric photo composition ───────────────────────────────────────── */

.section--who {
  padding-block: var(--space-xl) var(--space-3xl);
}

.who__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
}

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

.who__figure--lead img {
  aspect-ratio: 4 / 3;
}

/* ── Lea — diptych, portrait placeholder ────────────────────────────────── */

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

.facts,
.hours {
  display: grid;
  gap: 0;
  margin: var(--space-lg) 0 0;
  max-width: var(--measure);
}

.facts > div,
.hours > div {
  display: grid;
  grid-template-columns: minmax(0, 12ch) minmax(0, 1fr);
  gap: var(--space-md);
  padding-block: var(--space-sm);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.facts > div:last-child,
.hours > div:last-child {
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.facts dt,
.hours dt {
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding-top: 0.25em;
}

.facts dd,
.hours dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ── Contact ────────────────────────────────────────────────────────────── */

.section--contact {
  padding-block: var(--space-xl) var(--space-3xl);
}

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

.contact__hours h3,
.contact__details h3 {
  font-size: var(--text-md);
}

.contact__note {
  max-width: var(--measure-tight);
  margin-block: var(--space-lg);
  color: var(--color-muted);
}

/* ── Ft4 · Dense colophon ───────────────────────────────────────────────── */

.colophon {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-lg) var(--page-gutter) var(--space-3xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-muted);
  hyphens: manual; /* "Y-tun-nus" is a legal break but an ugly one */
}

.colophon p {
  max-width: 72ch;
}

.colophon p + p {
  margin-top: var(--space-sm);
}

.colophon__legend {
  margin-top: var(--space-md);
}

/* ── C4 · Sticky bottom bar — narrow viewports only ─────────────────────── */

.callbar {
  position: fixed;
  inset-inline: 0;
  bottom: 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);
  padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom));
  background: var(--color-paper);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.callbar__note {
  font-size: var(--text-sm);
  color: var(--color-muted);
  white-space: nowrap;
}

body {
  padding-bottom: 5rem;
}

/* ── Load reveal — one orchestrated entrance, capped stagger ────────────── */

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

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

/* ── Breakpoints ────────────────────────────────────────────────────────── */

@media (min-width: 40rem) {
  .who__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .who__figure--lead {
    grid-row: 1 / span 2;
  }

  .who__figure--lead img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 22rem;
  }

  .contact__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--space-2xl);
  }
}

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

  /* Portrait crop keeps the hero inside a 1280×800 fold; 40% holds the dog. */
  .hero__figure img {
    aspect-ratio: 4 / 5;
    max-height: 30rem;
    object-position: 40% center;
  }

  .section--visit {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-2xl);
    align-items: start;
  }

  .visit__figure {
    position: sticky;
    top: var(--space-xl);
  }

  .section--lea {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-2xl);
    align-items: start;
  }

  .spec th {
    width: 26%;
  }

  .callbar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* Four Finnish nav labels can't share a row on a phone — 2×2 beats 3+1. */
@media (max-width: 29.99rem) {
  .mast__nav ul {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-content: center;
    column-gap: var(--space-lg);
  }
}

/* Table → stacked rows on phones */
@media (max-width: 39.99rem) {
  .spec,
  .spec tbody,
  .spec tr,
  .spec th,
  .spec td {
    display: block;
    width: auto;
  }

  .spec tr {
    padding-block: var(--space-md);
  }

  .spec th,
  .spec td {
    padding-block: 0;
    padding-inline-end: 0;
  }

  .spec td {
    margin-top: var(--space-2xs);
  }

  .spec__price {
    text-align: start;
    margin-top: var(--space-xs);
  }

  .facts > div,
  .hours > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2xs);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }

  .reveal {
    animation: reveal-reduced 150ms linear forwards;
    animation-delay: 0ms;
    transform: none;
  }

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

  .chip:hover {
    transform: none;
  }
}
