@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Manrope:wght@400;500;600;700&family=Syne:wght@500;600;700&display=swap');

:root {
  --ink: #0b0d10;
  --ink-soft: #111419;
  --paper: #f3f0e8;
  --paper-muted: #c8c4ba;
  --line: rgba(243,240,232,.14);
  --line-strong: rgba(243,240,232,.28);
  --accent: #b7ff3c;
  --accent-2: #81a3ff;
  --danger: #ff846d;
  --radius: 20px;
  --header-h: 82px;
  --max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    radial-gradient(circle at 74% 8%, rgba(129,163,255,.08), transparent 30rem),
    radial-gradient(circle at 18% 22%, rgba(183,255,60,.045), transparent 26rem),
    var(--ink);
  font-family: Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--ink); }

.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; width: 30rem; height: 30rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(183,255,60,.055), transparent 65%);
  transform: translate(-50%, -50%); pointer-events: none; z-index: 0;
  left: var(--mx, 50%); top: var(--my, 25%);
}

.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 clamp(22px, 4vw, 64px);
  border-bottom: 1px solid rgba(243,240,232,.08);
  background: linear-gradient(to bottom, rgba(11,13,16,.93), rgba(11,13,16,.7));
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-family: Syne, sans-serif; font-weight: 700; letter-spacing: -.05em; font-size: 21px; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: var(--paper); color: var(--ink); }
.brand-mark svg { width: 19px; fill: currentColor; }
.desktop-nav { display: flex; gap: 34px; color: var(--paper-muted); font-size: 13px; }
.desktop-nav a { transition: color .2s ease; }
.desktop-nav a:hover { color: var(--paper); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.github-link { font-size: 12px; color: var(--paper-muted); }
.selection-pill {
  border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 999px;
  padding: 9px 13px; display: inline-flex; gap: 7px; align-items: center; cursor: pointer;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
}
.selection-pill span:first-child { color: var(--accent); font-family: "DM Mono"; }

main { position: relative; z-index: 1; }
.hero {
  min-height: 100svh; max-width: var(--max); margin: 0 auto;
  padding: calc(var(--header-h) + 8vh) clamp(22px, 4vw, 64px) 46px;
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  grid-template-rows: 1fr auto; gap: 3rem; align-items: center;
}
.hero-copy { max-width: 920px; position: relative; z-index: 3; }
.eyebrow, .section-index, .modal-kicker {
  font: 500 11px/1 "DM Mono", monospace; text-transform: uppercase; letter-spacing: .14em; color: var(--paper-muted);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 34px; }
.eyebrow span { width: 18px; height: 1px; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.hero h1, .section-heading h2, .process-intro h2, .forge-modal h2 {
  margin: 0; font-family: Syne, sans-serif; font-weight: 600; letter-spacing: -.065em; line-height: .92;
}
.hero h1 { font-size: clamp(64px, 7.8vw, 132px); max-width: 980px; }
.hero h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1px rgba(243,240,232,.65); }
.hero-lede { max-width: 650px; color: var(--paper-muted); font-size: clamp(16px, 1.25vw, 20px); line-height: 1.6; margin: 32px 0 0; }
.hero-cta { display: flex; align-items: center; gap: 20px; margin-top: 36px; }
.primary-cta {
  min-width: 176px; display: flex; justify-content: space-between; align-items: center; gap: 28px;
  background: var(--accent); color: var(--ink); padding: 16px 17px 16px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 700; transition: transform .25s ease, box-shadow .25s ease;
}
.primary-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(183,255,60,.12); }
.cta-arrow { font-size: 18px; }
.microcopy { color: #777a78; font: 400 11px/1.4 "DM Mono"; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 480px; }
.forge-disc {
  position: relative; width: min(34vw, 510px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--line);
  background:
    repeating-radial-gradient(circle, rgba(243,240,232,.025) 0 1px, transparent 1px 24px),
    radial-gradient(circle at 50% 50%, rgba(183,255,60,.08), transparent 43%);
  animation: discFloat 7s ease-in-out infinite;
}
.forge-ring { position: absolute; inset: 8%; border-radius: 50%; border: 1px dashed rgba(243,240,232,.17); animation: spin 36s linear infinite; }
.ring-two { inset: 25%; border-style: solid; border-color: rgba(183,255,60,.2); animation-direction: reverse; animation-duration: 24s; }
.forge-core {
  position: absolute; inset: 34%; border-radius: 32%; display: grid; place-items: center;
  background: var(--paper); box-shadow: 0 0 70px rgba(243,240,232,.08);
  transform: rotate(-7deg);
}
.forge-core svg { width: 62%; fill: var(--ink); }
.orbit-label { position: absolute; font: 500 9px "DM Mono"; letter-spacing: .16em; color: #777b78; }
.label-a { top: 8%; left: 48%; }
.label-b { right: -2%; top: 50%; transform: rotate(90deg); }
.label-c { left: 8%; bottom: 10%; }
.hero-orbit { position: absolute; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.hero-orbit-a { width: 26rem; height: 26rem; right: 8%; top: 22%; border: 1px solid rgba(129,163,255,.08); }
.hero-orbit-b { width: 14rem; height: 14rem; right: 17%; top: 31%; border: 1px solid rgba(183,255,60,.07); }
.hero-meta {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); padding-top: 20px;
}
.hero-meta div { display: flex; align-items: baseline; gap: 12px; }
.hero-meta strong { color: var(--accent); font: 400 10px "DM Mono"; }
.hero-meta span { color: #858984; font-size: 12px; }

.apps-section, .process-section, .manifesto {
  max-width: var(--max); margin: 0 auto; padding-left: clamp(22px, 4vw, 64px); padding-right: clamp(22px, 4vw, 64px);
}
.apps-section { padding-top: clamp(90px, 10vw, 160px); padding-bottom: 150px; }
.section-heading {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: end;
  padding-bottom: 52px; border-bottom: 1px solid var(--line);
}
.section-heading h2, .process-intro h2 { margin-top: 20px; font-size: clamp(46px, 5vw, 78px); }
.section-heading > p { margin: 0 0 6px auto; max-width: 480px; color: var(--paper-muted); line-height: 1.7; font-size: 14px; }

.platform-bar { display: flex; align-items: center; gap: 6px; padding: 26px 0 20px; }
.platform-button {
  border: 0; background: transparent; color: #777b78; padding: 11px 14px; border-radius: 999px; cursor: pointer;
  font-size: 12px; transition: .2s ease;
}
.platform-button:hover { color: var(--paper); }
.platform-button.active { color: var(--ink); background: var(--paper); }
.platform-symbol { margin-right: 5px; }
.platform-note { margin-left: auto; color: #676b67; font: 400 10px "DM Mono"; text-transform: uppercase; letter-spacing: .1em; }

.catalog-tools { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin: 0 0 26px; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 3px; }
.category-button {
  border: 0; background: transparent; color: #777b78; padding: 8px 11px; cursor: pointer;
  font: 400 11px "DM Mono"; text-transform: uppercase; letter-spacing: .06em;
}
.category-button.active, .category-button:hover { color: var(--paper); }
.category-button.active::before { content: "•"; color: var(--accent); margin-right: 7px; }
.search-field {
  width: 230px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line);
  color: #777b78; padding: 9px 0;
}
.search-field:focus-within { border-color: var(--line-strong); color: var(--paper); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--paper); font-size: 12px; }
.search-field input::placeholder { color: #646863; }

.catalog { border-top: 1px solid var(--line); }
.app-row {
  min-height: 82px; display: grid; grid-template-columns: 52px minmax(180px, .6fr) minmax(220px, 1fr) auto;
  align-items: center; gap: 22px; border-bottom: 1px solid var(--line);
  cursor: pointer; position: relative; transition: background .22s ease, padding .22s ease;
}
.app-row::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--accent);
  transform: scaleY(0); transition: transform .2s ease;
}
.app-row:hover { background: rgba(255,255,255,.022); padding-left: 8px; padding-right: 8px; }
.app-row.selected { background: rgba(183,255,60,.035); }
.app-row.selected::before { transform: scaleY(1); }
.app-icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; overflow: hidden;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.06);
}
.app-icon img { width: 20px; height: 20px; filter: grayscale(1) brightness(2.5); opacity: .88; }
.app-icon .fallback { font-family: Syne; font-weight: 700; color: var(--paper); }
.app-main strong { display: block; font-family: Syne; letter-spacing: -.02em; font-size: 16px; font-weight: 600; }
.app-main small { color: #6f736f; font: 400 10px "DM Mono"; text-transform: uppercase; letter-spacing: .06em; }
.app-description { color: #818581; font-size: 12px; line-height: 1.5; }
.app-action {
  width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong);
  transition: .2s ease; font-size: 17px; color: #a8aca7;
}
.app-row.selected .app-action { background: var(--accent); color: var(--ink); border-color: var(--accent); transform: rotate(45deg); }
.app-unavailable { opacity: .34; cursor: not-allowed; }
.app-unavailable:hover { padding-left: 0; padding-right: 0; background: transparent; }
.unavailable-label { font: 400 9px "DM Mono"; color: #777; text-transform: uppercase; }
.empty-state { text-align: center; padding: 80px 0; color: #737873; }
.empty-state span { font-family: Syne; font-size: 22px; color: var(--paper); }
.empty-state p { font-size: 12px; }

.process-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 8vw, 140px); padding-top: 130px; padding-bottom: 160px; border-top: 1px solid var(--line); }
.process-list { margin: 0; padding: 0; list-style: none; }
.process-list li { display: grid; grid-template-columns: 55px 1fr; gap: 20px; padding: 28px 0 34px; border-bottom: 1px solid var(--line); }
.process-number { font: 400 10px "DM Mono"; color: var(--accent); padding-top: 8px; }
.process-list h3 { margin: 0; font: 600 clamp(28px, 3vw, 42px) Syne; letter-spacing: -.045em; }
.process-list p { max-width: 540px; margin: 10px 0 0; color: #8d918d; font-size: 13px; line-height: 1.65; }

.manifesto { padding-top: 140px; padding-bottom: 140px; border-top: 1px solid var(--line); }
.manifesto-kicker { color: var(--accent); font: 400 10px "DM Mono"; text-transform: uppercase; letter-spacing: .12em; }
.manifesto > p { margin: 30px 0 70px; max-width: 1120px; font: 500 clamp(42px, 6.2vw, 92px)/1.02 Syne; letter-spacing: -.06em; }
.manifesto > p em { color: #7b807b; font-style: normal; }
.manifesto-foot { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); padding-top: 18px; color: #7c807c; font: 400 10px "DM Mono"; text-transform: uppercase; }

.forge-tray {
  position: fixed; z-index: 50; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(860px, calc(100vw - 32px)); background: rgba(22,25,29,.94); border: 1px solid rgba(243,240,232,.16);
  border-radius: 22px; box-shadow: 0 22px 70px rgba(0,0,0,.42); backdrop-filter: blur(22px);
  overflow: hidden; transition: transform .3s ease;
}
.tray-summary { min-height: 70px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 10px 10px 10px 16px; }
.tray-toggle { border: 0; background: transparent; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; padding: 0; }
.tray-count { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); font: 500 13px "DM Mono"; }
.tray-toggle strong { display: block; font-size: 12px; }
.tray-toggle small { display: block; margin-top: 3px; color: #777b78; font-size: 10px; }
.tray-chevron { margin-left: auto; color: #6d716d; transition: transform .25s ease; }
.forge-tray.open .tray-chevron { transform: rotate(180deg); }
.forge-button, .download-button {
  border: 0; background: var(--accent); color: var(--ink); min-height: 49px; padding: 0 18px; border-radius: 15px;
  display: inline-flex; gap: 28px; align-items: center; justify-content: space-between; font-weight: 700; font-size: 12px; cursor: pointer;
}
.forge-button:disabled { opacity: .26; cursor: not-allowed; }
.tray-detail { max-height: 0; overflow: hidden; opacity: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; transition: .3s ease; padding: 0 16px; }
.forge-tray.open .tray-detail { max-height: 190px; opacity: 1; padding: 0 16px 15px; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.selected-chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; color: #a4a8a3; font-size: 10px; cursor: pointer; background: transparent; }
.selected-chip:hover { border-color: var(--danger); color: var(--danger); }
.clear-button { border: 0; background: transparent; color: #737773; font: 400 10px "DM Mono"; text-transform: uppercase; cursor: pointer; white-space: nowrap; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(4,5,7,.72); backdrop-filter: blur(18px);
  display: grid; place-items: center; padding: 22px;
}
.modal-backdrop[hidden] { display: none; }
.forge-modal {
  width: min(760px, 100%); max-height: min(820px, 92svh); overflow: auto; position: relative;
  background: #13161a; border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 30px 120px rgba(0,0,0,.55);
}
.modal-close { position: absolute; right: 20px; top: 20px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 23px; color: #858a85; }
.forge-modal h2 { font-size: clamp(42px, 6vw, 72px); margin-top: 16px; }
.forge-modal > p { color: #858a85; line-height: 1.6; font-size: 12px; max-width: 600px; }
.code-preview { margin-top: 28px; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: #0c0e11; }
.code-head { height: 45px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); color: #777d77; font: 400 9px "DM Mono"; }
.code-head button { border: 0; background: transparent; color: var(--paper); cursor: pointer; font: inherit; }
.code-preview pre { margin: 0; padding: 18px; overflow: auto; max-height: 250px; color: #b8c0b8; font: 400 11px/1.7 "DM Mono"; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.download-button { flex: 1; min-height: 54px; }
.secondary-button { min-height: 54px; border: 1px solid var(--line); background: transparent; border-radius: 15px; padding: 0 18px; cursor: pointer; font-size: 11px; }
.security-note { margin: 14px 0 0 !important; font-size: 9px !important; color: #616661 !important; }

footer {
  max-width: var(--max); margin: 0 auto; padding: 30px clamp(22px, 4vw, 64px) 120px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  border-top: 1px solid var(--line); color: #6d716d; font-size: 10px;
}
footer p { margin: 0; }
footer > span { justify-self: end; }
.footer-brand { color: var(--paper); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes discFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(1.4deg); } }

@media (max-width: 980px) {
  :root { --header-h: 72px; }
  .site-header { grid-template-columns: 1fr auto; }
  .desktop-nav, .github-link { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--header-h) + 62px); }
  .hero-visual { min-height: 360px; margin-top: -40px; opacity: .88; }
  .forge-disc { width: min(78vw, 450px); }
  .hero-meta { margin-top: -20px; }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading > p { margin-left: 0; }
  .process-section { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .cursor-glow { display: none; }
  .site-header { padding: 0 18px; }
  .selection-pill span:last-child { display: none; }
  .hero { min-height: auto; padding: 142px 20px 44px; display: block; }
  .eyebrow { margin-bottom: 26px; }
  .hero h1 { font-size: clamp(54px, 16.8vw, 78px); line-height: .92; }
  .hero-lede { margin-top: 24px; font-size: 15px; }
  .hero-cta { align-items: flex-start; flex-direction: column; gap: 12px; }
  .primary-cta { min-width: 190px; }
  .hero-visual { min-height: 330px; margin: 42px 0 10px; }
  .forge-disc { width: min(88vw, 360px); }
  .hero-meta { grid-template-columns: 1fr; gap: 11px; padding-top: 18px; }
  .apps-section { padding: 90px 20px 125px; }
  .section-heading { gap: 26px; padding-bottom: 34px; }
  .section-heading h2, .process-intro h2 { font-size: 48px; }
  .platform-bar { overflow-x: auto; padding: 20px 0 16px; scrollbar-width: none; }
  .platform-button { flex: 0 0 auto; }
  .platform-note { display: none; }
  .catalog-tools { align-items: stretch; flex-direction: column; gap: 14px; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
  .category-button { flex: 0 0 auto; }
  .search-field { width: 100%; }
  .app-row { grid-template-columns: 43px 1fr auto; min-height: 76px; gap: 12px; }
  .app-description { display: none; }
  .app-icon { width: 35px; height: 35px; border-radius: 11px; }
  .app-main strong { font-size: 15px; }
  .process-section { padding: 90px 20px 120px; gap: 44px; }
  .process-list li { grid-template-columns: 42px 1fr; }
  .manifesto { padding: 100px 20px 120px; }
  .manifesto > p { font-size: 43px; margin-bottom: 50px; }
  .manifesto-foot { flex-direction: column; gap: 10px; }
  .forge-tray { width: calc(100vw - 20px); bottom: max(10px, env(safe-area-inset-bottom)); border-radius: 19px; }
  .tray-summary { grid-template-columns: 1fr auto; min-height: 66px; padding: 8px; }
  .tray-count { width: 40px; height: 40px; }
  .tray-toggle small { display: none; }
  .forge-button { min-width: 52px; padding: 0 14px; gap: 0; }
  .forge-button span:first-child { display: none; }
  .forge-tray.open .tray-detail { max-height: 240px; }
  .selected-chips { max-height: 120px; overflow: auto; }
  .forge-modal { border-radius: 22px; padding: 26px 18px; }
  .forge-modal h2 { font-size: 45px; }
  .modal-actions { flex-direction: column; }
  footer { padding: 28px 20px 110px; grid-template-columns: 1fr auto; }
  footer p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
