:root {
  --ink: #12181c;
  --ink-soft: #2a343c;
  --paper: #f3f0e8;
  --paper-2: #e7e2d6;
  --forest: #1f6f5b;
  --forest-deep: #134a3d;
  --copper: #c47a2c;
  --line: rgba(18, 24, 28, 0.12);
  --shadow: 0 24px 60px rgba(18, 24, 28, 0.12);
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(31, 111, 91, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(196, 122, 44, 0.14), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  min-height: 100vh;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top,
main,
footer {
  position: relative;
  z-index: 1;
}

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

nav a:hover {
  color: var(--forest-deep);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  min-height: calc(100vh - 5rem);
}

.brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--forest-deep);
  animation: rise 0.9s ease both;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  line-height: 1.15;
  color: var(--ink);
  max-width: 16ch;
  animation: rise 0.9s ease 0.08s both;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 38ch;
  color: var(--ink-soft);
  animation: rise 0.9s ease 0.16s both;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  animation: rise 0.9s ease 0.24s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--forest);
  color: #f7f5ef;
}

.btn.primary:hover {
  background: var(--forest-deep);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost:hover {
  border-color: var(--ink-soft);
}

.hero-visual {
  display: grid;
  place-items: center;
}

.ring {
  width: min(100%, 420px);
  height: auto;
  filter: drop-shadow(var(--shadow));
  animation: float 6s ease-in-out infinite;
}

.track {
  fill: none;
  stroke: rgba(18, 24, 28, 0.12);
  stroke-width: 18;
}

.track.thin {
  stroke-width: 2;
  stroke: rgba(31, 111, 91, 0.35);
}

.arc {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: draw 2.4s ease forwards 0.3s;
}

.pkt {
  fill: var(--copper);
}

.p1 { animation: orbit 8s linear infinite; transform-origin: 240px 240px; }
.p2 { animation: orbit 8s linear infinite -2s; transform-origin: 240px 240px; fill: var(--forest); }
.p3 { animation: orbit 8s linear infinite -4s; transform-origin: 240px 240px; }
.p4 { animation: orbit 8s linear infinite -6s; transform-origin: 240px 240px; fill: var(--forest); }

.panel {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
}

.section-lede {
  margin: 0.85rem 0 0;
  max-width: 52ch;
  color: var(--ink-soft);
}

.facts {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.facts li {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.facts strong {
  font-size: 1.05rem;
}

.facts span {
  color: var(--ink-soft);
}

.code-panel {
  background: rgba(255, 255, 255, 0.35);
  border-block: 1px solid var(--line);
}

.code {
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.35rem;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--ink);
  color: #e8efe9;
  box-shadow: var(--shadow);
}

.code code {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre;
}

.build-line {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  overflow-x: auto;
}

.stack-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stack-grid article {
  padding: 1.35rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.4);
}

.stack-grid h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--forest-deep);
}

.stack-grid p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.end .cta {
  margin-top: 1.5rem;
}

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

footer a {
  color: var(--ink-soft);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(160px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(160px) rotate(-360deg); }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.5rem;
  }

  .hero-visual {
    order: -1;
  }

  .ring {
    width: min(72vw, 320px);
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
