:root {
  /* These are Sage's actual desktop-app tokens. */
  --bg: #0f1117;
  --bg-soft: #0b0d14;
  --surface: #1a1d27;
  --surface-2: #232733;
  --line: rgba(139, 141, 152, 0.22);
  --line-strong: rgba(139, 141, 152, 0.38);
  --text: #e4e4e7;
  --muted: #8b8d98;
  --faint: #656874;
  --sage: #f472b6;
  --sage-bright: #f9a8d4;
  --sage-deep: #db2777;
  --violet: #6c63ff;
  --violet-soft: #b6b1ff;
  --ink: #17101a;
  --max: 1216px;
  --gutter: clamp(20px, 4vw, 44px);
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 0.84, 0.44, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { color: #fff; background: rgba(244, 114, 182, .38); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(65rem 40rem at 88% -10%, rgba(244, 114, 182, 0.09), transparent 65%),
    radial-gradient(45rem 35rem at 2% 25%, rgba(108, 99, 255, 0.08), transparent 70%);
}
a { color: inherit; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--sage-bright);
  outline-offset: 4px;
}
.wrap { width: min(100%, var(--max)); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: fixed; top: 8px; left: -999px; z-index: 100; padding: 10px 16px; background: var(--sage); color: var(--ink); border-radius: 8px; }
.skip:focus { left: 8px; }

.nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(3, 6, 4, 0.82), rgba(3, 6, 4, 0.36));
  backdrop-filter: blur(10px);
}
.nav-inner { height: 74px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-lockup { display: flex; flex-direction: column; line-height: 0.9; }
.brand-lockup b { font: 800 24px/1 var(--display); letter-spacing: -0.05em; text-transform: lowercase; }
.brand-lockup small { margin-top: 4px; color: #bcc3be; font-size: 9px; letter-spacing: 0.02em; }
.brand-lockup em { color: var(--sage); font-style: normal; font-weight: 700; }
/* The website/product mark is Sage's gateway threshold. Her desktop `❖`
   remains a separate character mark, worn on her jacket in the portrait. */
.gateway-mark {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 40px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 10px rgba(244, 114, 182, .32));
}
.gateway-mark::before {
  content: "";
  position: absolute;
  inset: 2px 3px 1px;
  border: 3px solid transparent;
  border-bottom: 0;
  border-radius: 18px 18px 3px 3px;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(145deg, var(--sage), var(--violet)) border-box;
}
.gateway-mark::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sage), var(--violet));
}
.gateway-mark i {
  position: absolute;
  z-index: 1;
  left: 17px;
  bottom: 3px;
  width: 3px;
  height: 27px;
  border-radius: 3px;
  background: linear-gradient(transparent, var(--sage-bright) 70%, #fff);
  box-shadow: 0 0 9px rgba(244, 114, 182, .6);
}
.gateway-mark-small { width: 31px; height: 33px; transform: scale(.86); transform-origin: left center; }
.gateway-mark-small i { left: 14px; height: 22px; }
.gateway-mark-large { width: 58px; height: 62px; transform: scale(1.35); margin: 24px 0 42px; }
.gateway-mark-large i { left: 27px; height: 42px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: #c1c8c3; text-decoration: none; font-size: 14px; font-weight: 500; transition: color 150ms ease; }
.nav-links a:hover { color: #fff; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: white; border-radius: 9px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1px; background: currentColor; margin: 4px auto; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 25px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 15px; transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: linear-gradient(90deg, var(--sage), var(--violet)); box-shadow: 0 16px 38px -19px rgba(244,114,182,.85); }
.button-ghost { color: var(--text); border-color: rgba(244,114,182,.42); background: rgba(15,17,23,.56); backdrop-filter: blur(7px); }
.button-ghost:hover { border-color: var(--sage); }
.button-small { min-height: 40px; padding: 0 20px; color: #fff !important; background: linear-gradient(90deg, var(--sage), var(--violet)); border-color: rgba(244,114,182,.65); }

.hero { position: relative; min-height: 780px; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-deep, #0b0d14); }
.hero-art, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { object-fit: cover; object-position: 54% 62%; opacity: .95; }
.hero-shade { background: linear-gradient(90deg, rgba(11,13,20,.99) 0%, rgba(11,13,20,.92) 28%, rgba(11,13,20,.48) 53%, rgba(11,13,20,.05) 78%), linear-gradient(180deg, rgba(11,13,20,.12) 48%, rgba(11,13,20,.93) 100%); }
.hero-grid { position: relative; z-index: 2; min-height: 690px; padding-top: 150px; display: grid; grid-template-columns: minmax(0, 700px) 1fr; align-items: center; }
.hero-copy { max-width: 700px; }
.eyebrow { margin: 0 0 17px; color: var(--sage); font: 700 11px/1.4 var(--display); letter-spacing: .17em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 1px; margin: 0 10px 3px 0; background: currentColor; }
.hero h1 { margin: 0; font: 800 clamp(46px, 5.35vw, 76px)/.98 var(--display); letter-spacing: -.064em; text-wrap: balance; }
.hero h1 span { display: block; color: var(--sage-bright); }
.hero-lede { max-width: 58ch; margin: 27px 0 0; color: #bac2bc; font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.hero-note { color: #7f8a82; font-size: 13px; margin: 17px 0 0; }

.capability-rail { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: 28px; }
.capability-rail article { display: flex; gap: 16px; padding: 22px 22px 19px; border-top: 1px solid rgba(255,255,255,.16); border-right: 1px solid rgba(255,255,255,.1); background: rgba(15,17,23,.76); backdrop-filter: blur(8px); }
.capability-rail article:first-child { border-left: 1px solid rgba(255,255,255,.1); }
.capability-rail > article > span { color: var(--sage); font: 700 10px/1.5 var(--display); letter-spacing: .1em; }
.capability-rail p { display: grid; gap: 4px; margin: 0; }
.capability-rail b { font-size: 14px; }
.capability-rail small { color: #78837c; font-size: 11px; line-height: 1.4; }

.section { padding: clamp(88px, 10vw, 142px) 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2, .persona h2, .finale h2 { margin: 0; font: 700 clamp(38px, 5vw, 62px)/1.05 var(--display); letter-spacing: -.055em; text-wrap: balance; }
.section-head h2 em, .finale h2 em { color: var(--sage-bright); font-family: var(--serif); font-style: normal; font-weight: 700; }
.section-head > p:last-child { max-width: 65ch; color: var(--muted); font-size: 17px; line-height: 1.7; }

.persona { background: linear-gradient(180deg, #14121d, var(--bg)); }
.persona-card { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: clamp(42px, 8vw, 110px); align-items: center; }
.persona-portrait { position: relative; margin: 0; overflow: hidden; border: 1px solid rgba(244,114,182,.28); border-radius: 12px; box-shadow: 0 35px 80px rgba(0,0,0,.45), 0 0 55px rgba(244,114,182,.08); }
.persona-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 64%, rgba(3,6,4,.82)); pointer-events: none; }
.persona-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.persona-portrait figcaption { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 20px; display: flex; align-items: center; gap: 10px; }
.persona-portrait figcaption > span:last-child { display: grid; }
.persona-portrait figcaption b { font: 700 17px/1 var(--display); }
.persona-portrait figcaption small { color: #b7c0b9; font-size: 11px; margin-top: 4px; }
.persona-copy { max-width: 650px; }
.persona-copy h2 { max-width: 11ch; }
.persona-intro { color: var(--muted); font-size: 18px; line-height: 1.75; margin: 28px 0; }
.persona blockquote { margin: 0 0 34px; padding: 18px 0 18px 24px; border-left: 2px solid var(--sage); color: var(--sage-bright); font: italic 500 26px/1.3 var(--serif); }
.principles { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.principles li { display: grid; grid-template-columns: 155px 1fr; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.principles b { color: var(--text); font-size: 14px; }
.principles span { color: var(--muted); font-size: 14px; }

.native { background: var(--bg-deep, #0b0d14); border-block: 1px solid var(--line); }
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.code-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #0b0d14; }
.code-card header { display: flex; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid var(--line); color: var(--sage); font: 700 10px/1 var(--display); letter-spacing: .13em; }
.code-card header b { color: #7d8a81; font: 500 11px/1 ui-monospace, monospace; letter-spacing: 0; }
.code-card pre { min-height: 245px; margin: 0; padding: 25px; overflow: auto; color: #cdd5cf; font: 500 13px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-card mark { color: var(--sage-bright); background: transparent; }
.code-card footer { padding: 13px 19px; border-top: 1px solid var(--line); color: #89958d; font-size: 12px; }
.code-card footer i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: var(--sage); border-radius: 50%; box-shadow: 0 0 8px var(--sage); }
.native-note {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(108, 99, 255, .28);
  border-left: 3px solid var(--violet);
  border-radius: 10px;
  background: linear-gradient(105deg, rgba(244,114,182,.055), rgba(108,99,255,.055));
}
.native-note span { color: var(--violet-soft); font: 700 10px/1.5 var(--display); letter-spacing: .13em; }
.native-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature { position: relative; min-height: 330px; padding: 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, rgba(26,29,39,.94), rgba(15,17,23,.82)); transition: border-color 180ms ease, transform 180ms var(--ease), box-shadow 180ms ease; }
.feature:hover { transform: translateY(-3px); border-color: rgba(244,114,182,.34); box-shadow: 0 8px 28px rgba(0,0,0,.3); }
.feature-wide { grid-column: 1 / -1; min-height: 285px; padding-right: 46%; }
.feature-wide::after { content: ""; position: absolute; right: -40px; top: -70px; width: 50%; aspect-ratio: 1; border: 1px solid rgba(244,114,182,.18); border-radius: 50%; box-shadow: inset 0 0 70px rgba(108,99,255,.06); }
.feature-index { color: var(--sage); font: 700 10px/1 var(--display); letter-spacing: .13em; }
.feature-icon { margin: 30px 0 18px; }
.feature h3 { max-width: 18ch; margin: 36px 0 15px; font: 700 clamp(24px, 3vw, 34px)/1.1 var(--display); letter-spacing: -.035em; }
.feature-wide h3 { margin-top: 18px; }
.feature p { max-width: 62ch; color: var(--muted); font-size: 15px; line-height: 1.65; }
.feature code { color: var(--sage); font: 500 12px ui-monospace, monospace; }
.token-demo, .budget-meter, .mini-route, .meter-stats, .model-pills { margin-top: 25px; }
.token-demo { display: flex; justify-content: space-between; gap: 18px; padding: 13px 16px; border: 1px solid var(--line); background: rgba(0,0,0,.2); font: 600 11px ui-monospace, monospace; }
.token-demo b { color: var(--sage); }
.budget-meter { position: relative; height: 37px; border: 1px solid var(--line); background: #070b09; }
.budget-meter i { display: block; width: 68%; height: 100%; background: linear-gradient(90deg, rgba(244,114,182,.35), rgba(108,99,255,.78)); }
.budget-meter span { position: absolute; inset: 0; display: grid; place-items: center; color: #e7ece8; font-size: 11px; }
.mini-route { display: flex; align-items: center; gap: 10px; color: #8e9b92; font: 700 10px var(--display); letter-spacing: .1em; }
.mini-route i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--violet), var(--sage)); box-shadow: 0 0 8px var(--sage); }
.meter-stats { display: flex; gap: 32px; }
.meter-stats span { display: grid; color: #7d8981; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.meter-stats b { color: var(--sage-bright); font: 700 22px var(--display); letter-spacing: -.03em; }
.model-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.model-pills span { padding: 6px 10px; border: 1px solid var(--line); color: #aab5ad; border-radius: 99px; font: 500 11px ui-monospace, monospace; }

.proof { position: relative; border-block: 1px solid var(--line); background: linear-gradient(135deg, #1a1827, #0b0d14); }
.proof::before { content: ""; position: absolute; inset: 0; opacity: .17; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(90deg, transparent, black 70%); }
.proof-grid { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(50px, 9vw, 120px); }
.text-link { display: inline-flex; gap: 8px; margin-top: 18px; color: var(--sage-bright); text-decoration: none; font-weight: 600; }
.proof-list { border-top: 1px solid var(--line-strong); }
.proof-list article { display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line-strong); }
.proof-list > article > span { color: var(--sage); font: 700 10px var(--display); }
.proof-list h3 { margin: 0 0 8px; font: 700 20px var(--display); letter-spacing: -.02em; }
.proof-list p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.run-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.run-card { padding: clamp(30px, 5vw, 55px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.run-card-primary { border-color: rgba(244,114,182,.42); background: radial-gradient(35rem 20rem at 90% 0%, rgba(244,114,182,.11), transparent 70%), var(--surface); }
.run-label { color: var(--sage); font: 700 10px var(--display); letter-spacing: .15em; }
.run-card h3 { margin: 26px 0 15px; font: 700 clamp(31px, 4vw, 44px)/1 var(--display); letter-spacing: -.045em; }
.run-card > p:not(.run-label) { min-height: 76px; color: var(--muted); line-height: 1.65; }
.run-card ul { min-height: 120px; margin: 28px 0; padding: 20px 0; list-style: none; border-block: 1px solid var(--line); }
.run-card li { padding: 5px 0; color: #c8d0ca; font-size: 14px; }
.run-card li::before { content: "↳"; margin-right: 10px; color: var(--sage); }

.finale { position: relative; overflow: hidden; padding: 150px 0; text-align: center; border-top: 1px solid var(--line); background: #0b0d14; }
.finale-glow { position: absolute; left: 50%; bottom: -25rem; width: 55rem; height: 55rem; transform: translateX(-50%); border: 1px solid rgba(244,114,182,.18); border-radius: 50%; box-shadow: inset 0 0 150px rgba(244,114,182,.12), 0 0 120px rgba(108,99,255,.11); }
.finale .wrap { position: relative; }
.finale .eyebrow::before { display: none; }
.finale h2 { font-size: clamp(42px, 6vw, 72px); }
.finale p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.finale-actions { justify-content: center; }

footer { border-top: 1px solid var(--line); background: #040705; }
.footer-inner { min-height: 130px; display: flex; align-items: center; gap: 28px; }
.footer-inner p { color: var(--faint); font-size: 13px; }
.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-links a { color: var(--muted); font-size: 13px; text-decoration: none; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .nav-links { display: none; position: absolute; top: 66px; left: var(--gutter); right: var(--gutter); flex-direction: column; align-items: stretch; gap: 0; padding: 12px; border: 1px solid var(--line-strong); background: rgba(6,10,8,.97); border-radius: 3px 16px 3px 3px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 13px 11px; }
  .nav-toggle { display: block; }
  .hero { min-height: auto; }
  .hero-grid { min-height: 760px; grid-template-columns: 1fr; align-content: center; padding-top: 118px; padding-bottom: 42px; }
  .hero-copy { max-width: 630px; }
  .hero-art { object-position: 63% 50%; opacity: .78; }
  .hero-shade { background: linear-gradient(90deg, rgba(11,13,20,.98), rgba(11,13,20,.6) 66%, rgba(11,13,20,.2)), linear-gradient(180deg, rgba(11,13,20,.18), rgba(11,13,20,.92)); }
  .capability-rail { grid-template-columns: 1fr 1fr; }
  .persona-card, .proof-grid { grid-template-columns: 1fr; }
  .persona-portrait { max-width: 640px; }
  .persona-copy { max-width: 720px; }
}

@media (max-width: 720px) {
  .nav-inner { height: 66px; }
  .hero-grid { min-height: 720px; padding-top: 100px; }
  .hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .hero-lede { font-size: 16px; }
  .capability-rail { grid-template-columns: 1fr; }
  .capability-rail article { border-left: 1px solid rgba(255,255,255,.1); }
  .section { padding-block: 86px; }
  .persona-card { gap: 48px; }
  .principles li { grid-template-columns: 1fr; gap: 6px; }
  .code-grid, .feature-grid, .run-grid { grid-template-columns: 1fr; }
  .native-note { grid-template-columns: 1fr; gap: 8px; }
  .feature-wide { grid-column: auto; padding-right: 30px; }
  .feature-wide::after { display: none; }
  .run-card > p:not(.run-label), .run-card ul { min-height: auto; }
  .footer-inner { padding-block: 34px; align-items: flex-start; flex-direction: column; }
  .footer-links { margin-left: 0; }
}

@media (max-width: 480px) {
  .hero-actions, .finale-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-note { line-height: 1.5; }
  .code-card pre { font-size: 11px; padding: 18px 14px; }
  .token-demo { flex-direction: column; }
  .meter-stats { gap: 20px; }
  .finale { padding-block: 110px; }
}

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