/* Pecki, Crimson Crest. Modern scroll-driven CSS animations. */

@property --total {
  syntax: '<integer>';
  inherits: false;
  initial-value: 0;
}
@property --total-cents {
  syntax: '<integer>';
  inherits: false;
  initial-value: 0;
}

:root {
  --bg: #f7f5ee;
  --bg2: #ede8d8;
  --surface: #fdfaf2;
  --ink: #1a232a;
  --ink2: #3a4751;
  --ink-soft: #5b6671;
  --line: #e0d9c8;
  --accent: #c32b3e;
  --accent-soft: #f7d8dd;
  --accent-ink: #a02030;
  --accent-deep: #7a1a26;
  --pos: #3d8a4a;
  --pos-soft: #dcebdf;
  --warn-soft: #f6ead0;

  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 30px;

  --shadow-card: 0 1px 2px rgba(26, 35, 42, 0.04), 0 8px 24px rgba(26, 35, 42, 0.05);
  --shadow-elevated: 0 8px 32px rgba(26, 35, 42, 0.10), 0 2px 8px rgba(26, 35, 42, 0.05);
  --shadow-icon: 0 40px 80px rgba(122, 26, 38, 0.18), 0 16px 32px rgba(26, 35, 42, 0.12);

  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--accent-deep); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============== SCROLL PROGRESS BAR (top of viewport) ============== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 100;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }
}

/* ============== HEADER ============== */
.site-header {
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 238, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(224, 217, 200, 0.5);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand .tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 999px;
}
.nav { display: flex; gap: 28px; font-size: 14px; font-weight: 600; }
.nav a { color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }

/* ============== HERO ============== */
.hero {
  padding: 80px 0 64px;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 20% -10% auto auto;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
  filter: blur(40px);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero-icon-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}
.hero-icon-big {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  border-radius: 22%;
  filter: drop-shadow(var(--shadow-icon));
  will-change: transform;
  animation: hero-icon-enter 1100ms var(--ease-out-back) both;
}
@keyframes hero-icon-enter {
  0%   { opacity: 0; transform: scale(0.7) rotate(-8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 560px;
}
.hero-copy > * {
  animation: hero-text-enter 900ms var(--ease-out) both;
}
.hero-copy > *:nth-child(1) { animation-delay: 200ms; }
.hero-copy > *:nth-child(2) { animation-delay: 320ms; }
.hero-copy > *:nth-child(3) { animation-delay: 440ms; }
.hero-copy > *:nth-child(4) { animation-delay: 560ms; }
.hero-copy > *:nth-child(5) { animation-delay: 680ms; }
@keyframes hero-text-enter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Editorial masthead replaces the generic SaaS pill */
.hero-masthead {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 480px;
}
.hero-masthead .masthead-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-masthead .vol {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent-deep);
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-masthead .rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-deep) 0%, var(--line) 40%, transparent 100%);
  min-width: 24px;
}
.hero-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
  padding-left: 2px;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.6; }
}

.hero h1 {
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 900;
  margin: 0;
  color: var(--ink);
}
.hero h1 em { font-style: normal; color: var(--accent-deep); }

.hero-lede {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--ink2);
  font-weight: 500;
  margin: 0;
  max-width: 480px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.hero-meta .sep { color: var(--line); }
.hero-meta a { color: var(--ink-soft); }
.hero-meta a:hover { color: var(--ink); }

/* App Store badge */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--surface);
  padding: 11px 22px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 240ms var(--ease-out), background 160ms ease, box-shadow 240ms var(--ease-out);
  border: 1px solid var(--ink);
  min-height: 56px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.btn-appstore:hover {
  background: #0d141a;
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(26, 35, 42, 0.18);
}
.btn-appstore .apple-logo { width: 28px; height: 28px; flex-shrink: 0; }
.btn-appstore .label { display: flex; flex-direction: column; text-align: left; line-height: 1.05; }
.btn-appstore .label .small { font-size: 10px; font-weight: 500; letter-spacing: 0.04em; }
.btn-appstore .label .big { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

/* ============== SECTIONS ============== */
section { padding: 72px 0; position: relative; }

/* Snap-target sections fill the viewport so each one lands cleanly */
section[data-snap]:not(.hero) {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Tighter padding for snap sections so the heading + content fits one viewport */
#features,
#features-trust,
#pricing {
  padding: 56px 0;
}
#features .section-head h2,
#features-trust .section-head h2 {
  font-size: clamp(28px, 3.4vw, 44px);
}
#features .section-head,
#features-trust .section-head { margin-bottom: 24px; }
#features .bento,
#features-trust .bento { gap: 14px; }
#features .fh,
#features-trust .fh { padding: 22px; gap: 10px; }
#features .fh h3,
#features-trust .fh h3 { font-size: 19px; }
#features .fh p,
#features-trust .fh p { font-size: 14px; }
#features .screenshot-wrap { max-width: 280px; }
#features .fh.has-screenshot .fh-art { margin: 12px -22px -110px; }

/* Desktop bento layout for #features:
   Tap takes the left half (tall), Settle the top-right half,
   and Today + Offline sit side-by-side as quarters under Settle. */
@media (min-width: 1025px) {
  #features .bento-features {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "tap settle settle"
      "tap today offline";
  }
  #features .bento-features .fh-tap     { grid-area: tap; }
  #features .bento-features .fh-settle  { grid-area: settle; }
  #features .bento-features .fh-today   { grid-area: today; }
  #features .bento-features .fh-offline { grid-area: offline; }
}

.section-head { text-align: center; margin-bottom: 32px; }
.section-head .micro {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 14px;
}
h2 {
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--ink);
  font-weight: 800;
}
.section-lede {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink2);
  margin: 0 auto;
  max-width: 580px;
  line-height: 1.5;
}

/* ============== BENTO ============== */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.fh {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.fh:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}
.fh.span-3 { grid-column: span 3; }
.fh.span-4 { grid-column: span 4; }
.fh.span-2 { grid-column: span 2; }
.fh.span-6 { grid-column: span 6; }
.fh.span-tall { grid-row: span 2; }
.fh h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.fh p { margin: 0; font-size: 15px; color: var(--ink2); line-height: 1.5; }
.fh .fh-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.fh-art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  margin: 6px -6px 0;
}

/* Spotlight card variant: real screenshot anchored under the text, bleeds past bottom edge */
.fh.has-screenshot {
  overflow: hidden;
  padding-bottom: 0;
}
.fh.has-screenshot .fh-art {
  flex: 0 0 auto;
  margin: 16px -28px -120px;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  overflow: visible;
}
.screenshot-wrap {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  position: relative;
  transition: transform 700ms var(--ease-out);
}
.screenshot-wrap img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 -8px 24px rgba(26, 35, 42, 0.08));
}
.fh.has-screenshot:hover .screenshot-wrap { transform: translateY(-8px); }

@media (max-width: 768px) {
  .fh.has-screenshot .fh-art { margin: 14px -22px -90px; }
  .screenshot-wrap { max-width: 280px; }
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}
.mini-tile {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 92px;
}
.app-frame .mini-tile {
  background: var(--surface);
}
.mini-tile.tap { background: var(--accent-soft); border-color: rgba(195, 43, 62, 0.3); }
.app-frame .mini-tile.tap { background: var(--accent-soft); }
.mini-tile .e { font-size: 24px; line-height: 1; }
.mini-tile .n { font-size: 13px; font-weight: 700; color: var(--ink); }
.mini-tile .p { font-size: 11px; color: var(--ink-soft); font-family: var(--font-mono); }
.mini-tile .c {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent);
  color: var(--surface);
  font-size: 11px;
  font-weight: 800;
  min-width: 20px; height: 20px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

/* ============== ANIMATED COUNT-UP NUMBER ============== */
.big-total { display: flex; flex-direction: column; gap: 4px; }
.big-total .label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
}
.big-total .amount {
  font-family: var(--font-mono);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
  line-height: 1;
  --total: 284;
  --total-cents: 40;
  counter-reset: total var(--total) cents var(--total-cents);
}
.big-total .amount::before {
  content: '$' counter(total) '.' counter(cents, decimal-leading-zero);
}
.big-total .delta {
  font-size: 13px;
  font-weight: 600;
  color: var(--pos);
  font-family: var(--font-mono);
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
@supports (animation-timeline: view()) {
  .big-total .amount {
    --total: 0;
    --total-cents: 0;
    animation: count-up 1.4s linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 50%;
  }
  @keyframes count-up {
    to { --total: 284; --total-cents: 40; }
  }
}

.streak-row { display: inline-flex; align-items: center; gap: 10px; }
.streak-row .pips { display: inline-flex; gap: 5px; }
.streak-row .pips span {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--line);
  transition: background 320ms var(--ease-out), border-color 320ms var(--ease-out);
}
.streak-row .pips span.on { background: var(--accent); border-color: var(--accent); }
.streak-row .pips span.on:last-of-type {
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.streak-row .num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}
.streak-row .unit {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-left: -4px;
}

/* No-signal indicator: 4 ascending bars + crimson X over the smallest bar */
.signal-no {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
  width: 66px;
}
.signal-no span {
  width: 12px;
  border-radius: 3px;
  background: var(--ink2);
}
.signal-no span:nth-child(1) { height: 30%; }
.signal-no span:nth-child(2) { height: 55%; }
.signal-no span:nth-child(3) { height: 78%; }
.signal-no span:nth-child(4) { height: 100%; }

/* X mark — two crossed strokes positioned over the smallest (first) bar */
.signal-no::before,
.signal-no::after {
  content: '';
  position: absolute;
  top: 6px;
  left: -4px;
  width: 20px;
  height: 3.5px;
  background: var(--accent);
  border-radius: 2px;
  transform-origin: center;
  box-shadow: 0 0 0 3px var(--surface);
}
.signal-no::before { transform: rotate(45deg); }
.signal-no::after  { transform: rotate(-45deg); }

.signal-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.signal-meta::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.settle-mock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--surface);
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 16px rgba(195, 43, 62, 0.25);
}
.settle-mock::before { content: '✓'; font-weight: 800; font-size: 16px; }

.fh-mascot {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  align-items: center;
  text-align: center;
  padding: 36px 28px 28px;
}
.fh-mascot img {
  height: 130px; width: auto; margin: 0 auto 8px;
  transition: transform 400ms var(--ease-out-back);
}
.fh-mascot:hover img { transform: rotate(-6deg) scale(1.05); }
.fh-mascot h3, .fh-mascot p { text-align: center; }
.fh-mascot p { max-width: 280px; margin: 0 auto; }

.lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.lock-chip .icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* ============== MASCOT QUOTE ============== */
.quote-section {
  padding: 140px 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  text-align: center;
  align-items: center;
}
.quote-section .mascot-img {
  height: 200px; width: auto; margin: 0 auto 28px;
}
.quote-section blockquote {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: var(--ink);
  max-width: 800px;
  margin: 0 auto 24px;
}
.quote-section blockquote em { font-style: normal; color: var(--accent-deep); }
.quote-section cite {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============== PRICING ============== */
.pricing-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px;
  box-shadow: var(--shadow-elevated);
  text-align: center;
}
.pricing-card .price {
  font-family: var(--font-mono);
  font-size: clamp(40px, 5vw, 56px); font-weight: 700;
  color: var(--accent-deep);
  margin: 8px 0 4px;
  letter-spacing: -0.03em; line-height: 1;
}
.pricing-card .price-unit {
  font-family: var(--font-sans); font-size: 18px;
  color: var(--ink-soft); font-weight: 600;
}
.pricing-card .price-sub {
  font-size: 14px; color: var(--ink-soft);
  margin: 10px 0 28px; font-weight: 500;
}
.pricing-card .save { color: var(--pos); font-weight: 700; font-family: var(--font-mono); }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; }
.pricing-card li {
  padding: 8px 0; color: var(--ink2);
  display: flex; align-items: flex-start; gap: 10px; font-size: 15px;
}
.pricing-card li::before { content: '✓'; color: var(--pos); font-weight: 800; flex-shrink: 0; }
.pricing-card .btn-appstore { width: 100%; justify-content: center; }
.pricing-foot { margin-top: 20px; font-size: 12px; color: var(--ink-soft); }

/* ============== FINAL CTA ============== */
.final-cta {
  background: #1a232a;
  color: var(--bg);
  padding: 140px 0;
  text-align: center;
  border-radius: var(--r-lg);
  margin: 64px 32px;
  position: relative;
  overflow: hidden;
}
.final-cta .container { position: relative; z-index: 1; }

/* Eyebrow micro on dark bg */
.final-cta .micro {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 245, 238, 0.55);
  margin-bottom: 18px;
}

.final-cta h2 {
  color: var(--bg);
  font-size: clamp(38px, 7vw, 88px);
  margin: 0 0 24px;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.final-cta h2 em { font-style: normal; color: rgba(247, 245, 238, 0.6); }
.final-cta p {
  color: rgba(247, 245, 238, 0.75);
  font-size: 18px; max-width: 560px; margin: 0 auto 40px;
}
.final-cta .btn-appstore {
  background: var(--bg); color: var(--ink); border-color: var(--bg);
}
.final-cta .btn-appstore:hover { background: var(--surface); color: var(--ink); }

/* Reassurance line under CTA */
.final-cta .cta-reassurance {
  margin: 22px auto 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(247, 245, 238, 0.5);
  max-width: none;
}

/* Mascot peeking from bottom-right corner — bigger, more present */
.cta-mascot {
  position: absolute;
  right: 6%;
  bottom: 24px;
  height: 110px;
  width: auto;
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .cta-mascot { height: 90px; right: 5%; bottom: 20px; opacity: 0.45; }
}
@media (max-width: 768px) {
  .cta-mascot { height: 72px; right: 5%; bottom: 16px; opacity: 0.4; }
}

/* ============== ARTICLE STYLES ============== */
.article { padding: 64px 0; }
.article .container { max-width: 720px; }
.article h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 12px;
  letter-spacing: -0.03em; color: var(--ink);
  font-weight: 800; line-height: 1.05;
}
.article .meta { color: var(--ink-soft); font-size: 14px; margin: 0 0 40px; }
.article h2 { font-size: 26px; margin: 40px 0 12px; color: var(--ink); letter-spacing: -0.02em; }
.article h3 { font-size: 19px; margin: 24px 0 8px; color: var(--ink); font-weight: 700; }
.article p, .article li { color: var(--ink2); font-size: 17px; line-height: 1.65; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article .callout {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 20px 24px; margin: 24px 0;
}
.article .callout p { margin: 0; }

/* ============== FAQ ============== */
details.faq {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 18px 22px; margin-bottom: 12px;
  transition: border-color 200ms ease, transform 200ms var(--ease-out);
}
details.faq:hover { border-color: rgba(195, 43, 62, 0.3); }
details.faq[open] { border-color: rgba(195, 43, 62, 0.3); }
details.faq summary {
  font-weight: 700; cursor: pointer; list-style: none;
  color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+'; font-size: 22px; color: var(--ink-soft);
  font-weight: 400; flex-shrink: 0;
  transition: transform 240ms var(--ease-out);
}
details.faq[open] summary::after { content: '−'; transform: rotate(180deg); }
details.faq p { margin: 12px 0 0; color: var(--ink2); }

/* ============== FOOTER ============== */
.site-footer {
  background: var(--bg2);
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
}
.site-footer > .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand .brand-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; color: var(--ink);
}
.footer-brand .brand-mark img { width: 32px; height: 32px; border-radius: 8px; }
.footer-brand p {
  margin: 0; font-size: 14px; color: var(--ink-soft);
  max-width: 280px; line-height: 1.55;
}
.footer-col h4 {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a { color: var(--ink2); font-size: 15px; font-weight: 600; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; }
.footer-bottom .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.made-with {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.made-with .heart { color: var(--accent); font-size: 14px; }
.made-with .credit { color: var(--ink2); font-weight: 700; }
.copy-line { font-size: 13px; color: var(--ink-soft); font-weight: 500; }

/* ============== SCROLL-DRIVEN REVEAL ============== */
@supports (animation-timeline: view()) {
  .reveal-up,
  .reveal-fade,
  .reveal-scale {
    animation-timeline: view();
    animation-fill-mode: both;
  }

  .reveal-up {
    animation-name: rv-up;
    animation-timing-function: linear;
    animation-range: entry 0% cover 35%;
  }
  .reveal-fade {
    animation-name: rv-fade;
    animation-timing-function: linear;
    animation-range: entry 0% cover 30%;
  }
  .reveal-scale {
    animation-name: rv-scale;
    animation-timing-function: linear;
    animation-range: entry 0% cover 40%;
  }

  /* Stagger inside bento via custom property index, with subtle exit-scale  */
  .bento .fh {
    animation: rv-up linear both, fh-exit linear both;
    animation-timeline: view(), view();
    animation-range: entry 0% cover 30%, exit 20% exit 100%;
    animation-delay: calc(var(--i, 0) * 60ms), 0ms;
  }
  .bento .fh:nth-child(1) { --i: 0; }
  .bento .fh:nth-child(2) { --i: 1; }
  .bento .fh:nth-child(3) { --i: 2; }
  .bento .fh:nth-child(4) { --i: 3; }
  .bento .fh:nth-child(5) { --i: 4; }
  .bento .fh:nth-child(6) { --i: 5; }
  .bento .fh:nth-child(7) { --i: 6; }
  .bento .fh:nth-child(8) { --i: 7; }

  /* Hero icon: enter + parallax + scale-out as you leave the hero */
  .hero-icon-big {
    animation: hero-icon-enter 1100ms var(--ease-out-back) both,
               hero-parallax linear both;
    animation-timeline: auto, scroll(root);
    animation-range: auto, 0 100vh;
  }

  /* Hero copy fades + drifts opposite as you scroll past the hero */
  .hero-copy {
    animation: hero-copy-out linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 80%;
  }

  /* Quote section mascot scales as you scroll into view */
  .quote-section .mascot-img {
    animation: mascot-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 60%;
  }

  /* Word-split heading reveals (set by motion.js) */
  [data-split].is-split .w {
    animation: word-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
    animation-delay: calc(var(--i, 0) * 35ms);
  }
}

/* ============== WORD-SPLIT BASE ============== */
[data-split].is-split { line-height: 1.05; }
[data-split].is-split .w {
  display: inline-block;
  will-change: transform, opacity;
  transform-origin: 0 90%;
}
/* Fallback for browsers without animation-timeline: just show them. */
@supports not (animation-timeline: view()) {
  [data-split].is-split .w { opacity: 1; transform: none; }
}

/* ============== MAGNETIC BUTTONS (motion.js sets transform) ============== */
.btn-appstore {
  transition: transform 320ms var(--ease-out), background 160ms ease, box-shadow 240ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-appstore { will-change: transform; }
}

@keyframes rv-up {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rv-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes rv-scale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes hero-parallax {
  from { transform: translateY(0) rotate(0) scale(1); }
  to   { transform: translateY(-72px) rotate(-4deg) scale(0.94); }
}
@keyframes hero-copy-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(48px); }
}
@keyframes mascot-rise {
  from { opacity: 0; transform: translateY(40px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes word-rise {
  from { opacity: 0; transform: translateY(0.5em) rotate(4deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes fh-exit {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to   { transform: translateY(-12px) scale(0.96); opacity: 0.7; }
}

/* ============== REDUCED MOTION ============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-icon-big { animation: none !important; transform: none !important; }
  .scroll-progress { display: none; }
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .hero .container { gap: 48px; }
  .hero-icon-big { max-width: 360px; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .fh.span-4 { grid-column: span 4; }
  .fh.span-3 { grid-column: span 2; }
  .fh.span-2 { grid-column: span 2; }
  .fh.span-6 { grid-column: span 4; }
  section { padding: 96px 0; }
  .quote-section { padding: 96px 0; min-height: 100svh; }
  .quote-section .mascot-img { height: 160px; }
  .final-cta { padding: 96px 0; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }

  .hero {
    padding: 48px 0 40px;
    min-height: auto;
  }
  .hero .container {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .hero-icon-big { max-width: 200px; }
  .hero-copy { align-items: center; max-width: none; gap: 18px; }
  .hero-lede { max-width: none; }
  .hero-cta-row { justify-content: center; }
  .hero-meta { justify-content: center; }

  section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }

  .bento { grid-template-columns: 1fr; gap: 12px; }
  .fh.span-3, .fh.span-4, .fh.span-2, .fh.span-6 { grid-column: span 1; }
  .fh.span-tall { grid-row: span 1; }
  .fh { padding: 22px; }
  .big-total .amount { font-size: 36px; }

  .quote-section { padding: 72px 0; min-height: 100svh; }
  .quote-section .mascot-img { height: 130px; margin-bottom: 18px; }

  .pricing-card { padding: 32px 24px; }

  .final-cta { padding: 64px 24px; margin: 40px 0; border-radius: 0; }

  .nav { gap: 18px; font-size: 13px; }
  .brand .tag { display: none; }

  .site-footer > .container { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { padding: 48px 0 24px; }
  .footer-bottom .container { flex-direction: column; gap: 8px; align-items: flex-start; }
}
