/* SMIFS God Quant — landing
   Palette and type lifted from smifs.com brand system. */

:root {
  --ink:    #06281d;
  --forest: #0f4634;
  --pine:   #065b40;
  --green:  #0a7d57;
  --mint:   #62d7a3;
  --mint-2: #b7f4d8;
  --foam:   #cdeee1;
  --paper:  #f7f7f7;
  --white:  #ffffff;
  --text:   #10241c;
  --muted:  #4b6459;

  --font-display: "Libre Baskerville", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --text-hero: clamp(2.6rem, 1.2rem + 4.6vw, 5.2rem);
  --text-h2: clamp(1.9rem, 1.2rem + 2.2vw, 3rem);
  --space-section: clamp(4.5rem, 3rem + 5vw, 9rem);
  --radius: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.01em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}
.eyebrow-light { color: var(--mint); }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--white) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e4ece8;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: .8rem 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.wordmark { text-decoration: none; display: flex; align-items: baseline; gap: .45rem; }
.wordmark-smifs {
  font-family: var(--font-body); font-weight: 600; letter-spacing: .22em;
  color: var(--green); font-size: .95rem;
}
.wordmark-gq { font-family: var(--font-display); font-style: italic; color: var(--ink); font-size: 1.05rem; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: .92rem; color: var(--muted);
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-docs { color: var(--green) !important; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .78rem 1.5rem; border-radius: 999px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--green); color: var(--white); }
.btn-solid:hover { background: var(--pine); box-shadow: 0 8px 24px rgba(10,125,87,.35); }
.btn-mint { background: var(--mint); color: var(--ink); }
.btn-mint:hover { background: var(--mint-2); box-shadow: 0 8px 24px rgba(98,215,163,.4); }
.btn-ghost { color: var(--ink); border: 1.5px solid #c9d8d1; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-ghost-light { color: var(--foam); border: 1.5px solid rgba(205,238,225,.4); }
.btn-ghost-light:hover { border-color: var(--mint); color: var(--mint); }

/* ── Hero ────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(10,125,87,.45), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(6,91,64,.5), transparent 60%),
    var(--ink);
  color: var(--foam);
  overflow: hidden;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(4rem, 8vw, 7.5rem) 1.5rem 3.5rem;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center;
}
.hero h1 { font-size: var(--text-hero); color: var(--white); font-weight: 700; }
.hero h1 em { font-style: italic; color: var(--mint); }
.hero-sub { margin-top: 1.4rem; max-width: 34rem; color: var(--foam); font-size: 1.1rem; }
.hero-ctas { display: flex; gap: .9rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.2rem; font-family: var(--font-mono); font-size: .75rem; color: rgba(205,238,225,.55); }

/* Terminal */
.terminal {
  background: #04120d;
  border: 1px solid rgba(98,215,163,.22);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.4);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: .8rem;
}
.terminal-bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .6rem .9rem; background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(98,215,163,.15);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(205,238,225,.25); }
.terminal-title { margin-left: .5rem; color: rgba(205,238,225,.55); font-size: .72rem; }
.live-badge {
  margin-left: auto; font-size: .68rem; letter-spacing: .08em;
  color: var(--mint); text-transform: uppercase;
}
.live-badge.is-live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint); margin-right: .4rem;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
.terminal-body { padding: 1rem 1.1rem 1.2rem; min-height: 330px; }
.term-lines { white-space: pre-wrap; word-break: break-all; color: #9fd8bf; line-height: 1.55; }
.term-lines .cmd { color: var(--foam); }
.term-lines .ok { color: var(--mint); }
.ltp-table { width: 100%; border-collapse: collapse; margin-top: .8rem; }
.ltp-table th {
  text-align: left; font-weight: 500; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(205,238,225,.45); padding: .3rem .4rem;
  border-bottom: 1px solid rgba(98,215,163,.15);
}
.ltp-table td { padding: .42rem .4rem; color: var(--foam); border-bottom: 1px solid rgba(98,215,163,.07); }
.ltp-table td.num { font-variant-numeric: tabular-nums; }
.up { color: var(--mint); }
.down { color: #ff9e9e; }
.flash { animation: flash .5s; }
@keyframes flash { 0% { background: rgba(98,215,163,.18); } 100% { background: transparent; } }

/* Ticker */
.ticker {
  border-top: 1px solid rgba(98,215,163,.18);
  background: rgba(0,0,0,.25);
  overflow: hidden; padding: .55rem 0;
}
.ticker-track {
  display: inline-flex; gap: 2.8rem; white-space: nowrap;
  font-family: var(--font-mono); font-size: .78rem; color: var(--foam);
  animation: ticker 40s linear infinite;
}
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker-track .sym { color: rgba(205,238,225,.55); margin-right: .5rem; }

/* ── Stats ───────────────────────────────────────── */
.stats { background: var(--paper); border-bottom: 1px solid #e4ece8; }
.stats-inner {
  max-width: 1100px; margin: 0 auto; padding: 2.6rem 1.5rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center;
}
.stat-num {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--ink); display: block;
}
.stat-unit { font-size: .55em; color: var(--green); }
.stat-label { font-size: .85rem; color: var(--muted); }

/* ── Sections ────────────────────────────────────── */
.section { max-width: 1200px; margin: 0 auto; padding: var(--space-section) 1.5rem; }
.section-head { max-width: 46rem; margin-bottom: 3rem; }
.section-head h2 { font-size: var(--text-h2); color: var(--ink); }
.section-sub { margin-top: 1rem; color: var(--muted); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.pillar {
  border: 1px solid #e0eae5; border-radius: var(--radius);
  padding: 1.7rem 1.6rem; background: var(--white);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(6,40,29,.1);
  border-color: var(--mint);
}
.pillar h3 { font-size: 1.15rem; color: var(--ink); margin-bottom: .6rem; }
.pillar p { font-size: .93rem; color: var(--muted); margin-bottom: 1rem; }
.endpoints { list-style: none; }
.endpoints li {
  font-family: var(--font-mono); font-size: .74rem; color: var(--green);
  padding: .28rem 0; border-top: 1px dashed #e0eae5;
}
.pillar-risk { background: var(--foam); border-color: var(--mint-2); }

/* ── Code ────────────────────────────────────────── */
.section-code .section-head { margin-bottom: 2rem; }
.codebox {
  background: var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px rgba(6,40,29,.25);
}
.code-tabs { display: flex; gap: .2rem; padding: .7rem .9rem 0; border-bottom: 1px solid rgba(98,215,163,.15); }
.code-tab {
  font-family: var(--font-mono); font-size: .8rem; color: rgba(205,238,225,.55);
  background: none; border: none; padding: .55rem 1rem; cursor: pointer;
  border-radius: 8px 8px 0 0;
}
.code-tab:hover { color: var(--foam); }
.code-tab.is-active { color: var(--mint); background: rgba(98,215,163,.08); }
.code-pane {
  display: none; padding: 1.4rem 1.5rem; overflow-x: auto;
  font-family: var(--font-mono); font-size: .82rem; line-height: 1.65; color: #c7e8d8;
}
.code-pane.is-active { display: block; }

/* ── AI band ─────────────────────────────────────── */
.ai-band {
  background:
    radial-gradient(900px 400px at 15% 0%, rgba(10,125,87,.5), transparent 60%),
    var(--forest);
  color: var(--foam);
}
.ai-inner {
  max-width: 1200px; margin: 0 auto; padding: var(--space-section) 1.5rem;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center;
}
.ai-band h2 { font-size: var(--text-h2); color: var(--white); margin-bottom: 1.1rem; }
.ai-points { list-style: none; margin: 1.6rem 0 .4rem; }
.ai-points li { padding: .5rem 0 .5rem 1.6rem; position: relative; font-size: .98rem; }
.ai-points li::before { content: "→"; position: absolute; left: 0; color: var(--mint); }
.ai-points strong { color: var(--white); }
.chat {
  background: rgba(4,18,13,.75); border: 1px solid rgba(98,215,163,.2);
  border-radius: var(--radius); padding: 1.3rem; display: grid; gap: .8rem;
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
}
.chat-msg { padding: .75rem 1rem; border-radius: 10px; font-size: .88rem; max-width: 92%; }
.chat-user { background: var(--mint); color: var(--ink); justify-self: end; font-weight: 500; }
.chat-tool { font-family: var(--font-mono); font-size: .74rem; color: rgba(205,238,225,.55); background: rgba(255,255,255,.05); }
.chat-ai { background: rgba(205,238,225,.1); color: var(--foam); }
.chat .pos { color: var(--mint); font-weight: 600; }

/* ── Bento ───────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.bento-cell {
  border-radius: var(--radius); padding: 1.7rem 1.6rem; background: var(--paper);
  border: 1px solid #e4ece8;
  transition: background .25s, border-color .25s;
}
.bento-cell:hover { background: var(--foam); border-color: var(--mint-2); }
.bento-wide { grid-column: span 2; }
.bento-cell h3 { font-size: 1.12rem; color: var(--ink); margin-bottom: .55rem; }
.bento-cell p { font-size: .93rem; color: var(--muted); }

/* ── FAQ ─────────────────────────────────────────── */
.section-faq { max-width: 820px; }
.faq details { border-bottom: 1px solid #e4ece8; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.2rem 1.15rem 0;
  font-family: var(--font-display); font-size: 1.08rem; color: var(--ink);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .3rem; top: 50%;
  transform: translateY(-50%); color: var(--green); font-family: var(--font-body);
  font-size: 1.3rem; transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 1.3rem; color: var(--muted); font-size: .95rem; max-width: 60ch; }
.faq code { font-family: var(--font-mono); font-size: .82em; background: var(--foam); padding: .1em .35em; border-radius: 4px; }

/* ── CTA band / Footer ───────────────────────────── */
.cta-band {
  background: var(--ink); color: var(--white); text-align: center;
  padding: var(--space-section) 1.5rem;
}
.cta-band h2 { font-size: var(--text-h2); margin-bottom: 1.8rem; }
.cta-band .hero-ctas { justify-content: center; }

.footer { background: #04120d; color: rgba(205,238,225,.7); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 3.5rem 1.5rem 2rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
}
.footer-brand p { margin-top: .8rem; font-size: .88rem; }
.footer-col { display: grid; gap: .55rem; align-content: start; }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--mint); font-family: var(--font-body); }
.footer-col a { text-decoration: none; font-size: .9rem; color: rgba(205,238,225,.7); }
.footer-col a:hover { color: var(--white); }
.footer-legal {
  max-width: 1200px; margin: 0 auto; padding: 1.4rem 1.5rem 2.4rem;
  font-size: .76rem; color: rgba(205,238,225,.4);
  border-top: 1px solid rgba(98,215,163,.12);
}

/* ── Manifesto ───────────────────────────────────── */
.manifesto { max-width: 1100px; margin: 0 auto; padding: var(--space-section) 1.5rem; }
.manifesto p {
  font-family: var(--font-display); font-size: clamp(1.5rem, 1rem + 2.4vw, 2.7rem);
  line-height: 1.35; color: var(--ink); max-width: 20em;
}
.manifesto .mw { will-change: opacity; }

/* ── Exploded anatomy ────────────────────────────── */
.explode {
  background:
    radial-gradient(1000px 600px at 20% 20%, rgba(10,125,87,.35), transparent 60%),
    var(--ink);
  color: var(--foam); overflow: hidden;
}
.explode-inner {
  max-width: 1200px; margin: 0 auto; min-height: 100vh;
  padding: clamp(4rem, 7vw, 6rem) 1.5rem;
  display: flex; flex-direction: column; justify-content: center;
}
.explode-head { margin-bottom: 0; }
.explode-head h2 { color: var(--white); }
.explode-head .section-sub { color: rgba(205,238,225,.75); }
.explode-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
  margin-top: 1.5rem;
}
.scene { perspective: 1500px; height: 430px; display: grid; place-items: center; }
.stack {
  position: relative; width: 330px; height: 330px;
  margin-top: 90px; /* headroom: explosion grows upward, must clear the heading */
}
.layer {
  position: absolute; inset: 0; border-radius: 20px;
  border: 1px solid rgba(98,215,163,.45);
  background: linear-gradient(135deg, rgba(10,125,87,.28), rgba(4,18,13,.85));
  display: grid; place-items: center;
  /* Each layer carries its own full 3D matrix instead of relying on a
     preserve-3d parent — Safari/WebKit flattens nested 3D contexts, which
     collapsed the whole stack. Painting order comes from z-index. */
  transform: rotateX(58deg) rotateZ(-42deg)
             translate3d(0, calc(var(--i) * -12px), calc(var(--i) * 58px));
  z-index: calc(1 + var(--i));
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
}
.layer span {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .22em;
  color: var(--mint);
}
.layer-top { background: linear-gradient(135deg, rgba(98,215,163,.4), rgba(10,125,87,.35)); }
.layer-top span { color: var(--white); }
.caps { list-style: none; display: grid; gap: .35rem; }
.cap {
  padding: .6rem 1.1rem; border-left: 2px solid rgba(98,215,163,.2);
  transition: border-color .3s, background .3s, opacity .3s;
  opacity: .55;
}
.cap strong { display: block; font-family: var(--font-display); font-size: 1.02rem; color: var(--white); margin-bottom: .2rem; }
.cap span { font-size: .85rem; color: rgba(205,238,225,.7); }
.cap.is-on { opacity: 1; border-color: var(--mint); background: rgba(98,215,163,.07); }

/* Short viewports: compact the pinned scene so nothing overlaps */
@media (max-height: 850px) {
  .explode-head h2 { font-size: clamp(1.6rem, 1rem + 1.8vw, 2.2rem); }
  .explode-head .section-sub { margin-top: .5rem; font-size: .9rem; }
  .explode-inner { padding-top: 2.5rem; padding-bottom: 2rem; }
  .explode-grid { margin-top: .5rem; gap: 2rem; }
  .scene { height: 340px; }
  .stack { width: 240px; height: 240px; margin-top: 20px; }
  .cap { padding: .45rem 1rem; }
  .cap span { font-size: .78rem; }
}

/* ── Heading underline shimmer (driven by motion.js) ── */
.section-head h2, .gq-band h2, .ai-band h2 {
  background-image: linear-gradient(var(--mint), var(--mint));
  background-repeat: no-repeat; background-position: 0 100%;
  background-size: 0% 3px; padding-bottom: .35rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .btn, .pillar { transition: none; }
  .section-head h2, .gq-band h2, .ai-band h2 { background-size: 38% 3px; }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 980px) {
  .hero-inner, .ai-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-wide { grid-column: span 2; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .explode-grid { grid-template-columns: 1fr; }
  .explode-inner { min-height: 0; }
  .scene { height: 400px; }
  .stack { width: 260px; height: 260px; }
  .cap { opacity: 1; }
}
@media (max-width: 620px) {
  .nav-inner { gap: 1rem; }
  .nav-inner .btn { white-space: nowrap; padding: .55rem 1rem; font-size: .85rem; }
  /* one button fits on small screens; SEBI link wins, page has CTAs below */
  .nav-inner .nav-cta { display: none; }
  .nav-inner .nav-sebi { margin-left: auto; }
  .pillars, .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .hero-inner { padding-top: 3rem; }
  .terminal { font-size: .72rem; }
}
