/* VENTFALL — site styles. Warm paper, ink outlines, rust and teal from the games' palette. */
@font-face { font-family: "Oswald"; src: url("../fonts/oswald.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Pangolin"; src: url("../fonts/pangolin.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f1e4c6;
  --paper-2: #e6d2a8;
  --cream: #fff7e6;
  --ink: #2b1d14;
  --ink-soft: #5b4636;
  --rust: #b4532a;
  --rust-dark: #8a3a1c;
  --teal: #3f5d62;
  --teal-dark: #23383c;
  --brass: #c8963e;
  --night: #1c1511;
  --sky: #cfe8f3;
  --shadow: 5px 5px 0 rgba(43, 29, 20, .9);
  --radius: 14px 18px 12px 20px;
  --gutter: 16px;
  --wrap: 1180px;
  --head: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --hand: "Pangolin", "Comic Sans MS", "Segoe Print", cursive;
  --body: "Iowan Old Style", "Palatino Linotype", Palatino, "PT Serif", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(255, 247, 230, .9), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .24  0 0 0 0 .12  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color: var(--ink);
  font: 18px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rust-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; line-height: 1.12; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); text-transform: uppercase; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--cream); padding: 6px 10px; }
.hand { font-family: var(--hand); }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--night);
  border-bottom: 4px solid var(--rust);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.site-head .wrap { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.logo {
  font: 700 1.55rem/1 var(--head); letter-spacing: .1em; color: var(--cream); text-decoration: none;
  text-shadow: 2px 2px 0 var(--rust-dark); white-space: nowrap;
}
.logo:hover { color: #fff; }
.nav { flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; white-space: nowrap; }
.nav a {
  display: block; padding: 8px 10px; color: #e9dcc0; text-decoration: none;
  font: 500 .98rem/1 var(--head); text-transform: uppercase; letter-spacing: .05em; border-radius: 6px;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--brass); }
.head-play {
  font: 700 .95rem/1 var(--head); text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  color: var(--cream); background: var(--rust); border: 2px solid var(--cream); padding: 8px 12px; border-radius: 8px;
  white-space: nowrap;
}
.head-play:hover { background: var(--rust-dark); color: #fff; }
.lang { display: flex; gap: 2px; font: 600 .85rem/1 var(--head); }
.lang a, .lang span { padding: 6px 7px; border-radius: 6px; text-decoration: none; color: #b9a98c; }
.lang span { color: var(--night); background: var(--brass); }
.lang a:hover { color: #fff; }
@media (max-width: 760px) {
  .site-head .wrap { flex-wrap: wrap; gap: 6px 10px; padding-top: 8px; }
  .nav { order: 3; flex-basis: 100%; }
  .head-play { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero { position: relative; background: var(--night); color: var(--cream); overflow: hidden; }
.hero picture img, .hero > img { width: 100%; height: clamp(360px, 62vw, 720px); object-fit: cover; object-position: 40% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(28, 21, 17, 0) 35%, rgba(28, 21, 17, .55) 70%, rgba(28, 21, 17, .95) 100%);
}
.hero .hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-bottom: clamp(18px, 4vw, 44px); }
.hero h1 { margin: 0; font-size: clamp(2.6rem, 9vw, 6.2rem); letter-spacing: .06em; text-shadow: 3px 3px 0 var(--rust-dark), 0 6px 24px rgba(0, 0, 0, .6); }
.hero .sub { font: 500 clamp(1rem, 2.6vw, 1.5rem)/1.2 var(--head); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 .4em; color: #f7d9a8; }
.hero .tagline { font: 1.35rem/1.3 var(--hand); margin: .3em 0 1em; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 700 1.05rem/1 var(--head); text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: 10px 14px 9px 13px;
  padding: .75em 1.1em; box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-play {
  font-size: clamp(1.7rem, 6vw, 3.1rem); padding: .45em 1em .45em .8em;
  background: var(--rust); color: var(--cream); border-color: var(--ink);
  box-shadow: 7px 7px 0 var(--ink); transform: rotate(-1.5deg);
}
.btn-play:hover { background: #c75f31; color: #fff; transform: rotate(-1.5deg) translate(-2px, -3px); box-shadow: 9px 10px 0 var(--ink); }
.btn-play:active { transform: rotate(-1.5deg) translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.btn-play svg { width: .85em; height: .85em; flex: none; }
.btn-play.small { font-size: 1.4rem; }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: 4px 4px 0 rgba(0, 0, 0, .6); }
.btn-ghost:hover { color: #fff; box-shadow: 6px 6px 0 rgba(0, 0, 0, .6); }

/* ---------- sections, cards ---------- */
.section { padding: clamp(36px, 6vw, 72px) 0; }
.section.dark { background: var(--night); color: #efe2c8; }
.section.dark a { color: #f2b27c; }
.section.teal { background: var(--teal-dark); color: #e9f0ea; }
.section-title { display: inline-block; padding-bottom: 6px; margin-bottom: .8em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'><path d='M2 6 C 40 2, 80 9, 120 5 S 180 3, 198 6' fill='none' stroke='%23b4532a' stroke-width='3.2' stroke-linecap='round'/></svg>") bottom / 100% 10px no-repeat; }
.lead { font-size: 1.2rem; }
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.card {
  position: relative; background: var(--cream); color: var(--ink); border: 2px solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card > img, .card > a > img, .card > picture img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 2px solid var(--ink); }
.card a:not(.btn) { color: var(--rust-dark); }
.section.dark .card, .section.teal .card, .section.dark a.card, .section.teal a.card { color: var(--ink); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card .body > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: .35em; }
.card .more { margin-top: auto; padding-top: 8px; font: 600 1rem var(--head); text-transform: uppercase; letter-spacing: .05em; }
.grid > .card:nth-child(3n+1) { transform: rotate(-.5deg); }
.grid > .card:nth-child(3n+2) { transform: rotate(.4deg); }
a.card { text-decoration: none; transition: transform .15s; }
a.card:hover { transform: rotate(0) translateY(-3px); color: var(--ink); }
.card.sprite-card > .sprite-box { aspect-ratio: 1; display: grid; place-items: center; padding: 14px; border-bottom: 2px solid var(--ink);
  background: radial-gradient(circle at 50% 60%, #fff 0, var(--paper) 70%); }
.card.sprite-card > .sprite-box img { width: 100%; height: 100%; object-fit: contain; }

.game-feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; }
.game-feature > .art img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.game-feature .body { padding: clamp(18px, 3vw, 34px); }
.game-feature .kicker { font: 600 .95rem var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--rust-dark); margin-bottom: .4em; }
.game-feature h2 { margin-bottom: .2em; }
.game-feature .actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-top: 18px; }
@media (max-width: 820px) { .game-feature { grid-template-columns: 1fr; } .game-feature > .art img { min-height: 0; aspect-ratio: 16 / 9; } }

.stamp {
  position: absolute; z-index: 3; top: 18px; right: 18px; transform: rotate(8deg);
  font: 700 1.4rem/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: #c0321f;
  border: 4px double #c0321f; padding: 6px 12px 4px; border-radius: 6px; background: rgba(255, 247, 230, .85);
  box-shadow: 0 0 0 2px rgba(255, 247, 230, .6);
}
.tape { position: relative; }
.tape::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(240, 214, 140, .75); border-left: 2px dashed rgba(0, 0, 0, .08); border-right: 2px dashed rgba(0, 0, 0, .08); z-index: 4;
}
.note {
  background: #fdf3c8; border: 2px solid var(--ink); border-radius: 4px 10px 6px 12px; padding: 14px 16px;
  font-family: var(--hand); font-size: 1.08rem; box-shadow: 4px 4px 0 rgba(43, 29, 20, .75); transform: rotate(-.6deg);
}
.quote { font: 1.5rem/1.35 var(--hand); margin: 0; padding: 0 0 0 18px; border-left: 4px solid var(--rust); }
.quote cite { display: block; font: italic .95rem var(--body); color: var(--ink-soft); margin-top: 6px; }
.dark .quote cite { color: #c9b89a; }

/* ---------- play page ---------- */
.play-box { text-align: center; padding: clamp(26px, 5vw, 50px) 0 10px; }
.play-box .btn-play { font-size: clamp(2.4rem, 10vw, 5rem); }
.play-box .fine { max-width: 640px; margin: 22px auto 0; font-size: .98rem; color: var(--ink-soft); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { font: 600 .95rem var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--rust-dark); padding-top: 3px; }
.facts dd { margin: 0; }
.controls { width: 100%; border-collapse: collapse; background: var(--cream); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; font-size: 1rem; }
.controls th, .controls td { padding: 8px 12px; border-bottom: 1px solid #d9c49c; text-align: left; vertical-align: top; }
.controls th { font: 600 .9rem var(--head); text-transform: uppercase; letter-spacing: .05em; background: var(--paper-2); }
.controls tr:last-child td { border-bottom: 0; }
kbd { font: 600 .85rem var(--head); background: #fff; border: 1.5px solid var(--ink); border-bottom-width: 3px; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* ---------- gallery ---------- */
.gallery { columns: 3 300px; column-gap: 20px; }
.gallery figure { break-inside: avoid; margin: 0 0 20px; }
.tile {
  margin: 0; background: var(--cream); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px 12px 9px 13px;
  box-shadow: 4px 4px 0 rgba(43, 29, 20, .85); overflow: hidden;
}
.tile a { display: block; }
.tile img { width: 100%; }
.tile.sprite a { background: radial-gradient(circle at 50% 55%, #fff 0, #f4e8cc 75%); padding: 14px; }
.tile.sprite img { width: auto; max-height: 300px; margin: 0 auto; }
.tile figcaption { padding: 8px 12px 10px; font: 1rem/1.3 var(--hand); border-top: 2px solid var(--ink); }
.tile figcaption small { display: block; font: .85rem/1.3 var(--body); color: var(--ink-soft); }
.loops { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.loops .tile.sprite img { max-height: 190px; }

/* lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(20, 14, 10, .88); }
dialog.lightbox img { max-width: 96vw; max-height: 86vh; width: auto; border: 3px solid var(--cream); border-radius: 8px; background: #f4e8cc; }
dialog.lightbox p { color: var(--cream); text-align: center; font: 1.05rem var(--hand); margin: 8px 0 0; }
dialog.lightbox button { position: fixed; top: 10px; right: 14px; font: 700 1.6rem/1 var(--head); background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; }

/* ---------- wiki ---------- */
.wiki { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 34px; padding-top: 34px; padding-bottom: 60px; }
.wiki-nav { order: -1; position: sticky; top: 76px; align-self: start; font: 1rem/1.4 var(--head); }
.wiki-nav h2 { font-size: 1.05rem; letter-spacing: .1em; margin: 0 0 .4em; color: var(--rust-dark); }
.wiki-nav ul { list-style: none; margin: 0 0 18px; padding: 0; }
.wiki-nav a { display: block; padding: 4px 10px; border-left: 3px solid transparent; text-decoration: none; color: var(--ink); }
.wiki-nav a:hover { border-left-color: var(--brass); }
.wiki-nav a[aria-current="page"] { border-left-color: var(--rust); background: rgba(180, 83, 42, .09); font-weight: 600; }
.article { max-width: 780px; }
.article h1 { margin-bottom: .2em; }
.article .kicker { font: 600 .95rem var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: .5em; }
.article h2 { font-size: 1.6rem; margin-top: 1.4em; }
.article figure { margin: 1.2em 0 1.6em; }
.article figure.wide img { border: 2px solid var(--ink); border-radius: 10px 12px 9px 13px; box-shadow: 4px 4px 0 rgba(43, 29, 20, .85); }
.article figcaption { font: 1rem/1.35 var(--hand); color: var(--ink-soft); margin-top: 8px; }
.infobox {
  float: right; width: 300px; margin: 0 0 18px 26px; background: var(--cream); border: 2px solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; font-size: .98rem;
}
.infobox .ib-img { background: radial-gradient(circle at 50% 55%, #fff 0, #efe1c1 75%); padding: 14px; border-bottom: 2px solid var(--ink); }
.infobox .ib-img img { max-height: 300px; width: auto; margin: 0 auto; }
.infobox .ib-img.photo { padding: 0; }
.infobox .ib-img.photo img { max-height: none; width: 100%; }
.infobox .ib-cap { font: .95rem/1.3 var(--hand); padding: 6px 12px; border-bottom: 2px solid var(--ink); color: var(--ink-soft); }
.infobox h3 { margin: 0; padding: 10px 14px 4px; font-size: 1.2rem; }
.infobox dl { margin: 0; padding: 4px 14px 14px; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.infobox dt { font: 600 .82rem var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--rust-dark); padding-top: 3px; }
.infobox dd { margin: 0; }
.canon-note { clear: both; margin-top: 2em; font-size: .95rem; color: var(--ink-soft); border-top: 2px dashed #cdb68c; padding-top: 1em; }
.pill { display: inline-block; font: 600 .78rem var(--head); text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px 2px; border-radius: 99px; border: 1.5px solid currentColor; }
.pill.live { color: #2f7a43; } .pill.soon { color: #c0321f; } .pill.wip { color: var(--teal); }
.beasts { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.beasts .tile figcaption b { font-family: var(--head); font-weight: 600; font-size: 1.1rem; display: block; }
@media (max-width: 900px) {
  .wiki { grid-template-columns: 1fr; padding-top: 18px; gap: 20px; }
  .wiki-nav { position: static; order: 2; border-top: 2px dashed #cdb68c; padding-top: 18px; }
  .infobox { float: none; width: auto; max-width: 420px; margin: 0 0 22px; }
}

/* ---------- footer ---------- */
.site-foot { background: var(--night); color: #bfae90; padding: 34px 0 40px; border-top: 4px solid var(--rust); font-size: .95rem; }
.site-foot a { color: #e8c48f; }
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; }
.site-foot .logo { font-size: 1.3rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
