:root {
  --ground: #141416;
  --surface: #1c1c1f;
  --chip-fill: #2a2a2f;
  --border: #2e2e33;
  --ink: #f2f0eb;
  --muted: #a3a09a;
  --accent: #f5a623;
  --accent-soft: #ffc65c;
  --red: #d6293e;
  --blue: #5b9bff;
  --on-accent: #141416;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-sans); line-height: 1.6; }
a { color: var(--accent); }
a:hover { color: var(--accent-soft); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
section, article { scroll-margin-top: 88px; }
h1, h2, h3, p, blockquote, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(20, 20, 22, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { padding-top: 12px; padding-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
.brand:hover { color: var(--ink); }
.brand svg { width: 36px; height: 36px; flex: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.navlink { color: var(--muted); text-decoration: none; font-size: 15px; display: inline-flex; align-items: center; min-height: 44px; position: relative; transition: color 0.3s; }
.navlink::after { content: ''; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s; }
.navlink:hover, .navlink[aria-current="page"] { color: var(--ink); }
.navlink:hover::after, .navlink[aria-current="page"]::after { transform: scaleX(1); }
.lang { color: var(--ink); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.lang:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.btn svg { width: 18px; height: 18px; transition: transform 0.3s; }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-soft); color: var(--on-accent); }
.btn-ghost { border: 1px solid var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.textlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent); text-decoration: none; font-size: 15px; font-weight: 600; transition: color 0.3s; }
.textlink svg { width: 16px; height: 16px; transition: transform 0.3s; }
.textlink:hover { color: var(--accent-soft); }
.textlink:hover svg { transform: translateX(4px); }

/* Type */
.label { font-family: var(--font-mono); font-size: 14px; color: var(--blue); }
.h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 600; }
.h3 { font-size: 24px; line-height: 1.25; font-weight: 600; }
.muted { color: var(--muted); }
.sec { padding-top: clamp(72px, 10vw, 128px); padding-bottom: clamp(72px, 10vw, 128px); }
.rule { border-top: 1px solid var(--border); }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 56px; }
.sec-head .label { margin-bottom: 12px; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-arches { position: absolute; top: 0; right: max(-40px, calc(50% - 760px)); width: 720px; height: 1600px; pointer-events: none; }
.arch { fill: none; stroke: var(--border); stroke-width: 1; stroke-dasharray: 1; animation: draw 2.2s cubic-bezier(0.4, 0, 0.2, 1) both; }
.arch.a2 { animation-delay: 0.2s; }
.arch.a3 { animation-delay: 0.4s; stroke: var(--blue); }
.arch.a4 { animation-delay: 0.6s; stroke: var(--red); }
.hero-inner { position: relative; padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(64px, 9vw, 128px); display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-copy { flex: 1.25 1 480px; min-width: 0; }
.hero-copy .label { margin-bottom: 20px; }
.hero h1 { font-size: clamp(48px, 6vw, 84px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; }
.hero h1 span { color: var(--accent); }
.hero-lede { margin-top: 28px; max-width: 540px; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }
.hero .btn-row { margin-top: 36px; }

.page-hero .hero-inner { display: block; padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); }
.page-hero .label { margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(44px, 5.4vw, 72px); }
.page-hero .hero-lede { margin-top: 20px; }

/* Terminal */
.terminal { flex: 1 1 400px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); overflow: hidden; }
.term-bar { padding: 12px 20px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.term-body { padding: 20px; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; }
.term-body div { color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
.term-body .cmd { color: var(--ink); }
.term-body .cmd::before { content: '$'; color: var(--blue); margin-right: 1ch; }
.cursor { display: inline-block; width: 8px; height: 16px; margin-left: 2px; vertical-align: -2px; background: var(--blue); animation: blink 1.1s steps(2, start) infinite; }

/* Facts */
.facts { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.facts .wrap { padding-top: 36px; padding-bottom: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 28px; }
.fact-value { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.fact-label { font-size: 14px; color: var(--muted); }

/* Purpose grid */
.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 48px 56px; }
.cell-icon { width: 28px; height: 28px; color: var(--accent); transition: transform 0.3s, color 0.3s; }
.cell:nth-child(3n+1) .cell-icon { color: var(--red); }
.cell:nth-child(3n+2) .cell-icon { color: var(--blue); }
.cell:hover .cell-icon { transform: translateY(-3px); color: var(--accent-soft); }
.cell p { margin-top: 16px; font-size: 18px; line-height: 1.5; }

/* Timeline */
.timeline { position: relative; }
.tl-line { position: absolute; top: 8px; left: 0; right: 0; height: 1px; background: var(--border); }
.tl-progress { right: auto; width: 72%; background: var(--red); }
.tl-grid { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.tl-grid .when { font-size: 13px; }
.dot { width: 17px; height: 17px; border-radius: 50%; background: var(--red); margin-bottom: 28px; }
.dot-next { position: relative; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--blue); background: var(--ground); margin-bottom: 28px; }
.dot-next::after { content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--blue); animation: ring 2.4s ease-out infinite; }
.when { font-family: var(--font-mono); font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.tl-grid .h3 { margin-bottom: 12px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); padding: 32px; display: flex; flex-direction: column; gap: 16px; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 4px 16px rgba(245, 166, 35, 0.22); border-color: var(--accent); }
.card-icon { width: 28px; height: 28px; }
.ic-red { color: var(--red); }
.ic-blue { color: var(--blue); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 32px; }
.stack { display: grid; gap: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--ground); color: var(--accent); padding: 4px 12px; border-radius: 15px; font-size: 13px; white-space: nowrap; }
.status { align-self: flex-start; font-family: var(--font-mono); font-size: 13px; padding: 2px 12px; border-radius: 15px; border: 1px solid var(--border); color: var(--muted); }
.status.next { border-color: var(--blue); color: var(--blue); }
.card .textlink { margin-top: auto; }
.info { display: grid; gap: 12px; }
.info > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.info dt { color: var(--muted); font-size: 15px; font-weight: 600; }
.info dd { font-size: 15px; overflow-wrap: anywhere; }

/* About */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 80px; }
.split .label { margin-bottom: 12px; }
.prose { font-size: 18px; color: var(--muted); max-width: 720px; display: grid; gap: 20px; }
.values li { padding: 18px 0; border-top: 1px solid var(--border); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; transition: color 0.3s, padding-left 0.3s; }
.values li:last-child { border-bottom: 1px solid var(--border); }
.values li:hover { color: var(--accent); padding-left: 12px; }
.values-intro { margin-bottom: 24px; }

/* Lore */
.lore .wrap { max-width: 920px; }
.lore .label { margin-bottom: 20px; }
.lore blockquote { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.22; letter-spacing: -0.02em; font-weight: 500; }
.lore .textlink { margin-top: 24px; }

/* Join */
.join .wrap { position: relative; padding-top: clamp(72px, 10vw, 128px); }
.arches { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; overflow: hidden; }
.arches svg { display: block; width: 100%; height: auto; }
.arches img { position: absolute; left: 77.5%; bottom: 0; width: 20%; height: 90%; object-fit: cover; border-radius: 999px 999px 0 0; }
.join-copy { position: relative; padding-bottom: calc(min(12.5vw, 150px) + 48px); }
.join-copy h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; }
.join-copy p { margin-top: 24px; max-width: 520px; font-size: 18px; color: var(--muted); }
.join-copy .btn-row { margin-top: 32px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .wrap { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; }
.copyright { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.copyright svg { width: 22px; height: 22px; flex: none; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.foot { color: var(--muted); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; transition: color 0.3s; }
.foot:hover { color: var(--accent); }

/* Motion */
.rise { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.2s; }
.d3 { animation-delay: 0.32s; }
.d4 { animation-delay: 0.46s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes blink { to { visibility: hidden; } }
@keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.4); opacity: 0; } }
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes arcrise { from { transform: translateY(100%); } to { transform: none; } }

@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  .tl-progress { transform-origin: left; animation: growx linear both; animation-timeline: view(); animation-range: entry 40% cover 55%; }
  .arches { view-timeline-name: --arches; }
  .arc { transform-box: fill-box; animation: arcrise linear both; animation-timeline: --arches; }
}

/* Large screens: scale the whole page so it does not look small */
@media (min-width: 2000px) {
  html { zoom: 1.3; }
}
@media (min-width: 3200px) {
  html { zoom: 1.75; }
}

@media (max-width: 1120px) {
  .join-copy { padding-bottom: calc(25vw + 32px); }
}
@media (max-width: 1099px) {
  .tl-line { display: none; }
  .tl-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .tl-grid article { position: relative; padding-left: 40px; }
  .tl-grid article:not(:last-child)::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: -40px; width: 1px; background: var(--red); }
  .tl-grid .dot, .tl-grid .dot-next { position: absolute; left: 0; top: 4px; margin: 0; }
}
@media (max-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .info > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
