/* ══════════════════════════════════════════
   BYTIMIZE — MOBILE CSS (index)
   Single column, 16px side gutter, no sideways scrolling
══════════════════════════════════════════ */

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

:root {
  --bg:          #000000;
  --surface:     #111111;
  --surface-2:   #121212;
  --surface-3:   #0c0c0c;
  --line:        #262626;
  --line-2:      #333333;
  --line-3:      #4a4a4a;
  --text:        #f5f5f5;
  --soft:        #c9c9c9;
  --muted:       #a3a3a3;
  --muted-2:     #8f8f8f;
  --accent:      #ee7b30;
  --accent-hover:#ff9a57;
  --accent-dark: #b4561a;
  --paper:       #f3f3f3;
  --ink:         #0a0a0a;
  --display:     'Space Grotesk', system-ui, sans-serif;
  --mono:        'VT323', ui-monospace, monospace;
  --px:          16px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--display); font-size: 16px; line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, blockquote { overflow-wrap: break-word; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.accent { color: var(--accent); }
.wrap { margin: 0 var(--px); }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 100; padding: 10px 14px; background: var(--accent); color: var(--ink); border-radius: 6px; font-weight: 600; }
.skip-link:focus { left: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ══ NAV ══ */
.nav-wrap { position: sticky; top: 8px; z-index: 50; margin-top: 12px; }
[id] { scroll-margin-top: 84px; }
.nav { padding: 8px 8px 8px 14px; background: #1f1f1f; border: 1px solid #383838; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; position: relative; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.nav-logo { font-family: var(--mono); font-size: 28px; line-height: 1; color: var(--text); }
.nav-logo span { color: var(--accent); }
.nav-toggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid #383838; border-radius: 8px; color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 8px; position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); background: #1f1f1f; border: 1px solid #383838; border-radius: 10px; flex-direction: column; gap: 2px; }
.nav.open .nav-links { display: flex; }
.nav-links a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 6px; font-size: 17px; color: #e5e5e5; }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-links a.nav-cta { justify-content: center; margin-top: 6px; background: var(--accent); color: var(--ink); font-weight: 600; }

/* ══ BUTTONS ══ */
.btn { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px; border-radius: 8px; border: 1px solid transparent; font-family: inherit; font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-ghost { background: #121212; border-color: var(--line-3); color: var(--text); font-weight: 500; }
.btn-dark { background: var(--ink); color: var(--text); }
.btn-row { display: flex; flex-direction: column; gap: 12px; width: 100%; }

/* ══ SECTIONS ══ */
.section { margin-top: 88px; }
.section.after-band { margin-top: 56px; }
.eyebrow { margin: 0 0 10px; font-family: var(--mono); font-size: 20px; line-height: 1.2; color: var(--accent); }
.h2 { margin: 0; font-size: clamp(27px, 8.8vw, 32px); line-height: 1.12; font-weight: 700; letter-spacing: -.5px; }
.section-head { margin-bottom: 28px; }
.section-head p { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.grid-2, .grid-3, .grid-4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.check-list li::before { content: "\2713\00a0"; }

/* ══ SUB-PAGE HERO ══ */
.page-hero { padding-top: 48px; }
.page-hero h1 { margin: 0 0 18px; font-size: clamp(34px, 11vw, 42px); line-height: 1.05; font-weight: 700; letter-spacing: -1px; }
.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--soft); }
.page-hero .lead { margin-bottom: 24px; }

/* ══ PIXEL BAND (scaled evenly so the grid spacing stays uniform) ══ */
.band { width: 100%; aspect-ratio: 480 / 72; margin-top: 64px; background: url(../static/backgrounds/band-grid-mobile.png) 0 0 / 100% 100% no-repeat; }

/* ══ TERMINAL WINDOW ══ */
.term { background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.term-bar { padding: 10px 14px; background: #1a1a1a; border-bottom: 1px solid #2a2a2a; display: flex; align-items: center; gap: 7px; }
.term-dot { width: 9px; height: 9px; border-radius: 99px; background: #3a3a3a; }
.term-dot.on { background: var(--accent); }
.term-title { margin-left: 8px; font-family: var(--mono); font-size: 17px; color: var(--muted-2); }
.term-body { padding: 18px 16px; font-family: var(--mono); font-size: 20px; line-height: 1.35; color: #d4d4d4; overflow-wrap: anywhere; }
.term-body p { margin: 0 0 4px; }
.term-gap { height: 10px; }
.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ══ FAQ ══ */
.faq-item { padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.faq-item h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.faq-item p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ══ CLOSING CTA ══ */
.cta { margin-top: 88px; padding: 40px 20px 150px; border: 1px solid #2a2a2a; border-radius: 16px; background: #121212 url(../static/backgrounds/cta-glow.png) no-repeat center calc(100% + 110px) / 700px 275px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.cta .eyebrow { margin: 0; font-size: 22px; }
.cta h2 { margin: 0; font-size: clamp(27px, 8.8vw, 32px); line-height: 1.1; font-weight: 700; letter-spacing: -.5px; }

/* ══ FOOTER ══ */
.footer { margin-top: 64px; padding: 28px 0 40px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 22px; font-size: 14px; color: var(--muted-2); }
.footer-logo img { width: auto; height: 40px; }
.footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}

/* ══ HOME: HERO ══ */
.hero-bg { position: absolute; top: 0; left: 0; right: 0; height: 700px; overflow: hidden; background: url(../static/backgrounds/hero-dither-mobile-poster.png) center top / cover no-repeat; opacity: .8; pointer-events: none; z-index: 0; }
.hero-bg video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
@media (prefers-reduced-motion: reduce) { .hero-bg video { display: none; } }
.hero { position: relative; z-index: 1; padding-bottom: 24px; }
.hero-inner { padding-top: 56px; display: flex; flex-direction: column; gap: 22px; text-align: center; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(36px, 12vw, 44px); line-height: 1.02; font-weight: 700; letter-spacing: -1.2px; }
.prompt { width: 100%; margin-top: 6px; padding: 12px; background: #111111; border: 1px solid #3a3a3a; border-radius: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.prompt:focus-within { border-color: var(--accent); }
.prompt label { font-family: var(--mono); font-size: 24px; color: var(--accent); padding-left: 4px; }
.prompt input { width: 100%; min-height: 44px; background: transparent; border: none; outline: none; color: var(--text); font-family: var(--mono); font-size: 22px; }
.prompt input::placeholder { color: #8a8a8a; }
.prompt .btn { grid-column: 1 / -1; }
.try { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.try span { width: 100%; font-size: 14px; color: var(--muted-2); }
.try button { min-height: 40px; padding: 0 14px; background: #0a0a0a; border: 1px solid var(--line-2); border-radius: 99px; color: #d4d4d4; font-family: inherit; font-size: 14px; }
.hero-alt { margin: 0; font-size: 15px; color: var(--muted-2); }

/* ══ HOME: SERVICES ══ */
.services { margin-top: 56px; }
.service-icon { width: 26px; height: 26px; margin-bottom: 12px; color: var(--accent); }
.also { margin-top: 12px; padding: 18px; border: 1px dashed #3a3a3a; border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.also p { margin: 0; font-size: 15px; color: var(--soft); }
.also strong { font-family: var(--mono); font-size: 20px; font-weight: 400; color: var(--accent); }
.also a { font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* ══ HOME: FORK ══ */
.fork { display: flex; flex-direction: column; gap: 12px; }
.fork-panel { padding: 28px 22px; border-radius: 14px; display: flex; flex-direction: column; gap: 18px; }
.fork-panel h2 { margin: 0; font-size: clamp(26px, 8.4vw, 30px); line-height: 1.12; font-weight: 700; letter-spacing: -.5px; }
.fork-panel p { margin: 0; font-size: 16px; line-height: 1.6; }
.fork-tag { font-family: var(--mono); font-size: 22px; }
.fork-light { background: var(--paper); color: var(--ink); }
.fork-light .fork-tag { color: var(--accent-dark); }
.fork-light p { color: #3d3d3d; }
.fork-light .check-list { color: #2a2a2a; }
.fork-dark { background: #151515; border: 1px solid #2a2a2a; }
.fork-dark .fork-tag { color: var(--accent); }
.fork-dark p { color: var(--soft); }
.fork-dark .check-list { color: #d4d4d4; }

/* ══ HOME: HOW WE WORK ══ */
.how { display: flex; flex-direction: column; gap: 28px; }
.how .lead { font-size: 16px; margin-top: 14px; }
.principles { margin-top: 28px; }
.principle { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(160deg, rgba(238, 123, 48, 0.22) 0%, #151515 65%); }
.principle h3 { margin: 0 0 6px; font-family: var(--mono); font-size: 21px; font-weight: 400; color: var(--accent); }
.principle p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--soft); }

/* ══ GLOW ══ */
:root { --glow: rgba(238, 123, 48, .45); --glow-soft: rgba(238, 123, 48, .18); }
.nav-logo span, .cursor, .term-body .accent { text-shadow: 0 0 12px var(--glow); }
.term-dot.on { box-shadow: 0 0 10px var(--glow); }
.eyebrow, .principle h3, .fork-tag { text-shadow: 0 0 18px var(--glow-soft); }
.hero h1 .accent, .page-hero h1 .accent, .h2 .accent, .cta h2 .accent { text-shadow: 0 0 32px var(--glow); }
.btn-primary, .nav-links a.nav-cta { box-shadow: 0 0 22px var(--glow-soft); transition: background .15s, box-shadow .2s; }
.btn-primary:hover, .nav-links a.nav-cta:hover { box-shadow: 0 0 30px var(--glow); }
.prompt:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 36px var(--glow-soft); }
.term { box-shadow: 0 0 0 6px #141414, 0 0 60px var(--glow-soft); }
.principle { box-shadow: 0 0 32px var(--glow-soft); }
.card { transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: rgba(238, 123, 48, .5); box-shadow: 0 0 32px var(--glow-soft); }
.cta { box-shadow: 0 0 80px var(--glow-soft); }
.fork-panel { box-shadow: 0 0 48px var(--glow-soft); }
.service-icon { filter: drop-shadow(0 0 8px var(--glow)); }

/* 4-step flow inside the terminal window; dots light up top to bottom */
.flow { list-style: none; margin: 0; padding: 28px 30px; display: flex; flex-direction: column; gap: 26px; font-family: var(--display); }
.flow li { position: relative; display: flex; gap: 20px; align-items: flex-start; }
.flow li:not(:last-child)::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: -28px; width: 2px; background: var(--line-2); }
.flow li:nth-child(2) { --d: 2s; }
.flow li:nth-child(3) { --d: 4s; }
.flow li:nth-child(4) { --d: 6s; }
.flow-dot { position: relative; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 99px; background: #2a2a2a; border: 2px solid var(--line-3); animation: flow-dot 8s var(--d, 0s) infinite; }
.flow strong { display: block; font-size: 19px; font-weight: 600; color: var(--muted); animation: flow-text 8s var(--d, 0s) infinite; }
.flow span:not(.flow-dot) { font-size: 15px; color: var(--muted-2); }
@keyframes flow-dot { 0%, 28%, 100% { background: #2a2a2a; border-color: var(--line-3); box-shadow: none; } 4%, 22% { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--glow); } }
@keyframes flow-text { 0%, 28%, 100% { color: var(--muted); } 4%, 22% { color: var(--text); } }
@media (prefers-reduced-motion: reduce) {
  .flow-dot, .flow strong { animation: none; }
  .flow-dot { background: var(--accent); border-color: var(--accent); }
  .flow strong { color: var(--text); }
}

/* never show native video controls (iOS shows a play button when autoplay is blocked, e.g. Low Power Mode) */
.hero-bg video { pointer-events: none; }
.hero-bg video::-webkit-media-controls, .hero-bg video::-webkit-media-controls-start-playback-button, .hero-bg video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
