/* PawPawCare landing — brand tokens mirror frontend/src/theme/index.js */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-var.woff2') format('woff2');
}

/* Rounded display face for headlines only (Baloo 2, OFL, latin subset, variable 400-800). */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/baloo2-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #201b15;
  --ink-soft: #514538;
  --paper: #fff8f4;
  --bark: #653e00;
  --caramel: #855300;
  --honey: #fdb965;
  --peach: #ffddb8;
  --sky: #085ac0;
  --sky-bright: #2170e4;
  --surface-low: #fef1e7;
  --surface: #f8ece2;
  --surface-high: #f2e6dc;
  --card: #ffffff;
  --outline: #d5c4b2;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Baloo 2', 'Plus Jakarta Sans', system-ui, sans-serif;
  --cocoa: #2b1a08;

  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-full: 999px;

  /* Warm shadows, never gray (design.md: tinted #5a3500, 4–8% opacity) */
  --shadow-card: 0 6px 24px rgba(90, 53, 0, 0.08), 0 2px 6px rgba(90, 53, 0, 0.05);
  --shadow-lift: 0 14px 40px rgba(90, 53, 0, 0.13), 0 4px 10px rgba(90, 53, 0, 0.06);
  --shadow-btn: 0 4px 14px rgba(101, 62, 0, 0.28);

  --header-h: 68px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--bark);
  text-wrap: balance;
  margin: 0 0 0.5em;
}

h1, h2 { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.08; }
h1 { font-size: clamp(2.4rem, 5vw, 3.35rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; color: var(--ink); }

p { margin: 0 0 1em; }

a { color: var(--sky); text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--bark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; }

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.container-narrow { max-width: 760px; }

section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 248, 244, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 150ms ease-in-out;
}

.site-header.scrolled { box-shadow: 0 2px 18px rgba(90, 53, 0, 0.1); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: 0;
  color: var(--bark);
  text-decoration: none;
  margin: 0;
}

.paw {
  width: 26px;
  height: 26px;
  fill: var(--caramel);
  flex: none;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2.5vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 150ms ease-in-out;
}

.nav-links a:hover { color: var(--bark); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--card);
  border: 1.5px solid var(--outline);
  border-radius: var(--r-md);
  color: var(--bark);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 640px) {
  .site-header nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.nav-open nav {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--surface-high);
    box-shadow: var(--shadow-card);
    padding: 6px 0 10px;
  }
  .site-header.nav-open .nav-links {
    flex-direction: column;
    gap: 0;
    padding-inline: clamp(20px, 4vw, 40px);
  }
  .site-header.nav-open .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 1.05rem;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--r-full);
  transition: transform 150ms ease-in-out, box-shadow 150ms ease-in-out, background 150ms ease-in-out;
  min-height: 48px;
  padding: 12px 26px;
}

.btn-primary {
  background: var(--bark);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover { background: var(--caramel); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary[disabled] { opacity: 0.6; cursor: default; transform: none; }

.btn-sm { min-height: 48px; padding: 10px 20px; font-size: 0.95rem; }

/* ---------- Tag chips (pet-tag section labels) ---------- */

.tag-chip {
  display: inline-block;
  background: var(--peach);
  color: var(--bark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid rgba(101, 62, 0, 0.18);
  margin: 0 0 14px;
}

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(24px, 4vw, 48px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero-copy .lede {
  font-size: 1.14rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 1.6em;
}

.hero-visual {
  display: flex;
  align-items: flex-end;
  gap: clamp(14px, 2vw, 22px);
  padding-bottom: 26px; /* room for the phone that sits below the photo baseline */
}

.hero-photo {
  flex: 1;
  min-width: 0;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--surface);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
}

/* ---------- Phone frame ---------- */

.phone {
  position: relative;
  z-index: 1;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 18.6;
  border-radius: 42px;
  border: 9px solid var(--ink);
  background: var(--ink);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 32px;
}

.phone-sm { width: min(260px, 72vw); }

/* Photo and phone are separate objects side by side: the puppy carries the
   feeling, the screen shows what you actually get, and neither covers the
   other. The phone drops slightly below the photo baseline for depth. */
.phone-hero {
  flex-shrink: 0;
  width: min(188px, 34%);
  transform: translateY(26px);
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; padding-bottom: 22px; }
  .hero-photo { max-height: min(340px, 42vh); }
  .phone-hero { width: min(150px, 30%); transform: translateY(22px); }
}

/* On phones the duo shrinks but keeps its shape; heights capped so the H1 and
   lede stay high on the fold and readable at first paint (SEO audit C1). */
@media (max-width: 640px) {
  .hero-photo { max-height: min(280px, 36vh); }
  .phone-hero { width: min(118px, 32%); transform: translateY(18px); }
}

/* ---------- Forms ---------- */

.waitlist-form { max-width: 520px; }

.form-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.field { flex: 1 1 240px; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.field input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--outline);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  min-height: 48px;
  transition: border-color 150ms ease-in-out;
}

.field input::placeholder { color: #a08b74; }
.field input:focus { border-color: var(--sky-bright); outline: none; box-shadow: 0 0 0 3px rgba(33, 112, 228, 0.18); }

.form-note {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-top: 10px;
}

.hp-field { position: absolute; left: -9999px; }

/* ---------- Pack strip ---------- */

.pack-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 24px;
  margin-top: 8px;
  background: var(--surface-low);
  border-radius: var(--r-xl);
}

.pack-strip p { margin: 0; color: var(--ink-soft); font-weight: 600; font-size: 0.98rem; }

.pet-chips {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
  flex-wrap: wrap;
}

.pet-chip {
  background: var(--chip, var(--peach));
  color: var(--bark);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: var(--r-full);
}

/* ---------- Trail (signature walk path) ---------- */

.trail {
  display: flex;
  justify-content: center;
  padding: clamp(8px, 2vw, 20px) 0;
}

.trail svg { width: 170px; height: 76px; overflow: visible; }

.trail-flip svg { transform: scaleX(-1); }

.trail-path {
  fill: none;
  stroke: var(--honey);
  stroke-width: 2.5;
  stroke-dasharray: 1 10;
  stroke-linecap: round;
}

.trail-paw { fill: var(--caramel); opacity: 0.45; }

/* ---------- Sections ---------- */

.section { padding: clamp(44px, 7vw, 84px) 0; }

.section-tinted {
  background: var(--surface-low);
}

.section > .container > h2 { max-width: 22em; }

/* ---------- Feature cards ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: 36px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--surface-high);
  border-radius: var(--r-2xl);
  padding: 18px 22px 24px;
  box-shadow: var(--shadow-card);
  transition: transform 150ms ease-in-out, box-shadow 150ms ease-in-out;
}

.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.feature-card .shot {
  height: 250px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--surface-low);
}

.feature-card .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* The weight-trends screen keeps its chart below the pet header, so frame the
   card lower to land on the graph instead of the avatar. */
.feature-card .shot img[src*="health."] {
  object-position: center 72%;
}

.shot-family {
  display: flex;
  align-items: center;
  justify-content: center;
}

.family-cluster { display: flex; }

.avatar {
  width: 58px;
  height: 58px;
  border-radius: var(--r-full);
  background: var(--chip, var(--peach));
  color: var(--bark);
  font-weight: 800;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  margin-left: -12px;
}

.avatar:first-child { margin-left: 0; }

.avatar-add {
  background: var(--surface-high);
  color: var(--caramel);
  border-style: dashed;
  border-color: var(--outline);
}

@media (max-width: 820px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card .shot { height: 210px; }
}

/* ---------- Split sections ---------- */

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.split-reverse { grid-template-columns: 0.95fr 1.05fr; }
.split-reverse .split-copy { order: 2; }

.split-copy p { color: var(--ink-soft); max-width: 34em; }
.split-copy strong { color: var(--ink); }

.disclaimer {
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--peach);
  padding-left: 14px;
  max-width: 34em;
}
#about strong { color: var(--ink); }

.split-visual { display: flex; justify-content: center; }

@media (max-width: 820px) {
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-reverse .split-copy { order: 0; }
}

/* ---------- Scan card (AI intake mock) ---------- */

.scan-card {
  background: var(--card);
  border: 1px solid var(--surface-high);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lift);
  padding: 26px 28px;
  width: min(380px, 100%);
  transform: rotate(-1.5deg);
}

.scan-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--caramel);
  margin-bottom: 14px;
}

.scan-card ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.scan-card li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.98rem;
}

.check {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #d3f2e0;
  color: #1a6b3a;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.scan-apply {
  display: inline-block;
  background: var(--bark);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: var(--r-full);
}

/* ---------- Share cards ---------- */

.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: 36px;
}

.share-card {
  background: var(--card);
  border-radius: var(--r-2xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.share-card .icon {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: var(--caramel);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: var(--peach);
  border-radius: var(--r-md);
  padding: 8px;
  margin-bottom: 16px;
}

.share-card p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

@media (max-width: 820px) {
  .share-grid { grid-template-columns: 1fr; }
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  counter-reset: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}

.step { position: relative; padding-top: 6px; }

.step-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: var(--peach);
  color: var(--bark);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 14px;
}

.step p { color: var(--ink-soft); margin: 0; }

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */

#faq details {
  background: var(--card);
  border: 1px solid var(--surface-high);
  border-radius: var(--r-lg);
  margin-top: 12px;
  overflow: hidden;
}

#faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 20px;
  list-style-position: outside;
  transition: background 150ms ease-in-out;
}

#faq summary:hover { background: var(--surface-low); }

#faq details p { padding: 0 20px 18px; margin: 0; color: var(--ink-soft); }

#faq details[open] summary { border-bottom: 1px solid var(--surface-high); margin-bottom: 12px; }

/* ---------- Closing band ---------- */
/* The one dark moment on the page: a full-bleed cocoa band so the last ask
   reads as a destination, not another cream section. */

#waitlist {
  position: relative;
  overflow: hidden;
  background: var(--cocoa);
  color: var(--paper);
  padding: clamp(56px, 8vw, 96px) 0;
}

.cta-paw-bg {
  position: absolute;
  fill: var(--paper);
  opacity: 0.06;
  pointer-events: none;
}
.cta-paw-bg.a { width: 150px; height: 150px; top: -20px; left: 4%; transform: rotate(-16deg); }
.cta-paw-bg.b { width: 96px; height: 96px; bottom: -8px; right: 6%; transform: rotate(18deg); }

.cta-panel {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.cta-panel h2 { color: var(--paper); }
.cta-panel p { color: rgba(255, 248, 244, 0.72); }
.cta-panel .form-note { color: rgba(255, 248, 244, 0.6); }
.cta-panel .field label { color: rgba(255, 248, 244, 0.85); }
.cta-panel .field input { border-color: transparent; }
.cta-panel .field input:focus { border-color: var(--honey); box-shadow: 0 0 0 3px rgba(253, 185, 101, 0.3); }
.cta-panel .btn-primary { background: var(--honey); color: var(--ink); box-shadow: none; }
.cta-panel .btn-primary:hover { background: #ffc987; }

.paw-cta {
  width: 44px;
  height: 44px;
  fill: var(--honey);
  margin-bottom: 6px;
}

.waitlist-form-center { margin-inline: auto; }

.waitlist-form-center .form-row { justify-content: center; }

.waitlist-form-center .field label { text-align: left; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0 48px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.wordmark-footer { font-size: 1.05rem; }

.footer-tagline { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

.site-footer .nav-links { justify-content: center; flex-wrap: wrap; }

.footer-legal { color: var(--ink-soft); font-size: 0.85rem; margin: 6px 0 0; }

/* ---------- Cookie consent banner (analytics.js) ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 15px 18px;
  background: var(--paper);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  animation: cookie-in 0.3s ease both;
}
@keyframes cookie-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cookie-text {
  flex: 1 1 240px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.cookie-text a { color: var(--caramel); font-weight: 600; }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; }
.cookie-btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--r-full);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.cookie-accept { background: var(--bark); color: #fff; }
.cookie-accept:hover { background: var(--caramel); }
.cookie-decline { background: transparent; color: var(--ink-soft); border-color: var(--outline); }
.cookie-decline:hover { background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .cookie-banner { animation: none; } }

/* ---------- Reveal on scroll (JS adds .js to <html>) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
  }
  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

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