/* Experience Point Games - site stylesheet */
:root {
  --ink: #17100d;
  --ink-2: #221712;
  --wood: #2f1f17;
  --wood-2: #3d2a1f;
  --line: #5a4030;
  --gold: #e9b843;
  --gold-2: #c28f2b;
  --cream: #f1dfc0;
  --cream-2: #d9c4a3;
  --text: #f3e9d8;
  --muted: #b9a58a;
  --purple: #4a1d4e;
  --max: 1160px;
  --radius: 10px;
  --font-display: "Alfa Slab One", "Rockwell", "Georgia", serif;
  --font-body: "Zilla Slab", "Georgia", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--gold); }
h3 { font-size: 1.35rem; color: var(--cream); }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.section { padding: 4.5rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--ink-2); }
.lede { font-size: 1.25rem; color: var(--cream-2); max-width: 46ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-size: .8rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-2); margin-bottom: .6rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23,16,13,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--cream); font-family: var(--font-display); font-size: 1rem; }
.brand img { width: 40px; height: 40px; border-radius: 8px; border: 2px solid var(--cream); }
.site-nav { margin-left: auto; display: flex; gap: 1.4rem; }
.site-nav a { color: var(--cream-2); text-decoration: none; font-family: var(--font-display); font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.4rem; border-radius: 8px; text-decoration: none;
  font-family: var(--font-display); font-size: 1rem; line-height: 1;
  border: 2px solid var(--gold-2); color: var(--gold); background: rgba(0,0,0,.35);
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--gold); color: var(--ink); }
.btn-primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn svg { width: 1.15em; height: 1.15em; fill: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(78vh, 760px); display: grid; place-items: center; text-align: center;
  padding: 4rem 0;
  text-shadow: 0 2px 8px rgba(0,0,0,.9);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-image: url("../img/hero-wide.jpg");
  background-size: cover; background-position: center 30%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(23,16,13,.35) 0%, rgba(23,16,13,.55) 55%, var(--ink) 100%);
}
.hero-logo { width: min(620px, 82vw); margin: 0 auto 1.2rem; filter: drop-shadow(0 8px 24px rgba(0,0,0,.6)); }
.hero .tagline { font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 1.8rem); color: var(--cream); text-shadow: 0 2px 10px rgba(0,0,0,.8); margin-bottom: .4rem; }
.hero .sub { color: var(--cream-2); text-shadow: 0 2px 8px rgba(0,0,0,.9); max-width: 52ch; margin: 0 auto 1.6rem; }
.hero .btn-row { justify-content: center; text-shadow: none }
@media (max-width: 700px) {
  .hero-bg { background-image: url("../img/hero-wide-mobile.jpg"); background-position: center; }
  .hero { min-height: min(70vh, 640px); }
}

/* Cards / grids */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card {
  background: var(--wood); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.card h3 { margin-top: .2rem; }
.card p:last-child { margin-bottom: 0; }

/* Silent film title cards, used for feature headings */
.film-card {
  background: #1c1c1c; color: #d9d9d9; border: 3px double #cfcfcf; border-radius: 6px;
  padding: 1.4rem 1.2rem 1.2rem; text-align: center; position: relative;
  font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3;
}
.film-card::after { content: "\2766"; display: block; margin-top: .6rem; font-size: 1.3rem; opacity: .8; }

/* Feature split rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.feature + .feature { margin-top: 3.5rem; }
.feature.flip .feature-media { order: 2; }
.feature-media img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.feature-text .film-card { margin-bottom: 1.2rem; }
@media (max-width: 800px) {
  .feature { grid-template-columns: 1fr; gap: 1.4rem; }
  .feature.flip .feature-media { order: 0; }
}

/* Characters */
.chars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.4rem; }
.char {
  background: linear-gradient(180deg, var(--wood-2), var(--wood)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.2rem 1.4rem; text-align: center;
}
/* Portraits are shown at a fixed height with feet aligned. --ts mirrors thumbnail_scale
   in the game: it compensates for source art whose bounding box includes a tall prop. */
.char img, .char-gallery img { transform: scale(var(--ts, 1)); transform-origin: bottom center; }
.char img { height: 210px; width: auto; margin: 32px auto .8rem; filter: drop-shadow(0 6px 12px rgba(0,0,0,.6)); }
.char h3 { margin-bottom: .3rem; }
.char .ability { color: var(--text); font-size: 1rem; margin-bottom: .5rem; }
.char .flavor { color: var(--muted); font-style: italic; font-size: .95rem; margin: 0; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .2s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery.contain img { aspect-ratio: 4/3; object-fit: contain; background: #0b0807; }
.gallery.char-gallery a { background: var(--wood-2); }
.gallery.char-gallery img { background: transparent; padding-top: 12%; object-position: bottom; }
.gallery.char-gallery a:hover img { transform: scale(var(--ts, 1)); }
.gallery figcaption, .caption { font-size: .9rem; color: var(--muted); padding: .5rem .2rem 0; }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1600px); }
dialog.lightbox::backdrop { background: rgba(0,0,0,.88); }
dialog.lightbox img { max-height: 90vh; width: auto; max-width: 96vw; margin: auto; border-radius: 6px; }
dialog.lightbox button {
  position: fixed; top: 1rem; right: 1rem; background: var(--gold); border: 0; border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.4rem; cursor: pointer; font-family: var(--font-body);
}

/* Video */
.video-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 16px 50px rgba(0,0,0,.6); background: #000; }
.video-frame video { width: 100%; aspect-ratio: 16/9; }

/* Steam widget */
.steam-widget { display: flex; justify-content: center; }
.steam-widget iframe { width: 100%; max-width: 646px; height: 190px; border: 0; border-radius: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--muted); font-size: .95rem; background: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--cream-2); }
.site-footer .logo { width: 56px; height: 56px; border-radius: 10px; border: 2px solid var(--cream); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* Press kit layout */
.press { display: grid; grid-template-columns: 230px 1fr; gap: 3rem; align-items: start; padding-top: 3rem; padding-bottom: 3rem; }
.press-nav { position: sticky; top: 84px; }
.press-nav ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.press-nav li a { display: block; padding: .35rem .9rem; color: var(--cream-2); text-decoration: none; font-size: .95rem; }
.press-nav li a:hover { color: var(--gold); border-left: 2px solid var(--gold); margin-left: -2px; }
.press-nav .btn { margin-top: 1.2rem; width: 100%; justify-content: center; }
.press-main > section { padding: 0 0 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line); }
.press-main > section:last-child { border-bottom: 0; }
.press-main h2 { margin-bottom: 1rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.4rem; margin: 0; }
.facts dt { font-family: var(--font-display); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); padding-top: .15rem; }
.facts dd { margin: 0; }
.press ul.plain { padding-left: 1.2rem; }
.press ul.plain li { margin-bottom: .45rem; }
.dl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.dl-list li a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; background: var(--wood); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.dl-list li a span:last-child { color: var(--muted); white-space: nowrap; font-size: .9rem; }
.logo-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.logo-tiles a { display: grid; place-items: center; padding: 1.5rem; border-radius: 8px; border: 1px solid var(--line); min-height: 180px; }
.logo-tiles .dark { background: repeating-conic-gradient(#2a1c16 0 25%, #221712 0 50%) 0 0 / 24px 24px; }
.logo-tiles .light { background: var(--cream); }
.logo-tiles img { max-height: 130px; width: auto; }
.wordmark { width: min(360px, 60%); margin: 0 0 1rem; }
.card .wordmark { margin: 0.5rem auto; }
.callout { background: var(--wood); border-left: 4px solid var(--gold); padding: 1rem 1.2rem; border-radius: 0 8px 8px 0; }
.callout p:last-child { margin: 0; }
@media (max-width: 900px) {
  .press { grid-template-columns: 1fr; gap: 1.5rem; }
  .press-nav { position: static; }
  .press-nav ul { display: flex; flex-wrap: wrap; gap: .3rem; border: 0; }
  .press-nav li a { border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; }
  .press-nav li a:hover { margin-left: 0; border-left-width: 1px; }
  .press-nav .btn { width: auto; }
  .facts { grid-template-columns: 1fr; gap: .1rem 0; }
  .facts dd { margin-bottom: .7rem; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .site-header .wrap { height: 58px; gap: 1rem; }
  .brand span { display: none; }
  .site-nav { gap: 1rem; }
  .section { padding: 3rem 0; }
}
