/* ---------- tokens ---------- */
:root{
  --bg: #0D1117;
  --bg-raised: #12181F;
  --line: #232B35;
  --text: #E8ECEF;
  --text-muted: #8B96A5;
  --amber: #FF7A33;
  --teal: #4FD1C5;

  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --wrap: 1180px;
}

*{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a{ color: inherit; }

h1,h2,h3{ font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }

::selection{ background: var(--amber); color: #0D1117; }

a:focus-visible, button:focus-visible{
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

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

/* ---------- nav ---------- */
#nav{
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  font-family: var(--mono); font-size: 13px;
  background: linear-gradient(to bottom, rgba(13,17,23,0.85), transparent);
}
.nav-mark{
  font-family: var(--display); font-weight: 700; font-size: 18px;
  border: 1px solid var(--line); width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  text-decoration: none;
}
.nav-links{ display: flex; gap: 28px; list-style: none; }
.nav-links a{
  text-decoration: none; color: var(--text-muted);
  position: relative; padding-bottom: 3px;
  transition: color .2s ease;
}
.nav-links a::after{
  content:''; position: absolute; left:0; bottom:0; height: 1px; width: 0;
  background: var(--amber); transition: width .25s ease;
}
.nav-links a:hover, .nav-links a.active{ color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after{ width: 100%; }
.nav-cta{
  text-decoration: none; color: var(--bg); background: var(--text);
  padding: 8px 16px; border-radius: 20px; font-weight: 500;
  transition: background .2s ease;
}
.nav-cta:hover{ background: var(--amber); }

@media (max-width: 720px){
  .nav-links{ display:none; }
}

/* ---------- hero ---------- */
.hero{
  position: relative;
  height: 100svh;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
#hero-canvas{
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none;
}
.hero-copy{
  position: relative; z-index: 2;
  padding: 0 clamp(20px, 5vw, 56px) clamp(48px, 8vh, 96px);
  pointer-events: none;
}
.hero-kicker{
  font-family: var(--mono); color: var(--teal); font-size: 14px;
  margin-bottom: 18px;
}
.hero-title{
  font-size: clamp(56px, 12vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.hero-sub{
  margin-top: 22px; max-width: 520px;
  color: var(--text-muted); font-size: 17px;
}
.hero-scroll{
  margin-top: 40px; display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
}
.hero-scroll span{
  width: 1px; height: 28px; background: var(--text-muted); position: relative;
  overflow: hidden;
}
.hero-scroll span::after{
  content:''; position: absolute; top:-100%; left:0; width: 100%; height: 100%;
  background: var(--amber);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine{
  0%{ top: -100%; } 50%{ top: 0; } 100%{ top: 100%; }
}
.hero-hint{
  position: absolute; z-index: 2; bottom: clamp(48px,8vh,96px); right: clamp(20px,5vw,56px);
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
}
@media (max-width: 720px){
  .hero-hint{ display: none; }
}

.hero-copy{ transition: opacity .6s ease; }
.hero-copy.faded{ opacity: 0.22; }

.skip-drive{
  position: absolute; z-index: 5; top: 92px; right: clamp(20px, 5vw, 56px);
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  background: rgba(13,17,23,0.6); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 20px; cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.skip-drive:hover{ color: var(--text); border-color: var(--amber); }

#hero-labels{
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}
.hero-label{
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 12px; white-space: nowrap;
  padding: 4px 10px; border-radius: 12px;
  background: rgba(13,17,23,0.55); border: 1px solid var(--line);
  transition: opacity .15s ease;
}

.zone-prompt{
  position: absolute; z-index: 5; left: 50%; bottom: clamp(120px,18vh,180px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  background: rgba(13,17,23,0.75); border: 1px solid var(--line);
  padding: 10px 12px 10px 18px; border-radius: 24px;
  font-size: 14px; color: var(--text-muted);
}
.zone-prompt kbd{
  font-family: var(--mono); background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 6px; color: var(--text);
}
.zone-prompt button{
  font-family: var(--body); font-weight: 500; font-size: 13px;
  background: var(--amber); color: var(--bg); border: none;
  padding: 7px 16px; border-radius: 16px; cursor: pointer;
}

.touch-controls{ display: none; }
@media (max-width: 720px){
  .touch-controls{
    display: flex; justify-content: space-between; align-items: flex-end;
    position: absolute; z-index: 5; left: 20px; right: 20px; bottom: 28px;
  }
  .touch-pad{
    display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(2, 48px);
    gap: 6px;
  }
  .touch-pad button{
    grid-column: 2; background: rgba(20,27,35,0.75); border: 1px solid var(--line);
    color: var(--text); font-size: 16px; border-radius: 10px;
  }
  .touch-pad button[data-key="left"]{ grid-column: 1; grid-row: 2; }
  .touch-pad button[data-key="right"]{ grid-column: 3; grid-row: 2; }
  .touch-pad button[data-key="down"]{ grid-row: 2; }
}

/* ---------- sections ---------- */
.section{
  padding: 120px clamp(20px, 5vw, 56px);
  max-width: var(--wrap); margin: 0 auto;
  border-top: 1px solid var(--line);
}
.section h2{ font-size: clamp(28px, 4vw, 42px); max-width: 720px; }
.section-lede{
  color: var(--text-muted); max-width: 520px; margin-top: 16px; font-size: 17px;
}

.section-grid{
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px;
}
@media (max-width: 820px){
  .section-grid{ grid-template-columns: 1fr; gap: 40px; }
}

/* about */
.about-text h2{ font-weight: 500; line-height: 1.3; }
.about-text p{ margin-top: 20px; max-width: 560px; color: var(--text-muted); }
.about-text p strong{ color: var(--text); font-weight: 500; }
.about-text a{ color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

.about-facts{ align-self: start; }
.about-facts div{
  padding: 16px 0; border-top: 1px solid var(--line);
}
.about-facts div:last-child{ border-bottom: 1px solid var(--line); }
.about-facts dt{
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
}
.about-facts dd{ margin-top: 6px; font-size: 16px; }

/* stack */
.stack-grid{
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
}
@media (max-width: 820px){
  .stack-grid{ grid-template-columns: repeat(2, 1fr); }
}
.stack-group h3{
  font-size: 15px; font-weight: 500; color: var(--amber);
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.stack-group ul{ list-style: none; margin-top: 14px; }
.stack-group li{
  padding: 8px 0; color: var(--text-muted); font-size: 15px;
}

/* work */
.work-row{
  margin-top: 48px; display: grid; grid-template-columns: 200px 1fr; gap: 40px;
}
@media (max-width: 640px){
  .work-row{ grid-template-columns: 1fr; gap: 16px; }
}
.work-when{
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--mono); font-size: 13px; color: var(--text-muted);
}
.work-dot{
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  margin-top: 6px; flex-shrink: 0;
}
.work-what h3{ font-size: 22px; font-weight: 500; }
.work-org{ color: var(--text-muted); font-family: var(--mono); font-size: 13px; margin-top: 6px; }
.work-what p:not(.work-org){ margin-top: 18px; max-width: 600px; color: var(--text-muted); }

/* build (AECHO) */
.build-intro h2 + .section-lede{ margin-top: 16px; }
.build-card{
  margin-top: 56px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 48px;
}
@media (max-width: 820px){
  .build-card{ grid-template-columns: 1fr; padding: 32px; }
}
.build-card-text p{ color: var(--text-muted); max-width: 480px; }
.build-status{
  margin-top: 20px; font-family: var(--mono); font-size: 13px; color: var(--amber);
}
.build-link{
  display: inline-block; margin-top: 24px;
  text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--teal); padding-bottom: 2px;
}
.build-card-graph{
  height: 220px; position: relative;
}
@media (max-width: 820px){
  .build-card-graph{ height: 160px; order: -1; }
}

/* creator */
.creator .section-grid{ align-items: center; }
.creator h2{ font-weight: 500; }
.creator p{ margin-top: 18px; max-width: 520px; color: var(--text-muted); }
.creator p strong{ color: var(--text); font-weight: 500; }
.creator-link{
  text-decoration: none; color: var(--text);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 32px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s ease;
}
.creator-link:hover{ border-color: var(--amber); }
.creator-link span:first-child{ font-family: var(--mono); font-size: 18px; }
.creator-link-sub{ color: var(--text-muted); font-size: 14px; }

/* contact */
.contact-links{
  margin-top: 48px; display: flex; flex-direction: column; gap: 4px;
}
.contact-links a{
  text-decoration: none; font-family: var(--display); font-weight: 500;
  font-size: clamp(20px, 3.4vw, 32px);
  padding: 16px 0; border-bottom: 1px solid var(--line);
  transition: color .2s ease, padding-left .2s ease;
}
.contact-links a:hover{ color: var(--amber); padding-left: 12px; }

/* footer */
.footer{
  display: flex; justify-content: space-between;
  padding: 32px clamp(20px, 5vw, 56px) 48px;
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  max-width: var(--wrap); margin: 0 auto;
}
