/* ANA Paws N Claws — public landing page. One column on a stone ground, a few full
   colour bands, square corners, flat colour, one face. */

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg: #eeecea;
  --surface: #e4e1dd;
  --sand: #cdc3b6;
  --ink: #262624;
  --muted: #55524e;
  --accent: #1e6b3c;
  --accent-ink: #ffffff;
  --green: #1d4a31;
  --paper: #f3f3f1;
  --orange: #f0953a;
  --live: #7fd49a;
  --coat: #a89070; /* the dog's muddy coat; main.js keeps the same colour in MUD */
  --focus: var(--accent);
  --ring: var(--focus); /* focus ring: 3:1 or better on the surface it sits on */
  --sheet: var(--paper); /* the printed things: price sheet, Visit card, the name field */
  --night: var(--ink); /* the dark bands: Visit, and the slip's total line */
  --nose: #262624; /* the dog's nose and ear shadow, the same in both schemes */
  --paper-hover: #cdc3b6;
  --tooth: 10px; /* depth of the torn paper edge */

  --step-small: 1rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --step-display: clamp(2.75rem, 1.6rem + 3.6vw, 5rem);

  --edge: 12px;
  --pad: clamp(20px, 4vw, 64px);
  --gap: clamp(96px, 12vw, 180px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark, only when the visitor asks for it with the header switch: the page is light by
   default whatever the device says. The green and paper bands keep their colours; the
   ground, the printed sheets and the ink turn. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1a18;
  --surface: #262622;
  --sand: #3a342c;
  --ink: #ecebe7;
  --muted: #b3aea6;
  --focus: #7cc797;
  --sheet: #22221f;
  --night: #0e0e0d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, figure { margin: 0; }
p { text-wrap: pretty; }
h1, h2 { font-weight: 400; letter-spacing: -0.02em; line-height: 1.02; text-wrap: balance; }
a { color: inherit; }
::placeholder { color: var(--muted); opacity: 1; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.hero, .reviews, .visit { --ring: var(--orange); }
.card, .out { --ring: var(--focus); }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.skip:focus { top: 12px; }

/* Buttons: flat, square, one fill */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none;
  transition: background-color 200ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--green); }
.btn:active { transform: translateY(2px) scale(0.98); }
.btn--small { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }
.btn--block { display: flex; width: 100%; }
.quiet { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-underline-offset: 4px; transition: opacity 200ms; }
.quiet:hover { opacity: 0.7; }

.bar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 20px calc(var(--edge) + var(--pad));
}
.bar__mark { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; margin-right: auto; }
.bar__nav { display: flex; gap: 22px; font-size: var(--step-small); }
.bar__nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; transition: opacity 200ms; }
.bar__nav a:hover { opacity: 0.6; }
.theme {
  display: none; place-items: center; width: 44px; height: 44px;
  background: none; border: 0; color: inherit; cursor: pointer; transition: opacity 200ms;
}
.js .theme { display: inline-grid; }
.theme:hover { opacity: 0.6; }
.theme svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme__sun { display: none; }
[data-theme="dark"] .theme__sun { display: inline; }
[data-theme="dark"] .theme__moon { display: none; }

main > section { padding: 0 var(--pad); margin: var(--gap) var(--edge) 0; }
/* Sections with no band of their own would land flush under the top edge; the banded ones already have padding. */
.trip, .write { scroll-margin-top: clamp(48px, 7vw, 96px); }
[tabindex="-1"]:focus { outline: none; } /* sections focused by an in-page link, not by the user */

/* iPad and up: the bar (with the section links) stays at the top; sections stop below it. */
@media (min-width: 640px) {
  .bar {
    position: sticky; top: 0; z-index: 6; background: var(--bg);
    transition: box-shadow 200ms var(--ease);
  }
  .bar.is-stuck { box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 12%, transparent), 0 8px 24px rgb(0 0 0 / 0.06); }
  .menu, .reviews, .visit { scroll-margin-top: 84px; }
  .trip, .write { scroll-margin-top: calc(84px + clamp(24px, 4vw, 64px)); }
}

/* ---------- Hero ---------- */
/* The hero is a green field: the words on the left, the dog groomed on a loop on the right. */
.hero { margin-top: 0 !important; padding: 0 !important; background: var(--green); color: var(--paper); }
.hero__stage {
  display: grid; align-content: center; gap: 28px;
  min-height: calc(100svh - 2 * var(--edge)); padding: clamp(28px, 5vw, 72px) var(--pad);
}
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.hero h1 .w > span { display: inline-block; }
.hero h1 { font-size: clamp(2.75rem, 1rem + 4.2vw, 5.25rem); max-width: 14ch; }
.hero__lead { margin-top: 24px; max-width: 36ch; font-size: var(--step-lead); line-height: 1.35; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.hero .btn { background: var(--paper); color: var(--green); }
.hero .btn:hover { background: var(--paper-hover); }
.now { display: flex; align-items: center; gap: 10px; margin-top: 24px; opacity: 0.85; }
.now::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: 0.5; flex: none; }
.now.is-open::before { background: var(--live); opacity: 1; animation: pulse 2.4s var(--ease) infinite; }

.dog { display: grid; gap: 12px; justify-items: center; }
.dog svg { width: 100%; max-height: 52svh; overflow: visible; }
html:not(.js) .dog { display: none; }
.dog__body { fill: var(--coat); }
.dog__ear { fill: var(--nose); opacity: 0.16; }
.dog__eye { fill: var(--green); }
.dog__nose { fill: var(--nose); }
.dog__bandana { fill: var(--orange); transform-box: fill-box; transform-origin: 50% 0; transform: scale(0.3); opacity: 0; transition: transform 500ms var(--ease), opacity 200ms; }
.dog.dressed .dog__bandana { transform: scale(1); opacity: 1; }
.dog__bubbles circle, .dog__tufts path { transform-box: fill-box; transform-origin: center; }
.dog__bubbles circle { fill: var(--paper); fill-opacity: 0.18; stroke: var(--paper); stroke-width: 3; opacity: 0; }
.dog__tufts path { fill: none; stroke: var(--coat); stroke-width: 4; stroke-linecap: round; }
.dog svg { animation: breathe 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes breathe { 50% { transform: scale(1.012, 1.02); } }
.dog figcaption { font-size: var(--step-lead); min-height: 1.4em; text-align: center; }
.dog figcaption.swap { animation: flash 420ms var(--ease); }
.dog.paused svg, .dog.offscreen svg { animation-play-state: paused; }
.dog__pause {
  min-height: 44px; padding: 0 12px; background: none; border: 0; color: inherit;
  font: inherit; font-size: var(--step-small); text-decoration: underline; text-underline-offset: 4px;
  cursor: pointer; opacity: 0.8; transition: opacity 200ms;
}
.dog__pause:hover { opacity: 1; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: 0.55; } }
.hero__phone { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--step-lead); font-variant-numeric: tabular-nums; text-underline-offset: 6px; }

/* ---------- Services: a printed list on a sand ground ---------- */
.menu { margin-top: clamp(64px, 7vw, 104px) !important; background: var(--sand); padding-block: clamp(48px, 7vw, 96px); }
.sheet {
  max-width: 560px; margin-inline: auto;
  background: var(--sheet);
  padding: clamp(40px, 5vw, 64px) clamp(20px, 4vw, 48px);
  --edge-top: conic-gradient(from 135deg at 50% 0, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / calc(2 * var(--tooth)) var(--tooth) repeat-x;
  --edge-bottom: conic-gradient(from -45deg at 50% 100%, #0000, #000 1deg 89deg, #0000 90deg) 0 100% / calc(2 * var(--tooth)) var(--tooth) repeat-x;
  mask: var(--edge-top), var(--edge-bottom), linear-gradient(#000 0 0) 0 var(--tooth) / 100% calc(100% - 2 * var(--tooth)) no-repeat;
}
.sheet h2 { font-size: var(--step-head); text-align: center; margin-bottom: 40px; }
.sheet__group + .sheet__group { margin-top: 44px; }
.sheet h3, .slip h3 { font-size: var(--step-body); font-weight: 600; margin: 0 0 10px; }
.sheet__group > p { margin-top: 12px; font-size: var(--step-small); color: var(--muted); max-width: 40ch; }

/* Rows with a dot leader between name and value (menu and slip) */
.sheet dl > div, .slip dl > div { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; }
/* A wrapped row leads the eye along its last line, where the name ends and the value finishes. */
.sheet dl > div, .slip dl > div { align-items: last baseline; }
/* A row too long for a phone wraps inside the name and the value, each in its own column,
   rather than dropping the value onto a line of its own under a leader that points at nothing. */
.sheet dt, .slip dt { flex: 0 1 auto; min-width: 0; }
.sheet dd, .slip dd { flex: 0 1 auto; min-width: 0; max-width: 55%; order: 3; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.sheet dl > div::after, .slip dl > div::after {
  content: ''; order: 2; flex: 1 0 16px;
  border-bottom: 4px dotted currentColor; opacity: 0.35; transform: translateY(-5px);
}

/* ---------- First stay: an itinerary slip ---------- */
.trip > p { margin-top: 24px; max-width: 34ch; }
.trip h2 { font-size: var(--step-head); }
.slip {
  margin-top: 48px; max-width: 480px;
  padding: 8px clamp(20px, 3vw, 32px) 40px;
  font-variant-numeric: tabular-nums;
  mask: conic-gradient(from -45deg at 50% 100%, #0000, #000 1deg 89deg, #0000 90deg) 0 100% / calc(2 * var(--tooth)) var(--tooth) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--tooth)) no-repeat;
  background-color: var(--surface);
}
.slip h3 { margin-top: 28px; }
.slip__total {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 28px calc(-1 * clamp(20px, 3vw, 32px)) 0;
  padding: 12px clamp(20px, 3vw, 32px);
  background: var(--night); color: var(--paper); font-weight: 600;
}

/* ---------- Reviews ---------- */
.reviews { background: var(--green); color: var(--paper); padding-block: clamp(56px, 8vw, 112px); }
.reviews h2 { font-size: var(--step-display); max-width: 9ch; }
.score { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 36px; }
.score p { max-width: 30ch; }
.stars { width: 180px; height: auto; fill: var(--orange); }
.stars use { transform-box: fill-box; transform-origin: center; }
.reviews__links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }
.reviews .btn { background: var(--paper); color: var(--green); }
/* Real words from real owners, put in by build.mjs from Google; absent when there are none. */
.quotes { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 28px; }
.quotes blockquote { margin: 0; font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; }
.quotes blockquote p::before { content: '\201C'; }
.quotes blockquote p::after { content: '\201D'; }
.quotes__who { margin-top: 10px; font-size: var(--step-small); }

/* ---------- Phone booking bar (main.js shows it once the hero has gone) ---------- */
.dock { display: none; }
.reviews .btn:hover { background: var(--paper-hover); }

/* ---------- Text Ana (the live thing) ---------- */
.write h2 { font-size: var(--step-head); }
.builder { margin-top: 36px; display: grid; gap: 28px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 12px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--muted); cursor: pointer; user-select: none;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 140ms var(--ease);
}
.chips label:hover span { background: var(--sand); }
.chips input:active + span { transform: scale(0.96); }
.chips input:checked + span { background: var(--ink); color: var(--bg); box-shadow: none; }
.chips input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 2px; }
.field { display: grid; gap: 10px; max-width: 22rem; }
.field span { font-weight: 600; }
.field input {
  font: inherit; color: var(--ink); min-height: 52px; padding: 0 16px;
  background: var(--sheet); border: 2px solid var(--muted); border-radius: 0;
  transition: border-color 180ms;
}
.field input:focus { border-color: var(--focus); }
.out { margin-top: 40px; background: var(--surface); padding: clamp(20px, 3vw, 32px); }
.message { font-size: var(--step-lead); line-height: 1.35; margin-bottom: 24px; min-height: 3.6em; }
.message.flash { animation: flash 420ms var(--ease); }
@keyframes flash { from { opacity: 0.35; transform: translateY(4px); } }
.out__note { margin-top: 16px; font-size: var(--step-small); color: var(--muted); }

/* ---------- Visit: full width ---------- */
.visit {
  display: grid; gap: 40px; align-items: start;
  margin: var(--gap) var(--edge) 0;
  padding: clamp(40px, 6vw, 96px) var(--pad);
  background: var(--night); color: var(--paper);
}
.visit h2 { font-size: var(--step-head); }
.visit__text p { margin-top: 24px; max-width: 34ch; }
.visit__logo { display: block; width: 100%; max-width: 320px; height: auto; margin-top: 32px; }
.card { background: var(--sheet); color: var(--ink); padding: 32px; max-width: 400px; display: grid; gap: 18px; }
.card__hours { font-variant-numeric: tabular-nums; }
.card__hours div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.card__hours dt { color: var(--muted); }
.card__phone { display: flex; align-items: center; min-height: 44px; font-size: var(--step-lead); text-underline-offset: 5px; }

/* ---------- Footer: one quiet line ---------- */
.foot {
  display: grid; gap: 8px;
  padding: clamp(72px, 12svh, 140px) calc(var(--pad) + var(--edge)) 28px;
  font-size: var(--step-small); color: var(--muted);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* Wide screens: the sections sit as two columns, each closed on the right */
@media (min-width: 960px) {
  .hero__stage { grid-template-columns: 1fr 1.1fr; align-items: center; column-gap: clamp(40px, 5vw, 96px); }
  .dog svg { max-height: 60svh; }
  .trip, .reviews, .write, .visit { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(40px, 6vw, 120px); align-items: start; }
  .trip > h2, .trip > p { grid-column: 1; }
  .trip .slip { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; max-width: none; }
  .reviews h2 { grid-row: 1 / span 2; }
  .reviews .score { margin-top: 0; }
  .reviews .quotes, .reviews .reviews__links { grid-column: 2; }
  .write h2 { grid-column: 1 / -1; }
  .write .out { margin-top: 36px; }
  .visit { align-items: end; }
  .visit .card { justify-self: end; width: 100%; }
  .foot { grid-template-columns: 1fr auto 1fr; align-items: baseline; }
  .foot > p:last-child { text-align: right; }
}
@media (max-width: 639px) {
  .bar__nav { display: none; }
  .bar { gap: 8px; } /* mark, theme switch and Call Ana on one line at 390 */
  .js .dock {
    position: fixed; inset: auto 0 0; z-index: 5;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 10px var(--edge) calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--bg); box-shadow: 0 -8px 24px rgb(0 0 0 / 0.14);
    transform: translateY(110%); visibility: hidden;
    transition: transform 320ms var(--ease), visibility 0s 320ms;
  }
  .js .dock.is-shown { transform: none; visibility: visible; transition: transform 320ms var(--ease); }
  .dock .btn { min-height: 48px; padding: 0 12px; }
  .dock__text { background: var(--ink); color: var(--bg); }
  .dock__text:hover { background: var(--muted); }
  /* The footer's last links would sit under the bar. */
  .js .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 959px) {
  .hero__stage { gap: 16px; }
  .hero__lead { margin-top: 14px; font-size: var(--step-body); }
  .hero__actions { margin-top: 20px; }
  .now { margin-top: 14px; }
  .dog svg { max-height: 34svh; }
}

/* ---------- Motion (script adds .js; content shows without it) ---------- */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .rise.in { opacity: 1; transform: none; }
.js .hero h1 .w > span { animation: word 900ms var(--ease) both; }
.js .hero h1 .w:nth-child(2) > span { animation-delay: 70ms; }
.js .hero h1 .w:nth-child(3) > span { animation-delay: 140ms; }
.js .hero h1 .w:nth-child(4) > span { animation-delay: 210ms; }
.js .hero h1 .w:nth-child(5) > span { animation-delay: 280ms; }
@keyframes word { from { transform: translateY(105%); } }
.js .rise dl > div::after { transform: translateY(-5px) scaleX(0); transform-origin: left; transition: transform 900ms var(--ease) 250ms; }
.js .rise.in dl > div::after { transform: translateY(-5px) scaleX(1); }
.js .stars use { transform: scale(0.4); opacity: 0; transition: transform 500ms var(--ease), opacity 300ms; }
.js .score.in .stars use { transform: scale(1); opacity: 1; }
.js .score.in .stars use:nth-of-type(2) { transition-delay: 80ms; }
.js .score.in .stars use:nth-of-type(3) { transition-delay: 160ms; }
.js .score.in .stars use:nth-of-type(4) { transition-delay: 240ms; }
.js .score.in .stars use:nth-of-type(5) { transition-delay: 320ms; }

/* Windows high contrast drops background colours: mark the chosen chip another way. */
@media (forced-colors: active) {
  .chips input:checked + span { outline: 3px solid Highlight; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; animation: none !important; }
  .js .rise { transform: none; }
}
