/* Diceflame Studio
   Theme: dark only, locked (the brand is an ember on charcoal).
   Accent: one ember orange, used everywhere.
   Shapes: buttons and toggles are full pills, panels are 6px. Nothing else. */

:root {
  --bg: #131110;
  --bg-2: #1a1715;
  --bg-3: #221e1b;
  --line: #2f2925;
  --text: #ede6de;
  --muted: #a69c92;
  --ember: #e8622c;
  --ember-hot: #f07a45;
  --ember-ink: #1c0e07;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", monospace;

  --r-panel: 6px;
  --pad: clamp(20px, 5vw, 56px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-index scale */
  --z-nav: 20;
  --z-grain: 30;
  --z-skip: 40;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Film grain on a fixed layer only, never on scrolling content. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
img, svg { display: block; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

::selection { background: var(--ember); color: var(--ember-ink); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: 12px; top: -60px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  background: var(--ember);
  color: var(--ember-ink);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 1rem/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn .ph { font-size: 1.15em; transition: transform 0.3s var(--ease); }

.btn--solid { background: var(--ember); color: var(--ember-ink); }
.btn--solid:hover { background: var(--ember-hot); }
.btn--solid:hover .ph-arrow-down-right { transform: translate(2px, 2px); }

.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted); background: var(--bg-2); }

.btn--sm { height: 40px; padding: 0 18px; font-size: 0.9375rem; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  height: var(--nav-h);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgb(19 17 16 / 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand__mark { width: 26px; height: 33px; color: var(--ember); }
.brand__word {
  font: 700 1.1875rem/1 var(--display);
  font-variation-settings: "wdth" 88;
  letter-spacing: -0.01em;
  font-variant-ligatures: no-common-ligatures;
}
.brand__sub {
  margin-left: 6px;
  font-weight: 400;
  color: var(--muted);
}

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 8px;
}
.nav__links a {
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--text); }

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang button {
  height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 0.8125rem/1 var(--mono);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--bg-3); color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 72px;
  overflow: clip;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  align-items: center;
  gap: clamp(32px, 4vw, 64px);
}

.eyebrow {
  margin-bottom: 18px;
  font: 500 0.8125rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ember);
}

.hero__title {
  font: 800 clamp(3.2rem, 7vw, 6.4rem)/0.92 var(--display);
  font-variation-settings: "wdth" 80, "opsz" 96;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero__lede {
  margin-top: 24px;
  max-width: 38ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  color: var(--muted);
}

.hero__ctas {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__shot {
  margin: 0;
  /* bleeds past the container to the right edge of the viewport */
  margin-right: calc(-1 * var(--pad) - max(0px, (100vw - 1280px) / 2));
  border-radius: var(--r-panel) 0 0 var(--r-panel);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgb(232 98 44 / 0.25), 0 0 0 1px var(--line);
}
.hero__shot img { width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise 0.9s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero__copy > :nth-child(4) { animation-delay: 0.18s; }
  .hero__shot { animation: settle 1.1s var(--ease) 0.1s both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes settle {
  from { opacity: 0; transform: translateY(28px) rotate(1.2deg) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* ---------- About band ---------- */

.about {
  padding: clamp(72px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 120% at 50% 0%, rgb(232 98 44 / 0.08), transparent 70%);
}
.about__inner {
  display: grid;
  justify-items: center;
  text-align: center;
}
.about__mark {
  width: 56px;
  height: auto;
  aspect-ratio: 788 / 996;
  color: var(--ember);
  margin-bottom: 28px;
}
.about__text {
  max-width: 30ch;
  font: 500 clamp(1.5rem, 3vw, 2.5rem)/1.22 var(--display);
  font-variation-settings: "wdth" 92, "opsz" 48;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.about__text strong { color: var(--ember); font-weight: 600; }

/* ---------- Games ---------- */

.games { padding: clamp(80px, 11vw, 144px) 0; }

.h2 {
  font: 700 clamp(2.1rem, 4.4vw, 3.6rem)/1.02 var(--display);
  font-variation-settings: "wdth" 86, "opsz" 72;
  letter-spacing: -0.03em;
}

.game__title {
  font: 800 clamp(2.4rem, 4.6vw, 4rem)/0.95 var(--display);
  font-variation-settings: "wdth" 80, "opsz" 72;
  letter-spacing: -0.035em;
}

.game__pitch {
  margin-top: 20px;
  max-width: 52ch;
  font-size: 1.125rem;
  color: var(--muted);
}

.facts {
  margin: 32px 0 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  max-width: 520px;
}
.facts--row { grid-template-columns: repeat(3, minmax(0, max-content)); gap: 20px 48px; max-width: none; }
.facts dt, .debt__facts dt {
  font: 400 0.8125rem/1.4 var(--mono);
  color: var(--muted);
}
.facts dd, .debt__facts dd { margin-top: 4px; font-weight: 500; }

figure { margin: 0; }
.shot,
.pray__banner,
.pray__shots figure,
.core__mosaic figure {
  display: block;
  border-radius: var(--r-panel);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.pray__banner img,
.pray__shots img,
.core__mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.pray__banner:hover img,
.pray__shots figure:hover img,
.core__mosaic figure:hover img { transform: scale(1.03); }

/* Pray & Tell: banner across the top, text left, two screenshots stacked right */
.pray { margin-top: 56px; }
.pray__banner { aspect-ratio: 1920 / 500; }
.pray__body {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.pray__shots { display: grid; gap: 14px; }
.pray__shots figure { aspect-ratio: 16 / 9; }

/* Search of the Core: image mosaic first, text in a band below */
.core {
  margin-top: clamp(96px, 12vw, 160px);
  padding-top: clamp(64px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.core__mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}
.core__main { grid-row: span 2; }
.core__mosaic figure { aspect-ratio: auto; }
.core__main { aspect-ratio: 1500 / 835; }
.core__body {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title cta"
    "pitch pitch"
    "facts facts";
  align-items: end;
  column-gap: 32px;
}
.core__body .game__title { grid-area: title; }
.core__body .game__pitch { grid-area: pitch; }
.core__body .facts { grid-area: facts; margin-bottom: 0; }
.core__body .btn { grid-area: cta; }

/* Royal Debt: a ruled panel, like a page from the Crown's ledger */
.debt {
  margin-top: clamp(96px, 12vw, 160px);
  padding: clamp(36px, 6vw, 80px);
  background:
    repeating-linear-gradient(180deg, transparent 0 39px, rgb(237 230 222 / 0.035) 39px 40px),
    var(--bg-2);
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: 6px;
  border-radius: var(--r-panel);
  text-align: center;
}
.debt__status {
  font: 500 0.875rem/1 var(--mono);
  color: var(--ember);
  margin-bottom: 20px;
}
.debt__title {
  font: 800 clamp(3rem, 9vw, 8rem)/0.9 var(--display);
  font-variation-settings: "wdth" 75, "opsz" 96;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.debt__pitch {
  margin: 28px auto 0;
  max-width: 54ch;
  font-size: 1.125rem;
  color: var(--muted);
}
.debt__facts {
  margin: 48px auto 0;
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.debt__facts > div + div { border-left: 1px solid var(--line); }

/* ---------- Team ---------- */

.team {
  padding: clamp(80px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}
.team__list {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}
.team__list li {
  padding: 28px 0 0;
  border-top: 2px solid var(--line);
  transition: border-color 0.4s var(--ease);
}
.team__list li:hover { border-top-color: var(--ember); }
.team__name {
  font: 700 clamp(1.75rem, 3.2vw, 2.75rem)/1.05 var(--display);
  font-variation-settings: "wdth" 85, "opsz" 72;
  letter-spacing: -0.025em;
}
.team__role {
  margin-top: 10px;
  font: 400 0.9375rem/1.5 var(--mono);
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact {
  padding: clamp(80px, 11vw, 144px) 0;
  border-top: 1px solid var(--line);
  background: radial-gradient(70% 90% at 15% 110%, rgb(232 98 44 / 0.14), transparent 70%);
}
.contact__lede {
  font: 500 clamp(1.25rem, 2vw, 1.5rem)/1.4 var(--body);
  color: var(--muted);
}
.contact__mail {
  display: inline-block;
  margin-top: 18px;
  padding-bottom: 6px;
  font: 700 clamp(2rem, 6.4vw, 5.6rem)/1.05 var(--display);
  font-variation-settings: "wdth" 80, "opsz" 96;
  letter-spacing: -0.02em;
  font-variant-ligatures: no-common-ligatures;
  text-decoration: none;
  background: linear-gradient(var(--ember), var(--ember)) 0 100% / 0 3px no-repeat;
  transition: background-size 0.6s var(--ease), color 0.3s var(--ease);
  overflow-wrap: anywhere;
}
.contact__mail:hover { color: var(--ember); background-size: 100% 3px; }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); padding: 32px 0; }
.foot__inner { display: flex; align-items: center; gap: 32px; }
.foot__links { display: flex; gap: 24px; margin-left: auto; }
.foot__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.foot__links a:hover { color: var(--text); }
.foot__copy { font: 400 0.8125rem/1 var(--mono); color: var(--muted); }

/* ---------- Scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .team__list li:nth-child(2) { transition-delay: 0.08s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 5.5fr) minmax(0, 6.5fr); }
}

@media (max-width: 1023px) {
  .hero__title { font-size: clamp(2.8rem, 6.4vw, 4.4rem); }
}

@media (max-width: 767px) {
  :root { --nav-h: 60px; }
  .brand__sub { display: none; }
  .nav__links { gap: 18px; }
  .nav__links a { font-size: 0.875rem; }
  .nav__links a[href="#team"] { display: none; }
}

@media (max-width: 479px) {
  .nav__links { display: none; }
  .lang { margin-left: auto; }

  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 36px); }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__shot { margin-right: calc(-1 * var(--pad)); }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }

  .pray__body { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts--row { grid-template-columns: 1fr 1fr; gap: 20px 32px; }

  .core__mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .core__main { grid-row: auto; grid-column: span 2; }
  .core__mosaic figure:not(.core__main) { aspect-ratio: 16 / 9; }
  .core__body {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "pitch" "facts" "cta";
  }
  .core__body .facts { margin-bottom: 28px; }
  .core__body .btn { justify-self: start; }

  .debt { text-align: left; }
  .debt__pitch { margin-left: 0; }
  .debt__facts { grid-template-columns: 1fr; gap: 18px; }
  .debt__facts > div + div { border-left: 0; }

  .team__list { grid-template-columns: 1fr; gap: 32px; }

  .foot__inner { flex-wrap: wrap; gap: 20px; }
  .foot__links { margin-left: 0; width: 100%; order: 3; }
}
