/* Bark&Bath preview. Single light theme (brief allows). Radius rule: buttons pill, panels 20px, inputs 12px. */
:root {
  --cream: #fbf3e4;
  --on-cream: #1f2b2a;
  --on-cream-muted: #4a5755;
  --apricot: #f5dcc0;
  --on-apricot: #1f2b2a;
  --teal: #0f5c5a;
  --on-teal: #fbf3e4;
  --teal-ink: #0b4644;
  --on-teal-ink: #fbf3e4;
  --ink: #1f2b2a;
  --on-ink: #fbf3e4;
  --paper: #fffaf1;
  --on-paper: #1f2b2a;
  --terracotta: #b95a36; /* illustration strokes only */
  --error: #9b2c1f;
  --line: #d9c7ad;

  --display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, sans-serif;
  --r-panel: 20px;
  --r-input: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--on-cream);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-wrap: anywhere;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* Preview ribbon: in flow, never covers anything */
.ribbon {
  background: var(--ink);
  color: var(--on-ink);
  font-size: 0.8125rem;
  text-align: center;
  padding: 6px 16px;
}

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.mark { font-family: var(--display); font-weight: 600; font-size: 1.5rem; text-decoration: none; color: var(--on-cream); letter-spacing: -0.02em; }
.mark span { color: var(--teal); display: inline-block; transition: transform 0.3s var(--ease-out); }
@media (hover: hover) { .mark:hover span { transform: rotate(-12deg) scale(1.1); } }
.top .top-call { display: none; }
@media (min-width: 768px) { .top .top-call { display: inline-flex; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 700 1rem/1 var(--body); text-decoration: none; white-space: nowrap;
  border: 2px solid var(--teal); cursor: pointer;
  position: relative; isolation: isolate; overflow: hidden;
  transition: scale 0.15s ease-out;
}
/* Hover: the fill rises like bathwater. Only transform animates. */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(102%);
  transition: transform 0.3s var(--ease-out);
}
.btn:active { scale: 0.96; }
.btn-solid { background: var(--teal); color: var(--on-teal); }
.btn-solid::before { background: var(--teal-ink); }
.btn-ghost { background: var(--cream); color: var(--on-cream); }
.btn-ghost::before { background: var(--apricot); }
@media (hover: hover) {
  .btn:hover::before { transform: none; }
  .btn-solid:hover { border-color: var(--teal-ink); }
}

/* Hero */
.hero { display: grid; gap: 24px; padding-block: 8px 48px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 9vw, 4.5rem); max-width: 15ch; text-wrap: balance; }
.lede { margin-top: 18px; font-size: 1.1875rem; max-width: 34ch; color: var(--on-cream-muted); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { max-width: 460px; justify-self: center; width: 100%; }
@media (min-width: 880px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; padding-block: 32px 88px; }
  .hero-art { justify-self: end; }
}
@media (max-width: 400px) { .ctas .btn { width: 100%; } }

.blob { fill: var(--apricot); }
.b circle { stroke: var(--teal); stroke-width: 3; }
.b .hi { stroke: var(--terracotta); stroke-width: 4; }
.b1 circle { stroke-width: 4; fill: var(--paper); }
.b2 circle, .b4 circle, .b7 circle { stroke: var(--terracotta); }
.art-word { font-family: var(--display); font-weight: 600; font-size: 44px; fill: var(--teal); letter-spacing: -1px; }
.art-sub { font-family: var(--body); font-weight: 700; font-size: 17px; fill: var(--on-cream-muted); letter-spacing: 1px; }

/* Proof */
.proof { background: var(--teal); color: var(--on-teal); }
.proof-in { padding-block: 48px; display: grid; gap: 20px; }
.big-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.num { font-family: var(--display); font-weight: 600; font-size: clamp(4rem, 17vw, 8rem); line-height: 0.9; letter-spacing: -0.03em; }
.stat-txt { font-family: var(--display); font-weight: 500; font-size: clamp(1.375rem, 4vw, 2rem); line-height: 1.2; max-width: 20ch; }
.minor-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 1.0625rem; }
.minor-stats strong { font-weight: 700; }
.text-link { font-weight: 700; text-underline-offset: 4px; justify-self: start; }
.proof .text-link { color: var(--on-teal); }
@media (min-width: 880px) {
  .proof-in { grid-template-columns: 1.4fr 1fr; align-items: end; padding-block: 64px; }
  .minor-stats { flex-direction: column; }
  .text-link { grid-column: 2; }
}

/* Chat */
.chat { padding-block: 72px 48px; }
.chat h2 { font-size: clamp(1.875rem, 5vw, 3rem); max-width: 18ch; }
.chat-grid { display: grid; gap: 32px; margin-top: 28px; }
.chat-body { font-size: 1.1875rem; max-width: 46ch; }
.ready { background: var(--paper); color: var(--on-paper); border-radius: var(--r-panel); padding: 24px; }
.ready h3 { font-size: 1.25rem; }
.ready ul { margin: 14px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.ready li::marker { color: var(--teal); }
@media (min-width: 880px) {
  .chat-grid { grid-template-columns: 1.2fr 1fr; align-items: start; gap: 64px; }
  .ready { margin-top: -8px; transform: rotate(-1deg); }
}

/* Plates (placeholders that read as instructions) */
.plate {
  margin: 0;
  border: 2px dashed var(--teal);
  border-radius: var(--r-panel);
  background-color: var(--paper);
  color: var(--on-paper);
  background-image: repeating-linear-gradient(-45deg, rgba(15, 92, 90, 0.06) 0 10px, transparent 10px 20px);
  display: grid; place-content: center; text-align: center;
  padding: 24px;
}

.prices { padding-block: 48px; }
.prices h2 { font-size: clamp(1.875rem, 5vw, 3rem); }
.plate-prices { margin-top: 24px; min-height: 220px; }
.plate-title { font-family: var(--display); font-weight: 600; font-size: 1.5rem; }
.plate-note { margin-top: 8px; max-width: 40ch; color: var(--on-cream-muted); }
.prices-fallback { margin-top: 16px; max-width: 60ch; }
.prices-fallback a { font-weight: 700; color: var(--teal); text-underline-offset: 3px; }

.gallery { padding-block: 48px 80px; }
.gallery h2 { font-size: clamp(1.875rem, 5vw, 3rem); }
.plates { display: grid; gap: 16px; margin-top: 24px; }
.plates figcaption { font-weight: 700; max-width: 22ch; }
.plates .plate { min-height: 200px; }
.gallery-note { margin-top: 16px; font-size: 0.9375rem; color: var(--on-cream-muted); max-width: 60ch; }
@media (min-width: 640px) {
  .plates { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 150px; }
  .g1 { grid-column: span 4; grid-row: span 2; }
  .g2 { grid-column: span 2; grid-row: span 1; }
  .g3 { grid-column: span 2; grid-row: span 2; }
  .g4 { grid-column: span 4; grid-row: span 1; }
  .plates .plate { min-height: 0; }
}

/* Booking */
.book { background: var(--apricot); color: var(--on-apricot); }
.book-in { padding-block: 64px; display: grid; gap: 32px; }
.book-side h2 { font-size: clamp(1.875rem, 5vw, 3rem); }
.book-side > p:first-of-type { margin-top: 14px; max-width: 36ch; }
.side-label { margin-top: 32px; font-weight: 700; }
.phone-big { display: inline-block; font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 8vw, 2.75rem); color: var(--on-apricot); text-decoration-thickness: 2px; text-underline-offset: 6px; white-space: nowrap; }
@media (min-width: 880px) { .book-in { grid-template-columns: 0.8fr 1.2fr; gap: 64px; padding-block: 88px; } }

.form { background: var(--paper); color: var(--on-paper); border-radius: var(--r-panel); padding: 24px 20px; display: grid; gap: 18px; }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; padding: 32px; gap: 20px 24px; } .wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; }
.opt { font-weight: 400; color: var(--on-cream-muted); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--on-paper); background: var(--paper);
  border: 2px solid #8a7d6b; border-radius: var(--r-input);
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--teal); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--error); }
.help { font-size: 0.875rem; color: var(--on-cream-muted); }
.err { font-size: 0.9375rem; font-weight: 700; color: var(--error); min-height: 0; }
.err:empty { display: none; }
.form .btn { width: 100%; }
.success { background: var(--teal); color: var(--on-teal); border-radius: var(--r-panel); padding: 20px; }
.success-title { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin-bottom: 4px; }
/* Footer */
.foot { background: var(--ink); color: var(--on-ink); }
.foot-in { padding-block: 48px; display: grid; gap: 32px; }
.foot p + p { margin-top: 6px; }
.mark-foot { color: var(--on-ink); }
.mark-foot span { color: var(--on-ink); }
.foot-h { font-size: 1.25rem; margin-bottom: 8px; }
.foot a { color: var(--on-ink); text-underline-offset: 3px; }
#privacy p { max-width: 48ch; }
@media (min-width: 768px) { .foot-in { grid-template-columns: 1fr 1fr; } }

/* Mobile dock: sticky call + booking, body gets matching bottom room */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--cream); color: var(--on-cream);
  border-top: 1px solid var(--line);
}
.dock .btn { padding: 0 18px; }
body { padding-bottom: 72px; }
@media (min-width: 768px) { .dock { display: none; } body { padding-bottom: 0; } }

/* ---------- Static pieces the motion hangs off ---------- */
.suds { position: relative; white-space: nowrap; }
.suds-line { position: absolute; left: -2%; width: 104%; bottom: -0.16em; height: 0.26em; overflow: visible; pointer-events: none; }
.suds-line path { fill: none; stroke: var(--terracotta); stroke-width: 3.5; stroke-linecap: round; }
.spray { stroke: var(--terracotta); stroke-width: 3; opacity: 0; transform-box: view-box; transform-origin: 440px 206px; }
.edge { line-height: 0; margin-top: -1px; }
.edge svg { width: 100%; height: clamp(32px, 4.2vw, 60px); }
.edge-fill { fill: var(--teal); }
.edge-line { fill: none; stroke: var(--terracotta); stroke-width: 3; stroke-linecap: round; }
.text-link::after { content: "\2192"; display: inline-block; margin-left: 6px; transition: transform 0.25s var(--ease-out); }
.phone-big { transition: transform 0.25s var(--ease-out); }
.field label { justify-self: start; transition: transform 0.2s var(--ease-out); }
.field:focus-within label { transform: translateX(4px); }
.foot a:hover, .prices-fallback a:hover { text-decoration-thickness: 3px; }
.success-title { display: flex; align-items: center; gap: 10px; }
.tick { width: 26px; height: 26px; flex: none; }
.tick path { fill: none; stroke: var(--on-teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .text-link:hover::after { transform: translateX(5px); }
  .phone-big:hover { transform: translateX(4px); }
}

/* Dock arrives once the hero buttons scroll away (JS only; without JS it is always there) */
html.js .dock { transform: translateY(110%); visibility: hidden; transition: transform 0.2s ease-in, visibility 0s 0.2s; }
html.js .dock.show { transform: none; visibility: visible; transition: transform 0.4s var(--ease), visibility 0s; }

@media (prefers-reduced-motion: no-preference) {
  /* ---------- Hero: a bath filling with suds. Headline is never animated. ---------- */
  .hero-in { animation: up 0.5s var(--ease) both; }
  .ctas.hero-in { animation-delay: 0.1s; }
  .suds-line path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.6s 0.35s var(--ease-out) forwards; }

  .blob { transform-box: fill-box; transform-origin: center; animation: swell 0.6s var(--ease) both; }
  .b { transform-box: fill-box; transform-origin: center; animation: rise 0.6s var(--ease) both; }
  .b circle, .b .hi { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.55s var(--ease-out) forwards; }
  .b1 { animation: none; }
  .b1 circle { animation: draw 0.65s 0.1s var(--ease-out) forwards, fill-in 0.4s 0.3s ease-out both; }
  .b .hi { animation-delay: 0.6s; animation-duration: 0.3s; }
  .b2 { animation-delay: 0.25s; } .b2 circle { animation-delay: 0.25s; }
  .b3 { animation-delay: 0.32s; } .b3 circle { animation-delay: 0.32s; }
  .b4 { animation-delay: 0.38s; } .b4 circle { animation-delay: 0.38s; }
  .b5 { animation-delay: 0.44s; } .b5 circle { animation-delay: 0.44s; }
  .b6 { animation-delay: 0.5s; }  .b6 circle { animation-delay: 0.5s; }
  .b7 { animation-delay: 0.3s; }  .b7 circle { animation: draw 0.4s 0.3s var(--ease-out) forwards, pop 0.18s 0.95s ease-in forwards; transform-box: fill-box; transform-origin: center; }
  .b8 { animation-delay: 0.56s; } .b8 circle { animation-delay: 0.56s; }
  .spray { animation: spray 0.35s 0.97s var(--ease-out) both; }
  .art-word, .art-sub { animation: up 0.45s 0.45s var(--ease) both; }
  .art-sub { animation-delay: 0.55s; }

  @keyframes up { from { opacity: 0; transform: translateY(10px); } }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes swell { from { opacity: 0; transform: scale(0.9); } }
  @keyframes rise { 0% { opacity: 0; transform: translate(-6px, 46px) scale(0.6); } 60% { transform: translate(4px, -4px) scale(1.03); } 100% { opacity: 1; transform: none; } }
  @keyframes fill-in { from { fill-opacity: 0; } }
  @keyframes pop { to { opacity: 0; transform: scale(1.5); } }
  @keyframes spray { 0% { opacity: 0; transform: scale(0.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35); } }

  /* ---------- Scroll reveals: split into chunks, staggered 80ms. A group is only 'armed' (hidden) by JS
     on the first scroll, and only while it is still below the viewport, so an unscrolled page shows everything. ---------- */
  [data-reveal].armed .r {
    opacity: 0; translate: 0 14px; filter: blur(4px);
    transition: opacity 0.5s var(--ease-out), translate 0.6s var(--ease), filter 0.5s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  /* Plates fill from the bottom up, like a bath */
  [data-reveal].armed .r.fill {
    opacity: 1; translate: none; filter: none;
    clip-path: inset(100% 0 0 0 round var(--r-panel));
    transition: clip-path 0.8s var(--ease);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  [data-reveal].armed.in .r { opacity: 1; translate: none; filter: none; }
  [data-reveal].armed.in .r.fill { clip-path: inset(0 0 0 0 round var(--r-panel)); }

  /* 100% fills up like water when the proof band arrives */
  html.js .proof-in .num { display: inline-block; }
  .proof-in.armed .num { clip-path: inset(100% 0 0 0); transition: clip-path 0.9s 0.1s var(--ease); }
  .proof-in.armed.in .num { clip-path: inset(-10% 0 -10% 0); }

  /* Foam edge draws along the top of the teal band */
  .edge.armed .edge-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease-out); }
  .edge.armed.in .edge-line { stroke-dashoffset: 0; }
  @supports (animation-timeline: view()) {
    .edge.armed .edge-line { transition: none; animation: draw linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  }

  /* ---------- Form feedback ---------- */
  .err:not(:empty) { animation: up 0.25s var(--ease-out) both; }
  .shake { animation: shake 0.32s ease-out; }
  @keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
  .success:not([hidden]) { animation: fill-up 0.6s var(--ease) both; }
  .success:not([hidden]) .tick path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.4s 0.35s var(--ease-out) forwards; }
  .success:not([hidden]) > p:last-child { animation: up 0.4s 0.25s var(--ease) both; }
  @keyframes fill-up { from { clip-path: inset(100% 0 0 0 round var(--r-panel)); } to { clip-path: inset(0 0 0 0 round var(--r-panel)); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
