/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4
 * genre: editorial · macrostructure: Photographic · theme: Studio
 * tone: luxury · anchor hue: 85 (warm oat) · accent: forest green ~2% of viewport
 * enrichment: real photography (five supplied plates) — no generated imagery
 * nav: N9 edge-aligned minimal (CTA=outlined, wordmark=serif, padding=spacious)
 * footer: Ft4 dense colophon (family=serif, layout=paragraphs, includes=address+hours)
 * hero: H6 photographic fold (area=full-bleed, caption=plate-caption below, text below)
 * features: F3 tabular spec sheet (cols=2, rules=every row)
 * cta: C2 inline form (fields=3, submit=separate line) + C4 sticky bar (reveal=after fold, mobile)
 * motion: load-entrance · link-underline · bookbar-reveal  (three primitives, no scroll reveals)
 * slop test: 58/58 · contrast: pass (40–41) · nav/footer/hero: pass (42–45)
 * honest: pass (46) · chrome: pass (47) · tokens: pass (48) · mobile: pass (34, 49, 50–57)
 */

/* ═══ Reset & root ═════════════════════════════════════════════ */

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

/* Horizontal-scroll safety net lives on `html` only.
   `overflow-x: clip` on `body` as well makes Chrome drop the paint of the
   full-bleed fold images entirely (verified in this build) — so the Safari
   fallback is scoped to engines that lack `clip` in the first place. */
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;        /* the sticky nav must not cover an anchor target */
}
@supports not (overflow: clip) {
  body { overflow-x: hidden; }
}

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

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-style: normal;               /* headers are roman, always */
  margin: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}

p { margin: 0; }

a { color: var(--color-accent); }

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

:where(a, button):active { color: var(--color-accent-hover); }

:where(a, button, input, textarea, summary):focus-visible {
  /* never transitioned — the ring is instant */
  outline: var(--rule-emphasis) solid var(--color-focus);
  outline-offset: 3px;
}

/* ═══ Type registers ═══════════════════════════════════════════ */

.display {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--track-display);
}

.head {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-display-s);
  line-height: var(--leading-head);
  letter-spacing: var(--track-display);
}

.lede {
  font-size: var(--text-md);
  line-height: 1.5;
  max-width: 48ch;
}

.aside {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
  max-width: 46ch;
}

/* ═══ Nav · N9 ═════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) var(--page-gutter);
  background: var(--color-paper);
  border-bottom: var(--rule-hair) solid transparent;
  transition: border-color var(--dur-short) var(--ease-out);
}
.nav[data-stuck] { border-bottom-color: var(--color-rule); }

.nav__mark {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-ink);
}
.nav__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-md);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav__role {
  font-size: var(--text-xs);
  font-weight: var(--weight-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ═══ Chip · outlined CTA ══════════════════════════════════════ */

.chip {
  --chip-ink: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-xs) var(--space-lg);
  border: var(--rule-hair) solid var(--chip-ink);
  border-radius: var(--radius-none);
  background: transparent;
  color: var(--chip-ink);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-label);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;                /* clickable text never wraps */
  cursor: pointer;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out),
    border-color var(--dur-micro) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}
.chip:hover { background: var(--color-accent-wash); border-color: var(--color-accent-hover); color: var(--color-accent-hover); }
.chip:active { transform: translateY(1px); }
.chip[disabled], .chip[aria-disabled="true"] {
  --chip-ink: var(--color-neutral);
  cursor: not-allowed;
  background: transparent;
}
.chip--sm { min-height: 40px; padding-inline: var(--space-md); font-size: var(--text-xs); }

/* ═══ Photographic folds ═══════════════════════════════════════
   The image edge is the divider. No rules between folds. */

.fold__img {
  width: 100%;
  object-fit: cover;
  object-position: center;
}
/* Per-plate focal points — each photograph crops to its own subject. */
.fold__img[src*="pentu"] { object-position: 50% 32%; }
.fold__img[src*="laakitys"] { object-position: 50% 60%; }

.fold--hero  .fold__img { height: min(72dvh, 620px); }
.fold--mid   .fold__img { height: min(62dvh, 520px); }
.fold--short .fold__img { height: min(44dvh, 380px); }

/* Plate captions sit on paper beneath the photograph, not over it.
   An overlaid caption cannot clear 4.5:1 against a bright image region
   without a black scrim heavy enough to spoil the photograph. */
.fold__caption {
  padding: var(--space-sm) var(--page-gutter) 0;
  max-width: 52ch;
  color: var(--color-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
}

/* ═══ Bands — varied padding, never a uniform rhythm ═══════════ */

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

.band--statement {
  padding-block: var(--space-2xl) var(--space-2xl);
  display: grid;
  gap: var(--space-xl);
}
.band--statement .display { max-width: 14ch; }
.band__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--space-xl) var(--space-3xl);
  align-items: start;
  max-width: 78ch;
}

.band--services { padding-block: var(--space-2xl) var(--space-3xl); }
.band--vet { padding-block: var(--space-3xl) var(--space-2xl); }
.band--booking { padding-block: var(--space-2xl) var(--space-4xl); }

/* ═══ F3 Tabular spec sheet ════════════════════════════════════ */

.band--services .head { max-width: 20ch; margin-bottom: var(--space-xl); }

.spec { margin: 0; border-top: var(--rule-hair) solid var(--color-rule); }
.spec__row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: var(--space-sm) var(--space-xl);
  padding-block: var(--space-lg);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}
.spec__key {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: 0.005em;
}
.spec__val { margin: 0; color: var(--color-muted); max-width: 58ch; }

/* ═══ Vet — the one deliberate grid-break ══════════════════════
   The plate hangs above the band's top edge into the photo band. */

.band--vet {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: var(--space-3xl);
  align-items: start;
}
.plate { margin: calc(var(--space-3xl) * -1) 0 0; }
.plate img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.plate figcaption {
  margin-top: var(--space-sm);
  color: var(--color-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}
.vet__text { display: grid; gap: var(--space-md); max-width: var(--measure); }
.vet__text .head { margin-bottom: var(--space-xs); }

/* ═══ Booking ══════════════════════════════════════════════════ */

.band--booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--space-3xl);
  align-items: start;
  border-top: var(--rule-hair) solid var(--color-rule);
}
.booking__intro { display: grid; gap: var(--space-md); max-width: 46ch; }
.booking__tel { display: grid; gap: var(--space-2xs); margin-top: var(--space-sm); }

.tel {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: var(--rule-hair) solid var(--color-rule-strong);
  justify-self: start;
  transition: border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.tel:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }

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

.booking__ok {
  grid-column: 1 / -1;
  padding: var(--space-lg);
  background: var(--color-accent-wash);
  border: var(--rule-hair) solid var(--color-accent);
}

/* ═══ Form ═════════════════════════════════════════════════════ */

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}
.field { display: grid; gap: var(--space-2xs); }
.field--wide { grid-column: 1 / -1; }

.field label {
  font-size: var(--text-xs);
  font-weight: var(--weight-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-none);
  background: var(--color-paper-2);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.field textarea { resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--color-ink); }
.field input:focus, .field textarea:focus { background: var(--color-paper); border-color: var(--color-accent); }
.field input[disabled], .field textarea[disabled] { color: var(--color-neutral); background: var(--color-paper-3); cursor: not-allowed; }

.field[data-invalid] input,
.field[data-invalid] textarea {
  border-color: var(--color-danger);
  box-shadow: inset 0 0 0 1px var(--color-danger);   /* thickens optically; border-width never moves */
}

.field__hint { color: var(--color-muted); font-size: var(--text-sm); }
/* The message slot is always reserved, so an appearing error never shifts the page. */
.field__err {
  min-height: 1lh;
  color: var(--color-danger);
  font-size: var(--text-sm);
}
.field__err[data-quiet] { visibility: hidden; }

.form__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-xs);
}
.form__note { color: var(--color-muted); font-size: var(--text-sm); max-width: 38ch; }

.chip--submit { position: relative; }
.chip__spin { display: none; }
.chip--submit[data-loading] .chip__label { visibility: hidden; }
.chip--submit[data-loading] .chip__spin {
  display: block;
  position: absolute;
  inset: 50% auto auto 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: var(--rule-emphasis) solid var(--color-neutral);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Ft4 Dense colophon ═══════════════════════════════════════ */

.colophon {
  padding: var(--space-2xl) var(--page-gutter) var(--space-xl);
  background: var(--color-paper-2);
  border-top: var(--rule-hair) solid var(--color-rule);
}
.colophon__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl) var(--space-3xl);
  max-width: 62rem;
}
.colophon__block {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
  max-width: 48ch;
}
.colophon__label {
  display: block;
  margin-bottom: var(--space-2xs);
  color: var(--color-ink);
  font-size: var(--text-xs);
  font-weight: var(--weight-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.colophon a {
  color: var(--color-muted);
  text-decoration-color: var(--color-rule-strong);
  text-underline-offset: 3px;
  transition: color var(--dur-micro) var(--ease-out), text-decoration-color var(--dur-micro) var(--ease-out);
}
.colophon a:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); }

.colophon__foot {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  color: var(--color-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
}

/* ═══ C4 Sticky bookbar — mobile only ══════════════════════════ */

.bookbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: var(--z-sticky);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-xs) var(--page-gutter);
  background: var(--color-paper);
  border-top: var(--rule-hair) solid var(--color-rule);
  transform: translateY(100%);
  transition: transform var(--dur-short) var(--ease-out);
}
.bookbar[data-shown] { transform: translateY(0); }
.bookbar__line {
  min-width: 0;                        /* must be able to ellipsis, not push the CTA out */
  color: var(--color-muted);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══ Page-load entrance — the page's only orchestrated motion ══ */

[data-reveal] {
  opacity: 0;
  transform: translateY(6px);
  animation: reveal var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ═══ Responsive ═══════════════════════════════════════════════ */

@media (max-width: 60rem) {
  .band__cols { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }

  .band--vet {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
    padding-block: var(--space-2xl) var(--space-xl);
  }
  .plate { margin-top: 0; max-width: 22rem; }

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

  .spec__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); padding-block: var(--space-md); }
  .spec__val { max-width: none; }

  .colophon__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .bookbar { display: flex; }
  .colophon { padding-bottom: calc(var(--space-3xl) + env(safe-area-inset-bottom)); }
}

@media (max-width: 40rem) {
  .nav { padding-block: var(--space-md); }
  .nav__mark { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav__role { font-size: 0.62rem; }

  .fold--hero  .fold__img { height: min(56dvh, 420px); }
  .fold--mid   .fold__img { height: min(42dvh, 320px); }
  .fold--short .fold__img { height: min(32dvh, 260px); }
  .fold__caption { font-size: var(--text-xs); }

  .band--statement { padding-block: var(--space-2xl) var(--space-xl); }
  .band--statement .display { max-width: none; }
  .lede { font-size: var(--text-base); max-width: none; }

  .form { grid-template-columns: minmax(0, 1fr); }
  .form__foot { align-items: stretch; }
  .chip--submit { width: 100%; }

  .colophon__grid { gap: var(--space-lg); }
}

/* Small phones (≤ 416 px). The nav's wordmark + CTA are both nowrap, so at
   320 px the row must give back padding rather than push the CTA off-screen. */
@media (max-width: 26rem) {
  .nav { gap: var(--space-sm); padding-inline: var(--space-md); }
  .nav .chip { padding-inline: var(--space-sm); letter-spacing: 0.04em; }
  .nav .chip span[aria-hidden] { display: none; }
  .nav__name { font-size: var(--text-base); }
  .bookbar { padding-inline: var(--space-md); }
  .bookbar .chip { padding-inline: var(--space-sm); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  [data-reveal] { animation: reveal 150ms linear forwards; animation-delay: 0ms; }
  .bookbar { transition: opacity 150ms linear; transform: none; opacity: 0; }
  .bookbar[data-shown] { opacity: 1; }
  .chip__spin { animation-duration: 700ms !important; animation-iteration-count: infinite !important; }
}
