:root {
  color-scheme: dark;
  --ink: #f4ede4;
  --muted: #b9aca0;
  --night: #0b0809;
  --panel: #151011;
  --line: rgba(255, 235, 210, 0.14);
  --ember: #ff5a1f;
  --gold: #ffbd55;
  --blood: #a5161b;
  --green: #81b29a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--ink); color: var(--night); padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.4rem;
  padding: 1rem clamp(1.25rem, 5vw, 5rem);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; font-weight: 800; letter-spacing: .03em; }
.brand-logo { width: 3.1rem; height: 2.5rem; display: block; object-fit: cover; object-position: center; border: 1px solid rgba(255,189,85,.48); box-shadow: 0 0 18px rgba(255,90,31,.18); }
.brand-logo + span { font-size: .92rem; text-transform: uppercase; letter-spacing: .14em; }
nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }
nav a { font-size: .84rem; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .12em; }
nav a:not(.nav-cta) { color: var(--muted); }
.nav-cta { padding: .7rem 1rem; border: 1px solid rgba(255,189,85,.55); color: var(--gold); }
nav a:hover, nav a:focus-visible { color: #fff; }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding: 9rem clamp(1.25rem, 7vw, 7.5rem) 5rem;
  background:
    radial-gradient(circle at 77% 38%, rgba(168, 26, 20, .22), transparent 31%),
    linear-gradient(112deg, #0a0809 38%, #170909 100%);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .32;
  background-image: repeating-linear-gradient(125deg, transparent 0 42px, rgba(255,255,255,.025) 43px 44px);
  mask-image: linear-gradient(to right, transparent, #000);
}
.ember-field { position: absolute; width: 42vw; height: 42vw; right: -10vw; bottom: -18vw; background: radial-gradient(circle, rgba(255,75,10,.18), transparent 67%); filter: blur(10px); z-index: -1; }
.eyebrow { margin: 0 0 1rem; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.04; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; }
h1 { max-width: 780px; margin-bottom: 1.5rem; font-size: clamp(3.3rem, 7.5vw, 7.7rem); font-weight: 500; letter-spacing: -.055em; }
h1 span { color: var(--ember); font-style: italic; }
.hero-lede { max-width: 650px; margin: 0 0 2rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 3.45rem; padding: .8rem 1.25rem; text-decoration: none; font-weight: 800; font-size: .86rem; text-transform: uppercase; letter-spacing: .1em; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: linear-gradient(135deg, #ff6a22, #b7191f); color: #fff; box-shadow: 0 16px 45px rgba(185,25,31,.25); }
.button-primary:hover { background: linear-gradient(135deg, #ff7e39, #d22126); }
.button-ghost { border: 1px solid var(--line); color: var(--ink); }
.button-ghost:hover { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.04); }
.server-details { display: flex; flex-wrap: wrap; gap: 0; margin: 3.2rem 0 0; }
.server-details div { min-width: 8.8rem; padding: 0 1.7rem; border-left: 1px solid var(--line); }
.server-details div:first-child { padding-left: 0; border-left: 0; }
.server-details dt { color: #7e736e; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.server-details dd { margin: .18rem 0 0; color: var(--ink); font-size: .94rem; font-weight: 700; }
.hero-emblem { justify-self: center; width: min(100%, 620px); text-align: center; }
.logo-frame { position: relative; border: 1px solid rgba(255,173,61,.18); padding: .65rem; background: linear-gradient(145deg, rgba(255,94,31,.08), rgba(0,0,0,.35)); box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 90px rgba(190,31,20,.14); transform: rotate(1.2deg); }
.logo-frame::before, .logo-frame::after { content: ""; position: absolute; width: 3.5rem; height: 3.5rem; border-color: var(--gold); opacity: .7; }
.logo-frame::before { left: -.35rem; top: -.35rem; border-left: 1px solid; border-top: 1px solid; }
.logo-frame::after { right: -.35rem; bottom: -.35rem; border-right: 1px solid; border-bottom: 1px solid; }
.logo-frame img { display: block; width: 100%; height: auto; }
.hero-emblem > p { display: flex; justify-content: center; align-items: center; gap: .5rem; color: var(--muted); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; }
.hero-emblem > p span { width: .48rem; height: .48rem; border-radius: 50%; background: var(--ember); box-shadow: 0 0 14px var(--ember); }

.manifesto { display: grid; grid-template-columns: .55fr 1.45fr; gap: 3rem; align-items: start; padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 8vw, 9rem); background: #eee7dc; color: #191313; }
.manifesto > p { margin: .45rem 0 0; font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.manifesto h2 { margin: 0; max-width: 1050px; font-size: clamp(2.2rem, 4.6vw, 5rem); font-weight: 500; letter-spacing: -.04em; }
.manifesto em { color: #a11b1b; font-weight: 600; }

.world, .features, .path { padding: clamp(5rem, 9vw, 9rem) clamp(1.25rem, 7vw, 7.5rem); }
.section-heading { display: grid; grid-template-columns: .6fr 1fr; column-gap: 4rem; align-items: end; margin-bottom: 3rem; }
.section-heading .eyebrow { grid-column: 1 / -1; }
.section-heading h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 5.6rem); font-weight: 500; letter-spacing: -.045em; }
.section-heading > p:last-child { align-self: end; max-width: 640px; margin: 0; color: var(--muted); }
.section-heading.compact { display: block; max-width: 850px; }
.realm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.realm-card { position: relative; min-height: 34rem; display: flex; align-items: flex-end; padding: clamp(1.5rem, 4vw, 3.5rem); overflow: hidden; isolation: isolate; }
.realm-card::before { content: ""; position: absolute; inset: 0; z-index: -2; }
.realm-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(5,5,5,.98), rgba(5,5,5,.22)); }
.overworld::before { background: radial-gradient(circle at 50% 22%, rgba(116,173,129,.65), transparent 13%), radial-gradient(circle at 50% 35%, rgba(71,117,79,.24), transparent 35%), linear-gradient(145deg, #1d3424, #101613 58%); }
.nether::before { background: radial-gradient(circle at 50% 22%, rgba(255,77,22,.75), transparent 12%), radial-gradient(circle at 50% 36%, rgba(155,19,19,.35), transparent 34%), linear-gradient(145deg, #391012, #19090a 58%); }
.realm-number { position: absolute; right: 1.4rem; top: -.8rem; color: rgba(255,255,255,.06); font: 500 15rem/1 Georgia, serif; }
.realm-content { max-width: 580px; }
.realm-label { color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.realm-card h3 { margin: .6rem 0 1rem; font: 500 clamp(2.1rem, 4vw, 4.1rem)/1 Georgia, serif; }
.realm-card p:not(.realm-label) { color: #c9c0ba; }
.realm-trait { display: inline-block; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); color: #eee5dc; font-size: .74rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }

.features { background: #110d0e; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature-grid article { min-height: 19rem; padding: 2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 4rem; border: 1px solid rgba(255,189,85,.36); color: var(--gold); font-size: 1.35rem; }
.feature-grid h3 { margin-bottom: .9rem; font: 500 1.55rem/1.1 Georgia, serif; }
.feature-grid p { margin: 0; color: var(--muted); }

.path { background: linear-gradient(180deg, #0b0809, #150808); }
.path ol { margin: 3rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.path li { display: grid; grid-template-columns: .25fr 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.path li > span { color: var(--ember); font-size: .76rem; font-weight: 900; letter-spacing: .16em; }
.path h3 { margin: 0 0 .45rem; font: 500 clamp(1.5rem, 2.6vw, 2.5rem)/1.1 Georgia, serif; }
.path li p { margin: 0; color: var(--muted); }

.final-cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 7vw, 7.5rem); background: #eee7dc; color: #171111; }
.final-cta h2 { max-width: 900px; margin-bottom: 0; font-size: clamp(2.2rem, 4.3vw, 4.8rem); font-weight: 500; letter-spacing: -.04em; }
.final-cta .eyebrow { color: #941b1e; }
.final-cta .button { flex: 0 0 auto; }
footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.25rem, 7vw, 7.5rem); color: #776c68; font-size: .73rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 8rem; }
  .hero-emblem { width: min(82vw, 600px); justify-self: start; }
  .manifesto, .section-heading { grid-template-columns: 1fr; }
  .manifesto { gap: 1.5rem; }
  .section-heading { gap: 1.2rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .final-cta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
  .site-header { position: absolute; }
  .brand-logo + span { display: none; }
  nav a:not(.nav-cta) { display: none; }
  .nav-cta { padding: .6rem .8rem; }
  .hero { min-height: auto; padding-top: 8rem; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .hero-emblem { width: 100%; }
  .server-details { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .server-details div { min-width: 0; padding: 0 .8rem; }
  .server-details dd { font-size: .78rem; }
  .realm-grid, .feature-grid { grid-template-columns: 1fr; }
  .realm-card { min-height: 28rem; }
  .feature-icon { margin-bottom: 2.5rem; }
  .feature-grid article { min-height: 15rem; }
  .path li { grid-template-columns: 3rem 1fr; }
  footer { flex-direction: column; gap: .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Current server links and joining tools */
section[id] { scroll-margin-top: 2rem; }
button { font-family: inherit; cursor: pointer; }
button.button { border: 1px solid var(--line); }
:focus-visible { outline: 3px solid #85bfff; outline-offset: 5px; }
.copy-inline { padding: 0; border: 0; background: transparent; color: var(--ink); font-size: inherit; font-weight: inherit; text-align: left; overflow-wrap: anywhere; }
.copy-inline span { color: var(--gold); }
.server-details { gap: 1rem 0; }
.server-details .address-detail { min-width: 0; }
.join-address { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 2rem; background: #211315; border: 1px solid rgba(255,189,85,.35); }
.join-address .eyebrow { display: block; margin-bottom: .6rem; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.join-address code { display: block; font-size: clamp(1rem, 2.7vw, 2rem); color: #fff; }
.resources, .help { padding: clamp(4rem, 7vw, 7rem) clamp(1.25rem, 7vw, 7.5rem); }
.resources { background: #151011; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.resource-grid article { display: flex; align-items: flex-start; flex-direction: column; padding: 2rem; border: 1px solid var(--line); background: #0e0b0c; }
.resource-grid h3 { margin: 1rem 0 .5rem; font: 500 2rem/1.1 Georgia, serif; }
.resource-grid p { color: var(--muted); margin-bottom: 1.5rem; }
.resource-grid code, .site-address { margin-bottom: 1.5rem; overflow-wrap: anywhere; max-width: 100%; }
.resource-grid .button { margin-top: auto; }
.help details { border-top: 1px solid var(--line); padding: 1.3rem 0; }
.help details:last-child { border-bottom: 1px solid var(--line); }
.help summary { cursor: pointer; font-size: 1.1rem; font-weight: 700; }
.help details p { color: var(--muted); max-width: 850px; }
.help a, .path li a { color: var(--gold); text-underline-offset: .2em; }
.fallback-address { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.copy-status { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 100; max-width: calc(100% - 2rem); padding: .8rem 1.2rem; border: 1px solid var(--gold); background: #211315; color: #fff; box-shadow: 0 8px 30px #0008; overflow-wrap: anywhere; visibility: hidden; margin: 0; }
.copy-status.visible { visibility: visible; }
@media (max-width: 680px) {
  .server-details { display: flex; flex-wrap: wrap; }
  .server-details .address-detail { order: 3; flex-basis: 100%; padding: .6rem 0 0; border: 0; }
  .server-details dd { font-size: .92rem; }
  .join-address { flex-direction: column; align-items: stretch; padding: 1.2rem; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-grid article { padding: 1.4rem; }
  nav { gap: .7rem; }
  nav a[href*="map.fireandbloodgeopol"] { display: inline; font-size: .7rem; }
}
