/* Volunteer Code Works: Smoky Mountain dusk palette, firefly-gold accent. */
:root {
  --night: #0f1a2b;
  --ridge-1: #4f6d8f;
  --ridge-2: #3a5574;
  --ridge-3: #2a405c;
  --ridge-4: #1c2c44;
  --haze: #9fb3c8;
  --mist: #dfe8f1;
  --gold: #f4d35e;
  --gold-ink: #6b5310;

  --bg: #f6f8fb;
  --bg-tint: #e9eff6;
  --surface: #ffffff;
  --ink: #13213a;
  --ink-2: #44546b;
  --line: #d5dfea;
  --link: #2c5d8f;
  --focus: #2c7be5;

  --radius: 14px;
  --shadow: 0 1px 2px rgb(15 26 43 / .06), 0 8px 24px rgb(15 26 43 / .07);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1a2b;
    --bg-tint: #13223a;
    --surface: #182943;
    --ink: #e6edf5;
    --ink-2: #a9b8ca;
    --line: #2a3d5a;
    --link: #9cc3ec;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); max-width: 22ch; }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--night); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; }

.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--ink-2); margin-bottom: .75em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: #1d1a0c; border: 0; border-radius: 999px;
  padding: 12px 24px; font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 6px 18px rgb(244 211 94 / .25);
}
.btn:hover { transform: translateY(-1px); background: #f7dc78; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .55); }
.btn-ghost:hover { background: rgb(255 255 255 / .1); }
.btn-small { padding: 9px 16px; font-size: .92rem; }

/* Header + nav */
.site-header { background: var(--night); color: #fff; position: relative; }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { width: 40px; height: 27px; color: #fff; }
.brand-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; letter-spacing: .01em; }
.brand-name b { font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { color: var(--mist); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav-links a:not(.btn):hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #13223a; border-radius: 12px; padding: 8px; box-shadow: 0 16px 40px rgb(0 0 0 / .35);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { display: block; padding: 12px 14px; }
  .nav-links .btn { margin: 8px 6px 6px; }
}

/* Hero: dusk sky over layered Smoky Mountain ridges */
.hero { position: relative; padding: 72px 0 0; overflow: hidden; }
.hero-sky {
  position: absolute; inset: -90px 0 0 0;
  background:
    radial-gradient(60% 50% at 78% 72%, rgb(244 211 94 / .16), transparent 70%),
    linear-gradient(180deg, #0f1a2b 0%, #1b2d4a 38%, #3b5778 70%, #7d93ad 100%);
}
.hero-copy { position: relative; z-index: 2; padding-bottom: 40px; }
.hero .eyebrow { color: var(--haze); }
.hero h1 { font-size: clamp(2.2rem, 1.3rem + 4vw, 4rem); max-width: 18ch; color: #fff; }
.hero h1 span { display: block; font-weight: 500; font-size: .52em; color: var(--mist); margin-top: .5em; max-width: 30ch; line-height: 1.3; }
.lede { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--mist); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.ridges { position: relative; z-index: 1; width: 100%; height: clamp(140px, 18vw, 260px); margin-top: -10px; }
.ridges .r1 { fill: var(--ridge-1); opacity: .65; }
.ridges .r2 { fill: var(--ridge-2); opacity: .85; }
.ridges .r3 { fill: var(--ridge-3); }
.ridges .r4 { fill: var(--bg); }

/* Fireflies (placed by main.js; hidden when motion is reduced) */
.fireflies { position: absolute; inset: 0; pointer-events: none; }
.firefly {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 10px 3px rgb(244 211 94 / .6);
  opacity: 0; animation: glow var(--d, 6s) ease-in-out var(--delay, 0s) infinite, drift var(--dd, 14s) ease-in-out var(--delay, 0s) infinite alternate;
}
@keyframes glow { 0%, 100% { opacity: 0; } 40%, 60% { opacity: .95; } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(var(--dx, 30px), var(--dy, -20px)); } }
@media (prefers-reduced-motion: reduce) { .fireflies { display: none; } }

/* Sections */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-tint { background: var(--bg-tint); }
.section-dusk { background: linear-gradient(180deg, #1c2c44, #0f1a2b); color: var(--mist); }
.section-dusk h2 { color: #fff; }
.section-dusk .eyebrow { color: var(--haze); }

.cards { display: grid; gap: 20px; margin-top: 36px; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card p { color: var(--ink-2); margin: 0; }
.card-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--night); margin-bottom: 18px; }
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Apps */
.apps { display: grid; gap: 24px; margin-top: 36px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.app { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.app-art { aspect-ratio: 5 / 3; display: grid; place-items: end center; }
.app-art svg { width: 100%; height: 100%; }
.app-art-trivia { background: linear-gradient(180deg, #5c7ea6, #9fb3c8); }
.app-art-encore { background: linear-gradient(180deg, #3a2030, #6f2f3d); }
.app-art-next { background: linear-gradient(180deg, #0f1a2b, #3a5574); }
.app-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.app-body p { color: var(--ink-2); }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: .4em; }
.app-head h3 { margin: 0; font-size: 1.4rem; font-weight: 700; }
.tag { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--bg-tint); color: var(--ink-2); white-space: nowrap; }
.tag-fun { background: #e4f1e9; color: #23593d; }
.tag-utility { background: #e3ecf7; color: #234b78; }
@media (prefers-color-scheme: dark) {
  .tag-fun { background: #1f3a2c; color: #a6dcbc; }
  .tag-utility { background: #1e3352; color: #a9c8ee; }
}
.facts { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-size: .85rem; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--ink-2); }
.status { margin-top: auto; margin-bottom: 0; font-weight: 600; color: var(--ink) !important; display: flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.text-link { margin-top: auto; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding: 24px 0 0; border-top: 2px solid var(--line); position: relative; }
.steps li::before { content: "0" counter(step); font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--link); display: block; margin-bottom: 8px; }
.steps p { color: var(--ink-2); margin: 0; }

/* About */
.about { display: grid; gap: 48px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.values li { background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .1); border-radius: 12px; padding: 18px 20px; }
.values b { color: var(--gold); display: block; margin-bottom: 2px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 28px; } }

/* Contact */
.contact { display: grid; gap: 48px; grid-template-columns: 1fr 1.2fr; align-items: start; }
.contact > div p { color: var(--ink-2); max-width: 44ch; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; gap: 24px; } }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.field [aria-invalid="true"] { border-color: #c2412d; }
.form .btn { justify-self: start; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 500; }
.form-status.ok { color: #23774a; }
.form-status.err { color: #c2412d; }
@media (prefers-color-scheme: dark) { .form-status.ok { color: #7fd6a4; } .form-status.err { color: #ff9b8a; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: var(--night); color: var(--haze); padding: 36px 0; font-size: .92rem; }
.site-footer a { color: var(--mist); }
.site-footer .brand { color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-inner p { margin: 0; }

/* Privacy page */
.doc-header { background: var(--night); color: #fff; }
.doc-hero { padding: 40px 0 56px; }
.doc-hero h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); color: #fff; }
.doc-hero p { color: var(--haze); margin: 0; }
.doc { max-width: 760px; }
.doc h2 { font-size: 1.5rem; margin-top: 2em; max-width: none; }
.doc h3 { margin-top: 1.4em; font-weight: 700; font-size: 1.1rem; }
.doc p, .doc li { color: var(--ink-2); }
.doc li { margin-bottom: .4em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 404 page */
.notfound { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(180deg, #0f1a2b, #3b5778); color: var(--mist); text-align: center; }
.notfound h1 { color: #fff; font-size: clamp(2rem, 1.5rem + 3vw, 3.5rem); }
.notfound .eyebrow { color: var(--haze); }
.notfound main { padding: 48px 0; }
