/* Kryptonix Games — luminous tech-editorial portal
   Self-hosted variable fonts. Cool paper, ink typography, krypton lumen accent. */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #071016;
  --paper-2: #0e1a22;
  --ink: #e8f4f2;
  --ink-soft: #b0c7c8;
  --mute: #7f9a9c;
  --rule: #1e333c;
  --rule-strong: #9ef2d8;
  --lumen: #9ef01a;
  --lumen-ink: #071016;
  --tide: #2ee6c5;
  --reserved: #7fd3c8;
  --danger: #ff8a9a;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --max: 1120px;
  --wide: 1280px;
}

* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1000px 520px at 8% -10%, rgba(46, 230, 197, 0.14), transparent 55%),
    radial-gradient(800px 480px at 100% 0%, rgba(158, 240, 26, 0.08), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.011em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tide); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }

/* Masthead — typographic journal header, not a dark app bar */
.mast {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, black);
  backdrop-filter: saturate(1.15) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.mast::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--lumen), #7fd3c0 40%, var(--tide));
}
.mast-in {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.25rem;
  align-items: end;
  padding: 0.85rem 0 0.75rem;
}
.wordmark {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.wordmark .kicker {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--mute);
}
.wordmark strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.wordmark strong span {
  font-style: normal;
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  margin-left: 0.55rem;
  vertical-align: 0.35em;
  color: var(--tide);
}
.mast nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  align-items: baseline;
  font-size: 0.86rem;
  font-weight: 650;
}
.mast nav a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
}
.mast nav a:hover, .mast nav a.on {
  color: var(--ink);
  border-bottom-color: var(--lumen);
}
.ledger {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--lumen-ink);
  background: var(--lumen);
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Hero — editorial spread */
.issue {
  padding: 3.2rem 0 2.2rem;
  border-bottom: 1px solid var(--rule);
}
.issue-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: end;
}
.issue .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--tide);
  margin: 0 0 0.85rem;
}
.issue h1 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(2.6rem, 6.4vw, 5.1rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 0 0 1.1rem;
}
.issue h1 em { font-style: italic; font-weight: 450; }
.dek {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0 0 1.4rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem 1.2rem; align-items: center; }
.issue figure { margin: 0; }
.still {
  position: relative;
  overflow: hidden;
  background: #102028;
  aspect-ratio: 16/10;
}
.still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.still:hover img { transform: scale(1.04); }
.still figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.55rem;
  color: var(--mute);
}

/* Text links as primary actions (not fat buttons under covers) */
.text-go {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--lumen), var(--lumen)) 0 100% / 100% 0.28em no-repeat;
  padding-bottom: 0.05em;
}
.text-go:hover { color: var(--tide); }
.text-quiet {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.text-quiet:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Section heads */
.band { padding: 2.6rem 0; }
.band + .band, .folio-band { border-top: 1px solid var(--rule); }
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.sec-head h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0;
}
.sec-head p { margin: 0; color: var(--mute); font-size: 0.9rem; }

/* Open-now photo essay (3 free games) — not a card grid */
.open-now {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.1rem;
}
.open-now a { text-decoration: none; color: inherit; }
.open-now article:first-child { grid-row: span 1; }
.open-now .still { margin-bottom: 0.7rem; }
.open-now h3 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.2rem;
}
.open-now .meta { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tide); font-weight: 700; }

/* Folio index — horizontal editorial entries, not cover-tile + button */
.folio { display: flex; flex-direction: column; }
.folio-row {
  display: grid;
  grid-template-columns: 6.5rem 14rem 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.05rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.folio-row:last-child { border-bottom: 1px solid var(--rule); }
.folio-row .idx {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  color: var(--mute);
}
.folio-row .thumb {
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #102028;
}
.folio-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.folio-row:hover .thumb img { transform: scale(1.05); }
.folio-row h3 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.15rem;
}
.folio-row .blurb { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.folio-row .kicker {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--tide);
  margin-bottom: 0.2rem;
}
.folio-row .act { text-align: right; white-space: nowrap; }
.folio-row.is-reserved .idx { color: var(--reserved); }
.folio-row.is-reserved h3 { color: var(--ink); }
.folio-row.is-reserved .act .text-go {
  background-image: linear-gradient(color-mix(in srgb, var(--reserved) 30%, white), color-mix(in srgb, var(--reserved) 30%, white));
}

/* Shop ledger */
.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table th, .ledger-table td {
  text-align: left;
  padding: 0.85rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
.ledger-table th {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--mute);
}
.ledger-table .price {
  font-family: var(--serif);
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  font-weight: 560;
}
.ledger-table .coins { font-weight: 700; }
.ledger-table .bonus { color: var(--tide); font-size: 0.85rem; }
.ledger-table tr:hover td { background: color-mix(in srgb, var(--lumen) 12%, transparent); }
.note {
  background: var(--paper-2);
  border-left: 3px solid var(--lumen);
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
}
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 1.6rem 0; }
.facts h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}
.facts p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

.custom-box {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--rule);
}
.custom-box label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.underline-input {
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  padding: 0.2rem 0;
  width: min(16rem, 100%);
  color: inherit;
}
.underline-input:focus { outline: none; border-bottom-color: var(--tide); }

/* Forms / checkout */
form fieldset {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0 0 1.2rem;
  padding: 1rem 0 0;
}
form legend {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  padding: 0 0.4rem 0 0;
}
form label { display: block; font-weight: 650; margin: 0.7rem 0 0.25rem; }
form input[type="text"], form input[type="email"], form input[type="number"], form select {
  width: min(28rem, 100%);
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--rule);
  background: #0a151c;
  color: inherit;
}
.chk { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; margin: 0.7rem 0; }
.chk input { margin-top: 0.3rem; }
table.sum { width: 100%; border-collapse: collapse; }
table.sum th, table.sum td { text-align: left; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
table.sum th { width: 12rem; color: var(--mute); font-weight: 650; font-size: 0.88rem; }
table.sum .tot th, table.sum .tot td {
  font-family: var(--serif);
  font-size: 1.25rem;
  border-bottom: 0;
  padding-top: 0.8rem;
}
.err {
  background: #2a1518;
  color: var(--danger);
  padding: 0.7rem 0.9rem;
  margin: 0.8rem 0;
}
button, .btn {
  font-family: var(--sans);
  font-weight: 750;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--tide); color: white; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.small, .lead-s { font-size: 0.9rem; color: var(--ink-soft); }

/* Play stage / lock folio */
.pagehead { padding: 2rem 0 0.4rem; }
.pagehead h1 {
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  margin: 0.2rem 0 0.5rem;
}
.crumb { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); margin: 0; }
.stage {
  background: #0b121c;
  aspect-ratio: 16/10;
  margin: 1rem 0;
}
.stage iframe { width: 100%; height: 100%; border: 0; display: block; background: #0b121c; }
.lockfolio {
  margin: 1.2rem 0 1.6rem;
  padding: 1.6rem 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--reserved) 22%, transparent);
}
.lockfolio h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}
.play-meta {
  display: grid;
  grid-template-columns: 1fr 16rem;
  gap: 2rem;
  margin-top: 1.6rem;
}
.play-meta img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.pn { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }

/* Prose / legal */
.prose { padding-bottom: 3rem; }
.prose h1 { font-family: var(--serif); letter-spacing: -0.04em; }
.prose h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  margin: 1.6rem 0 0.5rem;
}
.prose p, .prose li { max-width: 42rem; }
.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0; }
.col-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }

/* Footer */
.colophon {
  border-top: 3px solid var(--ink);
  margin-top: 2rem;
  padding: 2rem 0 2.4rem;
  background: #122033;
  color: #e8eef3;
}
.colophon a { color: var(--lumen); }
.colophon a:hover { color: white; }
.coli {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}
.coli strong { display: block; font-family: var(--serif); font-style: italic; font-size: 1.15rem; margin-bottom: 0.4rem; font-weight: 500; }
.copy { font-size: 0.8rem; color: #b7c2cc; border-top: 1px solid #2a3a4d; padding-top: 0.9rem; }

.cookiebar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(18, 32, 51, 0.25);
}
.cookiebar a { color: var(--lumen); }
.cookiebar .btn { background: var(--lumen); color: var(--lumen-ink); }
.cookiebar[hidden] { display: none !important; }

@media (max-width: 900px) {
  .issue-grid, .open-now, .play-meta, .facts, .coli, .contact, .folio-row { grid-template-columns: 1fr; }
  .mast-in { grid-template-columns: 1fr auto; }
  .mast nav { grid-column: 1 / -1; }
  .folio-row .idx { display: none; }
  .folio-row .act { text-align: left; }
  html { font-size: 17px; }
}
