/* ============================================================
   SafePaws, pawsafely.com · True Motion LLC
   Light by default; [data-theme="dark"] flips the tokens.

   The tokens are the app's own (DESIGN.md §2–§4 / src/theme.ts): the same
   ink, the same green, the same four risk colours, Manrope 500–800 and pill
   buttons. The site is a picture of the app, so it wears the app's clothes.
   ============================================================ */

:root {
  color-scheme: light;

  --bg:        #FFFFFF;
  --bg-alt:    #F4F7F5;
  --surface:   #FFFFFF;

  --ink:       #0B231B;
  --ink-soft:  #55665E;
  --ink-dim:   #86958E;

  --accent:    #0B7D5D;
  --accent-h:  #0A6B4F;
  --accent-w:  #DDF7EA;
  /* the app's button green, used where white text sits on it at button size */
  --primary:   #0FA36F;

  --safe:      #0FA36F;
  --warn:      #B45309;
  --danger:    #C2321C;
  /* the cold end of the scale, frozen ground, ice, frostbite */
  --cold:      #1D63B8;

  --line:      #E4ECE7;
  --line-2:    #EEF3F0;

  --shadow:    0 1px 2px rgba(11,35,27,.04), 0 8px 20px -12px rgba(11,35,27,.16);
  --shadow-lg: 0 2px 6px rgba(11,35,27,.05), 0 30px 60px -30px rgba(11,35,27,.28);

  --r-xs: 8px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg:        #0A1410;
  --bg-alt:    #0F1B16;
  --surface:   #13211B;

  --ink:       #E8F3EE;
  --ink-soft:  #9DB5AA;
  --ink-dim:   #72877D;

  --accent:    #2DD69B;
  --accent-h:  #5BE3B3;
  --accent-w:  #113A2C;
  --primary:   #2DD69B;

  --safe:      #4ADE80;
  --warn:      #FBBF24;
  --danger:    #FB7185;
  --cold:      #60A5FA;

  --line:      #22362E;
  --line-2:    #1A2C25;

  --shadow:    0 1px 2px rgba(0,0,0,.3), 0 8px 24px -14px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.35), 0 30px 60px -30px rgba(0,0,0,.85);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500; /* Manrope: nothing below 500, nothing italic, same as the app */
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }
img, svg { display: block; max-width: 100%; }
svg { flex: none; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.024em; line-height: 1.12; }
h1 { font-size: clamp(2.35rem, 4.6vw, 3.7rem); font-weight: 800; letter-spacing: -.034em; line-height: 1.04; }
h2 { font-size: clamp(1.65rem, 2.9vw, 2.35rem); font-weight: 800; letter-spacing: -.03em; }
h3 { font-size: 1.02rem; }

.eyebrow {
  display: block; font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.lede { color: var(--ink-soft); font-size: clamp(1.02rem, 1.2vw, 1.12rem); max-width: 46ch; line-height: 1.62; }
.sub  { color: var(--ink-soft); margin-top: 14px; max-width: 52ch; }
.num  { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.nav.stuck { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.02rem; letter-spacing: -.025em; }
.logo svg { width: 22px; height: 22px; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a:not(.btn) { color: var(--ink-soft); font-size: .91rem; font-weight: 500; transition: color .18s; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-tools { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.icon-btn:hover { color: var(--ink); background: var(--bg-alt); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .moon { display: none; }
/* The burger only exists once the section links collapse; see the 940px block. */
.nav-burger { display: none; }
.nav-burger .ico-shut { display: none; }
.nav-burger[aria-expanded="true"] .ico-open { display: none; }
.nav-burger[aria-expanded="true"] .ico-shut { display: block; }
.nav-panel {
  border-top: 1px solid var(--line); background: var(--bg);
  padding: 6px 0 10px;
}
.nav-panel a {
  display: block; padding: 12px 22px; color: var(--ink-soft);
  font-size: .97rem; font-weight: 500;
}
.nav-panel a:active { background: var(--bg-alt); }
[data-theme="dark"] .icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .moon { display: block; }

/* ---------- buttons ---------- */
/* Pill buttons, like the app. The primary one glows in its own green, that
   glow is the app's single flourish, and it stays the only one here too. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  font-family: var(--sans); font-size: .93rem; font-weight: 700; letter-spacing: -.01em;
  padding: 11px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 8px 16px -6px color-mix(in srgb, var(--accent) 45%, transparent);
}
[data-theme="dark"] .btn-primary { color: #05100C; }
.btn-primary:hover { background: var(--accent-h); }
.btn-secondary { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-secondary:hover { border-color: var(--ink-dim); }
.btn-sm { padding: 8px 16px; font-size: .87rem; }

/* ---------- store badges ---------- */
.stores { display: flex; gap: 10px; flex-wrap: wrap; }
.store {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 9px 18px 9px 14px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  transition: opacity .18s;
}
.store:hover { opacity: .86; }
/* The App Store badge until an iOS build exists: same shape, clearly not tappable. */
.store-soon {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: default; opacity: .62;
}
.store-soon:hover { opacity: .62; }
.store svg { width: 20px; height: 20px; }
.store span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store small { font-size: .6rem; letter-spacing: .05em; text-transform: uppercase; opacity: .7; }
.store strong { font-size: .92rem; font-weight: 700; letter-spacing: -.015em; }

/* ---------- pills / status ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .64rem; font-weight: 500; letter-spacing: .09em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.pill[data-s="safe"]   { background: color-mix(in srgb, var(--safe) 14%, transparent);   color: var(--safe); }
.pill[data-s="warn"]   { background: color-mix(in srgb, var(--warn) 16%, transparent);   color: var(--warn); }
.pill[data-s="danger"] { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pill[data-s="cold"]   { background: color-mix(in srgb, var(--cold) 14%, transparent);   color: var(--cold); }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 4vw, 48px) 0 clamp(32px, 4vw, 48px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 30%; height: 120%;
  background: radial-gradient(46% 42% at 62% 34%, var(--accent-w), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr .86fr; gap: clamp(40px, 6vw, 84px); align-items: start; }
/* The copy hangs from the top of the phone, not its middle, centring it left a
   screen's worth of empty space above the headline. */
.hero-copy { padding-top: clamp(12px, 4vw, 52px); }

.tagline {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); padding: 5px 11px 5px 9px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface);
}
.tagline i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.hero h1 { margin: 22px 0 0; max-width: 13ch; }
.hero .lede { margin-top: 20px; }
.hero .stores { margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: .82rem; color: var(--ink-dim); }
.hero-note b { color: var(--ink-soft); font-weight: 700; }

/* ---------- device ---------- */
.device-stage { position: relative; display: grid; place-items: center; }
/* A current Pixel-class Android phone: even bezel, a centred punch-hole
   camera. The screen is a real capture of the app (app-today.png, taken from
   the release build in an emulator), not a mock-up, the comment beside the
   <img> in index.html says how to retake it. */
.device {
  position: relative; width: min(292px, 80vw); aspect-ratio: 9 / 20;
  border-radius: 30px; padding: 7px;
  background: linear-gradient(155deg, #434946 0%, #101614 42%, #2E3432 100%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.10);
}
.screen {
  position: relative; height: 100%; border-radius: 24px; overflow: hidden;
  background: #FFFFFF;
}
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hole {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: #0A0E0D; z-index: 5;
  box-shadow: 0 0 0 1px rgba(255,255,255,.10);
}

/* ---------- sections ---------- */
section.block { padding: clamp(40px, 5vw, 60px) 0; }
.block-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* Section heads sit centred over their content, less like a document, more like a page. */
.sec-head { max-width: 620px; margin: 0 auto 26px; text-align: center; }
.sec-head .sub { margin-left: auto; margin-right: auto; }

.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv[data-d="1"] { transition-delay: .06s }
.rv[data-d="2"] { transition-delay: .12s }
.rv[data-d="3"] { transition-delay: .18s }

/* ---------- surface chart ---------- */
.chart { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.chart-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--bg-alt);
}
.chart-head .ct { font-size: .95rem; font-weight: 700; letter-spacing: -.02em; }
.chart-head .cs { font-family: var(--mono); font-size: .72rem; color: var(--ink-dim); margin-top: 2px; }
.chart-legend { display: flex; gap: 16px; font-family: var(--mono); font-size: .68rem; color: var(--ink-soft); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }

.rows { padding: 6px 24px 20px; }
.row {
  display: grid; grid-template-columns: 148px 1fr 62px 88px; align-items: center; gap: 18px;
  padding: 13px 0; border-bottom: 1px solid var(--line-2);
}
.row:last-child { border-bottom: 0; }
.row-name { font-size: .92rem; font-weight: 500; letter-spacing: -.01em; }
.track { display: block; position: relative; height: 9px; border-radius: 5px; background: var(--line-2); overflow: visible; }
.track::after {
  content: ""; position: absolute; left: 75%; top: -13px; bottom: -13px;
  border-left: 1px dashed var(--ink-dim); opacity: .5;
}
.fill { display: block; height: 100%; border-radius: 5px; width: 0; transition: width .9s var(--ease); }
.in .fill, .rows.in .fill { width: var(--w); }
.fill[data-s="safe"]   { background: var(--safe) }
.fill[data-s="warn"]   { background: var(--warn) }
.fill[data-s="danger"] { background: var(--danger) }
.row-t { font-family: var(--mono); font-size: .92rem; font-variant-numeric: tabular-nums; text-align: right; }
.row-s { justify-self: end; }
.chart-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; border-top: 1px solid var(--line); background: var(--bg-alt);
  font-size: .8rem; color: var(--ink-dim);
}
.chart-foot .mk { font-family: var(--mono); }

/* ---------- cold panel ----------
   The winter counterpart to the surface chart. Deliberately not a second bar
   chart: the chart above plots readings taken on a real afternoon, and there
   is no equivalent set of winter readings to plot. These are published
   guidance lines, so they are laid out as guidance. */
.cold-panel {
  margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
}
.cold-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--bg-alt);
}
.cold-head .ct { font-size: .95rem; font-weight: 700; letter-spacing: -.02em; }
.cold-head .cs { font-family: var(--mono); font-size: .72rem; color: var(--ink-dim); margin-top: 2px; }
.cold-scale { display: grid; grid-template-columns: repeat(3, 1fr); }
.cold-step { padding: 18px 22px; border-left: 1px solid var(--line-2); }
.cold-step:first-child { border-left: 0; }
.cold-n {
  font-family: var(--mono); font-size: 1.45rem; font-weight: 500;
  letter-spacing: -.035em; line-height: 1.1; color: var(--cold);
}
.cold-step.is-danger .cold-n { color: var(--danger); }
.cold-step h3 { font-size: .95rem; font-weight: 700; letter-spacing: -.015em; margin: 7px 0 6px; }
.cold-step p { font-size: .86rem; color: var(--ink-soft); line-height: 1.55; }

/* ---------- features ---------- */
.fgroup + .fgroup { margin-top: 26px; }
.fg-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.fg-head p { color: var(--ink-dim); font-size: .9rem; }
.fg-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 999px; padding: 5px 12px;
}
.fg-tag svg { width: 11px; height: 11px; }
.fg-tag-free { color: var(--ink-soft); background: var(--bg-alt); box-shadow: inset 0 0 0 1px var(--line); }
.fg-tag-pro { color: #fff; background: var(--accent); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.features-pro { grid-template-columns: repeat(3, 1fr); border-color: var(--accent-w); background: var(--accent-w); }
.feature { background: var(--bg); padding: 24px 26px 26px; }
/* Premium cards are tinted and carry the accent rule, so the group a card
   belongs to survives being read on its own halfway down the page. */
.feature.is-pro { background: var(--accent-w); box-shadow: inset 0 2px 0 var(--accent); }
/* An odd number of free cards would otherwise leave a dead half-row. */
.features:not(.features-pro) > .feature:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* Icons stand alone, no tile behind them, the same call the 2.0 app made. */
.feature .fi { display: block; color: var(--accent); margin-bottom: 12px; }
.feature .fi svg { width: 30px; height: 30px; }
.feature.is-pro .fi { color: var(--accent); }
.feature h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.feature p { color: var(--ink-soft); font-size: .93rem; line-height: 1.55; }
.tag { font-family: var(--mono); font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-weight: 500; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { counter-increment: s; }
.step::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: .74rem; color: var(--accent);
  display: block; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: .93rem; line-height: 1.55; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; max-width: 760px; margin: 0 auto; }
.plan { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 22px; background: var(--surface); }
.plan.featured { border-color: var(--accent); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan h3 { font-size: 1rem; }
.plan .flag { font-family: var(--mono); font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); background: var(--accent-w); padding: 3px 8px; border-radius: 5px; }
.plan .price { font-size: 2.3rem; font-weight: 700; letter-spacing: -.04em; margin: 14px 0 2px; line-height: 1.1; }
.plan .price span { font-size: .92rem; font-weight: 500; color: var(--ink-dim); letter-spacing: -.01em; }
.plan .per { font-size: .84rem; color: var(--ink-dim); margin-bottom: 22px; }
.plan ul { list-style: none; flex: 1; display: grid; gap: 11px; align-content: start; }
.plan li { display: flex; gap: 10px; font-size: .91rem; color: var(--ink-soft); align-items: flex-start; }
.plan li svg { width: 15px; height: 15px; color: var(--accent); margin-top: 3px; }
.plan .btn { margin-top: 26px; }
.price-note { margin-top: 16px; font-size: .82rem; color: var(--ink-dim); text-align: center; }

/* ---------- closing ---------- */
.close-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.close-inner h2 { max-width: 18ch; }
.close-inner p { color: var(--ink-soft); margin: 8px auto 0; max-width: 38ch; }
.close-inner .stores { justify-content: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.foot-grid p { color: var(--ink-dim); font-size: .86rem; margin-top: 12px; max-width: 30ch; line-height: 1.55; }
.foot-col h4 { font-size: .78rem; font-weight: 700; color: var(--ink); margin-bottom: 14px; letter-spacing: -.01em; }
.foot-col ul { list-style: none; display: grid; gap: 10px; }
.foot-col a { color: var(--ink-soft); font-size: .88rem; transition: color .18s; }
.foot-col a:hover { color: var(--ink); }
.legal {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--ink-dim); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- legal pages ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 60px 28px 92px; }
.doc h1 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); }
.doc .updated { font-family: var(--mono); font-size: .76rem; color: var(--ink-dim); margin: 14px 0 36px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.doc h2 { font-size: 1.14rem; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--ink-soft); margin-bottom: 12px; font-size: .96rem; }
.doc strong { color: var(--ink); font-weight: 700; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  /* no room for the section links inline, the burger carries them instead */
  .nav-links li.hide-sm { display: none; }
  .nav-burger { display: grid; place-items: center; }
  .features-pro { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 52px; }
  .hero h1 { max-width: 16ch; }
  .device-stage { justify-items: center; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 116px 1fr 56px 78px; gap: 12px; }
  .cold-scale { grid-template-columns: 1fr; }
  .cold-step { border-left: 0; border-top: 1px solid var(--line-2); }
  .cold-step:first-child { border-top: 0; }
}
@media (max-width: 640px) {
  .nav-links li.hide-sm { display: none; }
  /* on a phone the hero's store badges are right there, the CTA is noise */
  .nav-cta { display: none; }
  .fg-head { gap: 8px; }
  .fg-head p { flex-basis: 100%; }
  .plans { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .row { grid-template-columns: 1fr 62px; grid-template-areas: "name temp" "bar bar"; gap: 6px 12px; }
  .row-name { grid-area: name } .row-t { grid-area: temp } .track { grid-area: bar; margin-top: 4px }
  .row-s { display: none }
  .track::after { top: -6px; bottom: -6px }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; }
  .fill { width: var(--w); }
}
