/* The Phoenix Project: site styles. Dark, cyan, square corners. */

@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 900; font-style: normal; font-display: swap; src: url("fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --ink: #060a0f;
  --slab: #0c131b;
  --slab-hi: #111c27;
  --rule: #1b2733;
  --rule-hi: #2c3e50;
  --flame: #00cfff;
  --ice: #e7f6fb;
  --mist: #8fa3b3;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --err: #ff7a7a;
  --ok: #4be3a0;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(16px, 4vw, 32px);
  --maxw: 1180px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html { background: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ice);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--flame); color: var(--ink); }

:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* Corner brackets, echoing the in-game Hub */
.brk { position: relative; }
.brk::before, .brk::after { content: ""; position: absolute; width: 16px; height: 16px; border: 0 solid var(--flame); pointer-events: none; }
.brk::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.brk::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ---------- Type ---------- */

.h-display, h1, h2, h3 { font-family: var(--display); text-transform: uppercase; margin: 0; font-weight: 800; letter-spacing: 0.01em; }

h2 { font-size: clamp(40px, 6vw, 76px); line-height: 0.94; }
h3 { font-size: clamp(26px, 3vw, 34px); line-height: 1; font-weight: 700; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lede-gap { margin-top: 18px; }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--mist); max-width: 52ch; }

code, .mono { font-family: var(--mono); font-size: 0.92em; }
.cmd-chip { font-family: var(--mono); font-size: 0.88em; color: var(--flame); background: var(--slab); border: 1px solid var(--rule); padding: 1px 7px; white-space: nowrap; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  font: 600 16px/1 var(--body);
  color: var(--ice); text-decoration: none;
  background: transparent; border: 1px solid var(--flame); border-radius: 0;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:hover { background: rgba(0, 207, 255, 0.14); }
.btn:active { background: rgba(0, 207, 255, 0.24); }
.btn-solid { background: var(--flame); color: var(--ink); }
.btn-solid:hover { background: var(--ice); border-color: var(--ice); }
.btn-solid:active { background: #bfeaf5; border-color: #bfeaf5; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Top bar ---------- */

.topbar { position: sticky; top: 0; z-index: 50; background: var(--ink); border-bottom: 1px solid var(--rule); }
.topbar .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 23px; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1; }
.brand .mark { width: 30px; height: 30px; color: var(--flame); flex: none; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { display: block; padding: 22px 14px 20px; color: var(--mist); text-decoration: none; font-weight: 500; font-size: 16px; line-height: 1; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s; }
.nav a:hover { color: var(--ice); border-bottom-color: var(--rule-hi); }
.nav a[aria-current="page"] { color: var(--ice); border-bottom-color: var(--flame); }
.nav a.btn { display: inline-flex; padding: 0 16px; min-height: 40px; margin-left: 10px; color: var(--ice); border: 1px solid var(--flame); }
.nav a.btn:hover { background: rgba(0, 207, 255, 0.14); color: var(--ice); border-color: var(--flame); }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid var(--rule-hi); color: var(--ice); cursor: pointer; border-radius: 0; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform 0.2s var(--ease), background-color 0.2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.topbar.open .nav-toggle span { background: transparent; }
.topbar.open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.topbar.open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px var(--gutter) 20px; background: var(--ink); border-bottom: 1px solid var(--rule); }
  .topbar.open .nav { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--flame); }
  .nav a.btn { margin: 16px 0 0; padding: 0 16px; min-height: 48px; font-size: 17px; border: 1px solid var(--flame); justify-content: center; }
}

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding: clamp(44px, 8vw, 100px) 0 clamp(56px, 9vw, 112px); border-bottom: 1px solid var(--rule); }
.hero .wrap { position: relative; z-index: 1; }

.hero-mark { position: absolute; z-index: 0; right: -10%; top: 50%; width: min(58vw, 700px); aspect-ratio: 1; transform: translateY(-50%); color: var(--flame); opacity: 0.2; pointer-events: none; }

.hero h1 { font-size: clamp(50px, 11.2vw, 136px); line-height: 0.88; font-weight: 900; letter-spacing: 0; margin: 0 0 clamp(20px, 3vw, 32px); }
.hero h1 .ln { display: block; }
.hero .lede { margin-bottom: clamp(28px, 4vw, 44px); }

.term { background: var(--slab); border: 1px solid var(--rule-hi); padding: 18px 20px 16px; max-width: 760px; }
.term-head { color: var(--mist); font-size: 14px; line-height: 1; margin-bottom: 14px; }
.term-line { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; }
.term-cmd { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--ink); border: 1px solid var(--rule); font-family: var(--mono); font-size: clamp(15px, 2.4vw, 21px); line-height: 1.35; color: var(--ice); overflow-wrap: anywhere; }
.term-cmd .prompt { color: var(--flame); flex: none; user-select: none; }
.term-cmd code { font-size: inherit; }
.term-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; color: var(--mist); min-height: 22px; }
.dot { width: 9px; height: 9px; flex: none; background: var(--mist); border-radius: 0; transform: rotate(45deg); }
.dot.on { background: var(--flame); }
.dot.off { background: transparent; border: 1px solid var(--mist); }
.term-foot strong { color: var(--ice); font-weight: 600; }

.sweep { position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--flame); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }

.hero-cta { margin-top: 22px; }

/* One orchestrated moment on load */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .ln { animation: wipe 0.85s var(--ease) both; }
  .hero h1 .ln + .ln { animation-delay: 0.14s; }
  .hero .lede { animation: rise 0.7s var(--ease) 0.5s both; }
  .term { animation: rise 0.7s var(--ease) 0.62s both; }
  .term .sweep { animation: sweep 1.15s var(--ease) 0.9s both; }
  .term-cmd code { animation: wipe 0.7s steps(30, end) 1.05s both; }
  .hero-mark { animation: fadein 1.4s ease 0.2s both; }
}
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sweep { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 0.2; } }

@media (max-width: 700px) {
  .hero-mark { right: -30%; top: 22%; width: 96vw; opacity: 0.1; }
  @keyframes fadein { from { opacity: 0; } to { opacity: 0.1; } }
  .term-line .btn { width: 100%; }
}

/* ---------- Sections ---------- */

.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec-line { border-top: 1px solid var(--rule); }

.sec-head { display: grid; gap: 18px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head .lede { margin: 0; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Server info */
.steps { margin-top: 32px; display: grid; gap: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding: 16px 0; border-top: 1px solid var(--rule); color: var(--ice); }
.steps li::before { content: counter(step); font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 0.9; color: var(--flame); }
.steps li > div > span { color: var(--mist); display: block; }
.steps li strong { font-weight: 600; display: block; }

.spec { background: var(--slab); border: 1px solid var(--rule-hi); margin: 0; }
.spec > div { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr); gap: 16px; padding: 16px 22px; border-top: 1px solid var(--rule); align-items: baseline; }
.spec > div:first-child { border-top: 0; }
.spec dt { color: var(--mist); font-size: 15px; }
.spec dd { margin: 0; font-weight: 600; font-size: 19px; overflow-wrap: anywhere; }
.spec dd .mono { font-weight: 500; }
.spec[hidden], .spec > div[hidden] { display: none; }
@media (max-width: 520px) { .spec > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 14px 18px; } }

/* Features */
.feats { border-bottom: 1px solid var(--rule); }
.feat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px clamp(32px, 6vw, 88px); padding: 28px 0; border-top: 1px solid var(--rule); }
.feat p { margin: 0; color: var(--mist); font-size: 18px; max-width: 58ch; }
@media (max-width: 880px) { .feat { grid-template-columns: minmax(0, 1fr); padding: 22px 0; } }

/* Store tiers */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--slab); border: 1px solid var(--rule-hi); }
.tier { padding: 30px 28px 34px; border-top: 3px solid var(--tier); border-left: 1px solid var(--rule); }
.tier:first-child { border-left: 0; }
.tier h3 { color: var(--tier); font-size: clamp(38px, 4.4vw, 52px); font-weight: 800; margin-bottom: 8px; }
.tier .sum { color: var(--mist); font-size: 16px; margin-bottom: 22px; }
.tier li { position: relative; padding: 11px 0 11px 22px; border-top: 1px solid var(--rule); font-weight: 500; }
.tier li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 8px; height: 8px; background: var(--tier); }
.tier-silver { --tier: var(--silver); }
.tier-gold { --tier: var(--gold); }
.tier-elite { --tier: var(--flame); }
.store-foot { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.store-foot p { margin: 0; color: var(--mist); max-width: 52ch; }
@media (max-width: 880px) {
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier { border-left: 0; border-top-width: 3px; }
  .tier + .tier { border-top-width: 3px; }
}

/* Rules */
.rules { counter-reset: rule; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--rule); font-size: clamp(18px, 2.1vw, 22px); font-weight: 500; line-height: 1.4; }
.rules li::before { content: counter(rule); font-family: var(--display); font-weight: 900; font-size: 44px; line-height: 0.8; color: var(--flame); }
.rules + p { margin: 0; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--mist); }

/* Commands */
.cmds { width: 100%; border-collapse: collapse; background: var(--slab); border: 1px solid var(--rule-hi); }
.cmds th, .cmds td { text-align: left; padding: 14px 22px; border-top: 1px solid var(--rule); vertical-align: baseline; }
.cmds thead th { border-top: 0; color: var(--mist); font-weight: 500; font-size: 15px; background: var(--slab-hi); }
.cmds td:first-child { width: 36%; font-family: var(--mono); font-size: 16px; color: var(--flame); white-space: nowrap; }
.cmds td:first-child em { font-style: normal; color: var(--mist); }
.cmds td:last-child { color: var(--ice); }
@media (max-width: 640px) {
  .cmds, .cmds tbody, .cmds tr, .cmds td { display: block; }
  .cmds thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cmds tr { padding: 14px 18px; border-top: 1px solid var(--rule); }
  .cmds tr:first-child { border-top: 0; }
  .cmds th, .cmds td { padding: 0; border: 0; }
  .cmds td:first-child { width: auto; margin-bottom: 2px; }
}

/* Appeal call to action */
.band { background: var(--slab); border: 1px solid var(--rule-hi); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; }
.band h2 { font-size: clamp(36px, 5vw, 60px); }
.band p { margin: 12px 0 0; color: var(--mist); max-width: 46ch; }
@media (max-width: 760px) { .band { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--rule); padding: 36px 0 44px; color: var(--mist); font-size: 15px; }
.foot .wrap { display: grid; gap: 22px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot a { color: var(--ice); text-decoration: none; border-bottom: 1px solid var(--rule-hi); transition: border-color 0.15s; }
.foot a:hover { border-bottom-color: var(--flame); }
.foot .fine { margin: 0; max-width: 78ch; font-size: 14px; line-height: 1.55; }

/* ---------- Appeal page ---------- */

.page-head { padding: clamp(44px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(54px, 9vw, 112px); line-height: 0.9; font-weight: 900; margin-bottom: 18px; }

.appeal-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 80px); align-items: start; padding-bottom: clamp(64px, 9vw, 120px); }
@media (max-width: 880px) { .appeal-grid { grid-template-columns: minmax(0, 1fr); } }

.before li { padding: 14px 0 14px 22px; border-top: 1px solid var(--rule); position: relative; color: var(--ice); }
.before li::before { content: ""; position: absolute; left: 0; top: 1.4em; width: 8px; height: 8px; background: var(--flame); }
.before { border-bottom: 1px solid var(--rule); }

.form { background: var(--slab); border: 1px solid var(--rule-hi); padding: clamp(22px, 4vw, 40px); display: grid; gap: 22px; }
.form[hidden], .done[hidden] { display: none; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 640px) { .pair { grid-template-columns: minmax(0, 1fr); } }

.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field label, .field .lbl { font-weight: 600; font-size: 16px; line-height: 1.3; }
.field .opt { color: var(--mist); font-weight: 400; }
.hint { color: var(--mist); font-size: 14px; line-height: 1.45; margin: 0; }
.hint a { color: var(--ice); }

.in { width: 100%; min-height: 48px; padding: 11px 14px; background: var(--ink); color: var(--ice); border: 1px solid var(--rule-hi); border-radius: 0; font: 400 17px/1.4 var(--body); transition: border-color 0.15s, background-color 0.15s; }
textarea.in { min-height: 180px; resize: vertical; line-height: 1.55; }
.in::placeholder { color: #5f7384; }
.in:hover { border-color: #3d556b; }
.in:focus { outline: 0; border-color: var(--flame); box-shadow: 0 0 0 1px var(--flame); }
.in[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }

.err { margin: 0; color: var(--err); font-size: 14px; line-height: 1.4; }
.err[hidden] { display: none; }
.count { justify-self: end; color: var(--mist); font-size: 13px; font-variant-numeric: tabular-nums; margin-top: -2px; }
.count.bad { color: var(--err); }

.agree { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.agree input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 2px 0 0; background: var(--ink); border: 1px solid var(--rule-hi); border-radius: 0; cursor: pointer; display: grid; place-content: center; }
.agree input::after { content: ""; width: 10px; height: 10px; background: var(--flame); transform: scale(0); transition: transform 0.12s var(--ease); }
.agree input:checked::after { transform: scale(1); }
.agree input:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }
.agree input[aria-invalid="true"] { border-color: var(--err); }
.agree label { cursor: pointer; color: var(--ice); }

.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-msg { margin: 0; padding: 12px 14px; border: 1px solid var(--err); color: var(--err); font-size: 15px; background: rgba(255, 122, 122, 0.06); }
.form-msg[hidden] { display: none; }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.send-row .hint { max-width: 40ch; }

.done { background: var(--slab); border: 1px solid var(--rule-hi); padding: clamp(24px, 5vw, 48px); }
.done h2 { font-size: clamp(40px, 6vw, 68px); margin-bottom: 16px; }
.ref { display: inline-block; margin: 6px 0 18px; padding: 12px 18px; background: var(--ink); border: 1px solid var(--flame); font-family: var(--mono); font-size: clamp(22px, 4vw, 32px); letter-spacing: 0.06em; color: var(--flame); }
.done p { color: var(--mist); max-width: 54ch; }
.done p strong { color: var(--ice); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
