:root {
  --bg: #0b0a08;
  --bg-2: #12100d;
  --panel: #17140f;
  --line: rgba(201, 164, 92, 0.18);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #ece6da;
  --muted: #9d9483;
  --gold: #c9a45c;
  --gold-bright: #e3c27f;
  --online: #5fcf8a;
  --warn: #e0b04a;
  --off: #8a8173;
  --bad: #d9675b;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--gold); color: #000; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.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; gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(11,10,8,.92), rgba(11,10,8,0));
  transition: background .3s, padding .3s;
}
.nav.scrolled { background: rgba(11,10,8,.94); backdrop-filter: blur(10px); padding-block: 12px; border-bottom: 1px solid var(--line-soft); }
.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.wordmark-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--gold); color: var(--gold);
  font: 600 22px/1 var(--serif);
}
.wordmark-text { font: 600 13px/1 var(--sans); letter-spacing: .42em; }
.wordmark-text span { color: var(--gold); margin-left: .5em; }
.wordmark.small .wordmark-mark { width: 30px; height: 30px; font-size: 17px; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.nav-links a { text-decoration: none; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta { color: var(--gold); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
.cta-short { display: none; }
.nav-links .nav-cta:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  font: 600 13px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  border: 1px solid transparent; transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #120f0a; }
.btn-gold:hover { background: var(--gold-bright); }
.btn-gold:disabled { opacity: .6; cursor: progress; }
.btn-ghost { border-color: rgba(255,255,255,.25); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: end;
  padding: 120px clamp(16px, 6vw, 88px) clamp(64px, 10vh, 120px);
  isolation: isolate; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%;
  filter: saturate(.75) contrast(1.05) brightness(.8);
  animation: slowzoom 30s ease-out forwards;
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,10,8,.96) 0%, rgba(11,10,8,.75) 38%, rgba(11,10,8,.1) 70%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11,10,8,0) 35%);
}
@keyframes slowzoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-copy { max-width: 680px; }
.eyebrow { margin: 0 0 18px; font: 600 12px/1.4 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 92px); line-height: .98; }
h1 em, h2 em { font-style: italic; color: var(--gold-bright); }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: #cfc6b6; max-width: 540px; margin: 26px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta {
  position: absolute; right: clamp(16px, 4vw, 48px); bottom: 32px;
  display: flex; gap: 28px; font-size: 11px; letter-spacing: .3em; color: var(--muted);
}

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px);
}
.stat { padding: 34px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num { display: block; font: 500 clamp(34px, 4vw, 52px)/1 var(--serif); color: var(--gold-bright); }
.stat-label { display: block; margin-top: 10px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 150px) clamp(16px, 4vw, 48px) 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; }
.section-sub { color: var(--muted); font-size: 17px; margin: 18px 0 0; }
.fineprint { font-size: 12px; color: var(--muted); letter-spacing: .02em; }

/* ---------- servers ---------- */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.server-card {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-soft); min-height: 220px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .25s, transform .25s;
}
.server-card:hover { border-color: var(--line); transform: translateY(-2px); }
.server-card.skeleton { background: linear-gradient(100deg, var(--panel) 30%, #1f1b15 50%, var(--panel) 70%); background-size: 300% 100%; animation: shimmer 1.6s infinite linear; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.server-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.game-tag { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--off); }
.status.online { color: var(--online); }
.status.online::before { background: var(--online); box-shadow: 0 0 0 0 rgba(95,207,138,.6); animation: pulse 2s infinite; }
.status.starting, .status.stopping, .status.installing { color: var(--warn); }
.status.starting::before, .status.stopping::before, .status.installing::before { background: var(--warn); }
.status.suspended::before { background: var(--bad); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(95,207,138,0); } 100% { box-shadow: 0 0 0 0 rgba(95,207,138,0); } }
.server-name { font: 500 30px/1.05 var(--serif); margin: 0; }
.server-desc { margin: 0; color: var(--muted); font-size: 14px; }
.address {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(0,0,0,.35); border: 1px dashed var(--line); color: var(--text);
  font: 500 15px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; text-align: left;
  transition: border-color .2s, background .2s;
}
.address:hover { border-color: var(--gold); background: rgba(201,164,92,.06); }
.address .copy { font: 600 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); flex: none; }
.address code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); }
.server-meta b { color: var(--text); font-weight: 500; }
.join-note { font-size: 13px; color: #cfc6b6; margin: 0; }
.empty { grid-column: 1 / -1; padding: 40px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- leadership ---------- */
.leadership { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.portrait { position: relative; }
.portrait img, .portrait .fallback { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 55% 40%; border-radius: var(--radius); filter: saturate(.85); }
.portrait::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 1px solid var(--line); border-radius: var(--radius); z-index: -1; }
.portrait-caption { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); font-style: italic; }
.title-line { margin: 12px 0 28px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.leader-copy > p { color: #cfc6b6; font-size: 17px; }
blockquote { margin: 32px 0 0; padding: 0 0 0 24px; border-left: 2px solid var(--gold); }
blockquote p { margin: 0; font: italic 500 clamp(26px, 3vw, 36px)/1.15 var(--serif); }
cite { display: block; margin-top: 10px; font-style: normal; font-size: 13px; color: var(--muted); }

/* ---------- studio ---------- */
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.studio-card { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--line-soft); display: flex; flex-direction: column; }
.studio-card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 3fr 2fr; }
.studio-card img, .studio-card .fallback { width: 100%; height: 100%; min-height: 260px; aspect-ratio: 4 / 3; object-fit: cover; }
.studio-card.wide img, .studio-card.wide .fallback { aspect-ratio: 16 / 10; }
.studio-card img.pos-field { object-position: 50% 58%; }
.studio-card img.pos-origin { object-fit: contain; background: radial-gradient(circle, #241f17, var(--panel)); padding: 24px; }
figcaption { padding: 24px 26px 28px; color: var(--muted); font-size: 15px; }
figcaption strong { display: block; color: var(--text); font: 500 24px/1.15 var(--serif); margin-bottom: 8px; }
.studio-card.wide figcaption { align-self: center; padding: 32px; }

/* ---------- fallback when a photo is missing ---------- */
.fallback {
  display: grid; place-items: center; background:
    radial-gradient(circle at 50% 40%, rgba(201,164,92,.16), transparent 60%), var(--panel);
  color: var(--gold); font: italic 500 72px/1 var(--serif); letter-spacing: .05em;
}
.hero-media .fallback { position: absolute; inset: 0; font-size: 28vw; color: rgba(201,164,92,.07); justify-items: end; padding-right: 6vw; }

/* ---------- press ---------- */
.press { text-align: center; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quotes figure { margin: 0; padding: 30px 24px; border-top: 1px solid var(--line); }
.quotes blockquote { border: 0; padding: 0; margin: 0; font: italic 500 26px/1.2 var(--serif); }
.quotes figcaption { padding: 12px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- request form ---------- */
.request-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding: clamp(22px, 4vw, 44px); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--bg-2)); border: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.full { grid-column: 1 / -1; }
label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.opt { text-transform: none; letter-spacing: 0; opacity: .7; }
input, textarea {
  width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line-soft);
  background: rgba(0,0,0,.35); color: var(--text); font: 400 16px/1.4 var(--sans); resize: vertical;
}
input::placeholder, textarea::placeholder { color: #6c6457; }
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,164,92,.15); }
input.invalid { border-color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-foot .fineprint { margin: 0; }
.form-status { margin: 0; min-height: 1.5em; font-size: 15px; }
.form-status.ok { color: var(--online); }
.form-status.err { color: var(--bad); }

/* ---------- footer ---------- */
.footer { max-width: var(--max); margin: clamp(80px, 12vw, 150px) auto 0; padding: 40px clamp(16px, 4vw, 48px) 56px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 14px; }
.footer p { margin: 14px 0 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 999px; background: var(--gold); color: #120f0a;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 0; }
  .leadership { grid-template-columns: 1fr; }
  .portrait { max-width: 460px; }
  .studio-grid, .studio-card.wide { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .hero-meta { display: none; }
  .hero-media img { object-position: 70% 25%; }
  .hero-media::after { background: linear-gradient(0deg, var(--bg) 8%, rgba(11,10,8,.72) 55%, rgba(11,10,8,.35) 100%); }
}
@media (max-width: 560px) {
  .wordmark-text { letter-spacing: .28em; font-size: 12px; }
  .nav-links .nav-cta { padding: 8px 14px; font-size: 11px; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .request-form { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: 1fr; }
  .stat { padding: 26px 10px; }
}
