/* ============================================================
   CanMyDog — brand system
   Terracotta #C4717A is the locked brand color (app icon).
   Display: Fredoka (rounded, friendly — mascot-led product)
   Body: Nunito Sans
   ============================================================ */

:root {
  --terracotta: #C4717A;
  --terracotta-deep: #B05E67;
  --terracotta-soft: #F3DFE1;
  --ink: #32221F;
  --ink-soft: #6E5A56;
  --paper: #E0CDBD;
  --card: #FFFFFF;

  --safe: #3E8E5A;
  --safe-bg: #E4F2E9;
  --caution: #C97F1B;
  --caution-bg: #FAEEDB;
  --danger: #B23434;
  --danger-bg: #F8E2E2;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 6px 16px rgba(50, 34, 31, 0.07), 0 30px 70px rgba(50, 34, 31, 0.14);
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

/* Fonts: Fredoka / Nunito Sans have Latin letters only. Japanese characters
   fall through to 'M PLUS Rounded 1c' (a rounded Japanese font, loaded only
   by the /ja/ pages), so Latin text keeps the house fonts there too. */
body {
  font-family: 'Nunito Sans', 'M PLUS Rounded 1c', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, .display {
  font-family: 'Fredoka', 'M PLUS Rounded 1c', 'Nunito Sans', sans-serif;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: var(--terracotta-deep); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(224, 205, 189, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--terracotta-soft);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo-icon { width: 34px; height: 34px; border-radius: 10px; display: block; }
.logo-word { height: 26px; width: auto; display: block; }
.logo .dot {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--terracotta);
  display: grid; place-items: center;
  color: #fff; font-size: 1.05rem;
}
nav.main { display: flex; gap: 26px; align-items: center; }
nav.main a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
  display: inline-block; transition: transform 0.2s ease, color 0.2s ease;
}
/* Hover zoom: top nav links grow 25%, matching the buttons. */
nav.main a:hover { color: var(--terracotta-deep); transform: scale(1.25); }
/* EN · FR · ES language switcher (partials.js). Stays visible on mobile,
   where the main nav is hidden. */
.lang-switch {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 700; color: var(--ink-soft);
}
.lang-switch a { text-decoration: none; color: var(--ink-soft); padding: 2px 4px; border-radius: 6px; }
.lang-switch a:hover { color: var(--terracotta-deep); }
.lang-switch a[aria-current="true"] { color: var(--terracotta-deep); background: var(--terracotta-soft); }
/* Header items never wrap onto two lines. */
nav.main a, .lang-switch, header.site .btn { white-space: nowrap; }
/* French/Spanish nav labels are longer — tighten the nav before it gets crowded. */
@media (max-width: 1150px) {
  header.site .wrap { gap: 14px; }
  nav.main { gap: 16px; }
  nav.main a { font-size: 0.88rem; }
  header.site .btn { padding: 10px 18px; }
}
header.site .wrap { gap: 20px; }
@media (max-width: 1320px) {
  html[lang="fr"] nav.main, html[lang="es"] nav.main { gap: 16px; }
  html[lang="fr"] nav.main a, html[lang="es"] nav.main a { font-size: 0.88rem; }
  html[lang="fr"] header.site .btn, html[lang="es"] header.site .btn { padding: 10px 18px; }
}
/* The longer French/Spanish menu doesn't fit below ~1100px: collapse it
   there (English keeps it down to 860px, see Responsive). */
@media (max-width: 1100px) {
  html[lang="fr"] nav.main, html[lang="es"] nav.main { display: none; }
}
/* Japanese: break lines between phrases, not mid-word (Chrome/Edge). */
html[lang="ja"] { word-break: auto-phrase; }
/* Phones: logo + language switcher only. The hero right below has the
   App Store button, so the header one can go. */
@media (max-width: 560px) {
  header.site .btn { display: none; }
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff !important;
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 500;
  padding: 12px 26px; border-radius: 999px; text-decoration: none;
  border: none; cursor: pointer; font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn, .btn.brand { background: var(--terracotta); }
.btn:hover, .btn.brand:hover { background: var(--terracotta-deep); }
/* Hover zoom: every pill button grows 25% on hover. */
.btn:hover { transform: scale(1.25); }
.btn.outline {
  background: transparent; color: var(--terracotta-deep) !important;
  border: 1.5px solid var(--terracotta);
}
.btn.outline:hover { background: var(--terracotta-soft); }
/* "Coming soon" pill (until the App Store link exists): looks like a button, isn't one. */
.btn.soon, .btn.soon:hover { cursor: default; transform: none; background: var(--terracotta); }

/* ---------- Hero ---------- */
/* overflow-x clip lets the enlarged floating dog spill toward the page edge
   without ever creating a horizontal scrollbar (vertical stays visible). */
.hero { padding: 96px 0 80px; overflow-x: clip; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  margin-bottom: 8px;
}
.hero h1 .food {
  color: var(--terracotta-deep);
  border-bottom: 3px solid var(--terracotta-soft);
  display: inline-block; min-width: 3ch;
}
.verdict-chip {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 500;
  font-size: 1.15rem; padding: 10px 22px; border-radius: 999px;
  margin: 18px 0 22px;
  transition: background 0.3s ease, color 0.3s ease;
}
.verdict-chip .mark { font-size: 1.3rem; }
.verdict-chip.safe { background: var(--safe-bg); color: var(--safe); }
.verdict-chip.caution { background: var(--caution-bg); color: var(--caution); }
.verdict-chip.danger { background: var(--danger-bg); color: var(--danger); }

.hero p.lede {
  color: var(--ink-soft); font-size: 1.15rem; max-width: 46ch; margin-bottom: 28px;
}
.hero .cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero .fineprint { margin-top: 14px; font-size: 0.85rem; color: var(--ink-soft); }
/* Hero text paints above the mascot's glow, so overlapping words stay readable. */
.hero .wrap > div:first-child { position: relative; z-index: 1; }
/* French puts a space before "?": keep the "?" on the food's line
   (fr/index.html wraps both in .nowrap; the food itself may still wrap). */
.hero h1 .nowrap { white-space: nowrap; }
.hero h1 .nowrap .food { white-space: normal; max-width: calc(100% - 0.8em); }

.mascot-frame {
  /* No box anymore — the dog + logo float freely. */
  background: transparent; border: none; border-radius: 0;
  box-shadow: none; padding: 0; overflow: visible;
  aspect-ratio: auto;
  display: grid; place-items: center;
}
.mascot-frame img {
  width: 100%; height: auto; object-fit: contain;
  transform: scale(1.8);
  transform-origin: center center;
  /* Glow in the drawing's own terracotta/rose tones — zero offset so it
     hugs the dog + wordmark outline rather than dropping below it. */
  filter:
    drop-shadow(0 0 16px rgba(196, 113, 122, 0.60))
    drop-shadow(0 0 38px rgba(227, 167, 177, 0.50));
}
/* Step the enlargement down on smaller screens so it never overflows. */
@media (max-width: 1200px) {
  .mascot-frame img { transform: scale(1.5); }
}
.mascot-placeholder {
  color: var(--terracotta-deep); text-align: center; padding: 24px;
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif;
}

/* ---------- Sections ---------- */
section { padding: 104px 0; }
/* No per-section fill: the cream + pink is one fixed backdrop (see
   .bg-parallax). Sections stay transparent so only boxes and text scroll. */
section.tint { background: transparent; }
.eyebrow {
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 500;
  color: var(--terracotta-deep); text-transform: uppercase;
  letter-spacing: 0.2em; font-size: 0.74rem; margin-bottom: 14px;
}
section h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 18px; color: var(--ink); letter-spacing: -0.02em; }
.section-lede { color: var(--ink-soft); max-width: 62ch; margin-bottom: 28px; font-size: 1.06rem; }

/* Big bold brand statement (Philosophy) */
.big-statement {
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.18; letter-spacing: -0.01em;
  color: var(--ink); max-width: 18ch; margin-top: 40px;
}
.big-statement span { color: var(--terracotta-deep); }

/* Steps — a real sequence: snap → scan → verdict */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--card); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); border: 2px solid var(--terracotta);
}
.step .num {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--terracotta); color: var(--terracotta-deep);
  display: grid; place-items: center;
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 500;
  margin-bottom: 18px; background: transparent;
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.97rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature {
  background: var(--card); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
  border: 2px solid var(--terracotta);
}
.feature h3 { font-size: 1.25rem; margin-bottom: 10px; }
.feature p { color: var(--ink-soft); font-size: 0.97rem; }
.feature .badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  background: var(--danger-bg); color: var(--danger);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 12px;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* Story */
.story-card {
  background: var(--card); border-radius: 28px; box-shadow: var(--shadow);
  border: 2px solid var(--terracotta);
  padding: 48px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px;
  align-items: center;
}
.story-card .photo {
  background: var(--terracotta-soft); border-radius: var(--radius);
  border: 2px solid var(--terracotta);
  aspect-ratio: 1; display: grid; place-items: center; overflow: hidden;
}
.story-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.story-card blockquote {
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 500;
  font-size: 1.35rem; line-height: 1.4; color: var(--ink);
  margin-bottom: 16px;
}
.story-card cite { color: var(--ink-soft); font-style: normal; font-size: 0.95rem; }

/* FAQ */
details {
  background: var(--card); border-radius: var(--radius-sm);
  border: 2px solid var(--terracotta); box-shadow: var(--shadow); margin-bottom: 14px;
  padding: 0 26px;
}
details summary {
  cursor: pointer; list-style: none;
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 500; font-size: 1.05rem;
  padding: 18px 0; position: relative;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+'; position: absolute; right: 0;
  color: var(--terracotta); font-size: 1.4rem; font-weight: 400;
}
details[open] summary::after { content: '–'; }
details p { padding: 0 0 18px; color: var(--ink-soft); }

/* Disclaimer band — warm terracotta-red so the poison-control number stands out */
.vet-band {
  background: #B8474A; color: #FFECEC;
  border: 2px solid #95393B;
  border-radius: var(--radius); padding: 12px 36px;
  display: flex; gap: 18px; align-items: center;
}
.vet-band .paw { font-size: 1.8rem; }
.vet-band p { font-size: 0.95rem; line-height: 1.45; }
.vet-band strong { color: #fff; }
/* The emergency number, brightened and tappable. */
.vet-band .phone {
  color: #fff !important; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--terracotta-soft);
  padding: 40px 0; color: var(--ink-soft); font-size: 0.9rem;
}
footer.site .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px;
}
footer.site a { color: var(--ink-soft); text-decoration: none; margin-right: 20px; }
footer.site a:hover { color: var(--terracotta-deep); }

/* ---------- Inner pages (support / privacy) ---------- */
.page { padding: 64px 0 80px; max-width: 760px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 10px; }
.page .updated { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 36px; }
.page h2 { font-size: 1.4rem; margin: 36px 0 12px; }
.page p, .page li { color: var(--ink-soft); margin-bottom: 12px; }
.page ul { padding-left: 22px; }
.contact-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px; margin: 24px 0;
  border: 2px solid var(--terracotta);
}
.contact-card p { margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .mascot-frame { max-width: 360px; margin: 0 auto; }
  .mascot-frame img { transform: scale(1.05); }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .story-card { grid-template-columns: 1fr; padding: 32px; }
  nav.main { display: none; }
}

/* ---------- App screenshots ---------- */
.screens {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.screen {
  border-radius: 30px; overflow: hidden;
  border: 3px solid var(--terracotta); box-shadow: var(--shadow);
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Hover zoom: 50% bigger, lifted above the neighbouring screens. */
.screen:hover {
  transform: scale(1.5);
  position: relative; z-index: 10;
  box-shadow: 0 12px 28px rgba(50, 34, 31, 0.16), 0 40px 90px rgba(50, 34, 31, 0.22);
}
.screen img { display: block; width: 100%; height: auto; }
.screen-caption {
  text-align: center; margin-top: 12px;
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 500;
  color: var(--terracotta-deep); font-size: 0.95rem;
}
@media (max-width: 860px) {
  .screens { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Fixed background layer ----------
   Pinned to the viewport: cream base with three big pastel-pink paw prints.
   It stays put while every box and line of text scrolls over it, so the
   layering is visible without the busyness of a repeating pattern. */
.bg-parallax {
  position: fixed; inset: 0; height: 100vh;
  z-index: -1; pointer-events: none; overflow: hidden;
}
.paw {
  position: absolute;
  background: url("assets/paw.svg") center / contain no-repeat;
  opacity: 0.5;
}
.paw.p1 { width: 38vw; height: 38vw; top: -7vw;  left: -8vw;  transform: rotate(-18deg); }
.paw.p2 { width: 30vw; height: 30vw; top: 34vh;  right: -7vw; transform: rotate(24deg); }
.paw.p3 { width: 34vw; height: 34vw; bottom: -10vh; left: 22vw; transform: rotate(-8deg); }
