:root {
  --bg: #f7f5ef;
  --surface: #fffdf8;
  --surface-2: #eef5f1;
  --ink: #14213d;
  --muted: #617083;
  --line: #d8ddd8;
  --mint: #4fb49a;
  --mint-dark: #217d69;
  --coral: #ef7d6d;
  --gold: #e0b45c;
  --terminal: #0d1726;
  --terminal-line: #263349;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-soft: 0 18px 50px rgba(20, 33, 61, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 0%, rgba(79,180,154,.10), transparent 24rem),
    radial-gradient(circle at 100% 16%, rgba(239,125,109,.08), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: radial-gradient(rgba(20,33,61,.17) .55px, transparent .55px);
  background-size: 22px 22px;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 11px 14px 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,253,248,.88);
  border: 1px solid rgba(20,33,61,.10);
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(20,33,61,.07);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-mark { width: 42px; height: 42px; }
.brand-name { font-size: 1.2rem; letter-spacing: -.025em; }
.desktop-nav { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .93rem; }
.desktop-nav a { padding: 10px 13px; border-radius: 10px; transition: background .18s ease, color .18s ease; }
.desktop-nav a:hover { background: var(--surface-2); color: var(--mint-dark); }
.nav-docs { border: 1px solid var(--line); }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.menu-toggle span { display: block; width: 25px; height: 2px; margin: 5px 0; background: var(--ink); border-radius: 99px; }

.section-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hero { min-height: 720px; display: grid; grid-template-columns: 1.02fr .98fr; gap: 46px; align-items: center; padding: 72px 0 48px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(33,125,105,.22);
  border-radius: 8px;
  background: rgba(79,180,154,.10);
  color: var(--mint-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 750;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.eyebrow::before { content: ">"; color: var(--coral); }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 25px 0 22px;
  font-size: clamp(3.4rem, 7.2vw, 6.8rem);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 840;
}
h1 span { color: var(--mint-dark); }
.hero-lead { max-width: 650px; font-size: 1.16rem; line-height: 1.72; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 31px 0; }
.button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 14px 19px;
  font-weight: 760;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.button-primary:hover { background: var(--mint-dark); border-color: var(--mint-dark); }
.button-secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button-secondary:hover { border-color: var(--mint); background: #fff; }
.full-width { width: 100%; }

.mini-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-stats div { min-width: 128px; padding: 13px 15px; background: rgba(255,253,248,.72); border: 1px solid var(--line); border-radius: 12px; }
.mini-stats strong { display: block; font-family: ui-monospace, monospace; font-size: 1.45rem; color: var(--mint-dark); }
.mini-stats span { font-size: .82rem; color: var(--muted); }

.hero-visual { position: relative; min-height: 590px; display: grid; place-items: center; }
.incubator-svg { width: min(100%, 610px); filter: drop-shadow(0 24px 30px rgba(20,33,61,.12)); }
.orbit-one { transform-origin: 310px 238px; animation: spin 16s linear infinite; }
.orbit-two { transform-origin: 310px 238px; animation: spinReverse 11s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
.floating-chip {
  position: absolute;
  padding: 9px 13px;
  border: 1px solid rgba(20,33,61,.16);
  border-radius: 10px;
  background: rgba(255,253,248,.92);
  box-shadow: 0 9px 28px rgba(20,33,61,.10);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem;
  font-weight: 750;
  animation: bob 3.5s ease-in-out infinite;
}
.chip-one { left: 4%; top: 23%; }
.chip-two { right: 2%; top: 41%; animation-delay: -.8s; }
.chip-three { left: 11%; bottom: 15%; animation-delay: -1.5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.story-section, .features-section, .versions-section { padding: 96px 0; }
.section-heading { max-width: 790px; margin-bottom: 42px; }
.section-heading.centered { margin-inline: auto; text-align: center; }
.section-heading h2, .command-copy h2, .download-copy h2 {
  margin: 22px 0 14px;
  font-size: clamp(2.2rem, 4.7vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -.052em;
}
.section-heading p { color: var(--muted); font-size: 1.08rem; line-height: 1.72; }
.story-grid { display: grid; grid-template-columns: 1.2fr .9fr .9fr; gap: 18px; align-items: stretch; }
.story-card, .feature-card, .version-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,253,248,.90);
  box-shadow: var(--shadow-soft);
}
.story-card { padding: 28px; }
.story-main { background: linear-gradient(145deg, rgba(79,180,154,.13), var(--surface) 58%); }
.story-card:nth-child(2) { background: linear-gradient(145deg, rgba(224,180,92,.13), var(--surface) 58%); }
.story-card:nth-child(3) { background: linear-gradient(145deg, rgba(239,125,109,.11), var(--surface) 58%); }
.story-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(20,33,61,.12);
  background: var(--ink);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: .76rem;
  margin-bottom: 21px;
}
.story-card h3, .feature-card h3, .version-card h3 { font-size: 1.35rem; margin-bottom: 11px; letter-spacing: -.02em; }
.story-card p, .feature-card p, .version-card p, .version-card li { color: var(--muted); line-height: 1.68; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card { padding: 25px; text-align: left; min-height: 330px; }
.feature-illustration { height: 145px; margin-bottom: 22px; position: relative; display: grid; place-items: center; }
.egg-a, .egg-b, .version-egg, .download-egg {
  margin-inline: auto;
  width: 88px; height: 112px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  background: #f8e4b5;
  transform: rotate(-3deg);
  position: relative;
}
.egg-a::before, .egg-b::before, .version-egg::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--coral); left: 15px; top: 28px; }
.egg-dot { width: 13px; height: 13px; background: var(--mint); border-radius: 50%; position: absolute; right: 10px; bottom: 22px; }
.egg-b { background: #dceee8; transform: rotate(4deg); }
.egg-stripe { width: 62px; height: 10px; border-radius: 99px; background: var(--gold); transform: rotate(-12deg); }
.incubator-mini { width: 138px; height: 128px; margin-inline: auto; border: 2px solid var(--ink); border-radius: 42% 42% 23% 23%; background: linear-gradient(rgba(255,255,255,.72), rgba(79,180,154,.18)); }
.incubator-mini::after { content: ""; position: absolute; bottom: 5px; width: 154px; height: 31px; border: 2px solid var(--ink); border-radius: 9px; background: #dceee8; }
.incubator-mini span { width: 52px; height: 67px; border: 2px solid var(--ink); border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; background: #f8e4b5; z-index: 2; }
.rocket-mini { width: 68px; height: 116px; margin-inline: auto; border: 2px solid var(--ink); border-radius: 50% 50% 22% 22%; background: #edf3f5; transform: rotate(7deg); }
.rocket-mini::before, .rocket-mini::after { content: ""; position: absolute; bottom: 13px; width: 26px; height: 34px; background: #f3c6be; border: 2px solid var(--ink); z-index: -1; }
.rocket-mini::before { left: -20px; border-radius: 70% 10% 20% 70%; }
.rocket-mini::after { right: -20px; border-radius: 10% 70% 70% 20%; }
.rocket-window { width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 50%; background: #bde2d8; position: absolute; left: 19px; top: 32px; }

.command-section { padding: 76px 0 112px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.terminal-card { border: 1px solid #253247; border-radius: 18px; overflow: hidden; background: var(--terminal); box-shadow: 0 28px 70px rgba(13,23,38,.24); }
.terminal-topbar { background: #172235; border-bottom: 1px solid #2a3850; padding: 14px 17px; display: flex; gap: 8px; align-items: center; color: #9cabc0; font-family: ui-monospace, monospace; font-size: .76rem; }
.terminal-topbar span { width: 10px; height: 10px; border-radius: 50%; }
.terminal-topbar span:nth-child(1){ background: #ef7d6d; }
.terminal-topbar span:nth-child(2){ background: #e0b45c; }
.terminal-topbar span:nth-child(3){ background: #4fb49a; }
.terminal-topbar div { margin-left: 7px; }
.terminal-content { min-height: 310px; padding: 31px; color: #eef3fb; font: 700 .94rem/2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.prompt { color: #70d8bd; }
.terminal-muted { color: #9cabc0; }
.terminal-success { color: #f1c76d; }
.cursor { display: inline-block; width: 9px; height: 1.15em; background: #eef3fb; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.command-copy p { color: var(--muted); font-size: 1.06rem; line-height: 1.72; }
.check-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.check-list span { width: 24px; height: 24px; display: grid; place-items: center; background: rgba(79,180,154,.13); color: var(--mint-dark); border-radius: 7px; }

.version-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.version-card { padding: 28px; position: relative; display: flex; flex-direction: column; }
.featured-version { border-color: rgba(33,125,105,.55); background: linear-gradient(180deg, rgba(79,180,154,.12), var(--surface) 38%); }
.version-badge { font: 750 .72rem ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-dark); }
.popular-tag { position: absolute; right: 18px; top: 18px; padding: 7px 9px; border-radius: 8px; background: var(--ink); color: #fff; font: 700 .68rem ui-monospace, monospace; }
.version-egg { margin: 28px auto 24px; width: 73px; height: 91px; }
.large-egg { width: 88px; height: 110px; background: #dceee8; }
.team-egg { background: #f3c6be; }
.version-text { min-height: 80px; }
.version-card ul { padding-left: 19px; margin: 13px 0 27px; flex: 1; }
.version-card li { margin-bottom: 8px; }

.download-section { padding: 56px 0 105px; }
.download-card { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: 48px; padding: 48px; border: 1px solid rgba(20,33,61,.12); border-radius: var(--radius-xl); background: var(--ink); color: #fff; box-shadow: 0 25px 65px rgba(20,33,61,.18); overflow: hidden; }
.download-copy .eyebrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #bde2d8; }
.download-copy p { color: #c7d0dd; line-height: 1.7; }
.download-copy .button-primary { background: #fff; color: var(--ink); border-color: #fff; }
.download-copy .button-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.26); }
.download-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 27px 0 13px; }
.download-note { font: .76rem ui-monospace, monospace; }
.download-art { min-height: 300px; position: relative; display: grid; place-items: center; }
.download-egg { width: 144px; height: 181px; background: #f8e4b5; border-color: #f3f6fb; animation: hatch 3.4s ease-in-out infinite; }
.download-egg span { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: var(--coral); left: 28px; top: 42px; }
@keyframes hatch { 50% { transform: translateY(-9px) rotate(2deg); } }
.spark { position: absolute; color: #f1c76d; font-size: 1.25rem; animation: sparkle 2.4s ease-in-out infinite; }
.spark-a { top: 20%; left: 22%; }
.spark-b { top: 32%; right: 20%; animation-delay: -.7s; }
.spark-c { bottom: 22%; right: 29%; animation-delay: -1.3s; }
@keyframes sparkle { 50% { transform: scale(1.35) rotate(20deg); opacity: .45; } }

.site-footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 42px; display: grid; grid-template-columns: 1fr auto; gap: 22px; border-top: 1px solid var(--line); }
.footer-brand p, .copyright { color: var(--muted); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; font-weight: 700; }
.copyright { grid-column: 1 / -1; font-size: .82rem; margin: 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Documentation */
.docs-main { padding: 80px 0 110px; }
.docs-hero { display: grid; grid-template-columns: 1fr .72fr; gap: 36px; align-items: end; padding: 42px 0 56px; }
.docs-hero h1 { font-size: clamp(3rem, 6vw, 5.7rem); }
.docs-hero p { color: var(--muted); font-size: 1.12rem; line-height: 1.7; max-width: 720px; }
.docs-kicker { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.docs-kicker code { display: block; font: 700 .9rem/1.8 ui-monospace, monospace; color: var(--mint-dark); }
.docs-layout { display: grid; grid-template-columns: 235px 1fr; gap: 38px; align-items: start; }
.docs-sidebar { position: sticky; top: 100px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,248,.84); padding: 14px; }
.docs-sidebar a { display: block; padding: 10px 11px; border-radius: 9px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.docs-sidebar a:hover { background: var(--surface-2); color: var(--mint-dark); }
.docs-content { min-width: 0; }
.docs-section { padding: 0 0 58px; scroll-margin-top: 110px; }
.docs-section h2 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.045em; margin-bottom: 14px; }
.docs-section > p { color: var(--muted); line-height: 1.72; }
.command-list { display: grid; gap: 13px; margin-top: 24px; }
.command-item { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); overflow: hidden; }
.command-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 17px 19px; border-bottom: 1px solid var(--line); background: rgba(238,245,241,.48); }
.command-head code { font: 750 .89rem ui-monospace, monospace; color: var(--mint-dark); overflow-wrap: anywhere; }
.command-tag { flex: 0 0 auto; font: 700 .66rem ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--coral); }
.command-body { padding: 16px 19px; color: var(--muted); line-height: 1.65; }
.code-block { margin: 20px 0; padding: 22px; border-radius: 15px; background: var(--terminal); color: #eef3fb; overflow-x: auto; font: 700 .86rem/1.8 ui-monospace, monospace; box-shadow: 0 20px 50px rgba(13,23,38,.17); }
.note-card { padding: 18px 20px; border-left: 4px solid var(--gold); background: rgba(224,180,92,.10); border-radius: 0 12px 12px 0; color: var(--muted); line-height: 1.65; }

@media (max-width: 940px) {
  .hero, .command-section, .download-card, .docs-hero { grid-template-columns: 1fr; }
  .hero { padding-top: 60px; }
  .hero-visual { order: -1; min-height: 470px; }
  .incubator-svg { max-height: 490px; }
  .story-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .version-grid { grid-template-columns: 1fr; }
  .version-text { min-height: 0; }
  .download-art { min-height: 220px; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .site-header { border-radius: 15px; }
  .desktop-nav { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 10px; flex-direction: column; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
  .desktop-nav.open { display: flex; }
  .menu-toggle { display: block; }
  .hero { min-height: auto; }
  .hero-visual { min-height: 390px; }
  .floating-chip { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .command-section { gap: 36px; }
  .terminal-content { padding: 22px; font-size: .78rem; min-height: 270px; }
  .download-card { padding: 30px 22px; }
  .site-footer { grid-template-columns: 1fr; }
  .copyright { grid-column: 1; }
  .command-head { align-items: flex-start; flex-direction: column; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
