/* ======================================================================
   YITEC — design system  (Broadway-faithful: dark, cinematic, red + gold)
   Real Broadway look: warm near-black bg, white headlines with red key-words,
   gold accents, glowing red hero art.  Type: Lato (display) + Roboto (body).
   ====================================================================== */

:root {
  --bg:       #0d0202;
  --paper:    #110605;   /* subtle alternate band */
  --surface:  #1b0f0e;
  --surface-2:#22130f;

  --ink:      #ffffff;
  --ink-2:    #ddd2d1;
  --muted:    #9c8f8e;

  --red:      #e0231f;
  --red-700:  #b3140f;
  --red-soft: rgba(224,35,31,.12);
  --red-tint: rgba(224,35,31,.07);
  --gold:     #f4a823;

  --line:     #2c1a18;
  --line-2:   #3d2522;

  --radius:   18px;
  --radius-sm:12px;
  --maxw:     1180px;

  --shadow-sm: 0 6px 20px rgba(0,0,0,.4);
  --shadow:    0 16px 40px rgba(0,0,0,.5);
  --shadow-lg: 0 30px 70px rgba(0,0,0,.6);
  --glow-red:  0 10px 40px rgba(224,35,31,.28);

  --font-head: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink-2);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, canvas, svg { display: block; max-width: 100%; }
ul { list-style: none; }
::selection { background: var(--red); color: #fff; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; }
.section-pad { padding: 108px 0; }
.center { text-align: center; }
.section-head { max-width: 680px; }
.center .section-head { margin: 0 auto; }

.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  letter-spacing: .03em; color: var(--gold);
  padding: 7px 15px; border: 1px solid var(--line-2); border-radius: 100px;
  background: var(--surface);
}
.kicker .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }

h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--ink); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
h2.title { font-size: clamp(32px, 4.6vw, 56px); margin: 18px 0 16px; }
.lead { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.section-head .lead { margin-top: 8px; }

.red, .u-red { color: var(--red); }
.gold-text { color: var(--gold); }

/* ---------- buttons (arrow style) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 100px; cursor: pointer;
  border: 1px solid transparent; transition: all .22s ease; white-space: nowrap;
}
.btn .arw { transition: transform .22s ease; }
.btn:hover .arw { transform: translateX(4px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--glow-red); }
.btn-primary:hover { background: var(--red-700); transform: translateY(-2px); box-shadow: 0 14px 44px rgba(224,35,31,.42); }
.btn-ghost { background: rgba(255,255,255,.03); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--red); color: #fff; background: rgba(224,35,31,.1); transform: translateY(-2px); }
.btn-lg { padding: 16px 30px; font-size: 16px; }

/* ---------- nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .3s, border-color .3s, box-shadow .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(13,2,2,.8); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 900; font-size: 20px; color: #fff; letter-spacing: -.02em; }
.brand .logo { width: 34px; height: 34px; object-fit: contain; }
.brand .word { line-height: 1; }
.brand b { color: var(--red); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a.link { color: var(--ink-2); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a.link:hover { color: var(--red); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; width: 44px; height: 44px; color: #fff; font-size: 20px; cursor: pointer; }

/* language switch */
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 100px; overflow: hidden; background: var(--surface); }
.lang button { border: none; background: transparent; font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--muted); padding: 8px 13px; cursor: pointer; transition: all .2s; }
.lang button.active { background: var(--red); color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 74px; overflow: hidden; }
#city-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  background:
    radial-gradient(900px 520px at 76% 30%, rgba(224,35,31,.20), transparent 62%),
    radial-gradient(700px 500px at 90% 80%, rgba(244,168,35,.08), transparent 60%),
    linear-gradient(180deg, #0d0202 0%, #14060a 55%, #0d0202 100%); }
.hero-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(13,2,2,.5) 36%, transparent 62%),
              linear-gradient(180deg, transparent 55%, var(--bg) 100%); }
.hero .wrap { z-index: 3; }
.hero-content { max-width: 720px; }
.hero h1 { font-size: clamp(42px, 7vw, 86px); font-weight: 900; margin: 22px 0; letter-spacing: -.03em; line-height: 1.02; color: #fff; }
.hero .lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--ink-2); max-width: 580px; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 34px; }
.hero-stats { display: flex; gap: 42px; margin-top: 54px; flex-wrap: wrap; }
.hero-stats .stat .n { font-family: var(--font-head); font-weight: 900; font-size: 34px; color: #fff; }
.hero-stats .stat .n .red { color: var(--red); }
.hero-stats .stat .l { color: var(--muted); font-size: 13.5px; }

.ip-chip { display: inline-flex; align-items: center; gap: 12px; margin-top: 30px; padding: 8px 8px 8px 18px; border: 1px solid var(--line-2); border-radius: 100px; background: var(--surface); font-family: var(--font-mono); box-shadow: var(--shadow-sm); }
.ip-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: #36d27e; box-shadow: 0 0 10px #36d27e; animation: pulse 2s infinite; }
.ip-chip .ip { font-size: 15px; color: #fff; }
.ip-chip .copy { font-family: var(--font-body); font-size: 13px; font-weight: 600; padding: 8px 15px; border-radius: 100px; background: var(--red); color: #fff; cursor: pointer; border: none; transition: background .2s; }
.ip-chip .copy.copied { background: #36d27e; color: #06231a; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }

/* ---------- cards ---------- */
.card { background: linear-gradient(180deg, var(--surface), var(--bg-2, #150807)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow), 0 0 0 1px rgba(224,35,31,.15); border-color: var(--red); }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pillar { padding: 34px; }
.pillar .ic { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin-bottom: 20px; border: 1px solid var(--line-2); }
.pillar h3 { font-size: 22px; margin-bottom: 9px; }
.pillar p { color: var(--muted); font-size: 15px; }

/* feature grid */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat { padding: 28px 24px; }
.feat .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin-bottom: 18px; border: 1px solid var(--line-2); }
.feat h3 { font-size: 18px; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 14.5px; }
.feat .tag { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--red); background: var(--red-soft); padding: 3px 9px; border-radius: 6px; }

/* split / empire */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.steps { display: flex; flex-direction: column; gap: 6px; margin-top: 28px; }
.step { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step .num { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; background: var(--red); color: #fff; font-size: 15px; box-shadow: var(--glow-red); }
.step h4 { font-size: 17px; margin-bottom: 3px; }
.step p { color: var(--muted); font-size: 14.5px; }
.split-media { border: 1px solid var(--line-2); border-radius: var(--radius); background: #08100c; box-shadow: var(--shadow-lg); overflow: hidden; }
.terminal { font-family: var(--font-mono); font-size: 13.5px; padding: 24px; }
.terminal .bar { display: flex; gap: 7px; margin-bottom: 18px; }
.terminal .bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.terminal .bar i:nth-child(1){background:#ff5f57} .terminal .bar i:nth-child(2){background:#febc2e} .terminal .bar i:nth-child(3){background:#28c840}
.terminal .line { padding: 3px 0; color: #c4bdbd; }
.terminal .line .c { color: #ff6b69; } .terminal .line .u { color: #fff; }
.terminal .line .g { color: var(--gold); } .terminal .line .gr { color: #6ee7a0; }

/* mods */
.mods-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mod { padding: 26px 24px; display: flex; gap: 16px; align-items: flex-start; }
.mod .em { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); border: 1px solid var(--line-2); font-family: var(--font-head); font-weight: 900; font-size: 22px; }
.mod h3 { font-size: 17px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #fff; }
.mod h3 .badge { font-family: var(--font-body); font-size: 10.5px; font-weight: 700; color: #fff; background: var(--red); border-radius: 100px; padding: 2px 9px; letter-spacing: .03em; }
.mod p { color: var(--muted); font-size: 14px; }
.mod .ext { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--red); }
.mod .ext .arw { transition: transform .2s; }
.mod:hover .ext .arw { transform: translate(2px,-2px); }

/* join */
.join-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: j; }
.join-card { padding: 30px 24px; position: relative; }
.join-card::before { counter-increment: j; content: counter(j, decimal-leading-zero); position: absolute; top: 22px; right: 24px; font-family: var(--font-head); font-weight: 900; font-size: 30px; color: rgba(224,35,31,.18); }
.join-card .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin-bottom: 18px; border: 1px solid var(--line-2); }
.join-card h3 { font-size: 17px; margin-bottom: 8px; }
.join-card p { color: var(--muted); font-size: 14px; }
.join-card a.inline { color: var(--red); font-weight: 600; }

/* CTA band */
.cta-band { border-radius: 26px; padding: 66px 40px; text-align: center; position: relative; overflow: hidden;
  border: 1px solid var(--line-2); background: linear-gradient(180deg, #1c0a09, #0d0302); box-shadow: var(--shadow-lg); }
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(680px 320px at 50% -10%, rgba(224,35,31,.42), transparent 64%); pointer-events: none; }
.cta-band h2 { color: #fff; font-size: clamp(28px, 4vw, 48px); margin-bottom: 14px; position: relative; }
.cta-band .lead { color: var(--ink-2); position: relative; }
.cta-band .hero-actions { position: relative; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 62px 0 40px; margin-top: 30px; background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer h5 { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer a { color: var(--ink-2); font-size: 14.5px; display: block; padding: 5px 0; transition: color .2s; }
.footer a:hover { color: var(--red); }
.footer .about p { color: var(--muted); font-size: 14.5px; max-width: 330px; margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; flex-wrap: wrap; gap: 12px; }

/* ---------- reveal (FAILSAFE: only hides when html.js-anim; force-shown after load) ---------- */
.reveal { opacity: 1; transform: none; }
html.js-anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
html.js-anim .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s } .reveal.d2 { transition-delay: .14s } .reveal.d3 { transition-delay: .21s }
@media (prefers-reduced-motion: reduce) { html.js-anim .reveal { opacity: 1 !important; transform: none !important; } }

/* ===================== DOCS ===================== */
.docs-body { display: grid; grid-template-columns: 250px 1fr; gap: 50px; align-items: start; padding-top: 118px; max-width: 1200px; }
.docs-side { position: sticky; top: 98px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 8px; }
.docs-side h5 { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 22px 0 9px; }
.docs-side h5:first-child { margin-top: 0; }
.docs-side a { display: block; color: var(--ink-2); font-size: 14.5px; padding: 6px 12px; border-radius: 8px; border-left: 2px solid transparent; transition: all .18s; }
.docs-side a:hover { color: var(--red); background: var(--red-tint); }
.docs-side a.active { color: var(--red); border-left-color: var(--red); background: var(--red-tint); font-weight: 600; }

.docs-main { min-width: 0; }
.docs-main h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 14px; }
.docs-main > .lead { color: var(--ink-2); }
.docs-main h2 { font-size: 30px; margin: 58px 0 18px; scroll-margin-top: 98px; }
.docs-main h3 { font-size: 21px; margin: 30px 0 12px; scroll-margin-top: 98px; }
.docs-main p { color: var(--ink-2); margin-bottom: 14px; }
.docs-main ul.bullets { margin: 0 0 18px; }
.docs-main ul.bullets li { color: var(--ink-2); padding: 9px 0 9px 26px; position: relative; border-bottom: 1px solid var(--line); }
.docs-main ul.bullets li::before { content: ""; position: absolute; left: 6px; top: 17px; width: 7px; height: 7px; border-radius: 2px; background: var(--red); }
.docs-main strong { color: #fff; }
.cmd, .docs-main code { font-family: var(--font-mono); font-size: 13px; background: var(--red-soft); color: #ff8482; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); }
.docs-main a.tlink { color: var(--red); font-weight: 600; border-bottom: 1px solid var(--line-2); }

.callout { border: 1px solid var(--line-2); border-left: 3px solid var(--red); border-radius: var(--radius-sm); padding: 18px 22px; margin: 22px 0; background: var(--surface); }
.callout.warn { border-left-color: var(--gold); background: rgba(244,168,35,.07); }
.callout p { margin: 0; color: var(--ink-2); }
.callout.warn strong { color: var(--gold); }

.dl-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px 26px; margin: 22px 0; background: linear-gradient(120deg, var(--surface-2), var(--bg-2, #150807)); box-shadow: var(--shadow-sm); }
.dl-card .ic { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); border: 1px solid var(--line-2); }
.dl-card .meta { flex: 1; min-width: 200px; }
.dl-card .meta h4 { font-size: 17px; color: #fff; } .dl-card .meta p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

.step-row { display: flex; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.step-row .num { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; background: var(--red); color: #fff; box-shadow: var(--glow-red); }
.step-row h4 { font-size: 17px; margin-bottom: 4px; color: #fff; }
.step-row p { margin: 6px 0 0; }

table.cmd-table { width: 100%; border-collapse: collapse; margin: 14px 0 24px; font-size: 14px; }
table.cmd-table th { text-align: left; color: var(--muted); font-family: var(--font-head); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 2px solid var(--line-2); }
table.cmd-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
table.cmd-table td:first-child { white-space: nowrap; }
table.cmd-table tr:hover td { background: var(--red-tint); }

/* responsive */
@media (max-width: 960px) {
  .feat-grid, .join-grid { grid-template-columns: repeat(2, 1fr); }
  .mods-grid, .pillars { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .docs-body { grid-template-columns: 1fr; }
  .docs-side { display: none; }
}
@media (max-width: 560px) {
  .feat-grid, .join-grid, .mods-grid, .pillars, .footer-grid { grid-template-columns: 1fr; }
  .section-pad { padding: 74px 0; }
}

.nav-drawer { display: none; }
.nav-drawer.open { display: block; position: fixed; inset: 74px 0 auto 0; z-index: 99; background: rgba(13,2,2,.98); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding: 14px 24px 22px; box-shadow: var(--shadow); }
.nav-drawer a { display: block; padding: 13px 0; color: #fff; font-family: var(--font-head); font-weight: 700; border-bottom: 1px solid var(--line); }
.nav-drawer .lang { margin-top: 16px; }

/* SVG icon sizing */
.ic svg, .em svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pillar .ic svg { width: 26px; height: 26px; }
