/* Gloaming Studios — gloamingstudios.com */
@font-face { font-family: "Lora"; src: url("../fonts/lora.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #06090e;
  --bg2: #0a1018;
  --panel: #0e1620;
  --panel2: #121c28;
  --line: #1c2938;
  --line2: #2a3a4d;
  --text: #e6ecf1;
  --muted: #9aa8b6;
  --dim: #6b7a89;
  --teal: #4fd1c5;
  --teal-d: #2a8f86;
  --gold: #e0b04a;
  --ember: #e8741c;
  --forge: #e8944a; --mind: #8fb7ff; --aegis: #ff7a6e; --tend: #7bd26a;
  --ring: linear-gradient(90deg, #e8741c 0%, #e0b04a 22%, #7bd26a 46%, #4fd1c5 62%, #6ab7ff 80%, #2b3a8c 100%);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(40px, 6vw, 76px); }
h2 { font-size: clamp(30px, 3.6vw, 46px); }
h3 { font-size: 24px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.kicker { font: 600 13px/1.2 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; display: block; }
.lede { font-size: 20px; color: #c7d2dc; max-width: 720px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.ring-rule { height: 2px; background: var(--ring); border: 0; margin: 0; opacity: .85; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--teal); color: #041014; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(6, 9, 14, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; }
.brand svg { width: 34px; height: 34px; }
.brand span { font: 500 15px/1 var(--serif); letter-spacing: .3em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font: 500 15px/1 var(--sans); padding: 10px 12px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; display: block; height: 2px; margin-top: 6px; background: var(--ring); border-radius: 2px; }
.nav .btn { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line2); color: var(--text); border-radius: 10px; width: 44px; height: 40px; cursor: pointer; }
@media (max-width: 920px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 17px; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--sans); padding: 14px 22px; border-radius: 10px; border: 1px solid var(--line2); color: var(--text); background: var(--panel); cursor: pointer; text-decoration: none !important; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { background: var(--panel2); border-color: #3a4e66; transform: translateY(-1px); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #03201d; }
.btn.primary:hover { background: #6fe0d5; }
.btn.small { padding: 10px 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* hero */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(180deg, rgba(6,9,14,.55) 0%, rgba(6,9,14,.15) 35%, rgba(6,9,14,.75) 72%, var(--bg) 100%),
  linear-gradient(90deg, rgba(6,9,14,.85) 0%, rgba(6,9,14,.2) 60%); }
.hero .wrap { position: relative; z-index: 2; padding-bottom: 72px; padding-top: 120px; width: 100%; }
.hero h1 { letter-spacing: .14em; text-transform: uppercase; font-weight: 400; margin-bottom: 18px; }
.hero .lede { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 26px); color: #d6dee6; max-width: 640px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.badge { font: 500 13px/1 var(--sans); color: #cfd9e2; border: 1px solid var(--line2); background: rgba(14, 22, 32, .7); padding: 8px 12px; border-radius: 999px; }
.page-hero { padding: 88px 0 48px; border-bottom: 1px solid var(--line); background: radial-gradient(1200px 400px at 20% -10%, rgba(79, 209, 197, .10), transparent 60%), radial-gradient(900px 380px at 90% 0%, rgba(232, 116, 28, .08), transparent 60%); }
.page-hero h1 { font-size: clamp(38px, 5vw, 60px); }

/* sections */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
section.alt { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.grid { display: grid; gap: 22px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } section { padding: 68px 0; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 96px; }
.feature.flip > :first-child { order: 2; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; gap: 28px; } .feature.flip > :first-child { order: 0; } .feature + .feature { margin-top: 64px; } }
.shot { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line2); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02); background: #000; }
.shot img { width: 100%; height: auto; }
.points { list-style: none; padding: 0; margin: 18px 0 0; }
.points li { padding: 10px 0 10px 30px; position: relative; border-top: 1px solid var(--line); color: #cbd5de; }
.points li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(79,209,197,.15); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.stat-row div { padding: 26px 22px; border-right: 1px solid var(--line); }
.stat-row div:last-child { border-right: 0; }
.stat-row b { display: block; font: 500 40px/1 var(--serif); color: var(--text); margin-bottom: 8px; }
.stat-row span { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } .stat-row div:nth-child(2) { border-right: 0; } .stat-row div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* faction strip on home */
.faction-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.faction-strip a { display: block; text-align: center; color: var(--text); text-decoration: none; padding: 16px 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); transition: transform .15s, border-color .15s; }
.faction-strip a:hover { transform: translateY(-3px); border-color: var(--fc); }
.faction-strip img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: top; margin: 0 auto 10px; border: 2px solid var(--fc); }
.faction-strip b { display: block; font: 500 15px/1.2 var(--serif); }
.faction-strip small { color: var(--dim); font-size: 12px; }
@media (max-width: 1000px) { .faction-strip { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .faction-strip { grid-template-columns: repeat(2, 1fr); } }

/* victory cards */
.victory { border-top: 3px solid var(--vc); }
.victory .tag { color: var(--vc); font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.victory h3 { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font: 500 12px/1 var(--sans); padding: 6px 9px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line2); color: #cfd8e0; }
.chip.F { border-color: rgba(232,148,74,.5); color: var(--forge); }
.chip.M { border-color: rgba(143,183,255,.5); color: var(--mind); }
.chip.A { border-color: rgba(255,122,110,.5); color: var(--aegis); }
.chip.T { border-color: rgba(123,210,106,.5); color: var(--tend); }

/* faction profiles */
.fnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.fnav a { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line2); border-radius: 999px; color: var(--text); font-size: 14px; background: var(--panel); }
.fnav a:hover { border-color: var(--fc); text-decoration: none; }
.fnav img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top; }
.faction { padding: 80px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 70px; }
.faction:nth-of-type(even) { background: var(--bg2); }
.fgrid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; }
@media (max-width: 860px) { .fgrid { grid-template-columns: 1fr; gap: 28px; } }
.portrait { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line2); aspect-ratio: 322 / 400; background: #000; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5px; background: var(--fc); }
.leader-name { margin-top: 16px; font: 500 20px/1.25 var(--serif); }
.leader-title { color: var(--muted); font-size: 14px; }
.fhead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.fhead h2 { margin: 0; }
.swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--fc); display: inline-block; }
.signature { margin: 22px 0; padding: 18px 20px; border-left: 3px solid var(--fc); background: var(--panel); border-radius: 0 10px 10px 0; }
.signature b { display: block; font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--fc); margin-bottom: 8px; }
blockquote { margin: 22px 0; padding: 0; font: italic 400 20px/1.55 var(--serif); color: #d8e0e7; }
blockquote footer { font: 500 14px/1.3 var(--sans); font-style: normal; color: var(--dim); margin-top: 8px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 24px 0; }
.facts div { padding: 14px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--panel); }
.facts div:nth-child(2n) { border-right: 0; }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.facts dt { font: 600 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 15px; color: #d7dfe6; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts div { border-right: 0; } .facts div:nth-last-child(2) { border-bottom: 1px solid var(--line); } }
.tips h4 { font: 600 13px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 26px 0 6px; }

/* tech page */
.tracks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .tracks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tracks { grid-template-columns: 1fr; } }
.track { border-top: 3px solid var(--tc); }
.track h3 { color: var(--tc); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 18px 20px 18px 66px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 15px/1 var(--sans); color: #03201d; background: var(--teal); }
.steps b { display: block; margin-bottom: 2px; }
.explorer { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
@media (max-width: 980px) { .explorer { grid-template-columns: 1fr; } }
.ex-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.ex-controls input { flex: 1 1 220px; background: var(--panel); border: 1px solid var(--line2); color: var(--text); border-radius: 10px; padding: 11px 14px; font: 400 15px var(--sans); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.seg button { background: var(--panel); color: var(--muted); border: 0; border-right: 1px solid var(--line2); padding: 10px 13px; font: 500 14px var(--sans); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--panel2); color: var(--text); box-shadow: inset 0 -2px 0 var(--tc, var(--teal)); }
.tlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tnode { text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--tc); border-radius: 8px; padding: 10px 12px; color: var(--text); cursor: pointer; font: 400 14px/1.3 var(--sans); transition: background .12s, border-color .12s; }
.tnode:hover { background: var(--panel2); }
.tnode small { display: block; color: var(--dim); font-size: 12px; margin-top: 3px; }
.tnode b { font-weight: 600; color: var(--tc); margin-right: 6px; }
.tnode.on-path { background: rgba(224,176,74,.10); border-color: rgba(224,176,74,.55); border-left-color: var(--gold); }
.tnode.sel { background: rgba(79,209,197,.12); border-color: var(--teal); border-left-color: var(--teal); }
.tnode.known { opacity: .55; }
.tdetail { position: sticky; top: 88px; }
.tdetail .card { padding: 22px; }
.tdetail h3 { font-size: 26px; margin-bottom: 4px; }
.tdetail .meta { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.tdetail ol { margin: 8px 0 0; padding-left: 22px; }
.tdetail ol li { padding: 3px 0; color: #cfd8e0; font-size: 15px; }
.tdetail .q { font: italic 16px/1.5 var(--serif); color: #c9d3dc; border-left: 2px solid var(--line2); padding-left: 14px; margin: 16px 0 0; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }

/* media */
.video-frame { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line2); background: #000; aspect-ratio: 16/9; box-shadow: 0 40px 100px -40px rgba(0,0,0,.9); }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.gallery a:hover { border-color: var(--teal); }
.gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 10px 12px; font-size: 14px; color: var(--muted); background: var(--panel); }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.units { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.units figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.units img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.units figcaption { padding: 8px 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .units { grid-template-columns: repeat(3, 1fr); } }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(2,4,7,.93); display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }

/* forms */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { form .row { grid-template-columns: 1fr; } }
label { display: block; font: 500 14px/1.3 var(--sans); color: #cfd8e0; margin: 0 0 6px; }
.field { margin-bottom: 18px; }
input[type=text], input[type=email], select, textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 10px; padding: 12px 14px; font: 400 16px/1.4 var(--sans); }
textarea { min-height: 170px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 14px; color: var(--dim); }
.status { margin-top: 16px; padding: 14px 16px; border-radius: 10px; display: none; }
.status.ok { display: block; background: rgba(79,209,197,.1); border: 1px solid rgba(79,209,197,.4); color: #bdf2ec; }
.status.err { display: block; background: rgba(255,122,110,.08); border: 1px solid rgba(255,122,110,.4); color: #ffc9c3; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 10px; }
details summary { cursor: pointer; padding: 18px 0; font: 500 17px/1.3 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::after { content: "+"; color: var(--teal); font: 400 22px/1 var(--sans); }
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 18px; color: #c4ced8; }
.prose { max-width: 760px; }
.prose h2 { font-size: 30px; margin-top: 44px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* cta band */
.cta { position: relative; overflow: hidden; text-align: center; padding: 110px 0; }
.cta::before { content: ""; position: absolute; inset: 0; background: url("../img/world-ring.webp") center/cover; opacity: .22; }
.cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(6,9,14,.3), var(--bg) 75%); }
.cta .wrap { position: relative; z-index: 1; }
.cta .actions { justify-content: center; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg2); color: var(--muted); font-size: 15px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 8px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot .brand span { font-size: 13px; }
.legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) { .foot { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .foot > div:first-child { grid-column: 1 / -1; } }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
