/* ============================================================
   /grimmige_grim - "Of Light and Shadow" / Three Thresholds
   The plates are the page; the interface recedes to bone text
   and one candle accent. Cinzel (+ Forum for Cyrillic) is used
   only for names, as carved inscriptions. Cormorant: italic for
   Grim's own words, roman for the site's voice.
   Static by default; html.gg-motion (wide screens, motion
   allowed) turns each threshold into a pinned walk-through,
   driven by js/grimmige-grim.js.
   ============================================================ */

.gg {
  --night: #08070b;
  --bone: #e6dece;
  --candle: #e9b968;
  --ash: #9a92a8;
  --smoke: #15131a;
  --ff-inscr: "Cinzel", "Forum", "Trajan Pro", serif;
  --ff-prose: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --ff-code: "IBM Plex Mono", ui-monospace, monospace;
  /* type scale - perfect fourth from 20px prose */
  --t-s: .94rem;  --t-0: 1.25rem;  --t-1: 1.666rem;  --t-2: 2.22rem;  --t-3: 2.96rem;  --t-4: 3.95rem;
  background: var(--night);
  color: var(--bone);
  font-family: var(--ff-prose);
  font-size: var(--t-0);
  line-height: 1.6;
  overflow-x: clip;
  /* music player + credits (css/creator-soundscape.css) */
  --cs-accent: var(--candle); --cs-ink: var(--bone); --cs-dim: var(--ash); --cs-bg: rgba(8, 7, 11, .88);
  --cs-font: var(--ff-prose); --cs-heading: var(--ff-inscr);
}
.gg ::selection { background: rgba(233, 185, 104, .3); color: #fff7e6; }
.gg :where(a) { color: inherit; }   /* zero-specificity base so component link colours win */
.gg a:focus-visible, .gg button:focus-visible, .gg [tabindex]:focus-visible { outline: 2px solid var(--candle); outline-offset: 4px; border-radius: 2px; }
.gg :where(img) { max-width: 100%; }
.gg :where(p) { margin: 0; }   /* zero-specificity resets: every component sets its own spacing */

.gg-heading {
  font-family: var(--ff-inscr); font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, var(--t-3)); letter-spacing: .05em; line-height: 1.15;
  text-align: center; color: var(--bone); margin: 0 0 .5rem;
}
.gg-lede { max-width: 34rem; margin: 0 auto 3rem; text-align: center; color: var(--ash); font-size: 1.15rem; }
.gg-rule { display: block; width: min(460px, 76%); height: auto; margin: 0 auto; opacity: .85; }

/* ═══ OVERTURE ════════════════════════════════════════════ */
/* the site styles every <section> with an 8rem padding; the full-bleed parts must not inherit it */
.gg-overture { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; padding: 0; }
.gg-overture__plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; z-index: -2; }
.gg-overture::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 7, 11, .55) 0%, rgba(8, 7, 11, 0) 22%, rgba(8, 7, 11, 0) 70%, var(--night) 100%);
}
.gg-overture__content { text-align: center; padding: 6rem 1rem 8rem; }
.gg-overture__sigil { width: clamp(76px, 8.5vw, 118px); height: auto; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .65)); }
.gg-overture__name {
  font-family: var(--ff-inscr); font-weight: 500;
  font-size: clamp(2rem, 8vw, 6.8rem); letter-spacing: .06em; line-height: 1;
  margin: .32em 0 .18em; color: var(--bone); overflow-wrap: anywhere;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 240, 210, .12), 0 0 70px rgba(233, 185, 104, .2);
}
.gg-overture__epithet { font-style: italic; font-size: clamp(1.35rem, 2.4vw, 2rem); color: var(--candle); text-shadow: 0 2px 14px rgba(0, 0, 0, .8); }
.gg-overture__cue {
  position: absolute; left: 50%; bottom: 2.4rem; transform: translateX(-50%);
  font-size: 1rem; color: var(--ash); text-decoration: none; text-align: center; white-space: nowrap;
  padding-bottom: 2.2rem;
}
.gg-overture__cue::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 1.6rem; background: linear-gradient(var(--candle), transparent); }
.gg-overture__cue:hover { color: var(--bone); }

/* the one page-load sequence */
@media (prefers-reduced-motion: no-preference) {
  .gg-overture__sigil   { animation: ggRise 1.4s .2s cubic-bezier(.2, .7, .2, 1) both; }
  .gg-overture__name    { animation: ggCarve 1.8s .45s cubic-bezier(.2, .7, .2, 1) both; }
  .gg-overture__epithet { animation: ggRise 1.2s 1.15s ease-out both; }
  .gg-overture__cue     { animation: ggFade 1s 1.9s ease-out both; }
}
@keyframes ggRise  { from { opacity: 0; transform: translateY(14px); } }
@keyframes ggCarve { from { opacity: 0; letter-spacing: .22em; filter: blur(6px); } }
@keyframes ggFade  { from { opacity: 0; } }

/* ═══ EPIGRAPH ════════════════════════════════════════════ */
.gg-epigraph { max-width: 40rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) 1.25rem clamp(5rem, 11vw, 9rem); text-align: center; }
.gg-epigraph__bio { margin: 2.6rem 0 0; }
.gg-epigraph__bio p { font-style: italic; font-size: clamp(1.28rem, 2vw, 1.5rem); line-height: 1.68; margin-bottom: .9em; }
.gg-epigraph__bio p:last-child { color: var(--candle); margin-bottom: 0; }
.gg-epigraph__facts { margin-top: 2.4rem; color: var(--ash); font-size: 1.08rem; line-height: 1.75; }
.gg-empty { text-align: center; padding: 2rem 1.25rem 6rem; color: var(--ash); }

/* The builder's first character, independent of the house thresholds. */
.gg-character { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); max-width: 68rem; margin: 0 auto; padding: 0 2rem 7rem; }
.gg-character__portrait { position: relative; isolation: isolate; margin: 0; }
.gg-character__portrait::before { content: ""; position: absolute; inset: 12% 0 5%; z-index: -1; background: radial-gradient(ellipse, #67506e40, transparent 68%); }
.gg-character__portrait img { display: block; width: 100%; height: auto; }
.gg-character__text h2 { font-family: var(--ff-inscr); font-weight: 500; font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.1; color: var(--bone); margin: .5rem 0 1rem; }
.gg .gg-character__eyebrow { color: var(--ash); font-size: 1rem; letter-spacing: .09em; }
.gg .gg-character__role { color: var(--candle); font-style: italic; margin: 0 0 1.8rem; }
.gg .gg-character__text > p:not([class]) { color: var(--bone); margin-top: 1.1rem; line-height: 1.7; }
@media (max-width: 820px) {
  .gg-character { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; max-width: 34rem; padding: 0 1.5rem 4rem; }
  .gg-character__portrait { width: min(80vw, 340px); justify-self: center; }
  .gg-character__text h2, .gg-character__eyebrow, .gg-character__role { text-align: center; }
}

/* ═══ THRESHOLDS - static composition (default) ═══════════ */
.gg-scene { position: relative; isolation: isolate; padding: 0; }
.gg-scene__stage { position: relative; width: 100%; aspect-ratio: 1672 / 941; max-height: 94vh; overflow: hidden; background: #000; }
.gg-scene__cover, .gg-scene__ambient, .gg-scene__scrim { position: absolute; inset: 0; }
.gg-scene__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gg-scene__ambient { background-size: cover; background-position: 50% 50%; mix-blend-mode: screen; opacity: 0; pointer-events: none; }
.gg-scene--sulfur .gg-scene__ambient { background-size: 640px; background-repeat: repeat; }
.gg-scene__gate { position: absolute; inset: 0; pointer-events: none; }
.gg-scene__gate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gg-scene__scrim { opacity: 0; pointer-events: none; }
.gg-scene__runway { display: none; }

.gg-scene__title {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; text-align: center;
  padding: 18vh 1.25rem 6vh;
  background: linear-gradient(180deg, transparent, rgba(8, 7, 11, .55) 45%, rgba(8, 7, 11, .9));
}
.gg-scene__title h2 {
  font-family: var(--ff-inscr); font-weight: 500;
  font-size: clamp(2rem, 5vw, var(--t-4)); letter-spacing: .05em; line-height: 1.05; margin: 0 0 .35rem;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .8), 0 0 40px rgba(0, 0, 0, .9);
}
.gg-scene__title p { font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: #d7cdbb; text-shadow: 0 2px 12px rgba(0, 0, 0, .9); }

.gg-scene__panel { position: relative; z-index: 4; max-width: 38rem; margin: 0 auto; padding: 3.2rem 1.25rem 2.5rem; }
.gg-scene__desc { font-style: italic; font-size: 1.22rem; line-height: 1.7; margin-bottom: 2rem; }
.gg-scene__quote { margin: 2.2rem 0 1.8rem; padding-left: 1.2rem; border-left: 1px solid var(--candle); }
.gg-scene__quote p { font-style: italic; font-size: 1.28rem; line-height: 1.6; }
.gg-scene__quote footer { margin-top: .4rem; font-size: 1rem; color: var(--ash); }
.gg-scene__facts { color: var(--ash); font-size: 1.05rem; margin-bottom: 1.2rem; }
.gg-scene__enter {
  display: inline-block; font-size: 1.3rem; font-weight: 600; color: var(--candle);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .35em;
  transition: text-underline-offset .3s, color .3s;
}
.gg-scene__enter:hover { color: #ffd896; text-underline-offset: .5em; }

/* chapter paths - one drawing per house */
.gg-path { list-style: none; margin: 0; padding: 0; }
.gg-path a { text-decoration: none; display: grid; grid-template-columns: auto 1fr; column-gap: .85rem; align-items: center; }
.gg-path__glyph { grid-row: span 2; width: 26px; height: auto; filter: drop-shadow(0 0 8px rgba(233, 185, 104, .25)); }
.gg-path__name { font-weight: 600; font-size: 1.12rem; line-height: 1.3; transition: color .3s; }
.gg-path__sub { grid-column: 2; font-style: italic; font-size: 1rem; color: var(--ash); line-height: 1.35; }
.gg-path a:hover .gg-path__name { color: var(--candle); }
/* descent: each chapter a step lower, toward the crypt */
.gg-path--descent li { margin: 0 0 .9rem calc(var(--k) * 1.15rem); }
.gg-path--descent .gg-path__glyph { width: 22px; }
/* stones: stepping stones across the pool */
.gg-path--stones { display: flex; flex-wrap: wrap; gap: .7rem; }
.gg-path--stones a {
  padding: .65rem 1.1rem .7rem .8rem; border: 1px solid rgba(201, 214, 160, .28);
  border-radius: 26px 34px 22px 30px / 22px 26px 28px 24px; background: rgba(12, 16, 10, .55);
  transition: border-color .3s, background .3s;
}
.gg-path--stones a:hover { border-color: rgba(233, 185, 104, .6); background: rgba(30, 32, 16, .7); }
.gg-path--stones .gg-path__glyph { width: 30px; }
/* phases: the moons wax and wane across the chapters */
.gg-path--phases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; }
.gg-path--phases .gg-path__glyph { width: 32px; }

/* chapter windows after each threshold, on the house's own ground */
.gg-strip {
  position: relative; isolation: isolate; list-style: none; margin: 0; padding: clamp(3rem, 6vw, 5rem) 1.25rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 210px)); justify-content: center; gap: 1.6rem;
}
.gg-strip::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ground) center / 560px repeat; opacity: .16;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}
.gg-strip a { display: block; text-decoration: none; text-align: center; }
.gg-strip__win { display: block; overflow: hidden; aspect-ratio: 3 / 4; box-shadow: 0 0 0 1px rgba(230, 222, 206, .14), 0 18px 40px -18px rgba(0, 0, 0, .9); }
.gg-strip__win img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.82); transition: filter .5s, transform .8s cubic-bezier(.2, .7, .2, 1); }
.gg-strip a:hover img, .gg-strip a:focus-visible img { filter: brightness(1); transform: scale(1.04); }
.gg-strip__name { display: block; margin-top: .7rem; font-size: 1rem; color: var(--ash); transition: color .3s; }
.gg-strip a:hover .gg-strip__name { color: var(--bone); }
.gg-strip--veil .gg-strip__win  { border-radius: 50% 50% 3px 3px / 30% 30% 3px 3px; }
.gg-strip--sulfur .gg-strip__win { aspect-ratio: 4 / 3; border-radius: 30px 70px 26px 56px / 26px 40px 30px 44px; }
.gg-strip--sulfur { grid-template-columns: repeat(auto-fit, minmax(180px, 280px)); }
.gg-strip--moons .gg-strip__win  { aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 1px rgba(127, 214, 255, .35), 0 0 30px rgba(127, 214, 255, .08); }

/* ═══ THRESHOLDS - pinned walk-through (wide screens, motion allowed) ═══ */
html.gg-motion .gg-scene:not(.is-open) .gg-scene__stage { position: sticky; top: 0; height: 100vh; height: 100svh; max-height: none; aspect-ratio: auto; }
html.gg-motion .gg-scene:not(.is-open) .gg-scene__runway { display: block; height: 160vh; }
html.gg-motion .gg-scene:not(.is-open) .gg-scene__gate {
  inset: auto; left: 50%; top: 50%; width: max(100vw, 177.69vh); aspect-ratio: 1672 / 941; height: auto;
  transform: translate(-50%, -50%);
  /* no will-change: this layer grows ~5x and a pre-promoted texture that size paints black on some GPUs */
}
html.gg-motion .gg-scene:not(.is-open) .gg-scene__title { padding-bottom: 7vh; }
html.gg-motion .gg-scene:not(.is-open) .gg-scene__scrim { background: linear-gradient(90deg, rgba(8, 7, 11, .2) 0%, rgba(8, 7, 11, .55) 46%, rgba(8, 7, 11, .94) 78%); }
html.gg-motion .gg-scene--left:not(.is-open) .gg-scene__scrim { background: linear-gradient(270deg, rgba(8, 7, 11, .2) 0%, rgba(8, 7, 11, .55) 46%, rgba(8, 7, 11, .94) 78%); }
html.gg-motion .gg-scene:not(.is-open) .gg-scene__panel {
  width: min(34rem, 42vw); max-width: none; margin: 0 6vw 0 auto; padding: 14vh 0 26vh;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .75);
}
html.gg-motion .gg-scene--left:not(.is-open) .gg-scene__panel { margin: 0 auto 0 6vw; }

/* ═══ STORIED HOUSE WITHOUT A BESPOKE THRESHOLD ═══════════ */
.gg-framed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; max-width: 1100px; margin: 0 auto; padding: clamp(4rem, 8vw, 6rem) 1.25rem; }
.gg-framed__pic { position: relative; display: block; aspect-ratio: 1; }
.gg-framed__pic img:first-child { position: absolute; inset: 6.4%; width: 87.2%; height: 87.2%; object-fit: cover; }
.gg-framed__frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.gg-framed h2 { font-family: var(--ff-inscr); font-weight: 500; font-size: clamp(1.8rem, 3.5vw, var(--t-3)); letter-spacing: .05em; margin: 0 0 1rem; }
.gg-framed__desc { font-style: italic; font-size: 1.2rem; line-height: 1.7; margin-bottom: 1.5rem; }

/* ═══ ANTECHAMBER ═════════════════════════════════════════ */
.gg-ante { max-width: 1160px; margin: 0 auto; padding: clamp(5rem, 10vw, 8rem) 1.25rem clamp(3rem, 6vw, 5rem); }
.gg-ante__wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 3rem 2.4rem; }
.gg-ante__piece { display: block; text-decoration: none; text-align: center; }
.gg-ante__pic { position: relative; display: block; aspect-ratio: 1; }
.gg-ante__pic::before {                                    /* the sconce light above each piece, in the house's colour */
  content: ""; position: absolute; left: 10%; right: 10%; top: -14%; height: 60%; z-index: -1;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--h-rgb), .45), transparent 70%); filter: blur(10px);
  opacity: .55; transition: opacity .5s;
}
.gg-ante__pic img:first-child { position: absolute; inset: 6.4%; width: 87.2%; height: 87.2%; object-fit: cover; filter: brightness(.82); transition: filter .5s; }
.gg-ante__frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.gg-ante__piece:hover .gg-ante__pic::before, .gg-ante__piece:focus-visible .gg-ante__pic::before { opacity: 1; }
.gg-ante__piece:hover .gg-ante__pic img:first-child { filter: brightness(1); }
.gg-ante__name { display: block; margin-top: 1.3rem; font-family: var(--ff-inscr); font-weight: 500; font-size: 1.15rem; letter-spacing: .05em; }
.gg-ante__place { display: block; margin-top: .2rem; font-size: 1rem; color: var(--ash); }
.gg-ante__rooms { display: block; margin-top: .55rem; font-style: italic; font-size: 1rem; line-height: 1.5; color: #bdb4a6; }

/* ═══ SEALS OF THE ARCHIVE ════════════════════════════════
   Live achievements. CSS medallions until the generated art
   exists (img/achievements/frame-<tier>, emblem-<key>). */
.gg-seals { position: relative; isolation: isolate; max-width: 1100px; margin: 0 auto; padding: clamp(5rem, 10vw, 8rem) 1.25rem 2rem; }
/* the achievement pack's panel ground, very low - soft-light only adds grain to the night */
.gg-seals::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("/img/achievements/seals-ground.webp") center / 512px repeat; opacity: .35; mix-blend-mode: soft-light;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
}
.gg-seals__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2.6rem 1.8rem; }
.gg-seal {
  --ring-a: #6e6a63; --ring-b: #a9a49a; --ring-glow: rgba(169, 164, 154, .18); --disc: #121014;
  text-align: center; display: flex; flex-direction: column; align-items: center; border-radius: 6px;
}
.gg-seal--uncommon  { --ring-a: #4f7f7a; --ring-b: #a9c7c2; --ring-glow: rgba(138, 170, 192, .22); --disc: #0e1416; }
.gg-seal--rare      { --ring-a: #8a6a34; --ring-b: #e2c487; --ring-glow: rgba(212, 175, 122, .26); --disc: #15110a; }
.gg-seal--epic      { --ring-a: #4d2f7a; --ring-b: #b896e6; --ring-glow: rgba(160, 122, 216, .3);  --disc: #110b19; }
.gg-seal--legendary { --ring-a: #9a7224; --ring-b: #fbe7a6; --ring-glow: rgba(240, 216, 128, .38); --disc: #171108; }
.gg-seal--role      { --ring-a: #6d675a; --ring-b: #e6dfcd; --ring-glow: rgba(200, 192, 168, .26); --disc: #121110; }
.gg-seal__medal {
  position: relative; width: 120px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1.1rem;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .08), transparent 45%),
    radial-gradient(circle, var(--disc) 0 56%, transparent 57%),
    conic-gradient(from 210deg, var(--ring-a), var(--ring-b), var(--ring-a), var(--ring-b), var(--ring-a));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 28px var(--ring-glow), inset 0 0 0 6px rgba(0, 0, 0, .25);
  transform: perspective(600px) rotateX(0) rotateY(0); transition: transform .6s cubic-bezier(.2, .7, .2, 1), box-shadow .6s;
  overflow: hidden; isolation: isolate;
}
.gg-seal__medal::before { content: ""; position: absolute; inset: 15%; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ring-b) 45%, transparent); }
.gg-seal__medal::after {
  content: ""; position: absolute; inset: -20%; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 248, 225, .28) 50%, transparent 62%); transform: translateX(-120%);
}
/* generated art (img/achievements): the frames fill their square canvas edge to edge - crests and legendary
   rays reach the corners - so a framed seal is not clipped to a circle; the glow follows the art's alpha */
.gg-seal__medal.has-frame { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.gg-seal__medal.has-frame::before, .gg-seal__medal.has-frame::after { display: none; }
.gg-seal__medal.has-frame .gg-seal__frame { filter: drop-shadow(0 0 14px var(--ring-glow)) drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); transition: filter .5s; }
.gg-seal:hover .gg-seal__medal.has-frame, .gg-seal:focus-visible .gg-seal__medal.has-frame { transform: perspective(600px) translateY(-4px) rotateX(6deg); box-shadow: none; }
.gg-seal:hover .has-frame .gg-seal__frame, .gg-seal:focus-visible .has-frame .gg-seal__frame { filter: drop-shadow(0 0 22px var(--ring-glow)) drop-shadow(0 8px 12px rgba(0, 0, 0, .6)); }
/* the golden unlock light, behind earned legendary seals on hover only */
.gg-seal--legendary .gg-seal__medal.has-frame { isolation: isolate; }
.gg-seal--legendary .gg-seal__medal.has-frame .gg-seal__burst {
  position: absolute; inset: -45%; z-index: -1; pointer-events: none; background: url("/img/achievements/unlock-burst.webp") center / contain no-repeat;
  mix-blend-mode: screen; opacity: 0; transition: opacity .6s;
}
.gg-seal--legendary:hover .gg-seal__burst, .gg-seal--legendary:focus-visible .gg-seal__burst { opacity: .8; }
.gg-seal__frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 0; }
.gg-seal__emblem-img { position: relative; z-index: 1; width: 56%; height: 56%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.gg-seal__emblem { position: relative; z-index: 1; font-size: 2.3rem; line-height: 1; color: var(--seal); text-shadow: 0 0 14px color-mix(in srgb, var(--seal) 55%, transparent), 0 1px 0 rgba(0, 0, 0, .8); }
.gg-seal:hover .gg-seal__medal, .gg-seal:focus-visible .gg-seal__medal { transform: perspective(600px) rotateX(8deg) rotateY(-14deg); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 42px var(--ring-glow), inset 0 0 0 6px rgba(0, 0, 0, .25); }
.gg-seal__name { font-family: var(--ff-inscr); font-weight: 500; font-size: 1.08rem; letter-spacing: .05em; margin: 0 0 .25rem; }
.gg-seal__tier { font-size: .98rem; color: var(--ring-b); }
.gg-seal__desc { max-width: 250px; margin-top: .55rem; font-size: 1.02rem; line-height: 1.55; color: #b4ac9e; }
.gg-seal__title { margin-top: .5rem; font-size: .98rem; color: var(--ring-b); }

.gg-road { max-width: 820px; margin: 4rem auto 0; padding-top: 2.4rem; border-top: 1px solid rgba(255, 255, 255, .06); }
.gg-road__label { font-family: var(--ff-inscr); font-weight: 500; font-size: 1.05rem; letter-spacing: .05em; text-align: center; margin: 0 0 1.8rem; color: var(--ash); }
.gg-road__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.6rem 2.4rem; }
.gg-road__item { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: center; }
.gg-road__ring {
  width: 66px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, #0c0b0e 0 63%, transparent 64%), conic-gradient(var(--ring-b) calc(var(--p) * 1%), rgba(255, 255, 255, .07) 0);
  box-shadow: 0 0 18px var(--ring-glow);
}
.gg-road__ring span { font-size: 1.35rem; color: var(--seal); opacity: .75; }
.gg-road__ring img { width: 56%; height: 56%; object-fit: contain; opacity: .75; filter: saturate(.6); }
.gg-road__name { font-family: var(--ff-inscr); font-weight: 500; font-size: 1rem; letter-spacing: .04em; }
.gg-road__count { color: var(--ring-b); font-size: 1rem; }
.gg-road__desc { margin-top: .2rem; font-size: 1rem; line-height: 1.5; color: #a9a194; }

/* ═══ THE VISITORS' LEDGER ════════════════════════════════ */
.gg-ledger { max-width: 940px; margin: 0 auto; padding: clamp(5rem, 10vw, 8rem) 1.25rem 2rem; }
.gg-ledger__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.gg-ledger__list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name copy" "place copy" "code copy";
  column-gap: 1.4rem; row-gap: .15rem; align-items: center; padding: 1.15rem .2rem; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.gg-ledger__name { grid-area: name; font-family: var(--ff-inscr); font-weight: 500; font-size: 1.05rem; letter-spacing: .04em; text-decoration: none; }
.gg-ledger__name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .75rem; transform: rotate(45deg) translateY(-2px); background: var(--h-theme); }
.gg-ledger__name:hover { color: var(--candle); }
.gg-ledger__place { grid-area: place; font-size: 1rem; color: var(--ash); }
.gg-ledger__code { grid-area: code; font-family: var(--ff-code); font-size: .8rem; color: #b9b0a2; overflow-wrap: anywhere; margin-top: .3rem; }
.gg-ledger__copy {
  grid-area: copy; font: 600 1.02rem var(--ff-prose); color: var(--candle); background: none; cursor: pointer;
  border: 1px solid rgba(233, 185, 104, .45); border-radius: 2px; padding: .5rem 1rem; transition: background .3s, color .3s;
}
.gg-ledger__copy:hover { background: rgba(233, 185, 104, .1); color: #ffd896; }
.gg-ledger__copy.is-done { color: #a9d8b1; border-color: rgba(169, 216, 177, .5); }

/* ═══ CODA ════════════════════════════════════════════════ */
.gg-coda { text-align: center; padding: clamp(5rem, 10vw, 8rem) 1.25rem clamp(4rem, 8vw, 6rem); }
.gg-coda blockquote { margin: 2.6rem auto 2.2rem; max-width: 30rem; }
.gg-coda blockquote p { font-style: italic; font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.5; }
.gg-coda blockquote footer { margin-top: .6rem; font-size: 1rem; color: var(--ash); }
.gg-coda__sigil { width: 64px; height: auto; opacity: .9; }
.gg-coda__sign { margin-top: .9rem; font-size: 1rem; color: var(--ash); }

/* ═══ MOTION ON REQUEST ONLY ══════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
  .gg-seal:hover .gg-seal__medal::after, .gg-seal:focus-visible .gg-seal__medal::after { animation: ggSweep 1.1s ease-out; }
}
@keyframes ggSweep { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  .gg-seal__medal, .gg-strip__win img { transition: none; }
  .gg-seal:hover .gg-seal__medal, .gg-seal:focus-visible .gg-seal__medal { transform: none; }
}

/* Lenis (smooth scroll) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ═══ SMALL SCREENS ═══════════════════════════════════════ */
@media (max-width: 820px) {
  .gg-scene__stage { aspect-ratio: 941 / 1672; max-height: none; }
  .gg-scene__title { padding-top: 22vh; }
  .gg-framed { grid-template-columns: minmax(0, 1fr); }
  .gg-path--phases { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .gg-ledger__list li { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "place" "code" "copy"; }
  .gg-ledger__copy { justify-self: start; margin-top: .6rem; }
  .gg-road__list { grid-template-columns: minmax(0, 1fr); }
}

/* The index uses the same quiet bronze and candlelight as the visit ledger. */
.gg-index { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem 5rem; text-align: center; }
.gg-index ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; list-style: none; padding: 0; }
.gg-index a { color: var(--bone); font-family: var(--ff-inscr); text-underline-offset: .4em; }
.gg-index .is-seen a { color: var(--candle); text-shadow: 0 0 18px rgba(233, 185, 104, .5); }
.gg-index .is-seen a::before { content: '✓ '; }
.gg .cp-doors { margin: 1.5rem auto 2rem; }
.gg-scene:focus, .gg-scene__panel:focus { outline-offset: -4px; }

/* Cya Morra — moonlit brass beside Grima's violet. */
.gg-character--cya { margin-top: 2rem; }
.gg-character--cya .gg-character__portrait::before { background: radial-gradient(ellipse, rgba(211,174,108,.14), transparent 70%); }
.gg-character__house { display: inline-flex; gap: 1rem; padding: .8rem 0; color: var(--gg-candle, #d8ba81); text-underline-offset: .3em; }
.gg-cya-lodge { max-width: 48rem; margin: 0 auto 2rem; padding: 1.25rem 1.5rem; border-left: 1px solid #a88c5d; background: rgba(15,21,27,.7); line-height: 1.8; }
.gg-cya-lodge p { margin: 0 0 .75rem; }
.gg-cya-lodge a { color: #d8ba81; text-underline-offset: .3em; }
@media(min-width:821px) { .gg-character--cya { grid-template-columns: 1fr .85fr; } .gg-character--cya .gg-character__portrait { grid-column: 2; grid-row: 1; } .gg-character--cya .gg-character__text { grid-column: 1; grid-row: 1; } }
