/* ==========================================================================
   Náströnd — shared stylesheet
   Palette and wordmark treatment mirror the launcher's src/renderer/styles.css
   so the site and the launcher read as one thing.
   ========================================================================== */

:root {
  /* Carried over from the launcher (handoff §8.4) */
  --bg:        #080b08;   /* pitch black, green undertone */
  --ink:       #dfe6cd;   /* bone */
  --gold:      #9d8636;   /* tarnished gold — structure */
  --flame:     #45c22f;   /* witchfire — anything that glows */
  --rune:      #8dff5c;   /* brighter witchfire */

  /* Site-only additions */
  --raise:     #0d110c;   /* faintly lifted surface */
  --iron:      #1e241c;   /* borders, rules */
  --ash:       #8d977f;   /* muted body text */
  --gold-lit:  #c7a94a;   /* gold on hover / emphasis */

  --measure: 34rem;       /* ~68 characters at body size */
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

/* --- reset ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Alegreya, Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--gold-lit);
  text-decoration-color: var(--iron);
  text-underline-offset: 0.2em;
}
a:hover { color: var(--rune); text-decoration-color: currentColor; }

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

/* --- type ---------------------------------------------------------------- */

h1, h2, h3, .wordmark {
  font-family: "Pirata One", Alegreya, Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  margin: 0 0 0.75rem;
  color: var(--ink);
}

h3 {
  font-size: 1.4rem;
  margin: 2rem 0 0.5rem;
  color: var(--gold-lit);
}

p, li { max-width: var(--measure); }
p { margin: 0 0 1.1rem; }

.lede {
  font-size: 1.25rem;
  color: var(--ink);
}

.muted { color: var(--ash); }

.fineprint {
  font-size: 0.9375rem;
  color: var(--ash);
  line-height: 1.5;
}

/* --- page frame ---------------------------------------------------------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--iron);
  background: var(--bg);
}

.masthead-name {
  font-family: "Pirata One", Georgia, serif;
  font-size: 1.5rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.masthead-name:hover { color: var(--gold-lit); }

.masthead-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 1rem;
}

.masthead-nav a {
  color: var(--ash);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.masthead-nav a:hover { color: var(--ink); border-bottom-color: var(--gold); }
.masthead-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--flame);
}

main { padding: 0 var(--gutter); }

.wrap { max-width: 46rem; margin: 0 auto; }

/* The inscription rule: one continuous hairline down the left of the content,
   with a lozenge where each section begins. */
.section {
  position: relative;
  border-left: 1px solid var(--iron);
  padding: 2.75rem 0 2.75rem 1.75rem;
  margin: 0;
}

.section::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 3.3rem;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

.section + .section { border-top: none; }

@media (max-width: 34rem) {
  .section { padding-left: 1.1rem; }
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 44rem;
  display: flex;
  align-items: flex-start;
  padding: clamp(4rem, 10vw, 7rem) var(--gutter) clamp(3rem, 9vw, 5rem);
  overflow: hidden;
  background:
    /* Top-weighted scrim: dense where the copy sits, clearing downward so the
       art reads at full strength in the lower half. */
    linear-gradient(180deg,
      rgba(8,11,8,.90) 0%,
      rgba(8,11,8,.78) 34%,
      rgba(8,11,8,.30) 62%,
      rgba(8,11,8,.55) 86%,
      var(--bg)        100%),
    url("art/hero-bg.jpg"),
    linear-gradient(180deg, #0b0f0a 0%, var(--bg) 100%);
  background-size:     cover, cover, cover;
  background-position: center, center 22%, center;
  background-repeat:   no-repeat, no-repeat, no-repeat;
}

.hero .hero-inner { max-width: 46rem; margin: 0 auto; text-align: left; }
.hero .lede { max-width: 30rem; }

@media (max-width: 60rem) {
  .hero { min-height: 32rem; }
}


.hero-inner { max-width: 46rem; margin: 0 auto; }

.wordmark {
  font-size: clamp(3rem, 13vw, 6rem);
  margin: 0 0 0.6rem;
  line-height: 1;
  /* Stone gradient through the glyphs. drop-shadow, not text-shadow —
     on transparent text a text-shadow paints a blurred duplicate of the
     letterforms instead of light coming off carved stone (§8.4). */
  background: linear-gradient(176deg, #f2f6e4 6%, #b9c3a6 42%, #6f7a63 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(69, 194, 47, 0.35));
}

.hero .lede { max-width: 30rem; margin-bottom: 2rem; }

/* --- status badge -------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.45rem 0.95rem 0.5rem;
  border: 1px solid var(--iron);
  background: var(--raise);
  font-size: 1rem;
  line-height: 1.3;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ash);
  flex: none;
  align-self: center;
}

.status-label { color: var(--ash); }

.status-note {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  color: var(--ash);
  max-width: var(--measure);
}
.status-note:empty { display: none; }

/* States */
.status[data-state="online"]      { border-color: rgba(69, 194, 47, 0.45); }
.status[data-state="online"] .status-dot {
  background: var(--flame);
  box-shadow: 0 0 9px rgba(69, 194, 47, 0.9);
  animation: ember 4s ease-in-out infinite;
}
.status[data-state="online"] .status-label { color: var(--rune); }

.status[data-state="offline"] .status-dot { background: #5c6455; }
.status[data-state="offline"] .status-label { color: var(--ink); }

.status[data-state="maintenance"] { border-color: rgba(157, 134, 54, 0.5); }
.status[data-state="maintenance"] .status-dot { background: var(--gold); }
.status[data-state="maintenance"] .status-label { color: var(--gold-lit); }

.status[data-state="unknown"] { opacity: 0.72; }

/* The one piece of non-user-triggered motion on the site, and only when the
   realm is actually up — it is the thing worth drawing the eye to. */
@keyframes ember {
  0%, 100% { box-shadow: 0 0 6px  rgba(69, 194, 47, 0.55); }
  50%      { box-shadow: 0 0 13px rgba(69, 194, 47, 1); }
}

@media (prefers-reduced-motion: reduce) {
  .status[data-state="online"] .status-dot { animation: none; }
  * { transition: none !important; }
}

/* Compact variant that sits in the masthead on every page */
.status.is-compact {
  padding: 0.3rem 0.7rem;
  font-size: 0.9375rem;
}
.status.is-compact .status-dot { width: 7px; height: 7px; }

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: Alegreya, Georgia, serif;
  font-size: 1.0625rem;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-lit);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.btn:hover {
  background: rgba(157, 134, 54, 0.12);
  border-color: var(--gold-lit);
  color: var(--ink);
}

.btn-primary {
  border-color: var(--flame);
  color: var(--rune);
}
.btn-primary:hover {
  background: rgba(69, 194, 47, 0.12);
  border-color: var(--rune);
  color: var(--ink);
}

/* --- facts table --------------------------------------------------------- */

.facts {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0;
  font-size: 1.0625rem;
}

.facts th, .facts td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 1rem 0.65rem 0;
  border-bottom: 1px solid var(--iron);
}

.facts th {
  font-weight: 400;
  color: var(--gold);
  white-space: nowrap;
  width: 11rem;
}

.facts td { color: var(--ink); }

@media (max-width: 34rem) {
  .facts, .facts tbody, .facts tr, .facts th, .facts td { display: block; }
  .facts th {
    width: auto;
    border-bottom: none;
    padding-bottom: 0.1rem;
    font-size: 0.9375rem;
  }
  .facts td { padding-top: 0; }
}

/* --- news ---------------------------------------------------------------- */

.news-list { list-style: none; margin: 0; padding: 0; }

.news-item {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--iron);
  max-width: var(--measure);
}
.news-item:first-child { padding-top: 0.25rem; }
.news-item:last-child { border-bottom: none; }

.news-date {
  font-size: 0.9375rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.15rem;
}

.news-title {
  font-family: "Pirata One", Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.news-body { margin: 0; color: var(--ash); }

/* --- install page: platform switch --------------------------------------- */

.platform-switch {
  display: flex;
  gap: 0;
  margin: 0 0 2rem;
  border: 1px solid var(--iron);
  width: fit-content;
}

.platform-switch button {
  font-family: Alegreya, Georgia, serif;
  font-size: 1.0625rem;
  padding: 0.55rem 1.4rem;
  background: transparent;
  color: var(--ash);
  border: none;
  cursor: pointer;
}
.platform-switch button + button { border-left: 1px solid var(--iron); }
.platform-switch button:hover { color: var(--ink); }
.platform-switch button[aria-selected="true"] {
  background: var(--raise);
  color: var(--rune);
  box-shadow: inset 0 -2px 0 var(--flame);
}

.panel[hidden] { display: none; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.4rem 2.9rem;
  max-width: var(--measure);
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold-lit);
  font-size: 0.9375rem;
  line-height: 1;
}

.steps strong { color: var(--ink); font-weight: 700; }

.download-card {
  border: 1px solid var(--iron);
  background: var(--raise);
  padding: 1.4rem 1.5rem;
  max-width: var(--measure);
}

.download-card .btn { margin-bottom: 0.9rem; }

.hash {
  font-size: 0.875rem;
  color: var(--ash);
  word-break: break-all;
  line-height: 1.45;
  margin: 0;
}

.note {
  border-left: 2px solid var(--gold);
  padding: 0.15rem 0 0.15rem 1rem;
  margin: 1.5rem 0;
  color: var(--ash);
  max-width: var(--measure);
}
.note strong { color: var(--gold-lit); font-weight: 400; }

/* --- FAQ ----------------------------------------------------------------- */

.faq-item {
  border-bottom: 1px solid var(--iron);
  max-width: var(--measure);
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 0;
  color: var(--ink);
  font-size: 1.125rem;
  list-style: none;
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: "+";
  color: var(--gold);
  flex: none;
  font-size: 1.1rem;
  line-height: 1.4;
}
.faq-item[open] summary::before { content: "\2013"; color: var(--flame); }
.faq-item summary:hover { color: var(--rune); }

.faq-answer { padding: 0 0 1.1rem 1.85rem; }
.faq-answer p:last-child { margin-bottom: 0; }

kbd {
  font-family: inherit;
  border: 1px solid var(--iron);
  background: var(--raise);
  padding: 0.05em 0.4em;
  color: var(--ink);
  font-size: 0.95em;
}

code {
  font-family: inherit;
  color: var(--gold-lit);
  background: var(--raise);
  padding: 0.05em 0.35em;
  border: 1px solid var(--iron);
  font-size: 0.95em;
  word-break: break-word;
}

/* --- footer -------------------------------------------------------------- */

.colophon {
  margin-top: 3rem;
  padding: 2.25rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--iron);
}

.colophon-inner { max-width: 46rem; margin: 0 auto; }

.colophon p { font-size: 0.9375rem; color: var(--ash); line-height: 1.55; }
.colophon p:last-child { margin-bottom: 0; }

/* --- section watermark ---------------------------------------------------- */

.section--sigil::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20rem;
  height: 20rem;
  background: url("art/watermark.png") center / contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}
.section--sigil > * { position: relative; z-index: 1; }

@media (max-width: 52rem) {
  .section--sigil::after { display: none; }
}
