/* ECLIPSE landing. The page reads like a cartographer's atlas of a broken world: engraved display type
   from old maps, bone-white text on a moonlit night, amber for the one thing you should press. */

:root {
  --night: #141726;
  --night-deep: #0e1019;
  --dusk: #2a2340;
  --bone: #ece3cf;
  --bone-dim: #b9b1a1;
  --shard: #a9bddf;
  --amber: #e2a845;
  --amber-hot: #f3c46d;
  --line: rgba(236, 227, 207, 0.16);

  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --caps: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --text: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 3.2vw, 2.75rem);
  --step-4: clamp(2.6rem, 6vw, 5rem);

  --gutter: clamp(16px, 5vw, 72px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night-deep);
  color: var(--bone);
  font: 400 var(--step-0)/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: var(--shard); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; max-width: 68ch; }

:focus-visible { outline: 2px solid var(--amber-hot); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  padding: 8px 14px; background: var(--amber); color: var(--night-deep); text-decoration: none;
}
.skip:focus { top: 12px; }

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

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  font: 500 var(--step-0)/1 var(--text);
  color: var(--night-deep); background: var(--amber);
  border: 1px solid var(--amber); border-radius: 3px;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(243, 196, 109, 0);
  transition: background 0.15s, box-shadow 0.25s;
}
.button:hover { background: var(--amber-hot); box-shadow: 0 0 28px 2px rgba(243, 196, 109, 0.35); }

.button--quiet { color: var(--bone); background: rgba(14, 16, 25, 0.45); border-color: var(--line); }
.button--quiet:hover { background: rgba(14, 16, 25, 0.75); border-color: var(--bone-dim); box-shadow: none; }

.button--small { min-height: 38px; padding: 0 16px; font-size: 0.95rem; }

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

.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 18px var(--gutter);
}

.bar__brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--bone); text-decoration: none;
  font: 1.5rem/1 var(--caps);
}
.bar__moon { width: 28px; height: 28px; fill: none; stroke: var(--bone); stroke-width: 1.4; }
.bar__moon path { stroke: var(--amber); }

.bar__nav { display: flex; gap: 22px; margin-left: auto; }
.bar__nav a { color: var(--bone-dim); text-decoration: none; }
.bar__nav a:hover { color: var(--bone); }

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

.hero {
  position: relative; min-height: min(100svh, 1000px);
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
}

.hero__art {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
}

/* The art fades into the night at the bottom and on the left, where the words sit. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--night-deep) 2%, rgba(14, 16, 25, 0.82) 22%, rgba(14, 16, 25, 0) 58%),
    linear-gradient(to right, rgba(14, 16, 25, 0.72), rgba(14, 16, 25, 0) 55%),
    linear-gradient(to bottom, rgba(14, 16, 25, 0.55), rgba(14, 16, 25, 0) 18%);
}

.hero__text { padding: 0 var(--gutter) clamp(48px, 9vh, 110px); max-width: 980px; }

.hero h1 { font-size: var(--step-4); letter-spacing: -0.01em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }

.hero__lede { margin-top: 22px; font-size: var(--step-1); color: var(--bone); max-width: 46ch; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }

.hero__fine { font-size: 0.95rem; color: var(--bone-dim); }

/* The one orchestrated moment: the art settles and the words surface, once, on load. */
@media (prefers-reduced-motion: no-preference) {
  .hero__art { animation: settle 9s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  .hero__text > * { animation: surface 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__text > :nth-child(2) { animation-delay: 0.35s; }
  .hero__text > :nth-child(3) { animation-delay: 0.6s; }
  .hero__text > :nth-child(4) { animation-delay: 0.75s; }
}

@keyframes settle { from { transform: scale(1.09); filter: brightness(0.6); } to { transform: none; filter: none; } }
@keyframes surface { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Lore ---------- */

.lore {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(72px, 12vh, 140px) var(--gutter);
  background: radial-gradient(900px 500px at 85% 40%, rgba(169, 189, 223, 0.08), transparent 70%), var(--night-deep);
}

.lore h2, .road h2, .combat h2, .world h2, .next h2, .call h2 { font-size: var(--step-3); margin-bottom: 0.6em; }

.lore__text p { font-size: var(--step-1); color: var(--bone-dim); line-height: 1.65; }
.lore__text p:last-child { color: var(--bone); font-family: var(--display); font-style: italic; font-size: var(--step-2); line-height: 1.3; }

.lore__quote { margin: 0; padding: 28px 0 28px 32px; border-left: 1px solid var(--amber); }
.lore__quote p { font: italic var(--step-2)/1.35 var(--display); color: var(--bone); }
.lore__quote footer { color: var(--bone-dim); font-size: 0.95rem; }

/* ---------- The road ---------- */

.road { padding: clamp(40px, 8vh, 100px) 0 clamp(60px, 10vh, 120px); background: linear-gradient(var(--night-deep), var(--night)); }
.road > h2, .road__lede { margin-left: var(--gutter); margin-right: var(--gutter); }
.road__lede { color: var(--bone-dim); font-size: var(--step-1); }

.regions { list-style: none; margin: clamp(40px, 7vh, 80px) 0 0; padding: 0; counter-reset: region; }

/* Each land is a wide plate with its text beside it; the plates alternate sides like pages of an atlas. */
.region {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding: 0 var(--gutter) 0 0;
  margin-bottom: clamp(56px, 10vh, 120px);
  counter-increment: region;
}
.region:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); padding: 0 0 0 var(--gutter); }
.region:nth-child(even) img { order: 2; }

.region img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

/* The order of the lands is the order you travel, so each one carries its step on the road. */
.region__levels {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px;
  font: var(--step-3)/1 var(--display); color: var(--amber);
}
.region__levels::before { content: counter(region, upper-roman) "."; color: var(--bone-dim); font-size: 0.6em; }
.region__levels span { font: 500 0.95rem/1 var(--text); color: var(--bone-dim); }

.region h3 { font-size: var(--step-3); margin-bottom: 0.5em; }
.region__text p { color: var(--bone-dim); }
.region__now { color: var(--bone) !important; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Combat ---------- */

.combat { position: relative; isolation: isolate; padding: clamp(80px, 14vh, 160px) var(--gutter); overflow: hidden; }
.combat__art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.combat::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to right, var(--night) 8%, rgba(20, 23, 38, 0.86) 42%, rgba(20, 23, 38, 0.15) 80%),
              linear-gradient(to bottom, var(--night), transparent 12%, transparent 88%, var(--night));
}
.combat__text { max-width: 620px; }
.combat__text > p { font-size: var(--step-1); color: var(--bone-dim); }

.moves { margin: 32px 0 0; display: grid; gap: 22px; }
.moves dt { font: var(--step-2)/1.15 var(--display); color: var(--bone); }
.moves dd { margin: 4px 0 0; color: var(--bone-dim); max-width: 52ch; }

/* ---------- The world ---------- */

.world { padding: clamp(72px, 12vh, 140px) var(--gutter); background: var(--night); }

.facts {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 48px;
}
.facts h3 { font-size: var(--step-2); margin-bottom: 8px; color: var(--bone); }
.facts p { color: var(--bone-dim); margin: 0; }

/* ---------- What comes next ---------- */

.next {
  padding: clamp(72px, 12vh, 140px) var(--gutter);
  background: radial-gradient(1000px 600px at 50% 0%, rgba(74, 58, 110, 0.45), transparent 70%), var(--night-deep);
}
.next__lede { color: var(--bone-dim); font-size: var(--step-1); }

/* A route drawn across the page: each planned land is a stop further from home. */
.horizon {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
  position: relative;
}
.horizon::before {
  content: ""; position: absolute; left: 0; right: 0; top: 7px;
  border-top: 1px dashed rgba(169, 189, 223, 0.45);
}
.horizon li { position: relative; padding-top: 34px; }
.horizon li::before {
  content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px; transform: rotate(45deg);
  background: var(--night-deep); border: 1px solid var(--shard);
}
.horizon h3 { font-size: var(--step-2); margin-bottom: 8px; }
.horizon p { color: var(--bone-dim); }

/* ---------- Call ---------- */

.call {
  text-align: center; padding: clamp(80px, 14vh, 160px) var(--gutter);
  background:
    linear-gradient(var(--night-deep), rgba(14, 16, 25, 0.55) 30%, rgba(14, 16, 25, 0.75)),
    url("art/inverted-ridges.jpg") center 35% / cover;
}
.call h2 { font-size: var(--step-4); }
.call p { margin: 0 auto; font-size: var(--step-1); color: var(--bone); max-width: 52ch; }
.call .actions { justify-content: center; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 28px var(--gutter); border-top: 1px solid var(--line);
  color: var(--bone-dim); font-size: 0.95rem;
}
.foot p { margin: 0; }

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .bar__nav { display: none; }
  .bar .button { margin-left: auto; }
  .lore { grid-template-columns: minmax(0, 1fr); }
  .region, .region:nth-child(even) { grid-template-columns: minmax(0, 1fr); padding: 0 var(--gutter); }
  .region:nth-child(even) img { order: 0; }
  .region img { -webkit-mask-image: none; mask-image: none; border-radius: 3px; }
  .horizon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .horizon::before { display: none; }
}

@media (max-width: 560px) {
  .horizon { grid-template-columns: minmax(0, 1fr); }
  .actions .button { flex: 1 1 100%; }
}
