@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&display=swap');

:root {
  --cream: #faf9f7;
  --paper: #ffffff;
  --page-margin: #ece6de;
  --ink: #2e211e;
  --ink-soft: #5d514d;
  --ink-faint: #a89890;
  /* Fixed dark chip color — NOT redefined in dark mode. --ink flips to a light
     tone in dark mode (it's the adaptive body-text color); anything using it as
     a *background* on a surface that stays constant across themes (the hero
     gradient, the nav pill, the phone mockup) must use this instead, or it goes
     invisible (light bg + white text) once dark mode flips --ink. */
  --ink-solid: #2e211e;
  --line: rgba(46, 33, 30, 0.1);

  --accent: #c25c27;
  --accent-light: #f5842e;
  --accent-deep: #91300b;
  --sage: #83b388;
  --sage-deep: #587556;
  --dark: #2e211e;

  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;

  --radius-page: 32px;
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --max-width: 1120px;
}

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

body {
  font-family: var(--font-body);
  background: var(--page-margin);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  padding: 12px;
}
@media (max-width: 640px) { body { padding: 6px; } }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

.page {
  background: var(--paper);
  border-radius: var(--radius-page);
  overflow: hidden;
  position: relative;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(.16,.8,.3,1), transform 0.7s cubic-bezier(.16,.8,.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .4s; }

/* ============ Floating pill nav ============ */

nav.float-nav {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  animation: navIn .8s cubic-bezier(.16,.8,.3,1) both;
}
@keyframes navIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }

nav.float-nav .pill {
  display: flex;
  align-items: center;
  gap: 28px;
  background: rgba(46, 33, 30, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.35);
}

nav.float-nav .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
}
nav.float-nav .brand img { width: 24px; height: 24px; display: block; }

nav.float-nav .links {
  display: flex;
  gap: 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}
nav.float-nav .links a { color: inherit; }
nav.float-nav .links a:hover { color: #fff; }

nav.float-nav .cta {
  background: #fff;
  color: var(--ink-solid);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform .2s ease;
}
nav.float-nav .cta:hover { transform: scale(1.05); color: var(--ink-solid); }

@media (max-width: 720px) {
  nav.float-nav .links { display: none; }
  nav.float-nav .pill { gap: 14px; }
}

/* Simple sub-page nav (privacy/support/id) — same pill, no hero behind it */

nav.simple-nav { padding: 18px 4px; }
nav.simple-nav .wrap { display: flex; align-items: center; justify-content: space-between; }
nav.simple-nav .brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink);
}
nav.simple-nav .brand img { width: 26px; height: 26px; }
nav.simple-nav .links { display: flex; gap: 22px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
nav.simple-nav .links a { color: inherit; }
nav.simple-nav .links a:hover { color: var(--ink); }

/* ============ Hero ============ */

header.hero {
  position: relative;
  padding: 108px 0 0;
  background:
    radial-gradient(140% 100% at 15% -10%, var(--accent-light) 0%, var(--accent) 46%, var(--accent-deep) 100%);
  /* No overflow:hidden here — the orbit cards and mascot intentionally poke past
     the hero's own edge (negative offsets), and .page above already clips the
     page's outer corners. The ::before grain layer is sized with inset:0, so it
     stays put without needing clipping. */
  color: #fff;
}

header.hero::before {
  /* faint film-grain-style texture so the flat gradient doesn't look plasticky */
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: .5;
  pointer-events: none;
}

header.hero .hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 24px;
  padding-bottom: 60px;
}
/* Grid items default to min-width:auto, which refuses to shrink below the
   content's own natural width — on narrow screens that pushed the whole
   column wider than the viewport, and .page's overflow:hidden silently
   clipped text instead of letting it wrap. min-width:0 lets these shrink
   and wrap normally. */
header.hero .hero-copy,
header.hero .hero-visual { min-width: 0; }

.eyebrow { max-width: 100%; flex-wrap: wrap; }

@media (max-width: 900px) {
  header.hero .hero-grid { grid-template-columns: 1fr; text-align: center; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulseDot 1.8s ease-in-out infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

header.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.96;
  font-size: clamp(42px, 6.2vw, 88px);
  margin: 0 0 22px;
}
header.hero h1 .line2 { display: block; color: rgba(255,255,255,0.62); }

header.hero p.tagline {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 480px;
  margin: 0 0 34px;
}
@media (max-width: 900px) { header.hero p.tagline { margin-left: auto; margin-right: auto; } }

.badges { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .badges { justify-content: center; } }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.02); text-decoration: none; }
.btn.primary { background: var(--ink-solid); color: #fff; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.btn.primary:hover { color: #fff; }
.btn.on-color { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.4); }
.btn.on-color:hover { background: rgba(255,255,255,0.22); color: #fff; }
.btn.secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { color: var(--ink); border-color: var(--ink); }

/* Phone mockup */

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; }

.phone {
  width: 250px;
  height: 510px;
  background: linear-gradient(155deg, #34261f, #1b1310);
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 40px 70px -25px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06) inset;
  animation: floatPhone 6s ease-in-out infinite;
  transform: rotate(-6deg);
}
@keyframes floatPhone {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-16px); }
}

.phone .screen {
  position: relative;
  width: 100%; height: 100%;
  background: linear-gradient(175deg, var(--cream), #f1ece4 70%);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.phone .notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 22px; background: #1b1310; border-radius: 14px;
}

.tap-rings { position: relative; width: 128px; height: 128px; display: flex; align-items: center; justify-content: center; }
.tap-rings span {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: ringPulse 2.4s cubic-bezier(.2,.6,.4,1) infinite;
}
.tap-rings span:nth-child(1) { width: 46px; height: 46px; animation-delay: 0s; }
.tap-rings span:nth-child(2) { width: 46px; height: 46px; animation-delay: .5s; }
.tap-rings span:nth-child(3) { width: 46px; height: 46px; animation-delay: 1s; }
@keyframes ringPulse {
  0% { width: 46px; height: 46px; opacity: .8; border-width: 3px; }
  100% { width: 128px; height: 128px; opacity: 0; border-width: 1px; }
}
.tap-rings .core {
  position: relative; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink-solid);
  display: flex; align-items: center; justify-content: center;
}
.tap-rings .core svg { width: 20px; height: 20px; color: #fff; }

.phone .chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 8px 20px -10px rgba(46,33,30,.25);
  animation: chipIn .6s cubic-bezier(.16,.8,.3,1) both;
  animation-delay: .4s;
}
@keyframes chipIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.phone .chip .swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }

.orbit-card {
  position: absolute;
  background: var(--paper);
  border-radius: 16px;
  padding: 12px 15px;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,.4);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: floatSmall 5s ease-in-out infinite;
}
.orbit-card.a { top: 6%; right: -6%; animation-delay: .3s; }
.orbit-card.b { bottom: 10%; left: -10%; animation-delay: 1.1s; }
.orbit-card .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@keyframes floatSmall {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}
@media (max-width: 640px) {
  .orbit-card { display: none; }
}

/* Mascot */

.mascot {
  position: absolute;
  right: 34px;
  bottom: -8px;
  width: 108px;
  height: auto;
  animation: mascotBob 3.2s ease-in-out infinite;
  transform-origin: bottom center;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.28));
}
@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-9px) rotate(2deg); }
}
@media (max-width: 900px) { .mascot { right: 16px; width: 78px; } }

/* ============ Feature grid ============ */

section.features { padding: 88px 0 40px; }

.section-head { text-align: center; max-width: 560px; margin: 0 auto 52px; }
.section-head .kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(28px, 3.6vw, 40px);
  margin: 0;
  color: var(--ink);
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform .3s cubic-bezier(.16,.8,.3,1), box-shadow .3s ease, background .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -22px rgba(46,33,30,.3); background: var(--paper); }

.card .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 21px; height: 21px; }
.card.sage .icon { background: var(--sage-deep); }
.card.dark .icon { background: var(--ink-solid); }

.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 16.5px;
  margin: 0 0 8px;
  color: var(--ink);
}
.card p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* Devices strip */

section.devices { padding: 30px 0 90px; text-align: center; }
section.devices .eyebrow-plain {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 11.5px; font-weight: 700;
  color: var(--ink-faint); margin-bottom: 16px; display: block;
}
.pill-row { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.pill {
  padding: 8px 15px; border-radius: 999px; background: var(--cream);
  border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  transition: border-color .2s ease, color .2s ease;
}
.pill:hover { border-color: var(--accent); color: var(--ink); }

/* CTA band */

section.cta-band { padding: 0 0 90px; }
.cta-card {
  background: linear-gradient(135deg, var(--ink-solid), #1b1310);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 90% at 85% 0%, rgba(194,92,39,.35), transparent 70%);
}
.cta-card h2 {
  position: relative;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 12px;
}
.cta-card p { position: relative; color: rgba(255,255,255,.72); margin: 0 0 28px; font-size: 15px; }
.cta-card .badges { position: relative; justify-content: center; }

/* Footer */

footer.site { padding: 30px 0 40px; }
footer.site .wrap {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12.5px; color: var(--ink-faint);
}
footer.site .brand-mini { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink-soft); }
footer.site .brand-mini img { width: 18px; height: 18px; }
footer.site .links { display: flex; gap: 18px; }
footer.site .links a { color: var(--ink-faint); }
footer.site .links a:hover { color: var(--ink); }

/* ============ Content pages (privacy / support) ============ */

main.doc { padding: 30px 0 90px; }
main.doc .wrap { max-width: 720px; }
main.doc h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: 34px; margin-bottom: 4px;
}
main.doc .updated { color: var(--ink-faint); font-size: 13px; margin-bottom: 36px; }
main.doc h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  font-size: 19px; margin-top: 36px; margin-bottom: 10px;
}
main.doc p, main.doc li { color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
main.doc ul { padding-left: 20px; }
main.doc .callout {
  background: var(--cream); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 24px 0; font-size: 14px;
}

/* ============ ID tag pages ============ */
/* Opened full-screen from an NFC tap on a phone — no page-frame chrome, full bleed. */
body.id-body { padding: 0; background: var(--cream); }

.id-page { max-width: 440px; margin: 0 auto; padding: 24px 20px 48px; min-height: 100vh; }

.id-header { padding: 28px 24px; border-radius: var(--radius-lg); margin-bottom: 14px; color: #fff; }
.id-header .id-icon {
  width: 44px; height: 44px; margin-bottom: 14px; border-radius: 13px;
  background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.id-header h1 { font-family: var(--font-display); margin: 0 0 3px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.id-header p { margin: 0; font-size: 13px; opacity: .78; }
.id-header.emergency { background: linear-gradient(135deg, #c0392b, #8e2b20); }
.id-header.pet       { background: linear-gradient(135deg, var(--ink-solid), #1b1310); }
.id-header.lost      { background: linear-gradient(135deg, var(--sage-deep), #3f5a3d); }

.id-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 4px 18px; margin-bottom: 12px; }
.id-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.id-row:last-child { border-bottom: none; }
.id-row .id-label { color: var(--ink-faint); font-size: 12.5px; flex-shrink: 0; padding-top: 1px; }
.id-row .id-value { color: var(--ink); font-weight: 500; text-align: right; white-space: pre-line; }

.id-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.id-badge.blood, .id-badge.allergy { background: rgba(192,57,43,.1); color: #c0392b; }
.id-badge.neutral { background: var(--cream); color: var(--ink-soft); }
.id-badge.reward  { background: rgba(194,92,39,.14); color: var(--accent-deep); }

.id-call-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  padding: 16px; border-radius: var(--radius-md); background: var(--ink-solid); color: #fff;
  font-size: 15.5px; font-weight: 700; margin: 4px 0 14px; transition: transform .2s ease;
}
.id-call-btn:hover { transform: translateY(-2px); color: #fff; }

.id-empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.id-disclaimer { font-size: 12px; color: var(--ink-faint); text-align: center; line-height: 1.6; margin-top: 18px; }
.id-brand-footer { text-align: center; margin-top: 22px; font-size: 12.5px; color: var(--ink-faint); }
.id-brand-footer a { color: var(--ink-faint); font-weight: 700; }
.id-brand-footer a:hover { color: var(--ink); }

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #17130f;
    --paper: #1d1815;
    --page-margin: #0c0a09;
    --ink: #f6f1ec;
    --ink-soft: #c9bcb3;
    --ink-faint: #8f8078;
    --line: rgba(255, 255, 255, 0.09);
  }
  .btn.secondary { background: var(--paper); }
  .phone .screen { background: linear-gradient(175deg, #241d18, #171310); }
  .phone .chip { background: var(--paper); }
  .orbit-card { background: var(--paper); }
  /* .card.dark's icon box is --ink-solid (always dark) on purpose, but that now
     sits on an equally-dark card background — lighten it so the icon box still
     reads as a distinct chip instead of nearly disappearing into the card. */
  .card.dark .icon { background: rgba(255, 255, 255, 0.12); }
}
