/* FirstTen marketing site. Colours, spacing and radii come from tokens.css,
   which is generated from the app's theme (firstten/src/theme/tokens.ts).
   Daylight by default, Dusk under prefers-color-scheme: dark. */

@font-face {
  font-family: Ionicons;
  src: url('/site/fonts/ionicons-site.woff2') format('woff2');
  font-display: block;
}

:root {
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: Figtree, system-ui, sans-serif;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* The page turns to Dusk at sunset while it is open; let it fade rather than snap. */
@media (prefers-reduced-motion: no-preference) {
  body, .sheet, .card, .chip, .notif, .screen, .tabbar { transition: background-color .8s ease, color .8s ease, box-shadow .8s ease; }
}
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 23px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: var(--brand-deep); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 12px 16px; border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 700; }
.skip:focus { top: 16px; }

.ic { font-family: Ionicons; font-style: normal; font-weight: normal; line-height: 1; display: inline-block; flex: none; speak: never; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* Type: the app's scale, stretched for a wide screen */
.display { font-family: var(--font-display); font-weight: 800; margin: 0; }
.h1 { font-size: 72px; line-height: 72px; letter-spacing: -2.4px; text-wrap: balance; }
.h2 { font-size: 48px; line-height: 50px; letter-spacing: -1.4px; text-wrap: balance; }
.h3 { font-size: 22px; line-height: 27px; letter-spacing: -0.3px; }
.title { font-size: 30px; line-height: 34px; letter-spacing: -0.8px; }
.label { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin: 0; }
.lead { font-size: 19px; line-height: 29px; color: var(--text-secondary); margin: 0; text-wrap: pretty; }
.body { margin: 0; color: var(--text-secondary); }
.small { font-size: 14px; line-height: 20px; }
.caption { font-size: 12px; line-height: 16px; font-weight: 600; }
.strong { font-weight: 700; }
.muted { color: var(--text-muted); }
.ink { color: var(--text); }
.brand { color: var(--brand-deep); }
.accent { color: var(--accent); }
.gold { color: var(--gold-deep); }
.sky { color: var(--sky); }

/* Layout helpers */
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.self-start { align-self: flex-start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.stack-xl { display: flex; flex-direction: column; gap: 40px; }
.grid2, .grid3, .grid4 { display: grid; gap: 16px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Buttons (Button.tsx): a pill whose colour says what it does */
.btn { font: 700 16px/23px var(--font-body); display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 26px; border-radius: 999px; border: 0; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .1s, opacity .1s, background-color .8s ease, color .8s ease, box-shadow .8s ease; }
a.btn:active { transform: scale(.98); opacity: .85; }
.btn .ic { font-size: 20px; }
.btn-md { height: 50px; padding: 0 22px; }
.btn-sm { height: 44px; padding: 0 18px; font-size: 14px; line-height: 20px; gap: 6px; }
.btn-sm .ic { font-size: 16px; }
.btn-xs { height: 38px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-xs .ic { font-size: 15px; }
.btn-primary { background: var(--brand); color: var(--text-on-brand); }
.btn-secondary { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 2px var(--border); }
.btn-time { background: var(--sky-deep); color: var(--text-on-sky); }
.btn-gold { background: var(--gold); color: #0e2233; }
.btn-dusk-primary { background: #3fb874; color: #0d1b2a; }
.btn-night { background: rgba(241, 246, 250, .12); color: var(--starlight); box-shadow: inset 0 0 0 2px rgba(241, 246, 250, .4); }
@media (hover: hover) {
  a.btn-primary:hover { filter: brightness(1.08); }
  a.btn-secondary:hover { box-shadow: inset 0 0 0 2px var(--border-strong); }
  a.btn-night:hover { background: rgba(241, 246, 250, .2); }
}
.store { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.store small { font-size: 11px; font-weight: 600; letter-spacing: .2px; opacity: .9; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Cards (Card.tsx) */
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card); border: 1px solid var(--card-border); }
.card-hero { border-radius: var(--radius-xl); padding: 24px; }
.card-gold, .card-alt, .card-night, .card-brand-soft { box-shadow: none; border-color: transparent; }
.card-gold { background: var(--gold-soft); }
.card-alt { background: var(--surface-alt); }
.card-brand-soft { background: var(--brand-soft); }
.card-night { background: var(--night); color: var(--starlight); }

.tile { width: 56px; height: 56px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 26px; flex: none; }
.tile-sm { width: 44px; height: 44px; border-radius: 14px; font-size: 20px; }
.tile-surface { background: var(--surface); color: var(--brand-deep); }
.tile-night { background: var(--night); color: var(--starlight); }
.cat-bonding { background: var(--cat-bonding-soft); color: var(--cat-bonding); }
.cat-sensory { background: var(--cat-sensory-soft); color: var(--cat-sensory); }
.cat-learning { background: var(--cat-learning-soft); color: var(--cat-learning); }
.cat-imaginative { background: var(--cat-imaginative-soft); color: var(--cat-imaginative); }
.cat-outdoor { background: var(--sky-soft); color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--space-sm); font-size: 12px; line-height: 16px; font-weight: 700; }
.badge-quiet { background: var(--surface-alt); color: var(--text-secondary); }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--gold-soft); font-size: 13px; line-height: 16px; font-weight: 700; color: var(--text); }
.pill .ic { color: var(--gold-deep); font-size: 14px; }
.partner-label { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: var(--surface-alt); color: var(--text-secondary); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }

/* Header and hero: today's sky, drawn by the app's own scene code */
.hero { position: relative; overflow: hidden; color: var(--sky-ink, #0e2233); background: var(--sky-zenith, #5fa3e6); padding-bottom: calc(100vw / 1.8 * .3); min-height: calc(100vw / 1.8); }
.hero-scene { position: absolute; left: 0; right: 0; bottom: 0; }
.hero-scene svg { width: 100%; height: auto; }
.hero-wrap { position: relative; z-index: 2; }
.nav { display: flex; align-items: center; gap: 24px; height: 80px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-height: 44px; }
.brand img { width: 40px; height: 40px; }
.brand span { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.6px; }
.brand-footer { color: var(--text); }
.brand-footer img { border-radius: 10px; }
.nav-links { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav-links a:not(.btn) { color: inherit; text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px; border-radius: 999px; }
@media (hover: hover) { .nav-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; } }
.welcome-back { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 8px; padding: 10px 16px; border-radius: 999px; background: var(--surface); color: var(--text); width: fit-content; font-weight: 600; box-shadow: var(--shadow-card); }
.welcome-back a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; min-height: 24px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: start; padding-top: 48px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; max-width: 620px; }
.hero-label { color: var(--sky-label, #12355e); }
.hero-lead { color: inherit; opacity: .88; }
.hero-meta { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; }
.sky-note { position: absolute; z-index: 2; left: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); bottom: 112px; margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: #0e2233; font-size: 13px; font-weight: 600; }
.sky-note-moon { display: none; }
.night .sky-note { background: rgba(13, 27, 42, .72); color: #f1f6fa; }
.night .sky-note-sun { display: none; }
.night .sky-note-moon { display: inline-block; }
.sheet { position: relative; z-index: 3; margin-top: -72px; background: var(--background); border-radius: 40px 40px 0 0; }

/* The phone on the hero: the Today screen, drawn with the same tokens */
.phone { width: 330px; height: 676px; margin: 0 auto; border-radius: 52px; background: #0e2233; padding: 11px; box-shadow: 0 0 0 1px rgba(241, 246, 250, .14), 0 40px 80px -24px rgba(14, 34, 51, .5); }
.screen { width: 100%; height: 100%; border-radius: 42px; background: var(--background); overflow: hidden; display: flex; flex-direction: column; color: var(--text); }
.screen-body { flex: 1; padding: 44px 14px 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.phone-greeting { font-weight: 700; font-size: 15px; }
.pill-xs { font-size: 11px; padding: 5px 9px; }
.daycard { position: relative; border-radius: 22px; overflow: hidden; height: 184px; flex: none; background: var(--scene-sky); }
.daycard-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.daycard-text { position: absolute; left: 14px; top: 12px; right: 14px; color: var(--card-ink, #0e2233); }
.daycard-label { font-size: 10px; color: var(--card-label, #12355e); }
.daycard-num { font-size: 38px; line-height: 40px; letter-spacing: -1.4px; }
.daycard-sub { opacity: .85; }
.phone-line { margin: 2px 0; text-align: center; color: var(--text-secondary); font-size: 12px; line-height: 17px; }
.phone-card { padding: 14px; border-radius: 22px; display: flex; flex-direction: column; gap: 8px; }
.label-xs { font-size: 10px; }
.badge-xs { font-size: 10px; padding: 1px 7px; }
.phone-title { font-size: 20px; line-height: 23px; letter-spacing: -.5px; }
.phone-desc { color: var(--text-secondary); font-size: 12px; line-height: 17px; }
.tabbar { display: flex; justify-content: space-around; background: var(--tab-bar); border-top: 1px solid var(--border); padding: 6px 0 18px; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--text-muted); width: 54px; }
.tab-icon { width: 46px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.tab-on { color: var(--text); }
.tab-on .tab-icon { background: var(--tab-active); color: var(--tab-active-icon); }

/* Sections */
.section { padding-top: 96px; scroll-margin-top: 16px; }
.section-first { padding-top: 72px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.split.flip .visual { order: -1; }
.copy { display: flex; flex-direction: column; gap: 20px; max-width: 540px; }
.copy-wide { max-width: 760px; }
.visual { display: flex; flex-direction: column; gap: 16px; }
.ticks, .list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li, .list li { display: flex; gap: 12px; align-items: flex-start; }
.ticks .ic { font-size: 14px; width: 24px; height: 24px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.ticks-brand .ic { background: var(--brand-soft); color: var(--brand-deep); }
.ticks-sky .ic { background: var(--sky-soft); color: var(--accent); }
.ticks-gold .ic { background: var(--gold-soft); color: var(--gold-deep); }
.list { gap: 14px; margin: 0; }
.list .ic { font-size: 18px; margin-top: 2px; }
.list-brand .ic { color: var(--brand); }
.list-sky .ic { color: var(--accent); }
.more { font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; align-self: flex-start; }
.aside { margin: -16px 0 0; }

/* Ten years is 3,653 days */
.counter { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field input { font: 600 16px var(--font-body); height: 52px; padding: 0 16px; border: 2px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); width: 100%; max-width: 260px; }
.field input:focus { border-color: var(--brand); outline: none; }
.note { margin: 0; display: flex; gap: 8px; align-items: center; }
.counter-card { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.bignum { font-family: var(--font-display); font-weight: 800; font-size: 64px; line-height: 64px; letter-spacing: -2.4px; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.of { margin: 0 0 6px; font-weight: 700; color: var(--accent); }
.dots { display: grid; grid-template-columns: repeat(29, minmax(0, 1fr)); gap: 5px; }
.dot { aspect-ratio: 1; border-radius: 50%; background: var(--surface-alt); }
.dot.lived { background: var(--brand); }
.dot.memory { background: var(--gold); }
.dot.now { background: transparent; box-shadow: inset 0 0 0 2.5px var(--sky); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.key-lived { background: var(--brand); }
.key-now { box-shadow: inset 0 0 0 2px var(--sky); }
.key-come { background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* Outside */
.notif { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow-raised); border: 1px solid var(--card-border); }
.notif img { width: 36px; height: 36px; border-radius: 9px; }
.notif-app { font-weight: 700; font-size: 14px; }
.ring { position: relative; width: 148px; height: 148px; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--sky-soft); stroke-width: 14; }
.ring-bar { fill: none; stroke: var(--sky); stroke-width: 14; stroke-linecap: round; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 30px; line-height: 32px; letter-spacing: -1px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 72px; }
.bars i { flex: 1; border-radius: 8px; background: var(--sky); }
.bars i.off { background: var(--surface-alt); }
.bar-days { margin-top: 6px; }

/* Memories */
.memory-tile { min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.memory-tile .ic { font-size: 20px; }
.memory-title { font-weight: 700; }

/* Baby days */
.stats { gap: 10px; align-items: stretch; }
.stat { background: var(--surface-alt); border-radius: 16px; padding: 10px 12px; flex: 1; min-width: 0; }
.stat-num { font-weight: 800; font-size: 18px; line-height: 24px; }
.quick { flex: 1; min-width: 0; border: 2px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; font-weight: 700; font-size: 13px; }
.quick .ic { font-size: 20px; }
.link-ish { font-weight: 700; color: var(--brand-deep); }
.leap { justify-content: space-between; }
.night-label { color: #a9d1f7; }
.night-body { margin: 0; color: rgba(241, 246, 250, .86); }
.progress { height: 6px; border-radius: 3px; background: rgba(241, 246, 250, .18); overflow: hidden; }
.progress i { display: block; height: 100%; width: 44%; background: var(--gold); border-radius: 3px; }

/* Family */
.avatars { display: flex; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font: 800 16px var(--font-display); box-shadow: 0 0 0 3px var(--surface); }
.avatar + .avatar { margin-left: -8px; }
.timeline-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.timeline-row .ic { font-size: 20px; }
.time { width: 44px; }

/* Near you */
.curator { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px; }

/* Free */
.free { padding: 48px; gap: 40px; }

/* Get the app: the same sky at night */
.final { position: relative; overflow: hidden; border-radius: 40px; background: var(--final-zenith, #08101f); color: var(--starlight); }
.final-scene { margin-top: -96px; min-height: 160px; }
.final-scene svg { width: 100%; height: auto; }
.final-copy { position: relative; z-index: 1; padding: 72px 64px 0; display: flex; flex-direction: column; gap: 20px; max-width: 680px; }

.footer { padding: 64px var(--gutter) 48px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; justify-content: space-between; }
.footer-end { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer-links a { text-decoration: none; font-weight: 600; color: var(--text); padding: 12px 0; }
@media (hover: hover) { .footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; } }

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .phone { display: none; }
  .split, .counter { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .split.flip .visual { order: 0; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-bottom: calc(100vw / 1.8 * .55); }
  .sky-note { bottom: 96px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav { height: 68px; gap: 12px; }
  .nav-links a:not(.btn) { display: none; }
  .welcome-back { border-radius: 20px; }
  .h1 { font-size: 42px; line-height: 44px; letter-spacing: -1.4px; }
  .h2 { font-size: 34px; line-height: 38px; letter-spacing: -1px; }
  .title { font-size: 26px; line-height: 30px; letter-spacing: -.6px; }
  .lead { font-size: 17px; line-height: 26px; }
  .hero-inner { padding-top: 16px; }
  .hero-copy { gap: 20px; }
  .hero { padding-bottom: 200px; min-height: 0; }
  .hero-scene svg { height: 320px; }
  .sky-note { position: relative; left: auto; bottom: auto; margin: 24px var(--gutter) 0; font-size: 12px; line-height: 16px; border-radius: 16px; align-items: flex-start; }
  .sky-note .ic { margin-top: 2px; }
  .sheet { border-radius: 28px 28px 0 0; margin-top: -56px; }
  .section { padding-top: 72px; }
  .section-first { padding-top: 48px; }
  .grid2, .grid3, .grid4 { grid-template-columns: minmax(0, 1fr); }
  .dots { gap: 3px; }
  .bignum { font-size: 52px; line-height: 54px; letter-spacing: -2px; }
  .counter-card { padding: 20px; }
  .free { padding: 28px 24px; }
  .final { border-radius: 28px; }
  .final-copy { padding: 40px 24px 0; }
  .final-scene { margin-top: -24px; }
  .footer-end { align-items: flex-start; }
  .stats .stat { padding: 10px; }
}
