/* =========================================================================
   GLOAMDELVE: game page, on top of Ink & Bone (ttg.css, ttg-blocks.css)
   The game's own world: torchlight on umber dark, ember for action, red ink
   for the line you cross. In-world names are set in IM Fell English (the
   game's chosen face for its own pages); everything else stays studio type.
   ========================================================================= */

.gd {
  --paper:   #0C0B0A;
  --paper-2: #13110F;
  --paper-3: #1B1815;
  --card:    #161411;
  --ink:     #F2EEE6;
  --ink-2:   #C4BDB1;
  --ink-3:   #948C80;
  --rule:    rgba(242, 228, 210, 0.12);
  --rule-2:  rgba(242, 228, 210, 0.26);

  --game:    #E0723A;   /* torch ember: 6:1 on --paper */
  --game-hi: #F0945F;
  --red-ink: #D4503C;   /* 4.6:1 on --paper */
  --action:  var(--game);
  --action-ink: #0C0B0A;
  --font-fell: "IM Fell English", "Iowan Old Style", Georgia, serif;

  caret-color: var(--game);
}
.gd ::selection { background: var(--game); color: #0C0B0A; }
.gd a:not(.btn):not(.wordmark):not(.navlink) { text-underline-offset: 3px; }

/* width/height attributes reserve space; CSS sets the real shape. */
.gd main img:not(.gd-hero__img):not(.gd-city__img) { height: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Hero: the game itself, full bleed ------------------------------- */
@property --lit { syntax: "<percentage>"; inherits: false; initial-value: 150%; }

.gd-hero { position: relative; isolation: isolate; overflow: hidden;
  min-height: min(calc(100dvh - 68px), 960px); display: flex; align-items: flex-end;
  background: var(--paper); }
/* The key art opens from the dark around the torch, like light spreading. */
.gd-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
  object-fit: cover; object-position: 62% 50%;
  -webkit-mask-image: radial-gradient(circle at 62% 38%, #000 calc(var(--lit) - 40%), transparent var(--lit));
          mask-image: radial-gradient(circle at 62% 38%, #000 calc(var(--lit) - 40%), transparent var(--lit)); }
.gd-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(12, 11, 10, 0.96) 0%, rgba(12, 11, 10, 0.55) 34%, rgba(12, 11, 10, 0) 62%),
    linear-gradient(to right, rgba(12, 11, 10, 0.82) 0%, rgba(12, 11, 10, 0.3) 46%, rgba(12, 11, 10, 0) 70%); }
.gd-hero__body { padding-block: clamp(48px, 9vw, 96px) clamp(44px, 7vw, 84px); }
.gd-title { font-family: var(--font-fell); font-weight: 400; letter-spacing: -0.01em;
  font-size: clamp(3.4rem, 9vw, 6rem); line-height: 0.95; margin: 0 0 0.3em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
.gd-hero__line { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em;
  font-size: clamp(1.45rem, 2.7vw, 2.2rem); line-height: 1.12; max-width: 22ch; margin: 0 0 0.8rem; }
.gd-hero__sub { color: var(--ink-2); font-size: clamp(1rem, 1.3vw, 1.14rem); max-width: 46ch; margin: 0 0 2rem; }
.gd-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.gd-hero .btn--ghost { border-color: rgba(242, 228, 210, 0.42); background: rgba(12, 11, 10, 0.35); }

@media (prefers-reduced-motion: no-preference) {
  .gd-hero__img { animation: gd-light 2.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
  @keyframes gd-light { from { --lit: 0%; } to { --lit: 150%; } }
}

/* ---- Trailer and playtest: the game moving, and the way in ------------- */
.gd-play { padding-top: clamp(56px, 8vw, 112px); }
.gd-play__top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 72px); align-items: center; }
.gd-film { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
  background: var(--paper-3); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.gd-film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gd-film__poster { position: absolute; inset: 0; display: block; color: var(--ink); text-decoration: none; }
.gd-film__poster img { width: 100%; height: 100% !important; object-fit: cover; object-position: 40% 50%;
  filter: brightness(0.82) saturate(0.95); transition: filter 0.5s var(--ease), transform 0.9s var(--ease); }
.gd-film__poster::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(12, 11, 10, 0.78) 0%, rgba(12, 11, 10, 0) 42%); }
.gd-film__btn { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1;
  width: clamp(64px, 8vw, 92px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--game); color: var(--action-ink);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 236, 214, 0.35);
  transition: transform 0.35s var(--ease), background-color 0.25s; }
.gd-film__btn svg { width: 42%; height: 42%; fill: currentColor; translate: 6% 0; }
.gd-film__meta { position: absolute; left: clamp(16px, 2.4vw, 28px); bottom: clamp(14px, 2vw, 24px); z-index: 1;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(0.92rem, 1.2vw, 1.05rem); letter-spacing: -0.01em; }
.gd-film__meta span { margin-left: 0.5em; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.gd-film__poster:hover img, .gd-film__poster:focus-visible img { filter: brightness(1) saturate(1); transform: scale(1.02); }
.gd-film__poster:hover .gd-film__btn, .gd-film__poster:focus-visible .gd-film__btn { transform: scale(1.08); background: var(--game-hi); }
.gd-film__poster:active .gd-film__btn { transform: scale(0.97); }
.gd-film__poster:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--game); }

.gd-play__call .section-title { font-size: clamp(2rem, 3.6vw, 3.2rem); max-width: 12ch; }
.gd-play__call .lede { margin: 0 0 1.8rem; }
.gd-play__more { margin: 1.2rem 0 0; font-size: 0.95rem; color: var(--ink-3); }
.gd-play__more a, .gd-signup__alt a { color: var(--ink); text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--game) 70%, transparent); text-underline-offset: 3px; transition: color 0.2s; }
.gd-play__more a:hover, .gd-signup__alt a:hover { color: var(--game-hi); }

/* Five stills, two rows of different weight: one wide shot leads. */
.gd-stills { list-style: none; margin: clamp(48px, 7vw, 96px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.gd-stills li { border-radius: var(--r); overflow: hidden; background: var(--paper-3); border: 1px solid var(--rule); }
.gd-stills img { display: block; width: 100%; height: 100% !important; object-fit: cover; }
.gd-stills li:nth-child(1) { grid-column: span 4; aspect-ratio: 16 / 9; }
.gd-stills li:nth-child(2) { grid-column: span 2; }
.gd-stills li:nth-child(2) img { object-position: 0% 50%; }
.gd-stills li:nth-child(n+3) { grid-column: span 2; aspect-ratio: 4 / 3; }
.gd-stills li:nth-child(5) img { object-position: 76% 50%; }
.gd-stills__note { margin: 0.9rem 0 0; font-size: 0.86rem; color: var(--ink-3); }
.gd-signup__alt { margin: 1.4rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .gd-film__poster img, .gd-film__btn { transition: none; }
  .gd-film__poster:hover img { transform: none; }
}

/* ---- Nightmares --------------------------------------------------------- */
.gd-nm__top { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.gd-nm__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg);
  border: 1px solid var(--rule); box-shadow: var(--shadow); }
.gd-nm .section-title { max-width: 16ch; }
.gd-bounty { margin: 2rem 0 0; padding: clamp(24px, 3vw, 36px); background: var(--paper-3);
  border-block: 1px solid var(--rule-2); border-radius: 2px;
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.9); }
.gd-bounty blockquote { margin: 0; font-family: var(--font-fell); font-style: italic;
  font-size: clamp(1.7rem, 2.9vw, 2.45rem); line-height: 1.15; color: var(--ink); text-wrap: balance; }
.gd-bounty figcaption { margin-top: 1rem; font-size: 0.86rem; color: var(--ink-3); }

.gd-ladder { list-style: none; margin: clamp(56px, 8vw, 104px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(14px, 2vw, 28px); align-items: end; }
.gd-ladder li { border-top: 1px solid var(--rule-2); padding-top: 18px; }
.gd-ladder b { display: block; font-family: var(--font-fell); font-weight: 400; line-height: 1;
  color: var(--ink-3); margin-bottom: 0.7rem; font-size: 1.6rem; }
.gd-ladder h3 { font-size: 1.22rem; letter-spacing: -0.02em; margin: 0 0 0.45em; }
.gd-ladder p { color: var(--ink-2); font-size: 0.93rem; line-height: 1.5; margin: 0; }
/* Each tier stands taller and burns hotter than the last. */
.gd-ladder li:nth-child(2) { padding-top: 34px; }
.gd-ladder li:nth-child(2) b { font-size: 2rem; }
.gd-ladder li:nth-child(3) { padding-top: 52px; border-top-color: color-mix(in srgb, var(--game) 45%, var(--rule-2)); }
.gd-ladder li:nth-child(3) b { font-size: 2.5rem; color: var(--ink-2); }
.gd-ladder li:nth-child(4) { padding-top: 72px; border-top-color: color-mix(in srgb, var(--game) 75%, transparent); }
.gd-ladder li:nth-child(4) b { font-size: 3.1rem; color: var(--game); }
.gd-ladder li:nth-child(5) { padding-top: 94px; border-top: 2px solid var(--red-ink); }
.gd-ladder li:nth-child(5) b { font-size: 3.8rem; color: var(--red-ink); }
.gd-nm__fair { margin: clamp(36px, 5vw, 56px) 0 0; max-width: 64ch; color: var(--ink-2); }

/* ---- Combat: what the dice say ----------------------------------------- */
#combat .feature-row__art img { aspect-ratio: 16 / 10; object-fit: cover; box-shadow: var(--shadow); }
.gd-dice { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 1.6rem 0 0;
  background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.gd-dice > div { background: var(--paper); padding: 14px 16px; }
.gd-dice dt { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 1.05rem; }
.gd-dice > div:last-child dt { color: var(--game); }
.gd-dice dd { margin: 2px 0 0; font-size: 0.9rem; color: var(--ink-3); }
.gd-dice > div:first-child dt { color: var(--ink-3); }
.gd-note { margin: 1rem 0 0; font-size: 0.92rem; color: var(--ink-3); }

/* ---- The Dungeon: a depth gauge ----------------------------------------- */
.gd-deep__grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.gd-deep__art { position: sticky; top: 96px; }
.gd-deep__art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg);
  border: 1px solid var(--rule); box-shadow: var(--shadow); }
.gd-deep .section-title { max-width: 15ch; }
.gd-gauge { list-style: none; margin: 2.6rem 0 0; padding: 0; position: relative; }
.gd-gauge::before { content: ""; position: absolute; left: 2.6rem; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(to bottom, var(--rule-2), color-mix(in srgb, var(--game) 60%, transparent)); }
.gd-gauge li { display: grid; grid-template-columns: 5.2rem 1fr; align-items: baseline; padding: 14px 0; position: relative; }
.gd-gauge b { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; color: var(--ink-3); text-align: right; padding-right: 1.6rem; }
.gd-gauge h3 { font-family: var(--font-fell); font-weight: 400; font-size: 1.4rem; letter-spacing: 0; line-height: 1.15; margin: 0 0 0.15em; }
.gd-gauge p { margin: 0; color: var(--ink-2); font-size: 0.94rem; }
.gd-gauge li.is-line { margin-block: 10px; padding-block: 20px; }
.gd-gauge li.is-line::before, .gd-gauge li.is-line::after { content: ""; position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed color-mix(in srgb, var(--red-ink) 80%, transparent); }
.gd-gauge li.is-line::before { top: 0; }
.gd-gauge li.is-line::after { bottom: 0; }
.gd-gauge li.is-line b, .gd-gauge li.is-line h3 { color: var(--red-ink); }
.gd-gauge li:last-child b { color: var(--game); }


/* ---- Lidd: full-bleed city --------------------------------------------- */
.gd-city { position: relative; isolation: isolate; overflow: hidden; min-height: clamp(520px, 78vh, 860px);
  display: flex; align-items: flex-end; border-block: 1px solid var(--rule); }
.gd-city__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.gd-city::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(12, 11, 10, 0.95) 0%, rgba(12, 11, 10, 0.6) 30%, rgba(12, 11, 10, 0) 64%); }
.gd-city__body { padding-block: clamp(48px, 8vw, 96px); }
.gd-city .lede { max-width: 54ch; }

/* ---- Gods ---------------------------------------------------------------- */
.gd-gods { list-style: none; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(20px, 4vw, 56px); }
.gd-gods li { border-top: 1px solid var(--rule); padding: 22px 0 26px; }
.gd-gods h3 { font-family: var(--font-fell); font-weight: 400; font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  letter-spacing: 0; line-height: 1.1; margin: 0 0 0.35em; }
.gd-gods p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.gd-cast { margin: clamp(40px, 6vw, 72px) 0 0; }
.gd-cast img { width: 100%; aspect-ratio: 1920 / 823; object-fit: cover; border-radius: var(--r-lg);
  border: 1px solid var(--rule); box-shadow: var(--shadow); }


/* ---- The deal + signup ------------------------------------------------- */
#deal .trust { margin-top: 2.4rem; }
#deal .trust > div { background: var(--paper-2); }
.gd-signup { background: var(--paper-3); border-color: var(--rule-2); }
.gd-signup .section-title { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.gd .signup input { background: var(--paper); }
.gd .signup input:focus { border-color: var(--game); }

/* ---- Small screens ----------------------------------------------------- */
@media (max-width: 900px) {
  .gd-nm__top, .gd-deep__grid { grid-template-columns: 1fr; }
  .gd-play__top { grid-template-columns: 1fr; }
  .gd-play__call .section-title { max-width: 16ch; }
  .gd-ladder { grid-template-columns: 1fr; align-items: stretch; }
  .gd-ladder li, .gd-ladder li:nth-child(n) { padding-top: 16px; display: grid;
    grid-template-columns: 3.4rem 1fr; column-gap: 12px; }
  .gd-ladder li b, .gd-ladder li:nth-child(n) b { font-size: 2rem; grid-row: span 2; margin: 0; }
  .gd-deep__art { position: static; order: -1; }
  .gd-deep__art img { aspect-ratio: 16 / 11; }
  .gd-nm__img { aspect-ratio: 16 / 11; }
  .gd-gods { grid-template-columns: 1fr 1fr; }
  .gd-hero__img { object-position: 64% 50%; }
}
@media (max-width: 560px) {
  /* The stills become a strip you flick through, edge to edge. */
  .gd-stills { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
    margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad); }
  .gd-stills::-webkit-scrollbar { display: none; }
  .gd-stills li, .gd-stills li:nth-child(n) { grid-column: auto; aspect-ratio: 16 / 10; scroll-snap-align: start; }
  .gd-film__meta { font-size: 0.85rem; }
  .gd-gods, .gd-dice { grid-template-columns: 1fr; }
  .gd-gauge::before { left: 1.9rem; }
  .gd-gauge li { grid-template-columns: 3.8rem 1fr; }
  .gd-gauge b { padding-right: 1.2rem; font-size: 1.25rem; }
  .gd-hero { min-height: min(calc(100dvh - 68px), 720px); }
  .gd-hero__cta .btn { flex: 1 1 auto; }
}
