/* ==========================================================================
   Age Calculator — Apps Bean Technologies
   Brand tokens derived from the app UI (forest green / cream / terracotta)
   ========================================================================== */

:root {
  --forest:      #14563C;
  --forest-deep: #0E3B29;
  --forest-soft: #DCEDE2;
  --cream:       #FDF3E3;
  --cream-2:     #FBF7EC;
  --sand:        #F0E3CE;
  --clay:        #C2691B;
  --clay-soft:   #FBE7D2;
  --ink:         #16281D;
  --ink-soft:    #5A6B60;
  --line:        rgba(20, 86, 60, .14);
  --radius:      20px;
  --shadow-sm:   0 1px 2px rgba(14, 59, 41, .06), 0 4px 14px rgba(14, 59, 41, .05);
  --shadow-md:   0 10px 30px rgba(14, 59, 41, .10);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--cream-2);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Type roles ------------------------------------------------------------- */
.display {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Surfaces --------------------------------------------------------------- */
.surface {
  background: #FFFDF7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.surface-mint { background: var(--forest-soft); border: 1px solid rgba(20,86,60,.12); border-radius: var(--radius); }
.surface-sand { background: var(--sand); border: 1px solid rgba(194,105,27,.16); border-radius: var(--radius); }

/* Ambient blobs, echoing the app's soft background shapes ----------------- */
.blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(.5px); }
.blob-mint { background: rgba(220, 237, 226, .75); }
.blob-sand { background: rgba(240, 227, 206, .6); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-weight: 600; border-radius: 999px; padding: .85rem 1.6rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--forest); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--forest-deep); }
.btn-clay { background: var(--clay); color: #fff; box-shadow: 0 10px 24px rgba(194,105,27,.24); }
.btn-clay:hover { background: #A85713; }
.btn-ghost { background: #FFFDF7; color: var(--forest); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }

/* Focus visibility ------------------------------------------------------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 243, 227, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-link {
  position: relative; font-weight: 500; color: var(--ink-soft);
  padding: .4rem 0; text-decoration: none; transition: color .18s ease;
}
.nav-link:hover { color: var(--forest); }
.nav-link.is-active { color: var(--forest); font-weight: 600; }
.nav-link.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 3px; border-radius: 3px; background: var(--clay);
}

/* Mobile drawer */
#mobileNav { max-height: 0; overflow: hidden; transition: max-height .32s ease; }
#mobileNav.open { max-height: 460px; }

/* Signature: the live ticker --------------------------------------------- */
.ticker-cell {
  background: #FFFDF7; border: 1px solid var(--line); border-radius: 16px;
  padding: .9rem 1rem; text-align: center;
}
.ticker-num {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: clamp(1.15rem, 3.4vw, 1.6rem); color: var(--forest);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.ticker-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: .25rem; }
.seconds-live { color: var(--clay); }

/* Feature cards ---------------------------------------------------------- */
.feature-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(20,86,60,.28); }
.icon-chip {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center; font-size: 1.25rem;
}
.chip-forest { background: var(--forest-soft); color: var(--forest); }
.chip-clay   { background: var(--clay-soft); color: var(--clay); }

/* Phone frames ----------------------------------------------------------- */
.phone {
  border-radius: 30px; border: 8px solid #17281E; background: #17281E;
  box-shadow: 0 24px 60px rgba(14,59,41,.24); overflow: hidden; display: block;
}
.phone img { display: block; width: 100%; border-radius: 22px; }

.shot-rail { scrollbar-width: thin; scrollbar-color: var(--forest) transparent; }
.shot-rail::-webkit-scrollbar { height: 8px; }
.shot-rail::-webkit-scrollbar-thumb { background: rgba(20,86,60,.35); border-radius: 99px; }

/* FAQ accordion ---------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between;
  padding: 1.15rem 0; text-align: left; font-weight: 600; color: var(--ink);
  background: none; border: 0; cursor: pointer; font-size: 1.02rem;
}
.faq-q:hover { color: var(--forest); }
.faq-icon { flex: 0 0 auto; color: var(--clay); transition: transform .25s ease; margin-top: .2rem; }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a > div { padding: 0 0 1.15rem; color: var(--ink-soft); line-height: 1.75; }

/* Legal copy ------------------------------------------------------------- */
.legal h2 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--forest-deep); margin: 2.4rem 0 .7rem; letter-spacing: -.02em; }
.legal h3 { font-weight: 700; font-size: 1.03rem; margin: 1.5rem 0 .45rem; color: var(--ink); }
.legal p  { color: var(--ink-soft); line-height: 1.8; margin-bottom: .9rem; }
.legal ul { list-style: none; margin: 0 0 1.1rem; padding: 0; }
.legal li { color: var(--ink-soft); line-height: 1.75; padding-left: 1.6rem; position: relative; margin-bottom: .5rem; }
.legal li::before { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: .1rem; color: var(--forest); font-size: .82rem; }
.legal a { color: var(--clay); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Table of contents ------------------------------------------------------ */
.toc a { display: block; padding: .42rem 0; color: var(--ink-soft); font-size: .9rem; text-decoration: none; border-left: 2px solid transparent; padding-left: .8rem; transition: all .18s ease; }
.toc a:hover { color: var(--forest); border-left-color: var(--clay); }

/* Reveal on scroll ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

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