/* First Cards marketing site. Tokens match the app (app/assets/css/main.css). */

@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url('/fonts/baloo-2-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('/fonts/baloo-2-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 500; font-display: swap; src: url('/fonts/nunito-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2'); }

:root {
  --bg: #fff7e6;
  --surface: #ffffff;
  --surface-2: #fff0d1;
  --ink: #2b2519;
  --ink-soft: #6b604c;
  --line: #eadcbf;
  --brand: #ff5a5f;
  --brand-deep: #e8474c;
  --accent: #3d9be9;
  --good: #3fae5c;
  --gold: #f2b233;
  --sun: #ffc93c;
  --grape: #8e5cd9;
  --ember: #f2643a;
  --term: #ffe7a3;
  --term-ink: #6a4700;
  --shadow: 0 3px 0 rgba(90, 64, 20, 0.12), 0 8px 24px rgba(90, 64, 20, 0.08);
  --shadow-lg: 0 6px 0 rgba(90, 64, 20, 0.1), 0 24px 60px rgba(90, 64, 20, 0.16);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }

.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }

/* Buttons: the app's chunky pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 14px 26px;
  border-radius: 999px; border: 0;
  background: var(--surface); box-shadow: var(--shadow);
  font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.1;
  text-decoration: none; text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(2px) scale(0.98); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-deep), 0 10px 24px rgba(255, 90, 95, 0.3); }
.btn.small { min-height: 42px; padding: 8px 18px; font-size: 16px; }
.btn.small.primary { box-shadow: 0 3px 0 var(--brand-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; }

/* The app's tappable-term highlight */
.term {
  background: linear-gradient(transparent 22%, var(--term) 22%, var(--term) 90%, transparent 90%);
  color: var(--term-ink); padding: 0 0.08em; margin: 0 -0.04em;
  text-decoration: underline dotted 0.08em; text-underline-offset: 0.14em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.logo img, .logo .mark { width: 36px; height: 36px; flex: none; }
.logo .mark { overflow: visible; }

/* Header logo (angles as in shared/utils/brand.ts): starts as one pile and fans
   out on load; on hover (logo.js adds .replay) it collapses and fans again.
   The star is there throughout and dazzles as the cards land. */
.fc-card { transform-box: view-box; transform-origin: 50px 84px; transform: rotate(var(--r)); }
.fc-blue { --r: -20deg; }
.fc-gold { --r: -3deg; }
.fc-coral { --r: 15deg; }
.fc-sparkle { transform-box: view-box; transform-origin: 50px 47px; }
.logo.animated .fc-card { animation: fc-fan 0.7s cubic-bezier(0.34, 1.6, 0.64, 1) 0.3s both; }
.logo.animated .fc-gold { animation-delay: 0.36s; }
.logo.animated .fc-coral { animation-delay: 0.42s; }
.logo.animated .fc-sparkle { animation: fc-dazzle 0.6s ease-in-out 0.85s both; }
.logo.replay .fc-card { animation: fc-shuffle 0.9s cubic-bezier(0.34, 1.4, 0.64, 1) both; }
.logo.replay .fc-gold { animation-delay: 0.05s; }
.logo.replay .fc-coral { animation-delay: 0.1s; }
.logo.replay .fc-sparkle { animation: fc-dazzle 0.6s ease-in-out 0.62s both; }
@keyframes fc-fan { from { transform: rotate(0deg); } to { transform: rotate(var(--r)); } }
/* The star stays put while the cards move, then twinkles as they land. */
@keyframes fc-dazzle { 0% { transform: none; } 30% { transform: scale(1.45) rotate(45deg); } 55% { transform: scale(0.85) rotate(70deg); } 75% { transform: scale(1.2) rotate(85deg); } 100% { transform: rotate(90deg); } }
@keyframes fc-shuffle {
  0% { transform: rotate(var(--r)); }
  30% { transform: rotate(0deg) translateY(-2px); }
  38% { transform: rotate(0deg) scale(1.04, 0.95); }
  66% { transform: rotate(calc(var(--r) * 1.2)); }
  80% { transform: rotate(calc(var(--r) * 0.94)); }
  100% { transform: rotate(var(--r)); }
}
.logo.small { font-size: 20px; }
.logo.small img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 800; font-size: 16px; padding: 8px 14px; border-radius: 999px; color: var(--ink-soft); }
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; height: 60px; }
}

/* Hero */
.hero { position: relative; padding: 56px 0 72px; overflow: hidden; }
.blobs { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(4px); opacity: 0.55; }
.b1 { width: 520px; height: 520px; background: radial-gradient(circle, #ffd9d0 0%, transparent 68%); right: -120px; top: -80px; }
.b2 { width: 420px; height: 420px; background: radial-gradient(circle, #d4e9fb 0%, transparent 68%); right: 280px; bottom: -160px; }
.b3 { width: 360px; height: 360px; background: radial-gradient(circle, #ffe8a8 0%, transparent 68%); left: -140px; top: 120px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--brand-deep); background: #ffe3dc; padding: 6px 14px; border-radius: 999px; }
.eyebrow.light { color: var(--sun); background: rgba(255, 201, 60, 0.14); }
.hero h1 { font-size: clamp(46px, 7vw, 84px); font-weight: 800; margin: 18px 0 18px; letter-spacing: -0.03em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 34em; }
.promise-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 30px; }
.promise-pills li {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); box-shadow: var(--shadow);
  padding: 9px 16px 9px 12px; border-radius: 999px;
  font-weight: 800; font-size: 17px;
}
.promise-pills li:nth-child(1) .i { color: var(--brand); }
.promise-pills li:nth-child(2) .i { color: var(--accent); }
.promise-pills li:nth-child(3) .i { color: var(--gold); }
.promise-pills li:nth-child(4) .i { color: var(--grape); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Phones */
.phone {
  margin: 0; position: relative;
  width: 100%; max-width: 300px;
  padding: 9px; border-radius: 46px;
  background: #2b2519;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #463d2c;
}
.screen {
  --status: var(--bg);
  position: relative; display: flex; flex-direction: column;
  border-radius: 37px; overflow: hidden; background: var(--status);
  container-type: inline-size;
}
.screen.dim { --status: #9f9888; }
.status { /* status bar with the island, so it never covers the app */
  flex: none; height: 12cqw; position: relative;
  display: flex; align-items: center; padding: 0 9cqw;
  font: 800 4.2cqw/1 var(--font-body); color: var(--ink);
}
.status i { position: absolute; left: 50%; top: 2.6cqw; translate: -50% 0; width: 28cqw; height: 7.4cqw; border-radius: 999px; background: #2b2519; }
.status::after { content: ''; margin-left: auto; width: 6.4cqw; height: 3.2cqw; border-radius: 1cqw; border: 0.5cqw solid currentColor; opacity: 0.8; }
.phone img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; background: var(--bg); }
.hero-phones { position: relative; height: 660px; }
.hero-phones .phone { position: absolute; max-width: 280px; }
.hero-phones .back { left: 4%; top: 30px; rotate: -7deg; }
.hero-phones .front { right: 4%; top: 0; rotate: 5deg; }
.tap-ring {
  /* over the HP on the card in explain-hp.webp */
  position: absolute; left: 67.5%; top: calc(12cqw + 216.4cqw * 0.129);
  width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 3px solid var(--brand); z-index: 2;
  animation: ring 2.2s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(0.6); opacity: 1; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

.sticker {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-lg);
  font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1; white-space: nowrap;
  animation: bob 5s ease-in-out infinite;
}
.sticker .i { width: 1.35em; height: 1.35em; }
.s1 { right: -12px; top: 44px; rotate: 4deg; animation-delay: -0.8s; }
.s1 .i { color: var(--brand); }
.s2 { left: 0; top: 6px; rotate: -6deg; animation-delay: -1.6s; background: var(--brand); color: #fff; }
.s3 { left: 6%; bottom: 36px; rotate: 3deg; animation-delay: -3.2s; }
.s3 .i { color: var(--gold); }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

@media (max-width: 900px) {
  .hero { padding: 28px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-phones { height: min(600px, 142vw); max-width: 460px; width: 100%; margin: 0 auto; }
  .hero-phones .phone { max-width: min(250px, 58vw); }
  .hero-phones .back { left: 0; }
  .hero-phones .front { right: 0; }
  .sticker { font-size: 16px; }
  .s1 { right: 0; top: 4%; }
  .s3 { left: 0; bottom: 2%; }
  .s2 { left: 2%; top: 38%; }
}
@media (max-width: 520px) {
  .hero-cta .btn { width: 100%; }
}

/* Section titles */
.section-title { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; letter-spacing: -0.025em; max-width: 18em; }
.section-lead { font-size: 20px; color: var(--ink-soft); margin-top: 12px; max-width: 36em; }

/* Promise */
.promise { padding: 72px 0; }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.promise-tile {
  --tile: var(--brand); --tile-soft: #ffe3dc;
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: 28px; box-shadow: var(--shadow);
  padding: 26px 24px 28px;
}
.promise-tile::after { /* a peeking card in the corner */
  content: ''; position: absolute; right: -26px; top: -30px; width: 90px; height: 124px;
  border-radius: 14px; background: var(--tile-soft); rotate: 16deg;
}
.promise-tile h3 { font-size: 30px; font-weight: 800; margin: 18px 0 8px; position: relative; z-index: 1; }
.promise-tile p { color: var(--ink-soft); font-size: 17px; position: relative; z-index: 1; }
.badge {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 20px;
  background: var(--tile); color: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}
.badge svg { width: 34px; height: 34px; }
.t-coral { --tile: var(--brand); --tile-soft: #ffe3dc; }
.t-blue { --tile: var(--accent); --tile-soft: #dcecfb; }
.t-gold { --tile: var(--gold); --tile-soft: #ffefc2; }
.t-green { --tile: var(--good); --tile-soft: #daf1df; }
.t-grape { --tile: var(--grape); --tile-soft: #eee4fb; }
.t-ember { --tile: var(--ember); --tile-soft: #ffe2d6; }
@media (max-width: 1000px) { .promise-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .promise { padding: 48px 0; }
  .promise-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* Features */
.features { padding: 24px 0 40px; }
.feature {
  --panel: #ffe9e2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  width: calc(100% - 32px); max-width: 1128px; margin: 0 auto 24px; padding: 64px 56px;
  background: var(--panel); border-radius: 44px; position: relative; overflow: hidden;
}
.feature::before { /* a big soft card shape in the corner */
  content: ''; position: absolute; width: 260px; height: 360px; border-radius: 36px;
  background: rgba(255, 255, 255, 0.45); right: -80px; bottom: -120px; rotate: 18deg;
}
.feature.flip::before { right: auto; left: -80px; rotate: -18deg; }
.feature > * { position: relative; }
.f-coral { --panel: #ffe6df; }
.f-gold { --panel: #ffefc4; }
.f-grape { --panel: #eee4fb; }
.f-blue { --panel: #deedfb; }
.feature.flip .feature-copy { order: 2; }
.feature h2 { font-size: clamp(34px, 4.2vw, 50px); font-weight: 800; letter-spacing: -0.025em; margin: 14px 0 14px; }
.feature-copy > p { font-size: 19px; color: var(--ink-soft); max-width: 32em; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  padding: 6px 16px 6px 12px; border-radius: 999px; color: #fff;
}
.k-coral { background: var(--brand); }
.k-gold { background: var(--sun); color: #4a3500; }
.k-grape { background: var(--grape); }
.k-blue { background: var(--accent); }
.ticks { display: grid; gap: 10px; margin-top: 22px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.ticks .i { color: var(--good); margin-top: 0.2em; width: 1.2em; height: 1.2em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li {
  background: var(--term); color: var(--term-ink);
  font-weight: 800; font-size: 16px; padding: 6px 14px; border-radius: 999px;
  text-decoration: underline dotted 2px; text-underline-offset: 3px;
}
.feature-media { position: relative; display: flex; justify-content: center; }
.feature-media .phone { max-width: 300px; rotate: 2deg; }
.feature.flip .feature-media .phone { rotate: -2deg; }
.feature-media.pair { min-height: 680px; }
.feature-media.pair .phone { position: absolute; max-width: 270px; }
.feature-media.pair .phone:first-child { left: -2%; top: 0; rotate: -5deg; z-index: 1; }
.feature-media.pair .phone.second { right: -2%; top: 50px; rotate: 5deg; }
.s-found { left: 8%; top: 38%; background: var(--good); color: #fff; rotate: -6deg; }
.s-spares { right: 4%; bottom: 16%; rotate: 5deg; }
.s-spares .i { color: var(--good); }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px 44px; border-radius: 32px; width: calc(100% - 24px); margin: 0 auto 16px; }
  .feature.flip .feature-copy { order: 0; }
  .feature-media .phone { max-width: min(280px, 72vw); }
  .feature-media.pair { min-height: 0; height: min(600px, 142vw); max-width: 460px; width: 100%; margin: 0 auto; }
  .feature-media.pair .phone { max-width: min(240px, 56vw); }
  .feature-media.pair .phone:first-child { left: 0; }
  .feature-media.pair .phone.second { right: 0; }
  .s-found { left: 0; }
  .s-spares { right: 0; }
}

/* Grown-ups */
.grownups {
  background: var(--ink); color: #fff7e6;
  padding: 88px 0; margin-top: 24px;
  border-radius: 48px 48px 0 0;
}
.grownups .section-lead { color: #d8ccb4; }
.grownups .eyebrow { margin-bottom: 18px; }
.safety-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.safety { background: #3a3224; border-radius: var(--radius); padding: 22px 22px 24px; }
.safety .i { width: 36px; height: 36px; color: var(--sun); }
.safety:nth-child(4n + 2) .i { color: #7cc0f5; }
.safety:nth-child(4n + 3) .i { color: #ff8e91; }
.safety:nth-child(4n + 4) .i { color: #7fd495; }
.safety h3 { font-size: 22px; font-weight: 800; margin: 12px 0 6px; }
.safety p { font-size: 16px; color: #d8ccb4; }
@media (max-width: 1000px) { .safety-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .grownups { padding: 56px 0; border-radius: 32px 32px 0 0; }
  .safety-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* Price */
.price { background: var(--ink); padding: 0 0 88px; }
.price-inner { display: flex; justify-content: center; }
.price-card {
  --tile: var(--brand);
  position: relative; overflow: hidden;
  width: 100%; max-width: 760px;
  background: var(--bg); border-radius: 36px; box-shadow: var(--shadow-lg);
  padding: 44px 48px 48px; text-align: center;
}
.price-card .badge { margin: 0 auto; }
.price-card h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 800; margin: 18px 0 10px; letter-spacing: -0.025em; }
.price-lead { color: var(--ink-soft); font-size: 19px; max-width: 30em; margin: 0 auto; }
.price-tag { display: flex; flex-direction: column; align-items: center; margin: 26px 0 8px; }
.amount { font-family: var(--font-display); font-weight: 800; font-size: 84px; line-height: 1; letter-spacing: -0.03em; color: var(--brand); }
.once { font-weight: 800; color: var(--ink-soft); }
.price-card .ticks { justify-content: center; text-align: left; width: fit-content; margin: 24px auto 0; }
@media (max-width: 560px) {
  .price { padding-bottom: 56px; }
  .price-card { padding: 32px 20px 34px; border-radius: 28px; }
}

/* FAQ */
.faq { padding: 88px 0 56px; }
.faq .section-title { margin-bottom: 28px; }
details {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden;
}
summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px;
  font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.2;
}
summary::-webkit-details-marker { display: none; }
summary .i { color: var(--ink-soft); transition: rotate 0.2s ease; }
details[open] summary .i { rotate: 180deg; }
details p { padding: 0 24px 22px; color: var(--ink-soft); }
@media (max-width: 560px) {
  .faq { padding: 56px 0 32px; }
  summary { font-size: 19px; padding: 18px 18px; }
  details p { padding: 0 18px 18px; }
}

/* Get it */
.get { padding: 32px 0 88px; }
.get-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  background: var(--brand); color: #fff; border-radius: 40px;
  padding: 56px 24px; box-shadow: 0 6px 0 var(--brand-deep), 0 24px 60px rgba(255, 90, 95, 0.28);
  position: relative; overflow: hidden;
}
.get-inner::before, .get-inner::after {
  content: ''; position: absolute; width: 150px; height: 206px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
}
.get-inner::before { left: -40px; bottom: -70px; rotate: -18deg; }
.get-inner::after { right: -30px; top: -80px; rotate: 20deg; }
.get-logo { width: 84px; height: 84px; background: #fff; border-radius: 26px; padding: 10px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12); }
.get h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 800; letter-spacing: -0.025em; max-width: 14em; margin-top: 8px; }
.get p { font-size: 19px; opacity: 0.92; max-width: 30em; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 20px;
  font-family: var(--font-display); font-weight: 800; font-size: 19px;
}
.store em { font-style: normal; font-family: var(--font-body); font-size: 13px; background: rgba(255, 255, 255, 0.16); padding: 2px 8px; border-radius: 999px; }
@media (max-width: 560px) { .get { padding: 16px 0 56px; } .get-inner { border-radius: 30px; padding: 44px 20px; } }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 calc(40px + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: grid; gap: 12px; }
.fine { font-size: 14px; color: var(--ink-soft); max-width: 62em; }

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