/* Hadeda Games: one style sheet for every page (redesign 2026-12-02, after kards.com: full-screen key art, a sticky
   header with a call to action, a dark textured page, big art beside text panels, sections that rise in on scroll).
   The studio pages are near-black with the hadeda's iridescent green, violet and bronze; Paperthorn's pages are its
   toy theatre: candlelit gold, velvet red and paper. The black is the logo's own background (#0f0f0f). */
@font-face { font-family: "IM Fell SC"; src: url("../fonts/IMFellSC.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../fonts/Alegreya.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }

:root {
  --bg: #0f0f0f;
  --bg-2: #161412;
  --panel: rgba(26, 22, 19, .88);
  --line: rgba(224, 189, 114, .22);
  --line-strong: rgba(224, 189, 114, .5);
  --text: #ece4d5;
  --muted: #b8ac98;
  --gold: #e0bd72;
  --gold-2: #f4dba0;
  --velvet: #5a1014;
  --sa-green: #007749; --sa-gold: #ffb81c; --sa-white: #ffffff; --sa-red: #e03c31; --sa-blue: #001489;
  --wrap: 1180px;
  --head-h: 72px;
  --title: "IM Fell SC", Georgia, "Times New Roman", serif;
  --body: "Alegreya", Georgia, "Times New Roman", serif;
}
body.theme-pt { --bg: #110c0b; --bg-2: #1a1210; }

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; scroll-padding-top: var(--head-h); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.15rem/1.65 var(--body); overflow-x: hidden; }
/* the paper grain over everything, as kards.com's scratched card stock */
body::after { content: ""; position: fixed; inset: 0; background: url("../img/grain.png"); opacity: .45; pointer-events: none; z-index: 50; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: #fff3d0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--title); font-weight: 400; line-height: 1.08; letter-spacing: .02em; color: var(--gold-2); margin: 0; }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg-2); padding: 8px 12px; z-index: 100; }
.eyebrow { font-family: var(--title); letter-spacing: .32em; text-transform: uppercase; font-size: .9rem; color: var(--gold); margin: 0 0 14px; }
/* a gold rule with a diamond, as the game's own end screen */
.rule { display: flex; align-items: center; gap: 12px; color: var(--gold); margin: 18px 0 22px; max-width: 360px; }
.rule::before, .rule::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule span { width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); }
.center { text-align: center; }
.center .rule { margin-inline: auto; }
.sa-line { height: 4px; background: linear-gradient(90deg, var(--sa-green) 0 20%, var(--sa-gold) 20% 40%,
  var(--sa-white) 40% 60%, var(--sa-red) 60% 80%, var(--sa-blue) 80% 100%); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--title); letter-spacing: .12em; font-size: 1.05rem;
  text-decoration: none; color: #1a120a; background: linear-gradient(#f2d48f, #c99b4a); border: 1px solid #8a6424;
  border-radius: 3px; padding: 13px 26px; margin: 6px 12px 6px 0; box-shadow: 0 6px 22px rgba(0, 0, 0, .45);
  transition: filter .15s, transform .15s; }
.btn:hover { color: #000; filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: rgba(10, 8, 7, .35); color: var(--gold-2); border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { color: #fff3d0; border-color: var(--gold); background: rgba(224, 189, 114, .08); }
.btn.small { padding: 9px 16px; font-size: .92rem; margin: 0; }
.center .btn { margin: 6px 6px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.center .badges, .hero .badges { justify-content: center; }
.badge { font-family: var(--title); letter-spacing: .14em; font-size: .85rem; text-transform: uppercase; color: var(--gold-2);
  border: 1px solid var(--line-strong); background: rgba(10, 8, 7, .55); padding: 6px 12px; border-radius: 2px; }
.badge.lit { color: #1a120a; background: var(--gold); border-color: var(--gold); }

/* header: transparent over the hero, solid once the page scrolls (site.js) */
.site-head { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--head-h); transition: background .25s, border-color .25s;
  border-bottom: 1px solid transparent; background: linear-gradient(180deg, rgba(6, 5, 5, .7), rgba(6, 5, 5, 0)); }
.site-head.solid, body.no-hero .site-head { background: rgba(12, 10, 9, .94); border-bottom-color: var(--line); backdrop-filter: blur(6px); }
.site-head .wrap { width: min(1360px, 100% - 32px); height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand span { font-family: var(--title); letter-spacing: .3em; font-size: 1.05rem; white-space: nowrap; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--text); text-decoration: none; font-family: var(--title); letter-spacing: .16em; text-transform: uppercase; font-size: .95rem; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-2); border-bottom-color: var(--gold); }
.head-cta { margin-left: auto; }
body.no-hero main { padding-top: var(--head-h); }
@media (max-width: 860px) { .brand span { display: none; } .head-cta { display: none; } .nav { gap: 18px; margin-left: auto; } }
@media (max-width: 420px) { .nav a { font-size: .82rem; letter-spacing: .1em; } .nav { gap: 12px; } }

/* sections */
section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.lead { font-size: clamp(1.15rem, 2vw, 1.3rem); color: var(--muted); max-width: 720px; }
.center .lead { margin-inline: auto; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: clamp(28px, 4vw, 52px); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.frame { border: 1px solid var(--line-strong); box-shadow: 0 26px 70px rgba(0, 0, 0, .65); position: relative; }
.frame::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(224, 189, 114, .18); pointer-events: none; }
@media (min-width: 901px) { .split.over { grid-template-columns: 1.45fr 1fr; } .split.flip.over { grid-template-columns: 1fr 1.45fr; }
  .over .panel { margin-left: -110px; position: relative; z-index: 2; } .split.flip.over .panel { margin: 0 -110px 0 0; } }

/* rising in on scroll (site.js adds .js to <html>; without it everything simply shows) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* hero: full screen key art */
.hero { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: calc(var(--head-h) + 40px) 0 90px;
  position: relative; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 6, 6, .7) 0%, rgba(8, 6, 6, .05) 26%, rgba(8, 6, 6, 0) 62%, var(--bg) 100%); }
.hero .tag { font-family: var(--title); font-size: clamp(1.3rem, 3vw, 2rem); letter-spacing: .08em; color: var(--text);
  text-shadow: 0 2px 14px #000, 0 0 2px #000; margin: 6px 0 22px; }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 40px;
  border: 1px solid var(--line-strong); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--gold); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* the studio's hero: the hadeda in the dark, its iridescent feathers as light */
.hero-studio { background:
  radial-gradient(ellipse 36% 40% at 40% 38%, rgba(42, 107, 92, .42), transparent 70%),
  radial-gradient(ellipse 32% 38% at 61% 44%, rgba(91, 58, 115, .38), transparent 70%),
  radial-gradient(ellipse 54% 30% at 50% 80%, rgba(138, 98, 48, .2), transparent 70%), var(--bg); }
.hero-studio::before { background: linear-gradient(180deg, rgba(8, 6, 6, .4) 0%, rgba(8, 6, 6, 0) 20%, rgba(8, 6, 6, 0) 80%, var(--bg) 100%); }
.hero-studio .logo { width: min(780px, 88vw); margin: 0 auto 10px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6)); }
.hero-studio .tag { font-size: clamp(1rem, 2.2vw, 1.45rem); color: var(--muted); letter-spacing: .22em; text-transform: uppercase; text-shadow: none; }

/* Paperthorn's hero: the toy theatre on the hill */
.hero-pt { background: url("../img/key-theatre.jpg") center 40% / cover no-repeat, #120c0a; }
.hero-pt .wordmark { width: min(760px, 88vw); margin: 0 auto; filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .85)); }
.hero-pt .inner { margin-top: -8vh; }

/* fanned cards: spread sideways and turned, the middle one on top */
.fan { position: relative; height: clamp(400px, 42vw, 560px); }
.fan img { position: absolute; left: 50%; top: 50%; width: clamp(190px, 21vw, 290px); transform-origin: 50% 50%;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) rotate(var(--r, 0deg));
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .7)); transition: transform .3s ease; }
.fan img:hover { transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px) - 18px)) rotate(var(--r, 0deg)); z-index: 3; }
@media (max-width: 600px) { .fan img { width: 42vw; } }
@media (prefers-reduced-motion: reduce) { .fan img { transition: none; } }

/* the featured game on the studio's page */
.feature { padding: 0; }
.feature .stage { background: linear-gradient(90deg, rgba(10, 7, 6, .94) 0%, rgba(10, 7, 6, .74) 44%, rgba(10, 7, 6, .2) 78%),
  url("../img/key-theatre.jpg") center / cover no-repeat; border-block: 1px solid var(--line); }
.feature .split { min-height: 660px; padding: 80px 0; }
.feature .wordmark { width: min(480px, 90%); margin: 0 0 14px -8px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .8)); }
@media (max-width: 900px) { .feature .stage { background: linear-gradient(180deg, rgba(10, 7, 6, .6), rgba(10, 7, 6, .94)), url("../img/key-theatre.jpg") center / cover; } }

/* facts / stats */
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 40px; }
.facts-row div { background: #15100e; padding: 26px 16px; text-align: center; }
.facts-row b { display: block; font-family: var(--title); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.4rem); color: var(--gold-2); line-height: 1; margin-bottom: 8px; }
.facts-row span { font-family: var(--title); letter-spacing: .18em; text-transform: uppercase; font-size: .85rem; color: var(--muted); }

/* how to play: numbered rules */
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.rules li { display: grid; grid-template-columns: 50px 1fr; gap: 14px; align-items: start; }
.rules .n { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--gold); transform: rotate(45deg); margin: 6px; }
.rules .n span { transform: rotate(-45deg); font-family: var(--title); color: var(--gold-2); font-size: 1.1rem; }
.rules strong { font-family: var(--title); font-weight: 400; color: var(--gold-2); font-size: 1.25rem; letter-spacing: .04em; display: block; }
.rules p { margin: 2px 0 0; color: var(--muted); font-size: 1.06rem; }

/* the seven companies */
.companies { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 46px; }
.companies .company { flex: 0 1 calc(25% - 17px); min-width: 250px; }  /* (four, then the last three centred) */
.company { background: #17110f; border: 1px solid var(--line); overflow: hidden; transition: border-color .2s, transform .2s; }
.company:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.company img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.company div { padding: 18px 20px 22px; }
.company h3 { font-size: 1.45rem; }
.company .who { font-family: var(--title); letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: var(--gold); margin: 6px 0 10px; }
.company p { font-size: 1.02rem; color: var(--muted); margin: 0; }
@media (prefers-reduced-motion: reduce) { .company, .company:hover { transition: none; transform: none; } }

/* modes */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 46px; }
.mode { background: #17110f; border: 1px solid var(--line); }
.mode img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.mode div { padding: 20px 22px 24px; }
.mode p { color: var(--muted); font-size: 1.05rem; margin: 8px 0 0; }

/* the card tiers */
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(8px, 1.5vw, 20px); margin-top: 44px; align-items: end; }
.tiers figure { margin: 0; text-align: center; }
.tiers img { width: 100%; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .65)); }
.tiers figcaption { font-family: var(--title); letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 640px) { .tiers { grid-template-columns: repeat(3, 1fr); } .tiers figure:nth-child(n+4) { display: none; } }

/* trailer */
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.videos.one { grid-template-columns: 1fr; max-width: 1080px; margin: 40px auto 0; }
.videos figure { margin: 0; }
.videos video { width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.videos figcaption { color: var(--muted); font-size: 1rem; margin-top: 10px; text-align: center; }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 40px; }
@media (max-width: 1000px) { .shots { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .shots { grid-template-columns: repeat(2, 1fr); } }
.shots a { display: block; border: 1px solid var(--line); overflow: hidden; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s; }
.shots a:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .shots img { transition: none; } .shots a:hover img { transform: none; } }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .9); }
dialog.lightbox img { max-height: 88vh; width: auto; }
dialog.lightbox p { text-align: center; margin: 10px 0 0; color: var(--muted); }

/* the curtain band: the closing call */
.curtain-band { background: linear-gradient(180deg, var(--bg) 0%, rgba(0, 0, 0, .3) 28%, rgba(0, 0, 0, .3) 72%, var(--bg) 100%),
  url("../img/curtain.jpg") center / cover; }
.curtain-band .wordmark { width: min(420px, 80%); margin: 0 auto 10px; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .8)); }

/* studio: about */
.about-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.about-facts li { border-left: 2px solid var(--gold); padding: 6px 0 6px 18px; color: var(--muted); }
.about-facts b { display: block; font-family: var(--title); font-weight: 400; color: var(--gold-2); font-size: 1.3rem; letter-spacing: .04em; }

/* press kit */
table.facts { border-collapse: collapse; width: 100%; max-width: 760px; }
table.facts th, table.facts td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.facts th { font-family: var(--title); font-weight: 400; color: var(--gold-2); white-space: nowrap; width: 11em; letter-spacing: .06em; }
table.facts td { overflow-wrap: anywhere; }
@media (max-width: 560px) { table.facts th { width: auto; white-space: normal; padding-right: 10px; } }
ul.feat { padding-left: 1.1em; margin: 0 0 1em; }
ul.feat li { margin: .35em 0; }
ul.feat li::marker { color: var(--gold); }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.logos figure { margin: 0; background: #17110f; border: 1px solid var(--line); padding: 16px; text-align: center; }
.logos .on-curtain { background: #2a0709 url("../img/curtain.jpg") center / cover; }
.logos .on-dark { background: #0f0f0f; }
.logos img { margin: 0 auto 10px; max-height: 150px; width: auto; }
.page-title { padding: clamp(48px, 8vw, 90px) 0 10px; }
.page-title h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.prose section { padding: 56px 0; border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 18px; }
.prose h3 { margin: 1.6em 0 .4em; }

/* footer */
.site-foot { background: #0b0909; color: var(--muted); font-size: 1rem; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 52px 0 34px; }
.site-foot .brand { margin-bottom: 12px; }
.site-foot h4 { font-family: var(--title); font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; font-size: .9rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: var(--text); text-decoration: none; }
.site-foot a:hover { color: var(--gold-2); }
.site-foot .base { border-top: 1px solid var(--line); padding: 18px 0 26px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .92rem; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr; } }
.prose section:first-child { border-top: 0; padding-top: clamp(48px, 8vw, 90px); }
.site-head .head-cta { margin-left: auto; }
