/* ===========================================================
   Yearn marketing site — design tokens pulled directly from the
   app's own codebase (constants/themes.js, constants/uiTokens.js,
   components/ui/Button.jsx) so this page matches the product.
   =========================================================== */

:root {
  --bg: #121212;
  --bg-elevated: #1c1c1c;
  --bg-elevated-2: #202020;
  --border: #2e2e2e;
  --border-soft: #262626;
  --green: #438401;
  --green-bright: #5fb51a;
  --green-light: #a7c603;
  --gold: #e0ac3e;
  --white: #ffffff;
  --text: #f2f2f0;
  --text-muted: #a3a3a0;
  --text-faint: #838383;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --container: 1200px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.35);
  --font: "Roboto Condensed", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

main:focus-visible {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  margin: 0;
  color: var(--white);
  letter-spacing: 0.2px;
}

p { margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 17px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(95, 181, 26, 0);
}
.btn-primary:hover {
  background: var(--green-bright);
  box-shadow: 0 4px 22px rgba(95, 181, 26, 0.35);
}

.btn-secondary {
  background: transparent;
  border-color: var(--green);
  color: var(--green-bright);
}
.btn-secondary:hover { background: rgba(95, 181, 26, 0.1); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
}
.btn-ghost:hover { border-color: var(--text-muted); }

.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding-top: 16px;
  padding-bottom: 16px;
  transition: min-height 0.2s ease, padding 0.2s ease;
}
.site-header.scrolled .container {
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 98px; width: auto; transition: height 0.2s ease; }
.site-header.scrolled .brand img { height: 56px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-login { font-size: 15px; font-weight: 600; color: var(--text); }
.nav-login:hover { color: var(--green-bright); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  color: var(--white);
  cursor: pointer;
  flex: none;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 24px;
  border-top: 1px solid var(--border-soft);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}
.mobile-nav a:last-child { border-bottom: none; margin-top: 8px; }
.mobile-nav a.btn { color: #fff; justify-content: center; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: #0a0a0a url("assets/hero-bg.jpg") center top / cover no-repeat;
  padding: 108px 0 96px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 92% at 50% 52%, rgba(10,10,10,0.82) 0%, rgba(10,10,10,0.55) 42%, rgba(10,10,10,0.18) 72%, rgba(10,10,10,0) 100%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--green-bright);
  background: rgba(95, 181, 26, 0.12);
  border: 1px solid rgba(95, 181, 26, 0.35);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: 58px;
  line-height: 1.06;
  margin-bottom: 22px;
}
.hero p.lead {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 34px;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.hero-note { font-size: 13.5px; color: var(--text-faint); }
.hero-note b { color: var(--text-muted); font-weight: 600; }

/* ---------- generic section scaffolding ---------- */
section { padding: 96px 0; }
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head .eyebrow { background: transparent; border: none; padding: 0; margin-bottom: 14px; }
.section-head h2 { font-size: 38px; line-height: 1.15; margin-bottom: 14px; }
.section-head p { font-size: 17px; color: var(--text-muted); }

.alt-bg { background: var(--bg-elevated); }

/* ---------- how it works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.step-num {
  font-family: var(--font);
  font-weight: 900;
  font-size: 15px;
  color: #0a0a0a;
  background: var(--green-bright);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.step-card h3 { font-size: 20px; margin-bottom: 10px; }
.step-card p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 22px; }
.step-shot { margin: auto -24px 0; text-align: center; }
.step-shot img { width: 100%; height: auto; max-width: 300px; margin: 0 auto; display: block; }
.step-shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}
.step-shot-trigger img { transition: opacity 0.15s ease; }
.step-shot-trigger:hover img,
.step-shot-trigger:focus-visible img { opacity: 0.85; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 8, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  overflow: auto;
}
.lightbox[hidden] { display: none; }
.lightbox.is-zoomed { align-items: flex-start; }
.lightbox-img {
  max-width: min(92vw, 640px);
  max-height: 88vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  cursor: zoom-in;
}
.lightbox-img.is-zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- feature split (image + text) ---------- */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.feature-split.reverse .split-media { order: 2; }
.feature-split.reverse .split-copy { order: 1; }
.split-media img { border-radius: var(--radius-lg); width: 100%; height: auto; }
.split-copy .eyebrow { background: transparent; border: none; padding: 0; margin-bottom: 16px; }
.split-copy h2 { font-size: 34px; margin-bottom: 16px; line-height: 1.16; }
.split-copy p { font-size: 16.5px; color: var(--text-muted); margin-bottom: 26px; }

.feature-split + .feature-split { margin-top: 120px; }

/* ---------- feature grid (icons) ---------- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.icon-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
}
.icon-badge {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: rgba(95, 181, 26, 0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.icon-badge svg { width: 26px; height: 26px; }
.icon-card h3 { font-size: 18px; margin-bottom: 10px; }
.icon-card p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- testimonial ---------- */
.testimonial-card {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
}
.quote-mark { width: 38px; height: 28px; color: var(--green-bright); opacity: 0.85; margin-bottom: 20px; }
.testimonial-quote { font-size: 19px; line-height: 1.6; color: var(--text); margin-bottom: 22px; }
.testimonial-author { font-size: 15px; font-weight: 600; color: var(--text-muted); }

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}
.price-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
}
.price-card.featured {
  border-color: var(--green);
  background: linear-gradient(165deg, rgba(95,181,26,0.10), rgba(28,28,28,1) 55%);
}
.price-badge {
  position: absolute;
  top: -14px; right: 28px;
  background: var(--green-bright);
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.price-card h3 { font-size: 20px; margin-bottom: 6px; }
.price-amount { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 6px; }
.price-amount .num { font-size: 44px; font-weight: 700; color: var(--white); }
.price-amount .per { font-size: 15px; color: var(--text-muted); }
.price-alt { font-size: 13.5px; color: var(--text-faint); margin-bottom: 24px; }
.price-features { list-style: none; margin: 0 0 28px; padding: 0; }
.price-features li {
  font-size: 15px;
  color: var(--text-muted);
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  display: flex; gap: 10px; align-items: flex-start;
}
.price-features li:last-child { border-bottom: none; }
.price-features li svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--green-bright); }
.price-foot {
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  margin-top: 28px;
}
.price-note {
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  max-width: 560px;
  margin: 10px auto 0;
  line-height: 1.6;
}
.price-note strong { color: var(--text-soft, var(--white)); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border-soft);
  padding: 22px 0;
}
.faq-item summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--green-bright);
  font-weight: 400;
  margin-left: 16px;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 14px; color: var(--text-muted); font-size: 15px; max-width: 640px; }

/* ---------- final CTA ---------- */
.cta-banner {
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(95,181,26,0.16), transparent 60%), var(--bg-elevated);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.cta-banner h2 { font-size: 36px; margin-bottom: 14px; }
.cta-banner p { color: var(--text-muted); font-size: 16.5px; margin-bottom: 32px; }

/* ---------- footer ---------- */
.site-footer { padding: 64px 0 32px; }
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-soft);
}
.footer-brand img { height: 104px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: var(--text-faint); font-size: 14px; max-width: 260px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-faint); margin-bottom: 16px; }
.footer-col a, .footer-col span {
  display: block;
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 13px; color: var(--text-faint); }
.footer-legal { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
.footer-legal-links { display: flex; align-items: center; gap: 16px; }
.footer-legal-links a { font-size: 13px; color: var(--text-faint); }
.footer-legal-links a:hover { color: var(--white); }
.store-badges { display: flex; flex-direction: column; align-items: flex-end; }
.store-badges-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.store-badges-row { display: flex; align-items: center; gap: 12px; }
.store-badge-img { height: 40px; width: auto; opacity: 0.94; }

.hero-store-badges { margin-top: 28px; }
.hero-store-badges .store-badges-label { text-align: center; }
.hero-store-badges .store-badges-row { justify-content: center; }
.hero-store-badges .store-badge-img { height: 44px; }

/* ---------- legal pages (privacy / terms) ---------- */
.legal-hero { padding: 64px 0 28px; }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-bright);
  margin-bottom: 22px;
}
.legal-back:hover { color: var(--green-light); }
.legal-hero h1 { font-size: 40px; margin-bottom: 10px; }
.legal-hero .eff-date { font-size: 14px; color: var(--text-faint); }
.legal-content { max-width: 760px; margin: 0 auto; padding-bottom: 40px; }
.legal-content .intro { font-size: 16px; color: var(--text-muted); line-height: 1.7; margin-bottom: 44px; }
.legal-section { margin-bottom: 34px; }
.legal-section h2 { font-size: 19px; margin-bottom: 12px; }
.legal-section p { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { margin: 0 0 14px; padding-left: 20px; }
.legal-section ul:last-child { margin-bottom: 0; }
.legal-section li { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }
.legal-section li:last-child { margin-bottom: 0; }
.footer-legal-links a.is-active { color: var(--white); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .icon-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-split { grid-template-columns: 1fr; gap: 36px; }
  .feature-split.reverse .split-media { order: 1; }
  .feature-split.reverse .split-copy { order: 2; }
  .feature-split + .feature-split { margin-top: 72px; }
  .hero h1 { font-size: 44px; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .brand img { height: 68px; }
}

@media (max-width: 560px) {
  .steps-grid { grid-template-columns: 1fr; }
  .icon-grid { grid-template-columns: 1fr; }
  .hero { padding: 88px 0 72px; }
  .hero h1 { font-size: 34px; }
  section { padding: 64px 0; }
  .section-head h2 { font-size: 28px; }
  .header-actions .btn-primary { display: none; }
  .brand img { height: 53px; }
  .footer-brand img { height: 80px; }
}
