/*
 * PublishOS — marketing site styles.
 * Editorial long-form aesthetic: big confident typography, generous
 * whitespace, italic serif accents, monospace details, soft surfaces.
 * Light + dark themes, sticky chapter rail, scroll-driven reveals.
 */

/* ============ THEME TOKENS ============ */
:root {
  --bg:         #FBFAF6;
  --bg-soft:    #F5F4EF;
  --surface:    #FFFFFF;
  --surface-2:  #FAF9F4;
  --hair:       #E5E3DC;
  --hair-soft:  #EFEDE6;
  --text:       #14130F;
  --text-2:     #5C5A52;
  --text-3:     #989489;
  --violet:     #7E4FCC;
  --violet-soft:#EFE7FA;
  --coral:      #D8504F;
  --coral-soft: #FBE5E5;
  --blue:       #3F6BD0;
  --blue-soft:  #E5ECFA;
  --amber:      #C97432;
  --amber-soft: #FBE9D6;
  --green:      #2F8A5F;
  --green-soft: #E4F1EA;
  --pink:       #C45A8B;
  --pink-soft:  #F8E4EE;
  --shadow-lg:  0 30px 70px -30px rgba(20,19,15,0.22), 0 4px 16px -4px rgba(20,19,15,0.05);

  --radius:     16px;
  --radius-sm:  10px;
  --radius-lg:  24px;

  --ease:       cubic-bezier(.2, .8, .2, 1);
  --ease-out:   cubic-bezier(.16, 1, .3, 1);

  --font-sans:  -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-serif: "New York", "Iowan Old Style", "Cormorant Garamond", "Source Serif Pro", Georgia, serif;
  --font-mono:  ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;

  color-scheme: light;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  transition: background .35s var(--ease), color .35s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--hair-soft);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--hair);
  color: var(--text);
}
em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

/* ============ SKIP LINK ============ */
.skip {
  position: absolute;
  left: -9999px; top: -9999px;
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 8px;
  z-index: 100;
  font-size: 13px;
}
.skip:focus { left: 16px; top: 16px; }

/* ============ CONTAINER ============ */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}
.container.narrow {
  max-width: 760px;
}

/* ============ CURSOR GLOW ============ */
.cursor-glow {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    180px circle at var(--mx, 50%) var(--my, 50%),
    rgba(126, 79, 204, 0.08),
    transparent 65%
  );
  transition: background .15s linear;
}


/* ============ TYPOGRAPHY ============ */
.kicker {
  display: inline-block;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.kicker span {
  border-left: 2px solid currentColor;
  padding-left: 10px;
}
.chapter-eyebrow {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 24px;
}
.chapter-eyebrow span {
  position: relative; padding-left: 28px;
}
.chapter-eyebrow span::before {
  content: "";
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 20px; height: 1px; background: currentColor; opacity: 0.5;
}

.chapter-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.024em;
  /* Italic serif glyphs have generous descenders (f, y, p, g) — give
     them breathing room or the next line crops them at the bottom. */
  line-height: 1.12;
  margin: 0 0 24px;
  text-wrap: balance;
}
.chapter-title em {
  background: linear-gradient(120deg, var(--violet) 0%, var(--coral) 55%, var(--amber) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  /* The italic slant pushes glyphs past their bounding box; without this
     pad the gradient gets clipped at the leading/trailing edges and the
     letters appear "shaved". The negative margin keeps layout unchanged. */
  display: inline-block;
  padding: 0.06em 0.08em;
  margin: -0.06em -0.05em;
}
.chapter-lede {
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--text-2);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 0 40px;
  letter-spacing: -0.004em;
  text-wrap: pretty;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.022em;
  /* Generous so italic descenders (em variants) clear comfortably. */
  line-height: 1.15;
  margin: 0 0 18px;
  text-wrap: balance;
}
h3 {
  font-size: clamp(22px, 2.4vw, 28px); font-weight: 600;
  letter-spacing: -0.018em; line-height: 1.2;
  margin: 0 0 14px;
  text-wrap: balance;
}
h4 {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.012em; line-height: 1.3;
  margin: 0 0 8px;
}
h5 {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3); margin: 0 0 14px;
}
.body-lg {
  font-size: 16.5px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 0 22px;
  letter-spacing: -0.003em;
}
.prose p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-2);
  margin: 0 0 24px;
  letter-spacing: -0.003em;
  text-wrap: pretty;
}
.prose p:last-of-type { margin-bottom: 0; }

.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  margin: 32px 0 36px;
  padding-left: 22px;
  border-left: 2px solid var(--text);
  letter-spacing: -0.014em;
}
.big-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.004em;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s var(--ease),
    border-color .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--hair);
}
.btn-ghost:hover { border-color: var(--text); transform: translateY(-1px); }
.btn-lg { padding: 15px 28px; font-size: 15.5px; }

/* ============ SIDE RAIL ============
 * Fixed right-edge column. Each item is a tiny `num + dash` pair anchored
 * to the right. The active/hovered item grows its dash and reveals a
 * floating label pill to the LEFT, absolutely positioned so it never
 * affects the rail's width or the surrounding layout.
 */
.rail {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.rail.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.rail li {
  position: relative;
  /* Critical: gives the absolute-positioned label pill an anchor that
     hugs the right edge of the rail rather than the viewport. */
}
.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 14px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  transition: color .2s var(--ease);
}
.rail .rail-num {
  opacity: 0.55;
  transition: opacity .25s var(--ease);
}
.rail a::after {
  content: "";
  display: block;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.4;
  border-radius: 1px;
  transition: width .3s var(--ease), opacity .3s var(--ease);
}
.rail a:hover,
.rail a.is-active {
  color: var(--text);
}
.rail a:hover .rail-num,
.rail a.is-active .rail-num {
  opacity: 1;
}
.rail a:hover::after {
  width: 26px;
  opacity: 1;
}
.rail a.is-active::after {
  width: 32px;
  opacity: 1;
}

/* Floating label pill. Sits to the LEFT of the num+dash, anchored to
   `right: 100%` of the parent <li>. Absolutely positioned so it doesn't
   push the rail wider when it appears. */
.rail-label {
  position: absolute;
  right: 100%;
  margin-right: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 11.5px;
  letter-spacing: -0.002em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--hair);
  padding: 4px 11px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 14px -6px rgba(20, 19, 15, 0.2);
  transition: opacity .22s var(--ease), transform .25s var(--ease);
}
.rail a:hover .rail-label,
.rail a.is-active .rail-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 1280px) {
  .rail { display: none; }
}

/* ============ HERO ============
 * Centered column with a choreographed welcome animation: logo → kicker →
 * headline (per-word) → lede → CTAs → meta pill → scroll hint. Pure CSS,
 * triggers on page load via animation-fill-mode: backwards.
 */
.hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}
.hero-aurora {
  position: absolute;
  top: -240px; left: 50%;
  width: 1400px; height: 900px;
  margin-left: -700px;
  background:
    radial-gradient(closest-side, rgba(126,79,204,0.16), transparent 60%),
    radial-gradient(closest-side, rgba(216,80,79,0.10) 35%, transparent 70%),
    radial-gradient(closest-side, rgba(201,116,50,0.08) 35%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  animation: aurora-drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aurora-drift {
  from { transform: translate(0, 0) rotate(0deg) scale(1); }
  to   { transform: translate(-60px, 40px) rotate(12deg) scale(1.06); }
}
.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Padding scales with viewport height so the column compresses on
     short laptops and breathes on tall monitors. */
  padding: clamp(40px, 6vh, 80px) 32px clamp(36px, 5vh, 72px);
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}

/* ============ WELCOME ANIMATION ============
 * Single shared rise + fade keyframe. Each hero block lands on its own
 * delay token (`--welcome-d`); per-word headline blocks use `--d` so they
 * can be set inline.
 */
@keyframes welcome-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes word-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}
.hero-brand,
.hero-kicker,
.hero-lede,
.hero-ctas,
.hero-meta,
.hero-scroll {
  opacity: 0;
  animation: welcome-rise 0.9s var(--ease-out) forwards;
  animation-delay: var(--welcome-d, 0ms);
}
.hero-brand   { --welcome-d: 100ms; }
.hero-kicker  { --welcome-d: 280ms; }
/* Headline words handle their own animation; the <h1> itself isn't faded. */
.hero-lede    { --welcome-d: 1180ms; }
.hero-ctas    { --welcome-d: 1380ms; }
.hero-meta    { --welcome-d: 1520ms; }
.hero-scroll  { --welcome-d: 1780ms; }

/* Wordmark at the top of the column. */
.hero-brand {
  display: inline-block;
  margin: 0 auto clamp(16px, 3vh, 28px);
}
.hero-brand img {
  height: clamp(40px, 6vh, 56px);
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Kicker — tiny uppercase eyebrow above the headline. */
.hero-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 clamp(14px, 2.6vh, 26px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-kicker::before,
.hero-kicker::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

/* Headline. Each word is its own inline-block so we can stagger entrance.
   Size is the smaller of width-based and height-based scaling so short
   laptops don't get a headline taller than their viewport. */
.hero-headline {
  font-size: min(clamp(30px, 5.4vw, 72px), 9vh);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 0 auto clamp(14px, 2.6vh, 26px);
  max-width: 18ch;
  text-wrap: balance;
}
.hero-word {
  display: inline-block;
  opacity: 0;
  animation: word-rise 0.95s var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
  /* A touch of horizontal padding so the leading edge of slanted italic
     glyphs doesn't get clipped by background-clip:text. */
  padding: 0 0.04em;
}
.hero-headline em {
  background: linear-gradient(120deg, var(--violet) 0%, var(--coral) 55%, var(--amber) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 500;
  display: inline-block;
  padding: 0.06em 0.1em;
  margin: -0.06em -0.06em;
}

/* Sub-headline. */
.hero-lede {
  font-size: clamp(15.5px, 1.6vw, 19px);
  color: var(--text-2);
  line-height: 1.55;
  max-width: 540px;
  margin: 0 auto clamp(22px, 3.6vh, 36px);
  letter-spacing: -0.004em;
  text-wrap: pretty;
}

/* CTAs — block-level row so the meta line flows below. */
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 clamp(18px, 2.8vh, 32px);
}

/* Meta line (license + telemetry blurb). Plain inline text, no pill. */
.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 0;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0;
}
.ping {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
  animation: ping 2s ease-in-out infinite;
}
@keyframes ping {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.6); opacity: 0.55; }
}

/* Scroll-to-continue indicator at the bottom of the hero. */
.hero-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: clamp(28px, 5vh, 56px) auto 0;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color .2s var(--ease);
}
/* On very short viewports the scroll hint risks pushing the meta line
   off-screen — hide it; the page is short enough that the user finds the
   rest naturally. */
@media (max-height: 720px) {
  .hero-scroll { display: none; }
}
.hero-scroll:hover { color: var(--text); }
.hero-scroll svg {
  animation: scroll-bounce 2.2s var(--ease-out) infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* Respect reduced motion — collapse animations to instant reveal. */
@media (prefers-reduced-motion: reduce) {
  .hero-brand, .hero-kicker, .hero-lede, .hero-ctas, .hero-meta, .hero-scroll,
  .hero-word {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
  .hero-aurora { animation: none; }
  .hero-scroll svg { animation: none; }
}

/* ============ MARQUEE (dark band) ============ */
.marquee {
  margin-top: 0;
  padding: 24px 0;
  overflow: hidden;
  background: var(--text);
  border-top: 1px solid rgba(244, 242, 236, 0.08);
  border-bottom: 1px solid rgba(244, 242, 236, 0.08);
  position: relative;
  /* IMPORTANT: no mask on the band itself — the dark must extend edge-to-
     edge or the page background bleeds through at the corners. */
}
.marquee-track {
  display: flex; gap: 24px;
  font-size: 13px;
  color: rgba(244, 242, 236, 0.85);
  font-family: var(--font-mono);
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  letter-spacing: 0.01em;
  /* The text track gets the edge fade instead — words ease in/out at the
     band's edges without exposing what's behind. */
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track span:nth-child(even) {
  color: rgba(244, 242, 236, 0.35);
  opacity: 1;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ============ PROLOGUE ============ */
.prologue {
  padding: 140px 0 100px;
  border-bottom: 1px solid var(--hair);
}

/* ============ ORIENT (intro after prologue) ============ */
.orient {
  padding: 110px 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--hair);
}
.orient-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 80px;
  align-items: center;
}
@media (max-width: 980px) {
  .orient-grid { grid-template-columns: 1fr; gap: 50px; }
}

/* ============ BROWSER WINDOW MOCK ============ */
.browser-window {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform-origin: center;
  transition: transform .6s var(--ease-out);
}
.browser-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair-soft);
  background: var(--bg-soft);
}
.browser-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-r { background: #FF5F57; }
.dot-y { background: #FEBC2E; }
.dot-g { background: #28C840; }
.browser-url {
  margin-left: 8px; flex: 1;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px; color: var(--text-2);
  font-family: var(--font-mono);
}
.browser-url svg { color: var(--text-3); flex-shrink: 0; }
.pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); margin-left: auto;
  box-shadow: 0 0 0 3px var(--green-soft);
  animation: ping 2s ease-in-out infinite;
}
.browser-body { padding: 36px 32px 32px; }
.mock-eyebrow {
  font-size: 11.5px; color: var(--violet); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 6px;
}
.mock-title {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 600; letter-spacing: -0.018em;
  margin: 0 0 6px;
  font-family: var(--font-sans);
}
.mock-cursor {
  display: inline-block; width: 2px; height: 22px;
  background: var(--text); margin-left: 3px; vertical-align: -3px;
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.mock-sub { font-size: 13px; color: var(--text-2); margin: 0 0 22px; }
.mock-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 22px;
}
.mock-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft); border: 1px solid var(--hair);
  padding: 11px 12px; border-radius: 9px;
  font-size: 12px; color: var(--text);
  font-family: var(--font-mono);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.mock-card:hover { transform: translateY(-3px); border-color: var(--text-3); }
.mock-card-ico {
  width: 22px; height: 22px; border-radius: 5px;
  flex-shrink: 0;
}
.mock-card-ico.ico-html { background: var(--violet-soft); }
.mock-card-ico.ico-pdf  { background: var(--coral-soft); }
.mock-card-ico.ico-img  { background: var(--green-soft); }
.mock-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair-soft);
  padding-top: 18px; gap: 12px;
}
.mock-stats > div { display: flex; flex-direction: column; }
.mock-stat-num {
  font-size: 26px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.mock-stat-label { font-size: 11.5px; color: var(--text-3); }

/* ============ CHAPTERS ============ */
.chapter {
  padding: 120px 0 60px;
}
.chapter-alt {
  background: var(--surface-2);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.chapter-head {
  text-align: center;
  margin-bottom: 80px;
}
.chapter-head .chapter-eyebrow span {
  padding: 4px 14px 4px 28px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 999px;
}
.chapter-head .chapter-lede {
  margin-left: auto; margin-right: auto;
}
.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: center;
  padding: 60px 32px;
}
.feature-flip { direction: rtl; }
.feature-flip > * { direction: ltr; }
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: 1fr; gap: 40px; padding: 40px 32px; }
  .feature-flip { direction: ltr; }
}

/* ============ CHECK LIST ============ */
.check-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.check-list li {
  position: relative; padding-left: 28px;
  font-size: 14.5px; color: var(--text-2);
  line-height: 1.55;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1.5px var(--green);
}
.check-list li::after {
  content: ""; position: absolute; left: 4.5px; top: 9px;
  width: 5px; height: 8px;
  border: solid var(--green);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}

/* ============ TREE MOCK ============ */
.tree-mock {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 16px 12px;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 13px;
}
.tree-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: 6px;
  transition: background .15s var(--ease);
}
.tree-row:hover { background: var(--hair-soft); }
.tree-row.depth-0 { padding-left: 12px; }
.tree-row.depth-1 { padding-left: 36px; color: var(--text-2); }
.tree-row.depth-2 { padding-left: 60px; color: var(--text-2); }
.tree-toggle {
  display: inline-block; width: 12px;
  color: var(--text-3); font-size: 10px;
  transform: rotate(-90deg); transition: transform .2s var(--ease);
}
.tree-row.open .tree-toggle { transform: rotate(0); }
.tree-folder::before {
  content: ""; display: inline-block; width: 14px; height: 14px;
  margin-right: 6px; vertical-align: -3px;
  background: linear-gradient(135deg, var(--amber), var(--coral));
  border-radius: 3px;
  opacity: 0.9;
}
.tree-meta { margin-left: auto; font-size: 11px; color: var(--text-3); }
.tree-file {
  width: 14px; height: 14px; border-radius: 3px;
  display: inline-block;
}
.tree-file.html { background: var(--violet-soft); border: 1px solid var(--violet); }
.tree-file.img  { background: var(--green-soft); border: 1px solid var(--green); }
.tree-file.pdf  { background: var(--coral-soft); border: 1px solid var(--coral); }
.tree-row.file { color: var(--text); }

/* ============ UPLOAD MOCK ============ */
.upload-mock {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-lg);
}
.upload-mock-head { margin-bottom: 18px; }
.upload-mock-head strong { display: block; font-size: 15.5px; }
.upload-mock-head span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.upload-drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1.5px dashed var(--hair);
  background:
    radial-gradient(220px 100px at 100% 0%, rgba(126,79,204,0.08), transparent 70%),
    var(--surface);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  margin-bottom: 16px;
  transition: border-color .2s var(--ease);
}
.upload-drop:hover { border-color: var(--violet); }
.upload-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--violet-soft); color: var(--violet); margin-bottom: 6px;
}
.upload-drop strong { font-size: 14px; letter-spacing: -0.004em; }
.upload-drop span { font-size: 12px; color: var(--text-3); }

.upload-row {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--hair); border-radius: 9px;
  margin-bottom: 6px;
  background: var(--surface);
  position: relative;
}
.upload-row.state-done { background: linear-gradient(180deg, rgba(47,138,95,0.06), transparent); border-color: rgba(47,138,95,0.2); }
.upload-row.state-up   { background: linear-gradient(180deg, rgba(126,79,204,0.06), transparent); border-color: rgba(126,79,204,0.2); }
.upload-ico { width: 28px; height: 28px; border-radius: 6px; }
.upload-ico.html { background: var(--violet-soft); }
.upload-ico.pdf  { background: var(--coral-soft); }
.upload-ico.img  { background: var(--green-soft); }
.upload-ico.zip  { background: var(--amber-soft); }
.upload-name {
  font-size: 12.5px; color: var(--text); font-weight: 500;
  display: flex; align-items: baseline; gap: 6px;
}
.upload-name small { color: var(--text-3); font-weight: 400; }
.upload-tag {
  font-size: 11px; font-weight: 500; color: var(--text-2);
  background: var(--bg-soft); border: 1px solid var(--hair);
  padding: 2px 8px; border-radius: 999px;
}
.upload-row.state-done .upload-tag { background: var(--green-soft); color: var(--green); border-color: transparent; }
.upload-bar {
  grid-column: 1 / -1; height: 3px; background: var(--hair-soft);
  border-radius: 999px; overflow: hidden;
  margin-top: 6px;
}
.upload-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--coral));
  border-radius: 999px;
  animation: bar-pulse 1.6s ease-in-out infinite alternate;
}
@keyframes bar-pulse {
  from { opacity: 0.65; }
  to   { opacity: 1; }
}

/* ============ MODES ============ */
.modes {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.mode {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 18px;
  /* Grid: icon spans both rows; title + description stack in column 2.
     (Auto-flow would wrap the description back under the icon.) */
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 14px;
  row-gap: 4px;
  align-items: start;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.mode:hover { transform: translateY(-3px); border-color: var(--text-3); }
.mode-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 1px;
}
.mode-off .mode-icon  { background: var(--hair-soft); color: var(--text-2); }
.mode-public .mode-icon { background: var(--green-soft); color: var(--green); }
.mode-pw .mode-icon  { background: var(--violet-soft); color: var(--violet); }
.mode strong {
  grid-column: 2;
  font-size: 15px;
  line-height: 1.3;
}
.mode span {
  grid-column: 2;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============ GATE / RESET MOCKS ============ */
.gate-mock, .reset-mock {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 32px 28px 24px;
  max-width: 380px; margin: 0 auto;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.gate-head, .reset-head { margin-bottom: 18px; display: flex; justify-content: center; }
.gate-head img, .reset-head img { height: 40px; width: auto; }
.gate-mock h4, .reset-mock h4 { font-size: 17px; margin: 0 0 4px; }
.gate-sub, .reset-mock p { font-size: 13px; color: var(--text-2); margin: 0 0 20px; }
.gate-label, .reset-mock label {
  display: block; text-align: left;
  font-size: 12px; font-weight: 500;
  color: var(--text-2); margin-bottom: 6px;
}
.gate-input, .reset-input {
  position: relative;
  border: 1px solid var(--hair); border-radius: 9px;
  padding: 11px 12px; text-align: left;
  background: var(--surface);
}
.gate-stars { letter-spacing: 3px; color: var(--text); font-family: var(--font-mono); }
.gate-eye, .reset-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.gate-btn, .reset-btn {
  margin-top: 14px;
  width: 100%; padding: 11px 12px;
  background: var(--text); color: var(--bg);
  border-radius: 9px; font: inherit; font-weight: 500; border: 0; cursor: pointer;
  transition: opacity .2s var(--ease);
}
.gate-btn:hover, .reset-btn:hover { opacity: 0.92; }
.reset-input span:first-child { letter-spacing: 3px; font-family: var(--font-mono); }

/* ============ QUOTE BLOCK ============ */
.quote-block {
  padding: 80px 0;
  margin-top: 60px;
  background:
    linear-gradient(180deg, var(--surface-2), var(--bg));
  border-top: 1px solid var(--hair);
  text-align: center;
}
.quote-block .kicker { margin-bottom: 24px; }
.quote-block .kicker span {
  border-left: 0;
  padding: 4px 14px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 999px;
}

/* ============ STATS MOCK ============ */
.stats-mock {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.stats-head {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 22px;
}
.kpi { display: flex; flex-direction: column; gap: 4px; position: relative; }
.kpi strong { font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 11.5px; color: var(--text-3); }
.pulse-tile strong { color: var(--green); }
.dot-live {
  position: absolute; top: 5px; right: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px var(--green-soft);
  animation: ping 2s ease-in-out infinite;
}
.stats-chart {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 5px; height: 140px; align-items: end;
  padding: 14px 0; border-top: 1px solid var(--hair-soft);
  border-bottom: 1px solid var(--hair-soft);
  margin-bottom: 16px;
}
.bar {
  height: var(--h);
  background: linear-gradient(180deg, var(--violet), var(--coral));
  border-radius: 4px 4px 0 0;
  opacity: 0.9;
}
.stats-chart.is-in .bar { animation: bar-grow .9s var(--ease-out) backwards; }
.stats-chart.is-in .bar:nth-child(1) { animation-delay: .05s; }
.stats-chart.is-in .bar:nth-child(2) { animation-delay: .12s; }
.stats-chart.is-in .bar:nth-child(3) { animation-delay: .19s; }
.stats-chart.is-in .bar:nth-child(4) { animation-delay: .26s; }
.stats-chart.is-in .bar:nth-child(5) { animation-delay: .33s; }
.stats-chart.is-in .bar:nth-child(6) { animation-delay: .4s; }
.stats-chart.is-in .bar:nth-child(7) { animation-delay: .47s; }
.stats-chart.is-in .bar:nth-child(8) { animation-delay: .54s; }
.stats-chart.is-in .bar:nth-child(9) { animation-delay: .61s; }
.stats-chart.is-in .bar:nth-child(10) { animation-delay: .68s; }
.stats-chart.is-in .bar:nth-child(11) { animation-delay: .75s; }
.stats-chart.is-in .bar:nth-child(12) { animation-delay: .82s; }
@keyframes bar-grow {
  from { height: 0%; opacity: 0; }
  to   { height: var(--h); opacity: 0.9; }
}
.stats-foot { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11.5px; padding: 4px 10px;
  background: var(--bg-soft); border: 1px solid var(--hair); border-radius: 999px;
}

/* ============ ROLES / INVITE ============ */
.roles-mock {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  max-width: 480px; margin: 0 auto;
}
@media (max-width: 540px) { .roles-mock { grid-template-columns: 1fr; } }
.role-card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 18px;
  position: relative;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.role-card:hover { transform: translateY(-3px); border-color: var(--text-3); }
.role-card strong { display: block; font-size: 15px; margin-bottom: 3px; }
.role-card span { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.role-dot {
  position: absolute; top: 16px; right: 16px;
  width: 9px; height: 9px; border-radius: 50%;
}
.r-owner .role-dot  { background: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.r-admin .role-dot  { background: var(--blue);   box-shadow: 0 0 0 3px var(--blue-soft); }
.r-editor .role-dot { background: var(--green);  box-shadow: 0 0 0 3px var(--green-soft); }
.r-viewer .role-dot { background: var(--text-3); box-shadow: 0 0 0 3px var(--hair-soft); }

.invite-mock {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
}
.invite-row {
  display: grid; grid-template-columns: 32px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--hair-soft);
}
.invite-row:last-of-type { border-bottom: 0; }
.invite-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #fff;
}
.invite-text strong { display: block; font-size: 13px; font-weight: 500; }
.invite-text span { font-size: 11px; color: var(--text-3); }
.invite-state {
  font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  letter-spacing: 0.04em;
}
.state-sent    { background: var(--blue-soft); color: var(--blue); }
.state-done    { background: var(--green-soft); color: var(--green); }
.state-pending { background: var(--amber-soft); color: var(--amber); }
.invite-foot {
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid var(--hair-soft);
  text-align: center;
}
.invite-pill {
  font-size: 11.5px; color: var(--text-2);
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  padding: 5px 12px; border-radius: 999px;
}
.pal-1 { background: var(--violet); }
.pal-2 { background: var(--coral); }
.pal-3 { background: var(--blue); }
.pal-4 { background: var(--amber); }
.pal-5 { background: var(--green); }
.pal-6 { background: var(--pink); }

/* ============ NOTIFICATIONS ============ */
.notif-mock {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-lg);
}
.notif-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.notif-head strong { font-size: 14px; }
.notif-head span { font-size: 11.5px; color: var(--text-3); }
.notif-row {
  display: grid; grid-template-columns: 14px 1fr; gap: 10px;
  padding: 12px 4px;
  border-top: 1px solid var(--hair-soft);
}
.notif-row:first-of-type { border-top: 0; padding-top: 6px; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 6px;
}
.notif-row.k-success .notif-dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.notif-row.k-warn .notif-dot    { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.notif-row.k-info .notif-dot    { background: var(--blue);  box-shadow: 0 0 0 3px var(--blue-soft); }
.notif-row.k-danger .notif-dot  { background: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.notif-title { font-size: 13px; font-weight: 500; color: var(--text); }
.notif-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ============ STORAGE / USAGE ============ */
.storage-mock {
  display: grid; gap: 12px;
  max-width: 460px; margin: 0 auto;
}
.storage-pick {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.storage-pick:hover { transform: translateY(-3px); }
.storage-pick.is-active {
  border-color: var(--violet);
  background:
    linear-gradient(135deg, var(--violet-soft), transparent 60%),
    var(--surface);
}
.storage-pick-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.storage-pick-head strong { font-size: 15px; }
.badge-active {
  font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: var(--violet); color: #fff;
  letter-spacing: 0.04em;
}
.storage-pick-desc { font-size: 12.5px; color: var(--text-2); }

.usage-mock {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.usage-tiles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 18px;
}
.usage-tile {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--hair);
  border-radius: 10px;
}
.usage-eyebrow {
  font-size: 10.5px; font-weight: 600;
  color: var(--text-3); letter-spacing: 0.08em;
  text-transform: uppercase;
}
.usage-tile strong {
  font-size: 24px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1; margin-top: 4px;
}
.usage-tile small { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.usage-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hair-soft);
}
.usage-list li {
  display: grid; grid-template-columns: 16px 70px 1fr 36px;
  align-items: center; gap: 10px;
  padding: 4px 0;
  font-size: 12.5px;
}
.usage-list .dot { width: 9px; height: 9px; border-radius: 50%; }
.usage-list .name { color: var(--text); font-weight: 500; }
.usage-list .bar {
  height: 6px; border-radius: 999px;
  background: var(--hair-soft); overflow: hidden;
}
.usage-list .bar .fill {
  display: block; height: 100%; border-radius: 999px;
  transition: width 1s var(--ease-out);
}
.usage-list .pct {
  font-variant-numeric: tabular-nums;
  font-size: 11.5px; color: var(--text-2); text-align: right;
}

/* ============ CARDS GRID ============ */
.cards-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 40px;
}
@media (max-width: 880px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .cards-grid { grid-template-columns: 1fr; } }
.card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s var(--ease),
    box-shadow .25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--text-3);
  box-shadow: 0 14px 30px -18px rgba(20,19,15,0.18);
}
/* Card icon — one of six colour variants. Each card-ico carries a `c-*`
   modifier that pairs a soft tint background with a strong stroke colour
   and a faint border in the same hue. The whole tile lifts + tilts on
   card hover for a touch of playfulness. */
.card-ico {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  margin-bottom: 16px;
  /* Defaults — overridden by .c-* modifiers below. */
  background: var(--hair-soft);
  color: var(--text-2);
  border: 1px solid transparent;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover .card-ico {
  transform: translateY(-2px) rotate(-3deg) scale(1.06);
}
.card-ico svg {
  width: 19px; height: 19px;
  transition: transform .3s var(--ease);
}
.card:hover .card-ico svg {
  transform: rotate(3deg);
}

.card-ico.c-violet {
  background: var(--violet-soft);
  color: var(--violet);
  border-color: rgba(126, 79, 204, 0.18);
  box-shadow: 0 6px 16px -8px rgba(126, 79, 204, 0.4);
}
.card-ico.c-coral {
  background: var(--coral-soft);
  color: var(--coral);
  border-color: rgba(216, 80, 79, 0.18);
  box-shadow: 0 6px 16px -8px rgba(216, 80, 79, 0.35);
}
.card-ico.c-blue {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: rgba(63, 107, 208, 0.18);
  box-shadow: 0 6px 16px -8px rgba(63, 107, 208, 0.35);
}
.card-ico.c-amber {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(201, 116, 50, 0.2);
  box-shadow: 0 6px 16px -8px rgba(201, 116, 50, 0.4);
}
.card-ico.c-green {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(47, 138, 95, 0.2);
  box-shadow: 0 6px 16px -8px rgba(47, 138, 95, 0.35);
}
.card-ico.c-pink {
  background: var(--pink-soft);
  color: var(--pink);
  border-color: rgba(196, 90, 139, 0.18);
  box-shadow: 0 6px 16px -8px rgba(196, 90, 139, 0.35);
}
.card p { color: var(--text-2); margin: 0; line-height: 1.6; font-size: 14.5px; }

/* ============ OPEN SOURCE SECTION ============ */
.open-source {
  background: var(--text);
  color: var(--bg);
  padding: 140px 0;
  position: relative;
  overflow: hidden;
}
.open-source::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 20% 0%, rgba(126,79,204,0.16), transparent 70%),
    radial-gradient(600px 400px at 100% 100%, rgba(216,80,79,0.10), transparent 70%);
  pointer-events: none;
}
.os-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
  position: relative;
}
@media (max-width: 980px) { .os-grid { grid-template-columns: 1fr; gap: 40px; } }
.open-source .chapter-eyebrow { color: rgba(244,242,236,0.55); }
.open-source .chapter-title { color: var(--bg); }
.open-source .chapter-title em {
  background: linear-gradient(120deg, #B498F0 0%, #E27D7C 55%, #E0A064 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Inherits the inline-block / padding / negative-margin from
     .chapter-title em above — only the gradient colours change here. */
}
.open-source .chapter-lede { color: rgba(244,242,236,0.7); }
.os-points {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 38px 0 36px;
}
@media (max-width: 640px) { .os-points { grid-template-columns: 1fr; } }
.os-point { color: rgba(244,242,236,0.85); }
.os-point .os-num {
  font-family: var(--font-mono);
  font-size: 11.5px; color: rgba(244,242,236,0.4);
  letter-spacing: 0.1em; margin-bottom: 10px;
}
.os-point h4 { color: var(--bg); margin-bottom: 8px; font-size: 16.5px; }
.os-point p { font-size: 13.5px; color: rgba(244,242,236,0.6); line-height: 1.55; margin: 0; }
.os-point code {
  background: rgba(244,242,236,0.08);
  border-color: rgba(244,242,236,0.12);
  color: rgba(244,242,236,0.9);
}
.os-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.open-source .btn-primary { background: var(--bg); color: var(--text); }
.open-source .btn-ghost { color: var(--bg); border-color: rgba(244,242,236,0.2); }
.open-source .btn-ghost:hover { border-color: var(--bg); }

/* Terminal */
.terminal {
  background: #0A0907;
  border: 1px solid rgba(244,242,236,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  background: rgba(244,242,236,0.04);
  border-bottom: 1px solid rgba(244,242,236,0.06);
}
.terminal-bar .dot-r,
.terminal-bar .dot-y,
.terminal-bar .dot-g { width: 9px; height: 9px; border-radius: 50%; }
.terminal-bar .dot-r { background: #FF5F57; }
.terminal-bar .dot-y { background: #FEBC2E; }
.terminal-bar .dot-g { background: #28C840; }
.terminal-title {
  margin-left: 6px;
  font-size: 11px; color: rgba(244,242,236,0.5);
}
.terminal-body {
  padding: 18px 20px;
  color: rgba(244,242,236,0.92);
  line-height: 1.75;
}
.terminal-body .line { position: relative; }
.terminal-body .prompt { color: #9DDF8F; margin-right: 8px; }
.terminal-body .cmd { color: var(--bg); }
.terminal-body .out { color: rgba(244,242,236,0.55); padding-left: 20px; }
.terminal-link { color: #93C5FD; text-decoration: underline; }
.caret {
  display: inline-block; width: 8px; height: 14px;
  background: var(--bg); margin-left: 4px;
  vertical-align: -2px;
  animation: blink 1.05s steps(2) infinite;
}
.copy-btn {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  background: rgba(244,242,236,0.08);
  color: rgba(244,242,236,0.7);
  border: 1px solid rgba(244,242,236,0.12);
  border-radius: 5px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
  opacity: 0; pointer-events: none;
}
.line:hover .copy-btn { opacity: 1; pointer-events: auto; }
.copy-btn:hover { background: rgba(244,242,236,0.16); color: var(--bg); }
.copy-btn.copied { background: var(--green); color: #fff; border-color: var(--green); }

/* ============ START / CTA ============ */
.start {
  padding: 140px 0 100px;
  text-align: center;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(126,79,204,0.06), transparent 70%),
    radial-gradient(600px 240px at 50% 100%, rgba(216,80,79,0.05), transparent 70%),
    var(--bg);
}
.start-inner .chapter-eyebrow,
.start-inner .chapter-title,
.start-inner .chapter-lede {
  text-align: center;
  margin-left: auto; margin-right: auto;
}
.start-paths {
  margin-top: 50px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 820px) { .start-paths { grid-template-columns: 1fr; } }
.start-card {
  display: block; text-align: left;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s var(--ease),
    box-shadow .25s var(--ease);
  color: inherit;
}
.start-card:hover {
  transform: translateY(-4px);
  border-color: var(--text-3);
  box-shadow: 0 14px 30px -18px rgba(20,19,15,0.18);
}
.start-num {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-3); letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.start-card h3 { font-size: 20px; margin-bottom: 10px; }
.start-card p { color: var(--text-2); font-size: 14px; margin: 0 0 18px; line-height: 1.55; }
.start-link {
  font-size: 13px; font-weight: 500;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .2s var(--ease);
}
.start-card:hover .start-link { gap: 10px; }

/* ============ FOOTER (single-line, minimal, centered) ============ */
.foot {
  border-top: 1px solid var(--hair);
  background: var(--bg);
  padding: 26px 0;
  /* Ironclad centering — flex on the footer itself so the .foot-line is
     centered horizontally regardless of any inherited text-align quirks. */
  display: flex;
  justify-content: center;
  text-align: center;
}
.foot-line {
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
  margin: 0;
  letter-spacing: -0.002em;
  /* Block-level so the paragraph spans the available width; text-align
     centers the inline content inside it. */
  width: 100%;
}
.foot-line a {
  color: var(--text-2);
  border-bottom: 1px dotted var(--hair);
  padding-bottom: 1px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.foot-line a:hover { color: var(--text); border-bottom-color: var(--text); }
.foot-heart {
  color: #E11D48;
  display: inline-block;
  animation: heart-pulse 1.4s ease-in-out infinite;
}
@keyframes heart-pulse {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.22); }
  40% { transform: scale(0.95); }
  60% { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .foot-heart { animation: none; }
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
  .cursor-glow { display: none; }
  .marquee-track { animation: none; }
}
