/* Ninth Lantern. Night colours, one warm light. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-opsz.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #0b0d12;
  --night: #10141c;
  --night-2: #161b25;
  --night-3: #1e2430;
  --line: rgba(236, 222, 196, 0.1);
  --line-strong: rgba(236, 222, 196, 0.2);
  --text: #ece4d6;
  --muted: #a69d8e;
  --faint: #6f6a62;
  --lantern: #f5b75e;
  --flame: #ffd98f;
  --ember: #f08a3c;
  --dusk: #2a3550;

  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --section: clamp(64px, 9vw, 120px);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--flame); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: #fff1cf; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(245, 183, 94, 0.35); color: #fff; }

h1, h2, h3 { font-family: var(--display); font-weight: 560; line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 0.5em; font-variation-settings: "opsz" 96; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); font-weight: 600; letter-spacing: -0.012em; font-variation-settings: "opsz" 72; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; font-variation-settings: "opsz" 36; line-height: 1.2; }
p { margin: 0 0 1em; }
p, li, dd { text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.92em; }
.small { font-size: 0.875rem; }
.muted { color: var(--muted); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--lantern); color: var(--ink); border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font: 600 0.78rem/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lantern);
  margin: 0 0 1rem;
}
.lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: #d9d0c1; max-width: 40em; line-height: 1.6; }

/* ---- header ---- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 13, 18, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: #fff; }
.brand .mark { width: 22px; height: auto; color: var(--lantern); filter: drop-shadow(0 0 10px rgba(245, 183, 94, 0.45)); }
.brand-word { font: 600 1.2rem/1 var(--display); letter-spacing: 0.01em; font-variation-settings: "opsz" 48; white-space: nowrap; }
.site-nav { display: flex; gap: clamp(4px, 1.6vw, 22px); }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.97rem;
  padding: 8px 6px; border-radius: 6px; position: relative;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--lantern); box-shadow: 0 0 10px var(--lantern);
}

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

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }
.actions.center { justify-content: center; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  background: linear-gradient(180deg, var(--flame), var(--lantern) 60%, #e9a04b);
  color: #1c1205; font-weight: 650; font-size: 0.98rem; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255, 217, 143, 0.4) inset, 0 8px 30px -10px rgba(245, 160, 70, 0.7);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.button:hover { color: #1c1205; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 230, 180, 0.6) inset, 0 12px 36px -10px rgba(245, 160, 70, 0.9); }
.button.ghost { background: rgba(236, 222, 196, 0.04); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.button.ghost:hover { color: #fff; background: rgba(236, 222, 196, 0.08); box-shadow: 0 0 0 1px rgba(245, 183, 94, 0.55) inset; }
.more { display: inline-block; margin-top: auto; font-weight: 600; text-decoration: none; }
.more::after { content: " →"; transition: margin 0.15s; }
.more:hover::after { margin-left: 4px; }

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

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92vh, 900px);
  display: flex; align-items: flex-end;
  padding: clamp(260px, 30vw, 340px) 0 clamp(56px, 9vw, 112px);
  background: radial-gradient(120% 80% at 50% 0%, #182035 0%, #0f1422 45%, var(--ink) 100%);
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; color: #8d8577; }
.sky .lantern { transform-box: view-box; animation: sway var(--sway) ease-in-out var(--delay) infinite alternate; }
.sky .lantern.lit { color: #f4c47c; }
.sky .glow { animation: flicker 5.5s steps(1, end) infinite, breathe 7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.sky .ridge.far { fill: #121827; }
.sky .ridge.near { fill: var(--ink); }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%; z-index: -1;
  background: linear-gradient(transparent, rgba(11, 13, 18, 0.85));
  pointer-events: none;
}
.hero-copy { position: relative; }
.hero h1 { max-width: 11em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5); }
.hero .lede { max-width: 34em; }
@keyframes sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@keyframes breathe { from { transform: scale(0.96); } to { transform: scale(1.04); } }
@keyframes flicker { 0% { opacity: 1; } 31% { opacity: 0.86; } 33% { opacity: 1; } 62% { opacity: 0.92; } 64% { opacity: 0.8; } 66% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .sky .lantern, .sky .glow { animation: none; }
  .button, .more::after { transition: none; }
}

/* ---- sections ---- */

.section { padding: var(--section) 0; position: relative; }
.section.tight { padding-top: clamp(40px, 5vw, 64px); }
.section.alt { background: linear-gradient(180deg, var(--night) 0%, #0e1119 100%); border-block: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; }

.page-head {
  padding: clamp(64px, 10vw, 128px) 0 clamp(24px, 4vw, 48px);
  background: radial-gradient(70% 120% at 85% -10%, rgba(245, 183, 94, 0.13), transparent 60%), radial-gradient(90% 120% at 10% -30%, #182035, transparent 70%);
}
.page-head h1 { max-width: 14em; }
.page-head.lost { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.page-head.lost .wrap { display: flex; flex-direction: column; align-items: center; }
.page-head.lost .lede { margin-inline: auto; }

.frame { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--night-2); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.frame figcaption { padding: 12px 16px; font-size: 0.86rem; color: var(--muted); border-top: 1px solid var(--line); }

.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature-copy p:not(.eyebrow) { color: #d6cdbe; }

.cards { display: grid; gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  display: flex; flex-direction: column; gap: 4px;
  padding: clamp(24px, 3vw, 32px); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--night-2), var(--night));
  box-shadow: 0 0 0 1px var(--line);
}
.card p { color: var(--muted); }
.card h3 { margin-bottom: 0.4em; }
.card-num { font: italic 500 1.05rem/1 var(--display); color: var(--lantern); margin-bottom: 18px; }
.card.unlit .mark { color: var(--faint); margin-bottom: 16px; }
.mark.big { width: 34px; height: auto; }
.contact-line { margin-top: auto; margin-bottom: 0; font-weight: 600; color: var(--text) !important; word-break: break-word; }

.kiln-band { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.section.alt .numbers { grid-template-columns: repeat(3, 1fr); }
.numbers div { background: var(--night); padding: 24px 22px; }
.section.alt .numbers div { background: var(--ink); }
.numbers dt { font: 600 clamp(1.5rem, 2.6vw, 2.1rem)/1.1 var(--display); color: var(--flame); font-variant-numeric: lining-nums; margin-bottom: 8px; white-space: nowrap; }
.numbers dd { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.45; }
.kiln-band .small { margin-top: 12px; }

.closing { text-align: center; }
.closing-inner { display: flex; flex-direction: column; align-items: center; }
.closing .mark { width: 40px; height: auto; color: var(--lantern); margin-bottom: 24px; filter: drop-shadow(0 0 24px rgba(245, 183, 94, 0.6)); }
.closing p { color: var(--muted); }

/* ---- games ---- */

.flagship { border-radius: calc(var(--radius) + 4px); overflow: hidden; background: var(--night); box-shadow: 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.flagship-media { border-radius: 0; box-shadow: none; position: relative; }
.flagship-media::after { content: ""; position: absolute; inset: 35% 0 0 0; background: linear-gradient(rgba(16, 20, 28, 0), rgba(16, 20, 28, 0.75) 55%, var(--night)); }
.flagship-body { padding: 0 clamp(20px, 4vw, 48px) clamp(28px, 4vw, 48px); margin-top: clamp(-90px, -7vw, -40px); position: relative; }
.flagship-title { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.flagship-title h2 { margin: 0; font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.flagship-title .eyebrow { margin-bottom: 6px; }
.flagship-title img { width: 40px; flex: none; filter: drop-shadow(0 0 14px rgba(241, 203, 114, 0.4)); }
.big { font: 500 clamp(1.25rem, 2vw, 1.5rem)/1.4 var(--display); color: var(--text); font-variation-settings: "opsz" 36; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.split.wide-left { grid-template-columns: 1.6fr 1fr; }
.split > div > p { color: #d6cdbe; }

.spec { margin: 0; display: grid; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec dt { font: 600 0.76rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 0.15em; }
.spec dd { margin: 0; }
.spec.compact div { grid-template-columns: 6.5em 1fr; padding: 10px 0; font-size: 0.95rem; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ---- tech ---- */

.prose { max-width: 42em; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child, .prose .eyebrow + h2 { margin-top: 0; }
.prose p { color: #d6cdbe; }
.note {
  padding: 26px 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(245, 183, 94, 0.07), rgba(245, 183, 94, 0.02));
  box-shadow: 0 0 0 1px rgba(245, 183, 94, 0.22);
}
.note h3 { font-size: 1.15rem; color: var(--flame); }
.note ul { margin: 0; padding-left: 1.1em; color: #d6cdbe; }
.note li { margin-bottom: 0.55em; }
.note li::marker { color: var(--lantern); }
.note p { color: #d6cdbe; }

.stack { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 6px; }
.stack li {
  display: grid; grid-template-columns: 8em 1fr auto; gap: 20px; align-items: center;
  padding: 16px 22px; border-radius: 10px; background: var(--ink); box-shadow: 0 0 0 1px var(--line);
}
.stack li:nth-child(3) { box-shadow: 0 0 0 1px rgba(245, 183, 94, 0.45), 0 0 30px -12px rgba(245, 183, 94, 0.5); }
.stack code { color: var(--flame); font-weight: 600; }
.stack span { color: #d6cdbe; }
.stack em { font: normal 500 0.85rem/1.3 var(--mono); color: var(--muted); text-align: right; }
.api-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.api-strip > div { padding: 22px 24px; border-radius: var(--radius); background: var(--night-2); box-shadow: 0 0 0 1px var(--line); }
.api-strip h3 { font-size: 1.15rem; }
.api-strip p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.feature-card { background: var(--ink); padding: 28px 26px; transition: background 0.2s; }
.feature-card:hover { background: var(--night); }
.feature-card h3 { font-size: 1.2rem; }
.feature-card p:last-child { margin: 0; color: var(--muted); font-size: 0.96rem; }
.tag { display: inline-block; font: 600 0.7rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--lantern); padding: 6px 8px; border-radius: 6px; background: rgba(245, 183, 94, 0.09); margin-bottom: 14px; }

/* ---- press, about, legal ---- */

.quote { font: 400 1.12rem/1.6 var(--display); font-variation-settings: "opsz" 24; color: var(--text) !important; padding-left: 18px; border-left: 2px solid var(--lantern); }
.logo-box {
  display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 240px;
  border-radius: var(--radius); background: radial-gradient(circle at 50% 40%, rgba(245, 183, 94, 0.14), transparent 60%), var(--ink);
  box-shadow: 0 0 0 1px var(--line);
}
.logo-box .mark { width: 54px; color: var(--lantern); filter: drop-shadow(0 0 18px rgba(245, 183, 94, 0.55)); }
.logo-box .brand-word { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.todo {
  display: inline-block; padding: 0 8px; border-radius: 6px;
  font: 600 0.82em/1.6 var(--mono); color: #ffcf9a;
  background: repeating-linear-gradient(-45deg, rgba(240, 138, 60, 0.16) 0 6px, rgba(240, 138, 60, 0.08) 6px 12px);
  box-shadow: 0 0 0 1px rgba(240, 138, 60, 0.45);
}
.draft-note { padding: 12px 16px; border-radius: 10px; background: rgba(240, 138, 60, 0.1); box-shadow: 0 0 0 1px rgba(240, 138, 60, 0.35); color: #ffd9b0 !important; font-size: 0.95rem; }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }

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

.site-footer { border-top: 1px solid var(--line); background: #090b0f; padding: 56px 0 28px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--muted); max-width: 26em; margin-top: 14px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav h2 { font: 600 0.74rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 0 0 6px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.85rem; }
.footer-base p { margin: 0; }

/* ---- smaller screens ---- */

@media (max-width: 980px) {
  .feature, .kiln-band, .split, .split.wide-left { grid-template-columns: 1fr; }
  .cards.three, .features, .api-strip { grid-template-columns: 1fr 1fr; }
  .section.alt .numbers { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .header-row { min-height: 60px; flex-wrap: wrap; row-gap: 0; padding-block: 8px; }
  .site-nav { width: 100%; justify-content: space-between; margin: 0 -6px; }
  .site-nav a { font-size: 0.95rem; }
  .hero { min-height: 0; padding-top: 250px; }
  .sky { inset: 0 0 auto auto; width: 210%; height: auto; }
  .sky .ridge { display: none; }
  .cards.three, .features, .api-strip, .gallery, .numbers, .section.alt .numbers { grid-template-columns: 1fr; }
  .numbers dt { white-space: normal; }
  .spec div { grid-template-columns: 1fr; gap: 2px; }
  .stack li { grid-template-columns: 1fr; gap: 4px; }
  .stack em { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .actions .button { flex: 1 1 auto; justify-content: center; }
}
