/* Fox Open Code — foxcode.run landing. Brand: deep purple→maroon + fox orange. */
:root {
  --bg: #0b0c0e;
  --bg-2: #121317;
  --surface: #16181d;
  --surface-2: #1c1f26;
  --line: #262a32;
  --text: #ecedf0;
  --muted: #9aa1ab;
  --orange: #f07a2e;
  --orange-2: #ff9a4d;
  --purple: #631840;
  --maroon: #440a2e;
  --ok: #5fcb80;
  --radius: 16px;
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 0; position: relative; }
.eyebrow { color: var(--orange); font-weight: 600; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 14px 0 16px; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 640px; }
.center { text-align: center; } .center .lead { margin-inline: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: .98rem;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--orange), var(--orange-2)); color: #1b0e04;
  box-shadow: 0 10px 30px -10px rgba(240,122,46,.6); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(240,122,46,.75); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #3a3f49; background: #20242c; }
.btn svg { width: 18px; height: 18px; }

/* Nav */
header.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px);
  background: rgba(11,12,14,.72); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.brand b { font-size: 1.06rem; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: .94rem; font-weight: 550; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* Hero */
.hero { position: relative; padding: 72px 0 60px; overflow: hidden; }
.hero-glow { position: absolute; inset: -20% -10% auto -10%; height: 680px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 25% 20%, rgba(99,24,64,.55), transparent 70%),
    radial-gradient(50% 50% at 80% 10%, rgba(240,122,46,.22), transparent 70%),
    radial-gradient(60% 60% at 60% 60%, rgba(68,10,46,.5), transparent 70%); filter: blur(10px); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.hero h1 .grad { background: linear-gradient(120deg, var(--orange), var(--orange-2) 60%, #ffd9b8);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 20px; font-size: 1.18rem; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; margin-top: 26px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.hero-meta b { color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 100px; font-size: .82rem; color: var(--muted); font-weight: 550; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .ring { position: absolute; width: 112%; aspect-ratio: 1; border-radius: 50%; top: 50%; left: 50%;
  transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(99,24,64,.5), transparent 62%); z-index: 0; }
.hero-art img { position: relative; z-index: 1; width: 400px; max-width: 92%; filter: drop-shadow(0 30px 60px rgba(0,0,0,.6)); border-radius: 24px; }

/* Marquee / trust strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.strip-inner { display: flex; flex-wrap: wrap; gap: 14px 34px; justify-content: center; padding: 20px; color: var(--muted); font-size: .92rem; font-weight: 550; }
.strip-inner span { display: inline-flex; align-items: center; gap: 9px; }
.strip-inner b { color: var(--text); }

/* Feature grid */
.grid { display: grid; gap: 20px; }
.features { grid-template-columns: repeat(4, 1fr); }
.card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); border-color: #3a3f49; }
.card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(240,122,46,.12); color: var(--orange); }
.card .ic svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.08rem; margin-bottom: 7px; font-weight: 700; }
.card p { color: var(--muted); font-size: .94rem; }

/* Steps */
.steps { grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step .n { font-family: var(--mono); font-size: 2.2rem; font-weight: 800; color: var(--orange); opacity: .9; }
.step h3 { margin: 6px 0; font-size: 1.1rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* Showcase */
.show { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.phones { display: flex; gap: 22px; justify-content: center; }
.phone { border: 10px solid #1c1f26; border-radius: 34px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
  background: #000; width: 236px; }
.phone:nth-child(2) { margin-top: 36px; }
.phone img { width: 100%; display: block; }
.show ul { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.show li { display: flex; gap: 12px; color: var(--muted); }
.show li svg { width: 20px; height: 20px; color: var(--orange); flex: 0 0 auto; margin-top: 3px; }
.show li b { color: var(--text); }

/* Languages */
.langs { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px; }
.lang { display: inline-flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 100px; padding: 9px 16px; font-weight: 550; font-size: .92rem; }
.lang .fl { width: 22px; height: 15px; border-radius: 3px; overflow: hidden; display: inline-block; }

/* Specs */
.specs { grid-template-columns: 1fr 1fr; }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.spec h3 { font-size: 1.05rem; margin-bottom: 14px; }
.spec table { width: 100%; border-collapse: collapse; }
.spec td { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec td:first-child { color: var(--muted); } .spec tr:last-child td { border: 0; }
.spec td:last-child { text-align: right; font-weight: 600; }

/* Download */
.dl { background: linear-gradient(135deg, rgba(99,24,64,.5), rgba(68,10,46,.4)); border: 1px solid #3a2436;
  border-radius: 24px; padding: 46px; text-align: center; }
.dl h2 { margin-top: 6px; }
.dl .ver { display: inline-flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: .86rem;
  color: var(--muted); background: rgba(0,0,0,.3); border: 1px solid var(--line); padding: 7px 14px; border-radius: 100px; margin-bottom: 8px; }
.dl .sha { font-family: var(--mono); font-size: .76rem; color: var(--muted); word-break: break-all; margin-top: 18px; }
.dl .note { color: var(--muted); font-size: .88rem; margin-top: 10px; }

/* Roadmap */
.road { grid-template-columns: repeat(3, 1fr); }
.road .card { text-align: left; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px; margin-bottom: 12px; }
.pill.now { background: rgba(95,203,128,.15); color: var(--ok); }
.pill.soon { background: rgba(240,122,46,.15); color: var(--orange); }
.pill.later { background: rgba(154,161,171,.14); color: var(--muted); }

/* Community */
.community { grid-template-columns: repeat(4, 1fr); }
.comm { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .2s, transform .2s; }
.comm:hover { border-color: var(--orange); transform: translateY(-3px); }
.comm .ic { color: var(--orange); } .comm .ic svg { width: 24px; height: 24px; }
.comm b { font-size: 1rem; } .comm span { color: var(--muted); font-size: .86rem; word-break: break-all; }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 46px 0 34px; color: var(--muted); }
.foot-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { max-width: 320px; }
.foot-brand p { font-size: .9rem; margin-top: 10px; }
.foot-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.foot-col h4 { color: var(--text); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.foot-col a { display: block; color: var(--muted); font-size: .92rem; padding: 4px 0; transition: color .15s; }
.foot-col a:hover { color: var(--orange); }
.foot-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .82rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.disclaimer { max-width: 760px; }

/* Reveal animation — progressive enhancement: only hide when JS is on (html.js), so content is
   always visible without JS / for crawlers / in previews, and animates in for everyone else. */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }

/* Responsive */
@media (max-width: 920px) {
  .features, .community { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .show { grid-template-columns: 1fr; }
  .hero-art { order: -1; } .hero-art img { width: 300px; }
  .steps, .road { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-links.open { display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 16px 20px; gap: 16px; }
  .section { padding: 68px 0; }
}
@media (max-width: 560px) {
  .features, .community { grid-template-columns: 1fr; }
  .phones { flex-direction: column; align-items: center; } .phone:nth-child(2) { margin-top: 0; }
  .dl { padding: 30px 20px; }
}

/* ============ Portal hub (foxcode.run) ============ */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 46px; }
.project { position: relative; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 20px; padding: 28px; transition: transform .2s, border-color .2s; }
.project:hover { transform: translateY(-4px); border-color: #3a3f49; }
.project.featured { grid-column: 1 / -1; border-color: #4a2d3e;
  background: linear-gradient(135deg, rgba(99,24,64,.42), rgba(68,10,46,.3)); }
.project .pico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(240,122,46,.14); color: var(--orange); }
.project .pico img { width: 40px; height: 40px; border-radius: 10px; }
.project .pico svg { width: 28px; height: 28px; }
.project h3 { font-size: 1.3rem; }
.project.featured h3 { font-size: 1.7rem; }
.project p { color: var(--muted); font-size: .96rem; max-width: 60ch; }
.project .ptags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.ptag { font-size: .76rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 100px; padding: 4px 11px; }
.project .pcta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.project.disabled { opacity: .72; }

/* ============ Breadcrumb ============ */
.crumb { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .86rem; padding: 22px 0 0; flex-wrap: wrap; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--orange); }
.crumb svg { width: 14px; height: 14px; opacity: .6; }

/* ============ Doc / install prose ============ */
.doc { max-width: 820px; margin: 0 auto; }
.doc h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 44px 0 12px; scroll-margin-top: 84px; }
.doc h3 { font-size: 1.22rem; margin: 30px 0 8px; font-weight: 700; }
.doc p, .doc li { color: var(--text); opacity: .92; font-size: 1.02rem; }
.doc p { margin: 12px 0; }
.doc ol, .doc ul { margin: 12px 0 12px 2px; padding-left: 22px; display: grid; gap: 8px; }
.doc ol li::marker { color: var(--orange); font-weight: 700; }
.doc strong, .doc b { color: #fff; }
.doc code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 7px; border-radius: 7px; color: var(--orange-2); word-break: break-word; }
.doc a { color: var(--orange); } .doc a:hover { text-decoration: underline; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .96rem; }
.doc th, .doc td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--orange); background: var(--surface);
  border-radius: 12px; padding: 14px 18px; margin: 18px 0; }
.callout.warn { border-left-color: #e6a23c; } .callout.tip { border-left-color: var(--ok); }
.callout p { margin: 4px 0; font-size: .96rem; }
.callout b { color: #fff; }
.oem { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin: 16px 0; }
.oem h3 { margin-top: 0; }
.toc { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 22px 0 10px; }
.toc b { color: var(--text); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.toc ul { list-style: none; padding: 0; margin: 10px 0 0; columns: 2; gap: 10px; }
.toc a { color: var(--muted); font-size: .94rem; } .toc a:hover { color: var(--orange); }

/* ============ FAQ ============ */
.faq { max-width: 820px; margin: 26px auto 0; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2px 20px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 1.4rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 16px; margin: 0; font-size: .98rem; }

@media (max-width: 560px) { .projects { grid-template-columns: 1fr; } .toc ul { columns: 1; } }
