/* Rooks & Runes website: the game's colours (deep violet-black, gold trim, ivory text) and its logo font. */
@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/Cinzel.ttf') format('truetype');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #0d0b11;
  --bg-2: #13101a;
  --panel: #1a1822;
  --panel-hi: #24202f;
  --panel-lo: #14121a;
  --line: #322d3d;
  --trim: #6b5631;
  --trim-hi: #b48a43;
  --gold: #e2b75a;
  --gold-hi: #f6d88e;
  --text: #efe9db;
  --soft: #d8d1c4;
  --muted: #a59eb0;
  --violet: #cdbff3;
  --rare: #5b9ee8;
  --common: #9aa0a6;
  --legendary: #f0a030;
  --title-font: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --logo-font: 'Cinzel', var(--title-font);
  --body-font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  font: 16px/1.6 var(--body-font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
body.viewing { overflow: hidden; }
img, video { max-width: 100%; display: block; }
a { color: var(--gold); }
a:hover { color: #ffe1a0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--gold); color: #1a1006; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Header: clear over the hero, solid once the page scrolls. */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px;
  transition: background 0.3s, padding 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.top.solid { padding: 9px 28px; background: rgba(13, 11, 17, 0.88); backdrop-filter: blur(10px); border-bottom-color: rgba(180, 138, 67, 0.28); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
.brand span {
  font: 700 17px var(--logo-font); letter-spacing: 0.14em; text-transform: uppercase;
  background: linear-gradient(180deg, #ffe7a8, #c99540); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s;
}
.top.solid .brand span { opacity: 1; transform: none; }
.top-links { display: flex; align-items: center; gap: 26px; }
.top-links a:not(.btn) { position: relative; color: var(--soft); text-decoration: none; font-size: 15px; letter-spacing: 0.02em; }
.top-links a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform 0.2s var(--ease); }
.top-links a:not(.btn):hover { color: var(--text); }
.top-links a:not(.btn):hover::after { transform: scaleX(1); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 6px; cursor: pointer;
  font: 600 16px var(--body-font); text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, #2c2837, #221f2b);
  border: 1px solid var(--trim-hi);
  transition: transform 0.15s var(--ease), box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { color: #fff2cf; border-color: var(--gold-hi); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 18px rgba(226, 183, 90, 0.22); }
.btn.primary {
  color: #24170a; border-color: var(--gold-hi);
  background: linear-gradient(180deg, #f8e0a0, #dcad4e 55%, #b98a33);
  box-shadow: 0 0 26px rgba(226, 183, 90, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(90, 55, 10, 0.35);
}
.btn.primary:hover { color: #160d04; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 36px rgba(226, 183, 90, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.btn.ghost { background: rgba(20, 16, 26, 0.55); backdrop-filter: blur(4px); }
.btn.big { padding: 15px 28px; font-size: 17px; }
.btn.small { padding: 7px 16px; font-size: 14px; }

/* Hero: the game in motion, the emblem and the logo over it. */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; background: #0a0810 url('/img/hero-loop-poster.jpg') center / cover; }
.hero-video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); }
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(13, 11, 17, 0.35) 0%, rgba(13, 11, 17, 0.75) 70%, rgba(13, 11, 17, 0.92) 100%),
    linear-gradient(180deg, rgba(13, 11, 17, 0.6) 0%, rgba(13, 11, 17, 0) 22%, rgba(13, 11, 17, 0) 70%, var(--bg) 100%);
}
.hero-inner { width: 100%; max-width: 980px; padding: 110px 24px 130px; text-align: center; }
.emblem {
  width: 112px; height: 112px; margin: 0 auto 6px;
  animation: float 6s ease-in-out infinite;
  /* The emblem is painted on dark purple: feather its edges and let the scene show through the dark. */
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(90deg, transparent 4%, #000 18%, #000 82%, transparent 96%), linear-gradient(180deg, transparent 0%, #000 8%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 4%, #000 18%, #000 82%, transparent 96%), linear-gradient(180deg, transparent 0%, #000 8%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.emblem.small { width: 72px; height: 72px; animation: none; }
.logo-mark { margin: 0; }
.logo-mark img { width: min(640px, 88vw); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.75)); }
.tagline { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; margin: 18px 0 0; color: var(--violet); font-size: clamp(13px, 1.6vw, 16px); letter-spacing: 0.2em; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }
.tagline i { font-style: normal; font-size: 9px; color: var(--gold); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.actions.center { justify-content: center; }
.note { margin: 18px 0 0; color: var(--muted); font-size: 14px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.scroll-cue { position: absolute; bottom: 30px; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(239, 233, 219, 0.45); border-radius: 14px; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: cue 1.8s ease-in-out infinite; }

/* Pillars: three short promises under the hero. */
.pillars { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  padding: 28px 24px 24px; text-align: center;
  background: linear-gradient(180deg, rgba(36, 32, 47, 0.92), rgba(20, 18, 26, 0.92));
  border: 1px solid var(--line); border-top: 2px solid var(--trim-hi); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.pillar img { width: 72px; height: 72px; margin: 0 auto; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)); }
.pillar h2 { margin: 12px 0 6px; font: 700 21px var(--title-font); color: #f0d9a2; }
.pillar p { margin: 0; color: var(--muted); font-size: 15px; }

/* Sections and their ornamental titles. */
.section { max-width: 1180px; margin: 0 auto; padding: 110px 24px 0; }
.section-title {
  margin: 0; text-align: center;
  font: 700 clamp(28px, 4vw, 42px)/1.2 var(--title-font); letter-spacing: 0.03em; color: #f3dfae;
}
.section-title::before, .section-title::after { content: ''; display: block; margin: 0 auto; }
.section-title::after {
  width: 240px; max-width: 70%; height: 16px; margin-top: 14px;
  /* A gold rule either side of a small diamond. */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23e2b75a' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23e2b75a'/%3E%3C/linearGradient%3E%3ClinearGradient id='r' x1='1' x2='0'%3E%3Cstop offset='0' stop-color='%23e2b75a' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23e2b75a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='7.5' width='104' height='1' fill='url(%23l)'/%3E%3Crect x='136' y='7.5' width='104' height='1' fill='url(%23r)'/%3E%3Cpath d='M120 1l7 7-7 7-7-7z' fill='none' stroke='%23e2b75a' stroke-width='1.5'/%3E%3Cpath d='M120 5l3 3-3 3-3-3z' fill='%23e2b75a'/%3E%3Ccircle cx='108' cy='8' r='1.5' fill='%23e2b75a'/%3E%3Ccircle cx='132' cy='8' r='1.5' fill='%23e2b75a'/%3E%3C/svg%3E") center / contain no-repeat;
}
.section-lead { margin: 18px auto 0; max-width: 640px; text-align: center; color: var(--muted); font-size: 18px; }

/* The trailer: a poster with a play ring, opening the viewer. */
.trailer-card {
  position: relative; display: block; width: 100%; max-width: 1000px; margin: 40px auto 0; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--trim-hi); border-radius: 12px; background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 50px rgba(226, 183, 90, 0.08);
}
.trailer-card img { width: 100%; height: auto; transition: transform 0.6s var(--ease), filter 0.3s; }
.trailer-card:hover img { transform: scale(1.03); filter: brightness(1.1); }
.play-ring {
  position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px;
  display: grid; place-items: center; border-radius: 50%;
  color: #24170a; background: linear-gradient(180deg, #f8e0a0, #d4a246);
  box-shadow: 0 0 0 10px rgba(226, 183, 90, 0.18), 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.play-ring svg { width: 40px; height: 40px; margin-left: 5px; }
.trailer-card:hover .play-ring { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(226, 183, 90, 0.2), 0 10px 40px rgba(0, 0, 0, 0.6); }
.trailer-more { margin: 16px 0 0; text-align: center; font-size: 15px; color: var(--muted); }
.trailer-length { position: absolute; right: 16px; bottom: 14px; padding: 4px 12px; font-size: 13px; color: var(--text); background: rgba(10, 8, 14, 0.75); border: 1px solid var(--trim); border-radius: 999px; }

/* Feature rows: a framed screenshot beside its words, alternating sides. */
.feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; margin-top: 80px; }
.feature.flip .shot-frame { order: 2; }
.shot-frame { position: relative; margin: 0; }
.shot-frame img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--trim); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.shot-frame::before, .shot-frame::after {
  content: ''; position: absolute; width: 46px; height: 46px; border: 2px solid var(--gold); pointer-events: none;
}
.shot-frame::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.shot-frame::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.shot-frame.square { max-width: 460px; justify-self: center; }
.kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.feature h3 { margin: 0 0 14px; font: 700 clamp(26px, 3vw, 34px)/1.2 var(--title-font); color: #f0d9a2; }
.feature p:not(.kicker) { margin: 0; color: var(--soft); font-size: 17px; }

/* A hand of cards, styled after the game's reward cards. */
.hand { list-style: none; margin: 48px 0 0; padding: 20px 0 10px; display: flex; justify-content: center; gap: 0; }
.card {
  position: relative; flex: 0 0 200px; min-height: 290px; margin: 0 -6px; padding: 22px 18px 18px; text-align: center; outline: none;
  background: linear-gradient(180deg, #2a2536, #1a1722 60%, #15121b);
  border: 1px solid var(--line); border-top: 4px solid var(--common); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  transform: rotate(var(--tilt, 0deg)) translateY(var(--drop, 0px));
  transition: transform 0.3s var(--ease), box-shadow 0.3s, z-index 0s;
}
.card.rare { border-top-color: var(--rare); }
.card.legendary { border-top-color: var(--legendary); }
.card:nth-child(1) { --tilt: -8deg; --drop: 28px; }
.card:nth-child(2) { --tilt: -4deg; --drop: 8px; }
.card:nth-child(3) { --tilt: 0deg; --drop: 0px; z-index: 1; }
.card:nth-child(4) { --tilt: 4deg; --drop: 8px; }
.card:nth-child(5) { --tilt: 8deg; --drop: 28px; }
.card:hover, .card:focus-visible {
  z-index: 5; transform: rotate(0deg) translateY(-22px) scale(1.06);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65), 0 0 30px rgba(226, 183, 90, 0.25);
}
.card img { width: 72px; height: 72px; margin: 0 auto 10px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.card h3 { margin: 0; font: 700 20px var(--title-font); color: #f3e3bd; }
.card-type { margin: 2px 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--common); }
.card.rare .card-type { color: #8fbdf2; }
.card p:last-child { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.5; }

/* The ground: painted squares with a line each. */
.ground-grid { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ground-grid li {
  display: grid; grid-template-columns: 72px 1fr; column-gap: 16px; align-items: start;
  padding: 16px; border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(180deg, rgba(36, 32, 47, 0.9), rgba(20, 18, 26, 0.9));
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.ground-grid li:hover { border-color: var(--trim-hi); transform: translateY(-3px); }
.ground-grid img { grid-row: span 2; width: 72px; height: 72px; border-radius: 8px; border: 1px solid var(--trim); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45); }
.ground-grid img.on-wood { background: url('/img/ground/square-light.png') center / cover; }
.ground-grid img.rune { padding: 8px; background: radial-gradient(circle at 35% 30%, #3a3142, #1a1621 70%); }
.ground-grid h3 { margin: 0; font: 700 19px var(--title-font); color: #e8cf96; }
.ground-grid p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

/* Gallery */
.gallery { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery a { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; border: 1px solid var(--trim); background: #000; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease), filter 0.3s; }
.gallery a::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px transparent; border-radius: 10px; transition: box-shadow 0.2s; }
.gallery a:hover img { transform: scale(1.06); filter: brightness(1.12); }
.gallery a:hover::after { box-shadow: inset 0 0 0 2px var(--gold); }

/* Modes */
.modes { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mode {
  padding: 30px 24px; text-align: center;
  border: 1px solid var(--line); border-top: 3px solid var(--trim-hi); border-radius: 10px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
}
.mode img { width: 56px; height: 56px; margin: 0 auto; }
.mode h3 { margin: 12px 0 6px; font: 700 23px var(--title-font); color: #e8cf96; }
.mode p { margin: 0; color: var(--muted); font-size: 15px; }

/* Closing call to play, over the board art. */
/* Where it plays */
.devices { margin: 26px auto 0; padding: 26px 28px; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, rgba(36, 32, 47, 0.55), rgba(20, 18, 26, 0.55)); }
.devices-lead { margin: 0 auto; max-width: 720px; color: var(--soft); font-size: 16px; }
.devices-lead strong { color: #f0d9a2; font-weight: 700; }
.device-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; }
.device-list li { display: flex; align-items: center; gap: 12px; text-align: left; }
.device-list svg { flex: none; width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.device-list span { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); line-height: 1.35; }
.device-list b { color: var(--text); font-size: 15px; }
.devices-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

.closing {
  position: relative; margin-top: 120px; padding: 110px 24px; text-align: center; overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgba(13, 11, 17, 0.55), rgba(13, 11, 17, 0.92) 75%),
    linear-gradient(180deg, var(--bg), rgba(13, 11, 17, 0) 25%, rgba(13, 11, 17, 0) 75%, var(--bg)),
    url('/img/hero.jpg') center / cover no-repeat;
  border-top: 1px solid rgba(180, 138, 67, 0.25);
}
.closing-inner { max-width: 640px; margin: 0 auto; }
.closing h2 {
  margin: 10px 0 0; font: 700 clamp(36px, 6vw, 64px)/1.05 var(--logo-font); letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff2c6 10%, #e2b75a 55%, #8f6524); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 22px rgba(226, 183, 90, 0.3));
}
.closing p { margin: 16px 0 0; color: var(--soft); font-size: 19px; }
.closing .note { font-size: 14px; color: var(--muted); }

.foot { padding: 40px 24px 44px; text-align: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); background: #0a090d; }
.foot img { width: 164px; height: auto; margin: 0 auto 14px; opacity: 0.9; }
.foot p { margin: 4px 0; }
.foot .contact { margin-bottom: 10px; font-size: 15px; color: var(--soft); }

/* The viewer: trailer and screenshots over the page. */
.viewer { width: min(1180px, 94vw); max-width: none; max-height: 92vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.viewer::backdrop { background: rgba(6, 5, 9, 0.9); backdrop-filter: blur(4px); }
.viewer[open] { animation: pop 0.25s var(--ease); }
.viewer-video { position: relative; width: 100%; max-height: 84vh; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 1px solid var(--trim-hi); background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.viewer-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer-body video, .viewer-shot img { width: 100%; max-height: 84vh; object-fit: contain; border-radius: 10px; border: 1px solid var(--trim-hi); background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.viewer-shot { margin: 0; }
.viewer-shot figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 14px; }
.viewer-close {
  position: absolute; right: -6px; top: -50px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: rgba(30, 26, 38, 0.9); border: 1px solid var(--trim-hi); border-radius: 50%;
}
.viewer-close svg { width: 20px; height: 20px; }
.viewer-close:hover { color: #fff2cf; border-color: var(--gold-hi); }

/* Sections ease in once (main.js adds .shown). */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
.card.reveal { transform: rotate(var(--tilt, 0deg)) translateY(calc(var(--drop, 0px) + 40px)); }
.card.reveal.shown { transform: rotate(var(--tilt, 0deg)) translateY(var(--drop, 0px)); }
.card.reveal.shown:hover, .card.reveal.shown:focus-visible { transform: rotate(0deg) translateY(-22px) scale(1.06); }
.pillar:nth-child(2), .gallery li:nth-child(3n + 2), .mode:nth-child(2) { transition-delay: 0.08s; }
.pillar:nth-child(3), .gallery li:nth-child(3n), .mode:nth-child(3) { transition-delay: 0.16s; }
.card:nth-child(2) { transition-delay: 0.05s; }
.card:nth-child(3) { transition-delay: 0.1s; }
.card:nth-child(4) { transition-delay: 0.15s; }
.card:nth-child(5) { transition-delay: 0.2s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* Credits page */
.page { max-width: 820px; margin: 0 auto; padding: 110px 24px 0; }
.page h1 { font: 700 36px var(--title-font); color: #f3dfae; margin: 0 0 18px; }
.page h2 { font: 700 22px var(--title-font); color: #e8cf96; margin: 32px 0 8px; }
.page pre {
  white-space: pre-wrap; padding: 18px; font-size: 13px; line-height: 1.5; color: var(--soft);
  background: var(--panel-lo); border: 1px solid var(--line); border-radius: 8px;
}
.page + .foot { margin-top: 80px; }
.top.static { position: sticky; background: rgba(13, 11, 17, 0.92); border-bottom-color: rgba(180, 138, 67, 0.28); }
.top.static .brand span { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .hand { flex-wrap: wrap; gap: 14px; }
  .card, .card:nth-child(n) { flex: 0 1 220px; margin: 0; --tilt: 0deg; --drop: 0px; }
}
@media (max-width: 860px) {
  .top-links a:not(.btn) { display: none; }
  .pillars, .modes { grid-template-columns: 1fr; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 26px; margin-top: 64px; }
  .feature.flip .shot-frame { order: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .top, .top.solid { padding: 9px 16px; }
  .brand span { font-size: 14px; }
  .hero-inner { padding: 96px 16px 110px; }
  .emblem { width: 84px; height: 84px; }
  .section { padding: 80px 16px 0; }
  .pillars { padding: 0 16px; }
  .actions .btn { flex: 1 1 100%; }
  .gallery { grid-template-columns: 1fr; }
  /* On a phone the hand becomes a row to swipe through. */
  .hand { flex-wrap: nowrap; justify-content: flex-start; gap: 12px; margin: 36px -16px 0; padding: 20px 16px 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .hand::-webkit-scrollbar { display: none; }
  .card, .card:nth-child(n) { flex: 0 0 76%; min-height: 0; scroll-snap-align: center; }
  .card.reveal.shown:hover, .card.reveal.shown:focus-visible { transform: none; }
  .shot-frame::before, .shot-frame::after { width: 30px; height: 30px; }
  .shot-frame::before { top: -6px; left: -6px; }
  .shot-frame::after { bottom: -6px; right: -6px; }
  .viewer-close { top: -48px; right: 0; }
  .devices { padding: 22px 18px; }
  .device-list { flex-direction: column; align-items: flex-start; width: fit-content; margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .card.reveal { opacity: 1; transform: none; }
}
