/* Page-level styles complementing tokens.css */

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 80% 10%, rgba(46,99,242,0.08), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(26,63,184,0.06), transparent 60%),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 76vh;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
}
.hero-copy h1 .ln:nth-child(2) { font-style: normal; color: var(--blue-900); display:block; }
.hero-copy h1 .ln { display: block; }
.hero-sub {
  margin-top: 28px;
  max-width: 52ch;
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.55;
}
.hero-ctas { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-meta .stat-n { font-family: var(--font-display); font-size: 40px; line-height: 1; font-weight: 500; color: var(--ink); }
.hero-meta .stat-n .sfx { font-size: 22px; color: var(--blue-700); font-family: var(--font-sans); font-weight: 500; margin-left: 2px; }
.hero-meta .stat-l { margin-top: 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }

.hero-helix {
  position: relative;
  aspect-ratio: 0.62 / 1;
  max-height: 720px;
  color: var(--blue-700);
  justify-self: end;
  width: 100%;
  max-width: 440px;
}
.hero-helix::before {
  content: "";
  position: absolute; inset: -10% -20%;
  background: radial-gradient(circle at 50% 50%, rgba(46,99,242,0.10), transparent 55%);
  pointer-events: none;
  z-index: -1;
}
.hero-helix .axis {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--rule-2) 10%, var(--rule-2) 90%, transparent);
  transform: translateX(-0.5px);
}
.hero-helix-label {
  position: absolute; right: -4px; top: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.hero-helix-ticks {
  position: absolute; left: -40px; top: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px; color: var(--silver);
}
.hero-helix-ticks span { opacity: 0.8; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-helix { max-width: 360px; margin: 0 auto; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
}

/* ========== VALUE (6-up editorial grid) ========== */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.value-cell {
  padding: 36px 32px 40px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 240px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background .3s ease;
}
.value-cell:hover { background: #FAF8F2; }
.value-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--blue-700); }
.value-cell h4 { font-size: 22px; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.value-cell p { font-size: 14.5px; color: var(--fg-muted); line-height: 1.55; }
@media (max-width: 820px) { .value-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr; } }

/* ========== PANELS (4 product cards) ========== */
.panels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.panel-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  padding: 36px;
  min-height: 420px;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.panel-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 100% 0%, rgba(46,99,242,0.08), transparent 55%);
  opacity: 0; transition: opacity .4s ease;
  pointer-events: none;
}
.panel-card:hover { transform: translateY(-4px); border-color: var(--ink-2); box-shadow: 0 28px 60px -30px rgba(14,17,22,0.28); }
.panel-card:hover::after { opacity: 1; }

.panel-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fg-muted); }
.panel-card h3 {
  margin-top: 12px;
  font-size: 34px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.panel-card h3 em { color: var(--blue-700); font-style: italic; }
.panel-card p.pd { margin-top: 14px; color: var(--fg-muted); line-height: 1.55; font-size: 15px; max-width: 44ch; }

.panel-foot {
  margin-top: auto; padding-top: 32px;
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  border-top: 1px solid var(--line);
}
.panel-price .lbl { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); display:block; margin-bottom: 4px; }
.panel-price .val { font-family: var(--font-display); font-size: 32px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.panel-price .val .cur { font-size: 18px; color: var(--fg-muted); font-family: var(--font-sans); }

.panel-glyph {
  position: absolute; right: 32px; top: 32px;
  width: 80px; height: 80px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--blue-700);
}
.panel-glyph svg { width: 40px; height: 40px; }

@media (max-width: 760px) { .panels-grid { grid-template-columns: 1fr; } }

/* ========== HOW IT WORKS (horizontal steps) ========== */
.how-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.how-step {
  padding: 40px 28px 40px 0;
  border-right: 1px solid var(--line);
  position: relative;
}
.how-step:last-child { border-right: 0; padding-right: 0; }
.how-step .idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--blue-700);
  margin-bottom: 20px;
}
.how-step h4 { font-size: 22px; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.how-step p { margin-top: 12px; color: var(--fg-muted); font-size: 14.5px; line-height: 1.55; }
.how-step .ico {
  margin-top: 28px; width: 44px; height: 44px; color: var(--ink);
}
@media (max-width: 860px) {
  .how-steps { grid-template-columns: repeat(2,1fr); }
  .how-step { border-right: 0; border-bottom: 1px solid var(--line); padding: 32px 0; }
  .how-step:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--line); }
}

/* ========== SCIENCE (editorial quote) ========== */
.science { background: var(--bg-alt); }
.science-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
}
.science h2 { font-style: italic; font-family: var(--font-display); font-weight: 400; }
.science h2 .ln:nth-child(2) { font-style: normal; color: var(--blue-900); display: block; }
.science h2 .ln { display: block; }
.science .body { font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 56ch; }
.science-figs { display: grid; grid-template-columns: 1fr; gap: 18px; }
.science-fig {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--r-3); background: #fff;
}
.science-fig .n {
  font-family: var(--font-display); font-size: 48px; line-height: 1; color: var(--blue-700); font-weight: 500; letter-spacing: -0.02em;
}
.science-fig .n .sfx { font-family: var(--font-sans); font-size: 20px; color: var(--fg-muted); margin-left: 2px; }
.science-fig .l { margin-top: 10px; font-size: 13px; color: var(--fg-muted); }
@media (max-width: 820px) { .science-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ========== FAQ ========== */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: transparent; border: 0;
  padding: 28px 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink);
  transition: color .2s ease;
}
.faq-q:hover { color: var(--blue-700); }
.faq-q .caret {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: transform .3s ease, background .3s ease, color .3s ease, border-color .3s ease;
}
.faq-item.open .faq-q .caret { transform: rotate(45deg); background: var(--ink); color: #fff; border-color: var(--ink); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .4s ease;
  color: var(--fg-muted);
  font-size: 16px; line-height: 1.65;
  max-width: 68ch;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 0 28px 0; }

/* ========== CTA BLOCK ========== */
.big-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.big-cta::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(46,99,242,0.35), transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 110%, rgba(127,160,255,0.15), transparent 60%);
}
.big-cta-inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: end; }
.big-cta h2 {
  color: #fff; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(48px, 5.5vw, 96px); line-height: 1.02; letter-spacing: -0.025em;
}
.big-cta h2 .ln { display: block; }
.big-cta h2 .ln:nth-child(2) { font-style: italic; color: var(--blue-300); }
.big-cta p { color: var(--silver-2); font-size: 17px; line-height: 1.55; max-width: 44ch; margin-bottom: 24px; }
.big-cta .btn { background: #fff; color: var(--ink); border-color: #fff; }
.big-cta .btn:hover { background: var(--blue-500); color: #fff; border-color: var(--blue-500); }
@media (max-width: 820px) { .big-cta-inner { grid-template-columns: 1fr; } }

/* ========== FOOTER ========== */
.site-footer .foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px;
}
.site-footer .foot-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer .foot-rule { height: 1px; background: #2a2e38; margin: 64px 0 20px; }
.site-footer .foot-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #8B909B; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .site-footer .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ========== Hero scientific badges ========== */
.hero-badges {
  margin-top: 24px;
  display: flex; gap: 12px; flex-wrap: wrap;
}

/* ========== Tweaks panel (custom floating card) ========== */
.tweaks-panel {
  position: fixed; right: 24px; bottom: 24px; width: 320px; z-index: 200;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(14,17,22,0.28);
  font-family: var(--font-sans);
  overflow: hidden;
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-head { display: flex; align-items:center; justify-content:space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tweaks-head h5 { margin: 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); font-family: var(--font-sans); font-weight: 600; }
.tweaks-head button { border: 0; background: transparent; cursor: pointer; color: var(--fg-muted); font-size: 16px; }
.tweaks-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 18px; max-height: 70vh; overflow: auto; }
.tweak-group { display: flex; flex-direction: column; gap: 8px; }
.tweak-group label.t-l { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }
.tweak-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-chip {
  font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  font-family: var(--font-sans); letter-spacing: 0;
}
.tweak-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tweak-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease;
}
.tweak-swatch.on { border-color: var(--ink); transform: scale(1.08); }
