/* Paws.do landing page. Tokens mirror the app (DESIGN.md). One idea: the eye line stays still while the pet grows. */
@font-face { font-family: "Source Sans 3"; src: url("/assets/SourceSans3-latin.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
:root {
  color-scheme: light dark;
  --ink: #202b42; --muted: #5e6d84; --accent: #255ce4; --accent-text: #2051cc; --page: #ffffff; --sky: #edf6ff; --line: #dbe5f0; --sun: #fff0a8;
  --gutter: clamp(1.25rem, 5vw, 5rem);
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f3f7ff; --muted: #aebcd2; --accent-text: #aac6ff; --page: #141d2e; --sky: #1b2c48; --line: #394a65; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 1.1875rem/1.45 "Source Sans 3", -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2 { font-weight: 500; letter-spacing: -.025em; line-height: 1.06; text-wrap: balance; }
h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
a { color: var(--accent-text); text-underline-offset: .18em; }
a:focus-visible, summary:focus-visible, video:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 20; background: var(--accent); color: #fff; padding: .75rem 1rem; border-radius: 12px; }
.skip:focus { top: 1rem; }

/* Header sits over the hero. The hero's colours are fixed in both themes, so its text is too. */
.top { position: absolute; z-index: 5; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem var(--gutter); color: #202b42; }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; color: inherit; font-weight: 600; font-size: 1.3rem; letter-spacing: -.02em; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: .25rem; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .75rem; color: inherit; text-decoration: none; font-weight: 500; font-size: 1.0625rem; border-radius: 12px; }
.top nav a:hover { background: rgba(255,255,255,.4); }
/* Phones and tablets: a Menu button opens the links in a panel under the header. */
.menu { display: none; }
.menu svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu .cross, .top.open .menu .bars { display: none; }
.top.open .menu .cross { display: inline; }
@media (max-width: 68rem) {
  .js .menu { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .95rem; border: 0; border-radius: 12px;
    background: rgba(255,255,255,.6); color: #202b42; font: inherit; font-weight: 600; font-size: 1.0625rem; cursor: pointer; }
  .js .menu:focus-visible { outline: 3px solid #255ce4; outline-offset: 2px; }
  .js .top nav { display: none; position: absolute; top: calc(100% - .35rem); left: var(--gutter); right: var(--gutter); flex-direction: column; gap: 0;
    padding: .5rem; background: #fff; border-radius: 20px; box-shadow: 0 18px 50px rgba(32,43,66,.2); }
  .js .top.open nav { display: flex; }
  .js .top nav a { min-height: 52px; padding-inline: 1rem; font-size: 1.125rem; color: #202b42; }
  .js .top nav a:hover, .js .top nav a:focus-visible { background: #edf6ff; }
}

/* Hero: pinned while the scroll drives the flipbook. --line is the eye line's height. */
.hero { --line: 49svh; --h: calc((100svh - var(--line)) / .5137); --w: calc(var(--h) * 1.17);
  position: relative; height: 100svh; min-height: 34rem; overflow: hidden; background: #efab8f; color: #202b42; }
.js .hero-track { height: 560svh; }      /* ten ages: about half a screen of scrolling each */
.js .hero { position: sticky; top: 0; }
.stack img { position: absolute; left: 50%; bottom: 0; height: var(--h); width: auto; max-width: none; transform: translateX(-50%); opacity: 0; }
.stack img.on { opacity: 1; }
.age { position: absolute; right: var(--gutter); top: var(--line); transform: translateY(-50%); background: #fff; padding: .35rem 1rem; border-radius: 12px; font-weight: 600; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
h1 { position: absolute; left: var(--gutter); bottom: calc(100svh - var(--line) + 1.25rem); font-size: clamp(3rem, 4.5vw, 5rem); }
.intro { position: absolute; left: var(--gutter); top: calc(var(--line) + 1.25rem); width: min(25rem, 28vw); font-size: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.1rem; margin-top: 1.25rem; font-weight: 500; }
.button { display: inline-flex; align-items: center; min-height: 52px; padding: 0 1.5rem; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.button:hover { background: #2051cc; }
@media (max-height: 34rem) { .hero { --line: 17rem; } }
@media (max-width: 68rem) {
  .hero { --line: 56svh; }
  h1 { top: 5.25rem; bottom: auto; font-size: clamp(2.75rem, 11vw, 4.5rem); }
  .intro { top: auto; bottom: 1.25rem; left: var(--gutter); right: var(--gutter); width: auto; }
  .intro > p:first-child { display: none; }
  .actions { margin: 0; }
  .actions span { background: rgba(255,255,255,.88); padding: .15rem .6rem; border-radius: 8px; }
  html:not(.js) .top nav a:nth-child(-n+3) { display: none; }      /* no script: keep the short list */
  .age { font-size: 1.0625rem; transform: translateY(.9rem); }     /* below eye height: never over an eye */
}

main > section { padding: clamp(4rem, 9vw, 8rem) var(--gutter); }
.film { background: var(--sky); }
.film h2 { max-width: 75rem; margin: 0 auto 2rem; }
.film video { width: 100%; max-width: 75rem; margin-inline: auto; border-radius: 20px; background: #000; }

.how h2 { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.how ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.25rem, 3vw, 2.75rem); counter-reset: step; }
.how li { counter-increment: step; }
.how img { width: 100%; border-radius: 13% / 6%; outline: 6px solid #10172a; outline-offset: -1px; }
.how h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.015em; margin-top: 1.5rem; }
.how h3::before { content: counter(step) ". "; color: var(--muted); font-weight: 500; }
.how p { color: var(--muted); margin-top: .25rem; }
@media (max-width: 60rem) { .how ol { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 26rem) { .how ol { grid-template-columns: 1fr; } .how img { max-width: 16rem; } }

/* Photos placed so their eyes land on one spot (positions from make_photo_sections.py). */
.bg { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(22px) saturate(1.1); }

/* Everyday photos, lined up: pinned while you scroll through it. Each photo goes from as taken, to level (--pr), to the
   same size and place (--ps), turning around its own eyes. The eye marks (--pe) and the shared eye line (--pl) show it.
   Without JavaScript, or with reduced motion, it simply shows the lined-up result. */
.lineup-track { position: relative; background: var(--sky); }
.lineup { position: relative; background: var(--sky); padding: clamp(4rem, 9vw, 8rem) var(--gutter); text-align: center; }
.js .lineup-track { height: 320svh; }
.js .lineup { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding-block: clamp(1.5rem, 5svh, 3.5rem); }
/* Pinned, it must fit the window: four cards (2:3) no taller than what's left under the text. */
.lineup .cards { width: 100%; margin-inline: auto; text-align: left; }
.js .lineup .cards { width: min(100%, calc((100svh - 20rem) / 1.5 * 4 + 4.5rem)); }
.lineup .text { max-width: 44rem; margin: 0 auto clamp(1.5rem, 3vw, 2.5rem); }
.lineup .text p { color: var(--muted); margin-top: 1rem; }
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.25rem; counter-reset: step; }
.steps li { counter-increment: step; display: inline-flex; align-items: center; justify-content: center; min-height: 2.25rem; padding: 0 1rem; line-height: 1;
  border-radius: 999px; background: var(--page); color: var(--muted); font-weight: 600; font-size: .95rem; box-shadow: inset 0 0 0 1px var(--line); transition: background .25s, color .25s, box-shadow .25s; }
.steps li.on { box-shadow: none; }
.steps li::before { content: counter(step) "."; margin-right: .3em; }
.steps li.on { background: var(--accent); color: #fff; }
.cards .pet { position: absolute; aspect-ratio: 1; max-width: none;
  width: calc(100cqh + (var(--w) - 100cqh) * var(--ps, 1));
  left: calc((50cqw - 50cqh) + (var(--l) - (50cqw - 50cqh)) * var(--ps, 1));
  top: calc(var(--t) * var(--ps, 1));
  transform-origin: var(--ox) var(--oy); transform: rotate(calc(var(--r) * var(--pr, 1))); }
.cards .pet img { display: block; width: 100%; height: 100%; }
.eyes { position: absolute; left: var(--ex); top: var(--ey); width: var(--ed); height: 3px; background: var(--accent); box-shadow: 0 0 0 1.5px #fff;
  transform: translate(-50%, -50%) rotate(var(--ea)); opacity: var(--pe, 0); }
.eyes::before, .eyes::after { content: ""; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--accent); transform: translate(-50%, -50%); }
.eyes::before { left: 0; } .eyes::after { left: 100%; }
.cards li::after { content: ""; position: absolute; left: 0; right: 0; top: 42%; height: 3px; margin-top: -1.5px; background: var(--accent); box-shadow: 0 0 0 1.5px #fff; opacity: var(--pl, 0); }
@media (prefers-reduced-motion: reduce) { .js .lineup-track { height: auto; } .js .lineup { position: relative; height: auto; } .js .lineup .cards { width: 100%; } }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.75rem, 2vw, 1.5rem); position: relative; }
.cards li { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 18px; container-type: size; background: #d9cfc2; }
.cards span { position: absolute; left: .6rem; bottom: .6rem; background: #fff; color: #202b42; font-weight: 600; font-size: .95rem; padding: .15rem .6rem; border-radius: 8px; white-space: nowrap; }
/* Phones and short windows: not pinned (it wouldn't fit). The section scrolls normally, cards two by two at full width,
   and the same steps play as the cards move up the screen. */
@media (max-width: 52rem), (max-height: 40rem) {
  .js .lineup-track { height: auto; }
  .js .lineup { position: relative; height: auto; display: block; padding-block: clamp(3.5rem, 9vw, 5rem); }
  .js .lineup .cards { width: 100%; }
}
@media (max-width: 52rem) { .cards { grid-template-columns: repeat(2, 1fr); } }

/* Stickers: text beside a loose sheet of them, each at its own slight angle, as if stuck on by hand. */
.stickers { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.stickers .text p { color: var(--muted); margin-top: 1rem; max-width: 34rem; }
.stickers ul { display: grid; gap: 1rem; margin-top: 2rem; }
.stickers li strong { display: block; font-weight: 600; }
.stickers li { color: var(--muted); }
.stickers li strong { color: var(--ink); }
.sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.25rem, 1vw, .75rem); background: var(--sky); border-radius: 28px; padding: clamp(1rem, 3vw, 2rem); }
.sheet li { transform: rotate(var(--r, 0deg)); }
.sheet li:nth-child(3n+1) { --r: -5deg; } .sheet li:nth-child(4n+2) { --r: 4deg; } .sheet li:nth-child(5n+3) { --r: -2deg; } .sheet li:nth-child(7n) { --r: 6deg; }
.sheet img { width: 100%; filter: drop-shadow(0 6px 10px rgba(32,43,66,.12)); }
@media (max-width: 52rem) { .stickers { grid-template-columns: 1fr; } .sheet { grid-template-columns: repeat(3, 1fr); } }

.price { background: var(--sun); color: #202b42; }
/* A price list: the number big on the left, what you get in one sentence on the right. */
.price .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem clamp(2rem, 6vw, 6rem); align-items: baseline;
  padding: clamp(1.75rem, 4vw, 3rem) 0; border-bottom: 2px solid rgba(32,43,66,.14); max-width: 72rem; }
.price .row:first-child { padding-top: 0; }
.price h2, .price h3 { font-size: clamp(3.25rem, 8vw, 6.5rem); font-weight: 500; letter-spacing: -.035em; line-height: .95; margin: 0; }
.price h3 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
.price h2 span, .price h3 span { font-size: .32em; font-weight: 500; letter-spacing: -.01em; color: #544716; }
.price .row p { font-size: clamp(1.2rem, 1.9vw, 1.5rem); line-height: 1.35; max-width: 34rem; }
.price .fine { color: #544716; margin-top: 1.5rem; max-width: 44rem; }
.price .soon { margin-top: 1.75rem; }
@media (max-width: 52rem) { .price .row { grid-template-columns: 1fr; } }

.safe { background: var(--accent); color: #fff; }
.safe h2 { font-size: clamp(2.5rem, 6.6vw, 5.75rem); max-width: 16ch; }
.safe ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem clamp(2rem, 5vw, 5rem); margin: clamp(2.5rem, 5vw, 4rem) 0 2rem; }
.safe strong { display: block; font-size: 1.5rem; font-weight: 600; }
.safe li { color: #dbe6ff; }
.safe li strong { color: #fff; }
.safe a { color: #fff; }
.safe a:focus-visible { outline-color: #fff; }
@media (max-width: 44rem) { .safe ul { grid-template-columns: 1fr; } }

/* App Store: Apple's badge (black, as Apple supplies it), or the same shape as text until the badge file is added. */
.store { display: inline-flex; align-items: center; min-height: 50px; border-radius: 10px; }
.store img { height: 50px; width: auto; }
.store.text { padding: 0 1.25rem; background: #000; color: #fff; font-weight: 600; font-size: 1.0625rem; text-decoration: none; border: 1px solid #a6a6a6; }
.button.ghost { background: rgba(255,255,255,.88); color: #202b42; gap: .5rem; }
.button .play { flex: none; margin-left: -.2rem; }

.faq { max-width: 52rem; margin-inline: auto; }
.faq h2 { margin-bottom: 1.5rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; min-height: 3.5rem; padding-block: .5rem; font-weight: 600; font-size: 1.25rem; cursor: pointer; }
.faq details p { color: var(--muted); padding-bottom: 1.25rem; max-width: 40rem; }
.faq > p { margin-top: 1.5rem; }

.end { padding: 2.5rem var(--gutter) calc(2.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; }
.end a { margin-right: 1rem; font-size: .875rem; color: var(--muted); text-decoration: none; }
.end a:hover, .end a:focus-visible { text-decoration: underline; color: var(--ink); }
.end a:last-child { margin-right: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
