/* ------------------------------------------------------------------
   TES4Forever site styles
   Change the colours below to re-theme the whole site.
   ------------------------------------------------------------------ */
:root {
  --bg: #0f1115;
  --bg-alt: #151922;
  --surface: #1b202b;
  --border: #2a3140;
  --text: #e7e9ee;
  --muted: #9aa3b2;
  --accent: #f0602a;        /* main brand colour */
  --accent-hover: #ff8752;
  --accent-text: #1a0904;   /* text on accent buttons */

  --radius: 10px;
  --max: 1100px;
  --narrow: 760px;
  --header-h: 64px;         /* height of the sticky header */
  --notice-h: 0px;          /* height of the disclaimer bar, set by main.js */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

code, pre { font-family: var(--mono); font-size: .9em; }
pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .8em 1em;
  overflow-x: auto;
}

[hidden] { display: none !important; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: var(--narrow); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-text);
  padding: .5em 1em; z-index: 100;
}
.skip-link:focus { left: 1em; top: 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4em;
  padding: .65em 1.2em;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: .35em .85em; font-size: .9rem; }
.btn-large { padding: .85em 1.6em; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 17, 21, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; font-weight: 800; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: .02em; }
.brand span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 1.4em; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--text); }
.site-nav .btn { color: var(--accent-text); background: var(--accent); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--text); }

/* ---------- Background dust (assets/js/particles.js) ----------
   Sits behind all content; z-index -1 keeps it under every section. */
.bg-particles {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 10vh, 110px) 0;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(240, 96, 42, .18), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.5rem); margin-bottom: .25em; }
.eyebrow { color: var(--muted); font-size: .95rem; letter-spacing: .04em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 620px; margin: 0 auto 2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 9vh, 80px) 0; }
.section-intro { margin-top: -.2em; margin-bottom: 1.6em; }

/* ---------- Full-screen sections ----------
   Each section fills at least one screen below the sticky header, with its
   content centred, and scrolling settles on the top of each section. Sections
   with more content than fits simply grow taller. Skipped on very short
   screens (e.g. phones in landscape), where it would only get in the way. */
@media (min-height: 560px) {
  html { scroll-snap-type: y proximity; }
  .hero, .section {
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    display: flex; flex-direction: column; justify-content: center;
    scroll-snap-align: start;
  }
  .hero > .container, .section > .container { width: 100%; }
  .card code { white-space: nowrap; }
  /* The hero shares the first screen with the disclaimer bar, so the snap
     point for the first screen is the top of the page */
  .notice-bar { scroll-snap-align: start; }
  .countdown-bar:not([hidden]) + .notice-bar { scroll-snap-align: none; }
  .countdown-bar { scroll-snap-align: start; }
  .hero {
    scroll-snap-align: none;
    min-height: calc(100vh - var(--header-h) - var(--notice-h));
    min-height: calc(100svh - var(--header-h) - var(--notice-h));
  }
}
.section-alt { background: rgba(21, 25, 34, .8); /* --bg-alt, see-through for the dust */ border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Feature cards ----------
   Same shell as the video cards below: the title is a short accent-lit "screen"
   with a faded number, and the text sits underneath. */
.grid.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: feature; }
.card { counter-increment: feature; }
.card h3 {
  display: flex; align-items: center; gap: .7em;
  margin: 0; padding: 16px 70px 16px 18px; min-height: 64px;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .55);
}
.card h3::before {
  content: ""; flex: none; width: 4px; height: 1.2em; border-radius: 2px;
  background: var(--accent);
}
.card h3::after {
  content: counter(feature, decimal-leading-zero);
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 2.6rem; font-weight: 800; line-height: 1;
  color: rgba(240, 96, 42, .13);
  pointer-events: none;
}
.card p { padding: 14px 18px 18px; font-size: .95rem; line-height: 1.55; color: var(--muted); margin: 0; }

/* ---------- Showcase videos ----------
   Each .video is a 16:9 box holding a link to YouTube. main.js turns it into
   a play button and swaps in the YouTube player only when it is pressed. */
.showcase-more { margin: 28px 0 0; text-align: center; }
.grid.videos { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.videos { grid-template-columns: repeat(2, 1fr); } }
/* Six videos: three across on wide screens so they fit two rows */
@media (min-width: 1000px) { .grid.videos { grid-template-columns: repeat(3, 1fr); } }
.grid.videos { counter-reset: video; }
.video-card { counter-increment: video; }
.video-card, .card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.video-card:hover, .video-card:focus-within,
.card:hover, .card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(240, 96, 42, .45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45), 0 0 40px rgba(240, 96, 42, .12);
}
.video-card figcaption {
  display: flex; align-items: center; gap: .7em;
  padding: 14px 18px 16px;
}
.video-card figcaption h3 { margin: 0; }
.video-card figcaption::before {
  content: ""; width: 4px; height: 1.2em; border-radius: 2px;
  background: var(--accent);
}
/* The screen: an accent glow, faint scanlines and a big faded number, no game imagery */
.video { aspect-ratio: 16 / 9; }
.video, .card h3 {
  position: relative;
  background:
    radial-gradient(circle at 50% 55%, rgba(240, 96, 42, .16), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #1d2330, #0c0e13);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.video::before {
  content: counter(video, decimal-leading-zero);
  position: absolute; right: 16px; bottom: 4px;
  font-size: clamp(3.5rem, 9vw, 5.5rem); font-weight: 800; line-height: 1;
  color: rgba(240, 96, 42, .13);
  pointer-events: none;
}
.video::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, .65);
  pointer-events: none;
}
.video iframe { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; }
.video-link, .video-play {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 16px; text-align: center;
  color: var(--text); font: inherit; text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.video-play-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  box-shadow: 0 0 0 8px rgba(240, 96, 42, .14), 0 10px 28px rgba(0, 0, 0, .55);
  transition: transform .25s, background .15s, box-shadow .25s;
}
.video-play-icon::after {
  content: ""; margin-left: 6px;
  border-style: solid; border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent var(--accent-text);
}
.video-play:hover .video-play-icon, .video-play:focus-visible .video-play-icon {
  background: var(--accent-hover);
  transform: scale(1.08);
  box-shadow: 0 0 0 14px rgba(240, 96, 42, .12), 0 12px 32px rgba(0, 0, 0, .6);
}
.video-play-note {
  position: absolute; top: 14px; left: 14px;
  padding: .3em .75em;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--border); border-radius: 999px;
}
/* Phones: shrink the play button and label so they don't collide */
@media (max-width: 480px) {
  .video-play-icon { width: 56px; height: 56px; box-shadow: 0 0 0 6px rgba(240, 96, 42, .14), 0 8px 22px rgba(0, 0, 0, .55); }
  .video-play-icon::after { margin-left: 4px; border-width: 10px 0 10px 16px; }
  .video-play-note { top: 10px; left: 10px; font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .video-card, .card, .video-play-icon { transition: none; }
  .video-card:hover, .video-card:focus-within,
  .card:hover, .card:focus-within { transform: none; }
}

/* Shorter laptop screens: tighten spacing so most sections still fit one screen */
@media (min-width: 701px) and (max-height: 820px) {
  body { font-size: 16px; }
  .section { padding: 32px 0; }
  h2 { margin-bottom: .45em; }
  .section-intro { margin-bottom: 1.1em; }
  .grid.cards { gap: 12px; }
  .card h3 { font-size: 1.05rem; min-height: 0; padding: 11px 64px 11px 16px; }
  .card h3::after { font-size: 2.1rem; }
  .card p { padding: 10px 16px 13px; font-size: .9rem; line-height: 1.5; }
  .status-list li { padding: .35em 0; }
  .checklist li { padding: .35em 0 .35em 2em; }
  .checklist li::before { top: .35em; }
  details { margin-bottom: 8px; }
  summary { padding: 12px 0; }
}

/* ---------- Download ---------- */
.download-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.download-meta dl {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 0 0 20px;
}
.download-meta dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.download-meta dd { margin: 0; font-weight: 600; word-break: break-word; }
.checksum {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 20px;
}
.checksum-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.checksum code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .8rem; }
.download-box .small { margin: 14px 0 0; text-align: center; }

/* ---------- Requirements ---------- */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding: .5em 0 .5em 2em; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: .5em;
  color: var(--accent); font-weight: 700;
}

/* ---------- Install steps ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 32px; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 40px;
  border-left: 2px solid var(--border);
  margin-left: 20px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -21px; top: -4px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-weight: 800;
}
.steps p { color: var(--muted); }

.callout {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
}
.callout p { margin: .4em 0 0; color: var(--muted); }

/* ---------- FAQ ---------- */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 20px;
  margin-bottom: 10px;
}
summary {
  cursor: pointer; font-weight: 600; padding: 14px 0;
  list-style: none; position: relative; padding-right: 30px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 1.4rem; font-weight: 400;
}
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 16px; margin: 0; }


/* ---------- Disclaimer banner ---------- */
.notice-bar {
  background: #2c130b;
  border-bottom: 1px solid #5c2414;
  color: #f8d3c3;
  font-size: .88rem;
  line-height: 1.5;
  padding: 8px 0;
  text-align: center;
}
.notice-bar a { color: var(--accent-hover); margin-left: .3em; }

/* ---------- Next-release countdown ---------- */
.countdown-bar {
  background: linear-gradient(90deg, #1b202b, #2c130b 50%, #1b202b);
  border-bottom: 1px solid #5c2414;
  font-size: .95rem;
  padding: 8px 0;
  text-align: center;
}
.countdown-bar .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 16px;
}
.countdown-label strong { color: var(--accent); }
.countdown-timer { display: inline-flex; gap: 10px; font-variant-numeric: tabular-nums; }
.countdown-unit { color: var(--muted); font-size: .82rem; }
.countdown-unit b {
  color: var(--text); font-family: var(--mono); font-size: 1.05rem;
  margin-right: 2px;
}
.countdown-when { color: var(--muted); font-size: .85rem; }
.countdown-bar a { color: var(--accent-hover); font-size: .88rem; }

.hero-note { color: var(--muted); font-size: .88rem; max-width: 560px; margin: 2em auto 0; }
.center { text-align: center; }
.subhead { margin-top: 8px; }

/* ---------- Status ---------- */
.status-list { list-style: none; padding: 0; margin: 0 0 1em; }
.status-list li {
  display: flex; align-items: baseline; gap: 12px;
  padding: .6em 0; border-bottom: 1px solid var(--border);
}
.tag {
  flex: none; width: 112px; text-align: center; white-space: nowrap;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: .2em .5em; border-radius: 999px; border: 1px solid;
}
.tag-done { color: #7fd69a; border-color: #2f6b43; background: #15281c; }
.tag-progress { color: var(--accent); border-color: #7a2f16; background: #2c130b; }
.tag-started { color: #8fb8ff; border-color: #2d4a7a; background: #141e30; }
.tag-todo { color: var(--muted); border-color: var(--border); background: transparent; }

/* ---------- Callout variants ---------- */
.callout-strong { margin-bottom: 24px; background: #26120c; }
.callout-strong p { color: #e2c6bb; }

/* ---------- Support ---------- */
.btn-kofi { background: #72a4f2; color: #0d1320; }
.btn-kofi:hover { background: #8fb8ff; color: #0d1320; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #7983f5; color: #fff; }
.community { margin-top: 2.5em; padding-top: 2em; border-top: 1px solid var(--border); }
.support-note { max-width: 520px; margin: 1.4em auto 0; }

/* ---------- Download terms ---------- */
.download-terms { color: var(--muted); margin: 14px 0 0; }

/* ---------- Keys ---------- */
kbd {
  display: inline-block; min-width: 1.7em; text-align: center;
  font-family: var(--mono); font-size: .8rem;
  padding: .1em .45em; border-radius: 5px;
  background: var(--bg); border: 1px solid var(--border); border-bottom-width: 2px;
}
pre .os {
  display: inline-block; min-width: 5.5em;
  color: var(--accent); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
  user-select: none;
}
.steps + .callout { margin-bottom: 16px; }
details.build { margin-top: 8px; }
details.build pre { margin-bottom: 1em; }
details.build p { padding-bottom: 0; margin-bottom: 1em; }

/* ---------- Legal ---------- */
.legal h3 { margin-top: 1.8em; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .4em; }
.legal p, .legal li { color: #c9ced8; }
.legal .caps { text-transform: uppercase; font-size: .82rem; letter-spacing: .02em; color: var(--muted); }

.footer-disclaimer { margin: 18px 0 0; font-size: .8rem; line-height: 1.55; color: #7d8594; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2em; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.notfound h1 { font-size: 4rem; margin: 0; color: var(--accent); }

/* ---------- Mobile ---------- */
@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 12px; }
  .section { padding: 48px 0; }
  .download-box { padding: 20px; }
  .status-list li { flex-direction: column; gap: 4px; }
}

/* ---------- Mods ---------- */
#mods .callout { margin-bottom: 12px; }

/* ---------- What's new ----------
   Full width with the list in two columns on wide screens, so a long
   release still fits one screen; the intro keeps a readable line length. */
#new > .container > p { max-width: var(--narrow); }
@media (min-width: 1000px) {
  #new .checklist { columns: 2; column-gap: 40px; }
  #new .checklist li { break-inside: avoid; }
  #new .checklist li:last-child { border-bottom: 1px solid var(--border); }
}
