/* Wicklight · wicklightgames.com · shared stylesheet. Static site, zero JavaScript. */

@font-face {
  font-family: "Marcellus";
  src: url("../fonts/marcellus.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2026;
}
@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2026;
}
@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2026;
}

:root {
  --night: oklch(17% 0.018 220);
  --night-2: oklch(21% 0.02 215);
  --ink: oklch(92% 0.02 90);
  --ink-dim: oklch(70% 0.025 95);
  --flame: oklch(82% 0.12 85);
  --flame-hot: oklch(93% 0.09 95);
  --brass: oklch(62% 0.08 80);
  --line: oklch(32% 0.02 210);
  --shell: 60rem;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--night);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Alegreya", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One soft candle glow, top left, behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(56rem 40rem at 14% -8%, oklch(82% 0.12 85 / 0.08), transparent 62%);
}

::selection { background: var(--flame); color: var(--night); }

a {
  color: var(--flame);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: oklch(82% 0.12 85 / 0.4);
  transition: color 0.18s ease-out, text-decoration-color 0.18s ease-out;
}
a:hover { color: var(--flame-hot); text-decoration-color: currentColor; }

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

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ---------- brand mark ---------- */

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: "Marcellus", serif;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.2em;
}
.brand:hover { color: var(--flame-hot); }
.lit { color: var(--flame); }

/* The flame sits as the dot of the "I" in WICKLIGHT, wherever the wordmark appears. */
.i-mark { position: relative; }
.i-flame {
  position: absolute;
  left: 50%;
  top: -0.17em;
  transform: translateX(-50%);
  width: 0.32em;
  height: auto;
  pointer-events: none;
}

.site-head { padding-block: 1.5rem; border-bottom: 1px solid var(--line); }

/* ---------- index: hero ---------- */

.hero { padding-block: clamp(5.5rem, 16vh, 10rem) clamp(3rem, 8vh, 5.5rem); }

.wordmark {
  margin: 0 0 1.5rem;
  font-family: "Marcellus", serif;
  font-weight: 400;
  font-size: clamp(2.7rem, 7.5vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: 0.075em;
}

/* Each line is sized to always fit the viewport on one row: font-size solves for the
   exact width of that specific sentence (measured in Alegreya), so it never wraps. */
.lede {
  margin: 0;
  line-height: 1.5;
  white-space: nowrap;
}
.lede.line-1 { font-size: clamp(0.8rem, calc((100vw - 2.5rem) / 22.4), 1.4rem); }
.lede.line-2 {
  margin-top: 0.4rem;
  color: var(--ink-dim);
  font-style: italic;
  font-size: clamp(0.8rem, calc((100vw - 2.5rem) / 19.36), 1.4rem);
}

/* ---------- index: game ---------- */

.game { padding-block: clamp(2.5rem, 7vh, 4.5rem); }

.label {
  margin: 0 0 1.7rem;
  font-family: "Marcellus", serif;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--flame);
}

.game-row {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.game-icon {
  width: 100%;
  height: auto;
  border-radius: 22%;
  box-shadow:
    0 0 0 1px oklch(62% 0.08 80 / 0.35),
    0 1.5rem 4rem oklch(0% 0 0 / 0.5),
    0 0 5rem oklch(82% 0.12 85 / 0.14);
}

.game-name {
  margin: -0.3rem 0 0.7rem;
  font-family: "Marcellus", serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.pitch { margin: 0 0 1.6rem; max-width: 52ch; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid oklch(62% 0.08 80 / 0.55);
  border-radius: 999px;
  font-family: "Marcellus", serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--flame);
  box-shadow: 0 0 8px var(--flame);
  flex: none;
}

@media (max-width: 600px) {
  .game-row { grid-template-columns: 1fr; }
  .game-icon { width: 7.5rem; }
}

/* ---------- index: contact / explore columns ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem 3rem;
  margin-top: clamp(2.5rem, 7vh, 4rem);
  padding-block: clamp(2.8rem, 7vh, 4.5rem);
  border-top: 1px solid var(--line);
}

.col-title {
  margin: 0 0 1.1rem;
  font-family: "Marcellus", serif;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--flame);
}

.col p { margin: 0 0 0.55rem; color: var(--ink-dim); }

.col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

a.quiet { color: var(--ink); text-decoration-color: transparent; }
a.quiet:hover { color: var(--flame-hot); text-decoration-color: oklch(82% 0.12 85 / 0.5); }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 1.6rem 2.4rem;
  color: var(--ink-dim);
  font-size: 0.92rem;
}
.site-foot .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.8rem;
  justify-content: space-between;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }

/* ---------- legal pages ---------- */

.legal { padding-block: clamp(3rem, 8vh, 5rem) clamp(4rem, 10vh, 6rem); }

.legal h1 {
  margin: 0 0 0.5rem;
  font-family: "Marcellus", serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.9rem);
  letter-spacing: 0.04em;
  line-height: 1.12;
}

.updated { margin: 0 0 2.8rem; color: var(--ink-dim); font-style: italic; }

.prose { max-width: 68ch; }
.prose h2 {
  margin: 2.7rem 0 0.8rem;
  font-family: "Marcellus", serif;
  font-weight: 400;
  font-size: 1.42rem;
  letter-spacing: 0.05em;
  line-height: 1.25;
}
.prose p, .prose li { line-height: 1.7; }
.prose ul { margin: 0.8rem 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; }
.prose li::marker { color: var(--brass); }
.prose .note { color: var(--ink-dim); }
.prose code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.88em;
  background: oklch(100% 0 0 / 0.07);
  padding: 0.1em 0.35em;
  border-radius: 0.3em;
}

/* ---------- motion (gently, and only if welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .d1 { animation-delay: 0.06s; }
  .d2 { animation-delay: 0.16s; }
  .d3 { animation-delay: 0.26s; }
  .d4 { animation-delay: 0.36s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  .i-flame .sway {
    transform-origin: 50% 92%;
    animation: sway 3.8s ease-in-out infinite alternate;
  }
  @keyframes sway {
    from { transform: rotate(-2.3deg); }
    to { transform: rotate(2.5deg); }
  }
}
