/* Doney Games — site styles.
   One family (Archivo): Expanded width for headlines, normal width for reading.
   Signature: the logo's rising diagonal (about 49° from horizontal), used to cut the hero. */

:root {
  --midnight: #10153a;
  --navy: #1e2556;
  --raised: #27306e;
  --line: #36408a;
  --paper: #f4f5fb;
  --haze: #aab1d8;
  --gold: #f2b544;
  --gold-ink: #241a04;
  --danger: #ff8a7a;
  --ok: #8fe3b0;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 125;      /* Archivo width axis for headlines */
  --measure: 68ch;
  --page: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --slash: 49deg;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--midnight); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--midnight);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--paper); text-decoration-color: color-mix(in srgb, var(--gold) 70%, transparent); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-variation-settings: "wdth" var(--wide);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--haze); }
.muted { color: var(--haze); }
.small { font-size: 0.9rem; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section + .section { padding-top: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: var(--radius); z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--midnight); position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); margin-right: auto; }
.brand svg { width: 34px; height: auto; }
.brand span { font-variation-settings: "wdth" var(--wide); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { position: relative; display: block; padding: 10px 14px; text-decoration: none; color: var(--haze); font-weight: 600; }
.nav a:hover { color: var(--paper); }
.nav a[aria-current="page"] { color: var(--paper); }
/* the active page is marked with a short rising slash, echoing the logo */
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 2px; height: 14px;
  background: var(--gold); transform: translateX(-50%) rotate(var(--slash)); transform-origin: center;
}
.account-link { font-weight: 600; text-decoration: none; color: var(--paper); padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.account-link:hover { border-color: var(--haze); color: var(--paper); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  padding: 14px 22px; border-radius: var(--radius); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--gold-ink); }
.btn-primary:hover { background: #ffc865; color: var(--gold-ink); }
.btn-quiet { background: transparent; color: var(--paper); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--paper); color: var(--paper); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero: navy panel cut along the logo's diagonal, cards fanned behind the cut */
.hero { position: relative; overflow: hidden; background: var(--navy); isolation: isolate; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: clamp(520px, 72vh, 700px); align-items: center; }
.hero-copy { position: relative; z-index: 2; padding: 64px 0; }
.hero-copy .lede { color: #c6cbe8; margin-bottom: 28px; }
.hero-art {
  position: absolute; inset: 0 0 0 46%; z-index: 0;
  background: radial-gradient(70% 80% at 60% 45%, #2a3580 0%, var(--midnight) 75%);
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-art::before { /* the cut edge itself, a thin bright line along the diagonal */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, var(--paper) 0 2px, transparent 2px);
  clip-path: polygon(22% 0, calc(22% + 3px) 0, 3px 100%, 0 100%);
  opacity: 0.85;
}
.fan { position: absolute; left: 50%; top: 52%; width: 0; height: 0; }
.fan img {
  position: absolute; width: clamp(130px, 13vw, 190px); max-width: none; aspect-ratio: 2 / 3; height: auto;
  border-radius: 8px; box-shadow: 0 24px 48px rgba(4, 6, 24, 0.65);
  left: calc(clamp(130px, 13vw, 190px) / -2); top: calc(clamp(130px, 13vw, 190px) * -0.75);
  transform-origin: 50% 140%;
}
.fan img:nth-child(1) { transform: rotate(-24deg) translateY(10px); }
.fan img:nth-child(2) { transform: rotate(-12deg); }
.fan img:nth-child(3) { transform: rotate(0deg) translateY(-14px) scale(1.1); z-index: 3; }
.fan img:nth-child(4) { transform: rotate(12deg); z-index: 2; }
.fan img:nth-child(5) { transform: rotate(24deg) translateY(10px); z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .fan img { animation: deal 900ms cubic-bezier(.2, .7, .2, 1) both; }
  .fan img:nth-child(1) { animation-delay: 40ms; }
  .fan img:nth-child(2) { animation-delay: 110ms; }
  .fan img:nth-child(4) { animation-delay: 180ms; }
  .fan img:nth-child(5) { animation-delay: 250ms; }
  @keyframes deal { from { opacity: 0; translate: 0 40px; } }
}

/* Feature: one game, told plainly */
.feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.feature figure { margin: 0; }
.feature figure img { border-radius: var(--radius); border: 1px solid var(--line); }
.feature figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--haze); }
.facts { list-style: none; padding: 0; margin: 0 0 28px; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts b { font-variation-settings: "wdth" var(--wide); font-weight: 800; font-size: 1.25rem; line-height: 1.3; }
.facts span { color: var(--haze); }
.platforms { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.platforms .btn { justify-content: space-between; }
.platforms .note { font-weight: 500; font-size: 0.85rem; opacity: 0.85; }

/* Game page */
.game-head { display: grid; grid-template-columns: 112px 1fr; gap: 24px; align-items: center; margin-bottom: 32px; }
.game-head img { width: 112px; height: 112px; border-radius: 22px; }
.game-head h1 { margin: 0 0 6px; font-size: clamp(2rem, 4.4vw, 3.2rem); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.gallery img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: auto; }
.gallery figcaption { font-size: 0.88rem; color: var(--haze); margin-top: 6px; }
.gallery figure { margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.plain-list { padding-left: 1.2em; margin: 0 0 1em; max-width: var(--measure); }
.plain-list li { margin: 0.35em 0; }

/* Page header (inner pages) */
.page-head { padding: clamp(40px, 7vw, 80px) 0 clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); background: linear-gradient(to bottom, var(--navy), var(--midnight)); }
.page-head p { color: var(--haze); }
.crumbs { font-size: 0.92rem; color: var(--haze); margin-bottom: 10px; }
.crumbs a { color: var(--haze); }

/* Prose pages (privacy, about) */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }

/* Forms */
.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field .hint { font-size: 0.88rem; color: var(--haze); }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  font: inherit; color: var(--paper); background: var(--navy); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; width: 100%;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--navy); max-width: 640px; }
.status[data-kind="error"] { border-color: var(--danger); color: #ffd3cc; }
.status[data-kind="ok"] { border-color: var(--ok); color: #d3f6e2; }
.status:empty { display: none; }

/* Forum: lists, not cards */
.forum-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 28px 0 8px; }
.board-list, .thread-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.board-list li, .thread-list li { border-bottom: 1px solid var(--line); }
.board-row { display: grid; grid-template-columns: minmax(0, 1fr) 7rem 12rem; gap: 20px; padding: 18px 4px; align-items: center; }
.board-row h3 { margin: 0 0 4px; font-size: 1.15rem; }
.board-row h3 a { text-decoration: none; }
.board-row h3 a:hover { text-decoration: underline; }
.board-row p { margin: 0; color: var(--haze); font-size: 0.95rem; }
.count { text-align: right; font-variant-numeric: tabular-nums; color: var(--haze); font-size: 0.92rem; }
.count b { display: block; color: var(--paper); font-size: 1.15rem; }
.latest { font-size: 0.9rem; color: var(--haze); }
.thread-row { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 10rem; gap: 18px; padding: 14px 4px; align-items: center; }
.thread-row a.title { font-weight: 700; text-decoration: none; }
.thread-row a.title:hover { text-decoration: underline; }
.thread-row .by { font-size: 0.88rem; color: var(--haze); }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--haze); margin-right: 6px; vertical-align: 2px; }
.tag.pinned { border-color: var(--gold); color: var(--gold); }
.tag.staff { border-color: var(--haze); color: var(--paper); }
.posts { list-style: none; margin: 0; padding: 0; }
.post { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.post .who { font-weight: 700; word-break: break-word; }
.post .when { font-size: 0.85rem; color: var(--haze); }
.post .body { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }
.post .body a { overflow-wrap: anywhere; }
.post .tools { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 0.88rem; color: var(--haze); text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--paper); }
.linkish.danger:hover { color: var(--danger); }
.mod-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); margin: 16px 0; }
.empty { padding: 28px 0; color: var(--haze); }
.notice { padding: 16px 18px; border-left: 3px solid var(--gold); background: var(--navy); max-width: 720px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--haze); font-size: 0.95rem; }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: start; }
.site-footer svg { width: 120px; height: auto; color: var(--paper); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.foot-links a { color: var(--haze); }
.foot-links a:hover { color: var(--paper); }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 48px 0 300px; }
  .hero-art { inset: auto 0 0 0; height: 320px; clip-path: polygon(0 34%, 100% 0, 100% 100%, 0 100%); }
  .hero-art::before { display: none; }
  .fan { top: 64%; }
  .fan img { width: 118px; left: -59px; top: -88px; }
  .feature, .two-col { grid-template-columns: 1fr; }
  .board-row { grid-template-columns: minmax(0, 1fr) 5rem; }
  .board-row .latest { display: none; }
  .thread-row { grid-template-columns: minmax(0, 1fr) 4.5rem; }
  .thread-row .latest { display: none; }
  .post { grid-template-columns: 1fr; gap: 6px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header .wrap { gap: 8px 16px; }
  .nav { width: calc(100% + 20px); order: 3; margin: 0 -10px 6px; flex-wrap: nowrap; overflow-x: auto; gap: 0; }
  .nav a { padding: 8px 10px; white-space: nowrap; }
  .brand svg { width: 28px; }
  .game-head { grid-template-columns: 72px 1fr; gap: 16px; }
  .game-head img { width: 72px; height: 72px; border-radius: 16px; }
  .facts li { grid-template-columns: 6rem 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.plain-list + h2 { margin-top: 1.6em; }
.page-head h1#page-title { font-size: clamp(1.7rem, 4vw, 2.8rem); }
