:root {
  --maroon: #7f0d1a;
  --maroon-2: #b01626;
  --red-glow: rgba(176, 22, 38, .35);
  --bone: #d7c3a1;
  --bone-2: #f1e5ce;
  --steel: #161b20;
  --steel-2: #222a31;
  --steel-3: #303942;
  --black: #06080b;
  --silver: #aab3ba;
  --muted: #8d969d;
  --green: #44b678;
  --blue: #54a7ff;
  --gold: #d7a843;
  --orange: #d8792f;
  --purple: #a065d8;
  --max: 1180px;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--bone-2);
  background:
    radial-gradient(circle at 20% 10%, rgba(127, 13, 26, .22), transparent 34rem),
    radial-gradient(circle at 80% 4%, rgba(84, 167, 255, .08), transparent 25rem),
    linear-gradient(180deg, #06080b 0%, #10151a 48%, #06080b 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,.32) 1px, transparent 1px);
  background-size: 88px 88px, 88px 88px, 180px 180px;
  opacity: .45;
  mask-image: linear-gradient(180deg, black 0%, transparent 92%);
}
body::after {
  content: "";
  position: fixed;
  top: -30%;
  left: 0;
  width: 100%;
  height: 30%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(176,22,38,.08), transparent);
  animation: scan 9s linear infinite;
}
@keyframes scan { to { transform: translateY(520vh); } }
a { color: inherit; text-decoration: none; }
p { color: rgba(241,229,206,.82); line-height: 1.75; }
ul, ol { line-height: 1.65; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--bone-2);
  color: var(--black);
  padding: .75rem 1rem;
  border-radius: .5rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; }
.site-shell { position: relative; z-index: 1; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6,8,11,.83);
  border-bottom: 1px solid rgba(170,179,186,.18);
  backdrop-filter: blur(16px);
}
.topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.25rem;
  padding: .55rem 1rem;
  font-size: .75rem;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: .16em;
  border-bottom: 1px solid rgba(170,179,186,.12);
}
.navbar {
  max-width: var(--max);
  margin: 0 auto;
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .8rem; min-width: 250px; }
.brand-mark {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(215,195,161,.55);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 26px rgba(127,13,26,.42), inset 0 0 18px rgba(215,195,161,.12);
  overflow: hidden;
  flex: 0 0 auto;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand svg { width: 34px; height: 34px; fill: none; stroke: var(--bone); stroke-width: 4; stroke-linejoin: round; }
.brand strong { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .92rem; }
.brand small { display: block; color: var(--bone); letter-spacing: .12em; text-transform: uppercase; font-size: .68rem; margin-top: .18rem; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; }
.nav-links a {
  padding: .7rem .75rem;
  border-radius: 999px;
  color: rgba(241,229,206,.8);
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--bone-2); background: rgba(127,13,26,.35); }
.nav-links a.nav-discord { border: 1px solid rgba(215,195,161,.4); color: var(--bone-2); background: rgba(127,13,26,.28); }
.menu-toggle { display: none; background: transparent; color: var(--bone-2); border: 1px solid rgba(170,179,186,.25); border-radius: 10px; padding: .55rem .8rem; font-size: 1.3rem; }
.section { max-width: var(--max); margin: 0 auto; padding: 6.5rem 1rem; position: relative; }
.hero { min-height: 78vh; display: grid; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 2rem; align-items: center; }
.hero-copy { padding: 2rem 0; }
.kicker {
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  font-weight: 800;
  margin: 0 0 1rem;
}
h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 {
  font-size: clamp(3.2rem, 9vw, 7.6rem);
  letter-spacing: -.07em;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(176,22,38,.25);
}
h2 { font-size: clamp(2rem, 4vw, 4.4rem); letter-spacing: -.045em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); color: #fff4df; }
.hero-motto { color: var(--bone); font-weight: 900; letter-spacing: .28em; text-transform: uppercase; margin: 1rem 0; }
.hero-lede { max-width: 720px; font-size: 1.35rem; color: rgba(241,229,206,.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-actions.center { justify-content: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .85rem 1.15rem;
  border: 1px solid rgba(215,195,161,.45);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--bone-2);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .84rem;
  cursor: pointer;
  transition: .22s ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--bone); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.button.primary { background: linear-gradient(135deg, var(--maroon), var(--maroon-2)); border-color: rgba(255,255,255,.16); box-shadow: 0 0 32px var(--red-glow); }
.button.ghost { background: transparent; }
.discord-button::before { content: "✦"; margin-right: .5rem; color: var(--bone); }
.command-card, .panel-list, .requirements, .finder, .workflow, .ring-card, .faq, .rank-detail, .table-wrap, .notice, .privacy-grid article, .timeline, .dispatch {
  border: 1px solid rgba(170,179,186,.2);
  background:
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(22,27,32,.78);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.command-card { padding: 1.25rem; position: relative; overflow: hidden; }
.logo-card { text-align: left; }
.hero-logo {
  display: block;
  width: min(260px, 72vw);
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 24px 44px rgba(0,0,0,.55)) drop-shadow(0 0 30px rgba(127,13,26,.22));
}
.command-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 0%, rgba(215,195,161,.08) 45%, transparent 65%);
  transform: translateX(-100%);
  animation: glint 8s ease-in-out infinite;
}
@keyframes glint { 0%, 58% { transform: translateX(-110%); } 78%, 100% { transform: translateX(110%); } }
.card-header { display: flex; align-items: center; gap: .55rem; color: var(--bone); text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 900; margin-bottom: 1rem; }
.status-light { width: .65rem; height: .65rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.quick-guide { margin: 0; padding-left: 1.4rem; }
.quick-guide a { color: #fff4df; border-bottom: 1px solid rgba(215,195,161,.35); }
.terminal-note { color: var(--silver); font-size: .94rem; border-top: 1px solid rgba(170,179,186,.16); margin: 1.1rem 0 0; padding-top: 1rem; }
.section-heading { max-width: 850px; margin-bottom: 2rem; }
.section-heading.compact { margin-bottom: 1rem; }
.section-heading p:last-child { font-size: 1.08rem; }
.stat-grid, .activity-grid, .corps-grid, .ops-grid, .archive-grid { display: grid; gap: 1rem; }
.stat-grid { grid-template-columns: repeat(4, 1fr); }
.stat-grid article, .activity-card, .corps-card, .ops-card, .access-cards article {
  border: 1px solid rgba(170,179,186,.16);
  background: rgba(255,255,255,.045);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-height: 100%;
  transition: .22s ease;
}
.stat-grid article:hover, .activity-card:hover, .corps-card:hover, .ops-card:hover, .access-cards article:hover { transform: translateY(-4px); border-color: rgba(215,195,161,.45); background: rgba(255,255,255,.07); }
.stat-grid strong { color: var(--bone); display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: .4rem; }
.stat-grid span { color: rgba(241,229,206,.85); }
.activity-grid { grid-template-columns: repeat(3, 1fr); }
.activity-card span { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(215,195,161,.35); border-radius: 50%; color: var(--bone); margin-bottom: 1rem; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: start; }
.notice { margin-top: 1.5rem; padding: 1.15rem; color: rgba(241,229,206,.84); background: rgba(127,13,26,.16); }
.notice strong { color: var(--bone-2); }
.panel-list { padding: 1.5rem; }
.steel-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.steel-list li { position: relative; padding-left: 1.35rem; margin: .42rem 0; color: rgba(241,229,206,.84); }
.steel-list li::before { content: ""; position: absolute; left: 0; top: .65rem; width: .52rem; height: .52rem; border: 1px solid var(--bone); transform: rotate(45deg); background: rgba(127,13,26,.4); }
.steel-list.columns { columns: 2; column-gap: 2rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid rgba(170,179,186,.18); color: rgba(241,229,206,.84); }
th { background: rgba(127,13,26,.72); color: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
tr:nth-child(even) td { background: rgba(255,255,255,.025); }
.corps-grid { grid-template-columns: repeat(4, 1fr); }
.corps-card { position: relative; overflow: hidden; }
.corps-card::after { content: attr(data-corps); position: absolute; right: -10px; bottom: 8px; font-size: 3.6rem; font-weight: 900; letter-spacing: -.08em; opacity: .045; text-transform: uppercase; }
.corps-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; border: 1px solid rgba(215,195,161,.3); color: var(--bone); margin-bottom: 1rem; font-size: 1.35rem; }
.corps-card h3 { margin-bottom: .45rem; }
.corps-card p { min-height: 74px; margin: .5rem 0; }
.corps-card ul { padding-left: 1.1rem; color: rgba(241,229,206,.76); }
.corps-card strong { display: block; color: var(--bone); margin-top: 1rem; }
.knight { box-shadow: inset 0 3px 0 var(--maroon-2); }
.scribe { box-shadow: inset 0 3px 0 var(--green); }
.lancer { box-shadow: inset 0 3px 0 var(--blue); }
.paladin { box-shadow: inset 0 3px 0 var(--orange); }
.finder { margin-top: 1.2rem; padding: 1.5rem; display: grid; grid-template-columns: .75fr 1.25fr; gap: 1.25rem; align-items: start; }
.finder-form { display: grid; gap: .85rem; }
label { display: grid; gap: .35rem; color: var(--bone); font-weight: 800; font-size: .9rem; }
select, input {
  width: 100%;
  background: rgba(0,0,0,.3);
  color: var(--bone-2);
  border: 1px solid rgba(170,179,186,.26);
  border-radius: 12px;
  padding: .85rem;
  font: inherit;
}
.finder-result { grid-column: 2; min-height: 1rem; color: #fff4df; font-weight: 800; }
.rank-layout { display: grid; grid-template-columns: minmax(250px, .9fr) minmax(0, 1.1fr); gap: 1rem; }
.rank-tree { display: grid; gap: .6rem; }
.rank-button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .85rem;
  align-items: center;
  text-align: left;
  padding: .9rem;
  border: 1px solid rgba(170,179,186,.16);
  background: rgba(255,255,255,.045);
  color: var(--bone-2);
  border-radius: 14px;
  cursor: pointer;
  transition: .2s ease;
}
.rank-button:hover, .rank-button.active { background: rgba(127,13,26,.34); border-color: rgba(215,195,161,.42); }
.rank-button .node { width: 18px; height: 18px; border: 1px solid var(--bone); transform: rotate(45deg); background: rgba(127,13,26,.5); }
.rank-button small { color: var(--silver); }
.rank-detail { padding: 1.5rem; }
.authority-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: 1rem; }
.authority-strip span { padding: 1rem; border: 1px solid rgba(170,179,186,.16); border-radius: 14px; background: rgba(255,255,255,.035); color: rgba(241,229,206,.8); }
.authority-strip strong { color: var(--bone); }
.tenet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.tenet {
  padding: .9rem;
  border: 1px solid rgba(170,179,186,.15);
  background: rgba(255,255,255,.035);
  border-radius: 14px;
}
.tenet strong { display: block; color: var(--bone); margin-bottom: .35rem; }
.tenet span { color: rgba(241,229,206,.78); font-size: .94rem; }
.ring-card { margin-top: 1.2rem; padding: 1.35rem; display: grid; grid-template-columns: .7fr 1.3fr; gap: 1rem; align-items: center; background: rgba(127,13,26,.14); }
.ops-grid { grid-template-columns: repeat(4, 1fr); }
.mission { display: inline-block; width: 36px; height: 8px; border-radius: 999px; margin-bottom: 1rem; }
.mission.red { background: var(--maroon-2); box-shadow: 0 0 18px var(--maroon-2); }
.mission.green { background: var(--green); box-shadow: 0 0 18px var(--green); }
.mission.blue { background: var(--blue); box-shadow: 0 0 18px var(--blue); }
.mission.gold { background: var(--gold); box-shadow: 0 0 18px var(--gold); }
.ops-card small { color: var(--silver); text-transform: uppercase; letter-spacing: .09em; }
.workflow { margin-top: 1.2rem; padding: 1.5rem; }
.workflow ol { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 1rem 0 0; list-style: none; gap: .75rem; counter-reset: steps; }
.workflow li { counter-increment: steps; padding: 1rem; border: 1px solid rgba(170,179,186,.16); border-radius: 14px; background: rgba(255,255,255,.035); }
.workflow li::before { content: counter(steps, decimal-leading-zero); display: block; color: var(--bone); font-weight: 900; letter-spacing: .14em; margin-bottom: .4rem; }
.workflow strong { display: block; color: #fff4df; }
.workflow span { color: rgba(241,229,206,.75); }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.privacy-grid article { padding: 1.4rem; box-shadow: none; }
.archive-grid { grid-template-columns: repeat(3, 1fr); }
.dispatch { padding: 1.3rem; }
.dispatch span { color: var(--bone); text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 900; }
.join-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; }
.requirements { padding: 1.4rem; }
.access-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.access-cards article h3 { font-size: 1.15rem; }
.timeline { margin-top: 1rem; padding: 1.5rem; }
.timeline ol { columns: 2; column-gap: 2rem; margin-bottom: 0; }
.faq { margin-top: 1rem; padding: 1.5rem; }
details { border-top: 1px solid rgba(170,179,186,.16); padding: 1rem 0; }
details:first-of-type { margin-top: 1rem; }
summary { cursor: pointer; color: #fff4df; font-weight: 900; }
.final-cta { text-align: center; }
.site-footer { max-width: var(--max); margin: 0 auto; padding: 2rem 1rem 4rem; border-top: 1px solid rgba(170,179,186,.16); display: flex; align-items: start; justify-content: space-between; gap: 2rem; }
.site-footer p { max-width: 620px; }
.site-footer div:last-child { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--bone); font-weight: 800; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; }
  .nav-links { position: fixed; top: 111px; left: 1rem; right: 1rem; padding: 1rem; border: 1px solid rgba(170,179,186,.16); border-radius: 18px; background: rgba(6,8,11,.96); display: none; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .hero-grid, .split, .finder, .rank-layout, .ring-card, .join-layout { grid-template-columns: 1fr; }
  .finder-result { grid-column: 1; }
  .stat-grid, .activity-grid, .corps-grid, .ops-grid, .authority-strip, .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .tenet-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topline span:nth-child(n+4) { display: none; }
  .brand { min-width: 0; }
  .brand strong { font-size: .8rem; }
  .section { padding: 4.5rem 1rem; }
  .hero { min-height: 0; padding-top: 4rem; }
  .stat-grid, .activity-grid, .corps-grid, .ops-grid, .authority-strip, .archive-grid, .privacy-grid, .access-cards, .tenet-grid { grid-template-columns: 1fr; }
  .workflow ol { grid-template-columns: 1fr; }
  .steel-list.columns, .timeline ol { columns: 1; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
