/* =========================================================================
   FOLDHEIM · estilos
   Paleta das pedras rúnicas pintadas + papel + mar de tinta.
   ========================================================================= */

@font-face {
  font-family: "Vollkorn";
  src: url("../fonts/vollkorn-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vollkorn";
  src: url("../fonts/vollkorn-italic-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* paleta */
  --soot: #16161a;
  --soot-2: #222127;
  --fjord: #1e2e36;
  --fjord-2: #2c4550;
  --granite: #7c7a74;
  --granite-2: #a8a49b;
  --chalk: #e8e3d7;
  --chalk-2: #d6cdba;
  --minium: #b23a21;
  --minium-deep: #7d2614;
  --amber: #e9a23b;
  --kraft: #9c7a50;

  /* clãs */
  --c-corvo: #4b4752;
  --c-lobo: #b23a21;
  --c-serpente: #2b5a63;
  --c-urso: #9c7a50;
  --c-muspel: #e2622a;

  /* tipografia */
  --f-display: "Vollkorn", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-text: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --t-h1: clamp(3rem, 8.6vw, 7.6rem);
  --t-h2: clamp(2.2rem, 4.6vw, 4.3rem);
  --t-h3: clamp(1.7rem, 3vw, 2.6rem);
  --t-body: clamp(0.98rem, 0.95rem + 0.15vw, 1.08rem);
  --t-small: 0.84rem;
  --t-eyebrow: 0.72rem;

  /* espaço */
  --gutter: clamp(16px, 4.2vw, 64px);
  --panel-w: min(31rem, 38vw);
  --topbar-h: 64px;

  /* tom do texto (o JS alterna por seção) */
  --ink: var(--chalk);
  --ink-soft: rgba(232, 227, 215, 0.74);
  --ink-faint: rgba(232, 227, 215, 0.62);
  --rule: rgba(232, 227, 215, 0.22);
  --text-shadow: 0 1px 18px rgba(10, 10, 14, 0.55), 0 0 2px rgba(10, 10, 14, 0.35);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-fold: cubic-bezier(0.65, 0, 0.2, 1);

  color-scheme: dark;
}

body[data-tone="light"] {
  --ink: var(--soot);
  --ink-soft: rgba(22, 22, 26, 0.76);
  --ink-faint: rgba(22, 22, 26, 0.66);
  --rule: rgba(22, 22, 26, 0.2);
  --text-shadow: 0 1px 22px rgba(248, 238, 220, 0.75);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
  background: var(--soot);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--soot);
  /* a Vollkorn usa algarismos antigos por padrão: "120" parecia "I2O" */
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: color 0.6s var(--ease-out);
}

body.is-locked { overflow: hidden; }

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

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

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--chalk); color: var(--soot);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- canvas */
#mundo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--soot);
  touch-action: pan-y;
}

/* ---------------------------------------------------------------- loader */
.loader {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: var(--soot);
  color: var(--chalk);
  transition: opacity 1.1s var(--ease-out), visibility 0s linear 1.1s;
}
.loader.is-done { opacity: 0; visibility: hidden; }

.loader__fold {
  position: relative; width: 56px; height: 56px;
  perspective: 240px;
}
.loader__sheet, .loader__flap {
  position: absolute; inset: 0;
  background: var(--chalk);
}
.loader__sheet { clip-path: polygon(0 0, 100% 100%, 0 100%); background: var(--chalk-2); }
.loader__flap {
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transform-origin: 0 0;
  animation: loader-fold 1.8s var(--ease-fold) infinite;
}
@keyframes loader-fold {
  0%, 12% { transform: rotate3d(1, -1, 0, 0deg); background: var(--chalk); }
  50%, 62% { transform: rotate3d(1, -1, 0, 180deg); background: var(--granite-2); }
  100% { transform: rotate3d(1, -1, 0, 360deg); background: var(--chalk); }
}
.loader__label {
  font-family: var(--f-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.loader__pct { font-family: var(--f-text); font-size: 0.8rem; color: var(--granite-2); margin-left: 6px; font-variant-numeric: tabular-nums; }
.loader__bar { width: 180px; height: 1px; background: rgba(232, 227, 215, 0.16); }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--chalk); transition: width 0.3s linear; }
.loader__skip {
  margin-top: 10px; background: none; border: 0; color: var(--granite-2);
  font-size: var(--t-small); text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}

/* ---------------------------------------------------------------- file:// */
.file-warning { display: none; }
.is-file .file-warning {
  display: block; position: fixed; inset: 0; z-index: 90;
  padding: 12vh var(--gutter); background: var(--soot); color: var(--chalk);
  max-width: 46rem; margin: 0 auto;
}
.is-file .file-warning h2 { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.1; margin-bottom: 1rem; }
.is-file .file-warning p { color: rgba(232, 227, 215, 0.76); margin: 0.8rem 0; }
.is-file .file-warning pre { background: var(--soot-2); padding: 12px 16px; margin: 0.6rem 0; overflow-x: auto; }
.is-file .loader { display: none; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  color: var(--ink);
  pointer-events: none;
  transition: color 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}
.topbar > * { pointer-events: auto; }
.topbar__brand { display: block; text-decoration: none; padding: 6px 0; }
.logo-mark { display: block; height: 20px; width: auto; }
.logo-mark svg { height: 100%; width: auto; overflow: visible; }

.topbar__nav { margin-left: auto; }
.topbar__menu { display: none; }
.topbar__list { display: flex; gap: clamp(14px, 1.8vw, 28px); }
.topbar__list a {
  font-size: 0.82rem; letter-spacing: 0.02em; text-decoration: none;
  color: var(--ink-soft); padding: 6px 0; position: relative;
  text-shadow: var(--text-shadow);
  transition: color 0.3s;
}
.topbar__list a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor;
  transition: right 0.45s var(--ease-out);
}
.topbar__list a:hover, .topbar__list a[aria-current="true"] { color: var(--ink); }
.topbar__list a:hover::after, .topbar__list a[aria-current="true"]::after { right: 0; }

.sound-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-soft);
  text-shadow: var(--text-shadow);
}
.sound-toggle__wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.sound-toggle__wave i { display: block; width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height 0.3s; }
.sound-toggle[aria-pressed="true"] { color: var(--ink); }
.sound-toggle[aria-pressed="true"] .sound-toggle__wave i { animation: wave 1.1s ease-in-out infinite; }
.sound-toggle[aria-pressed="true"] .sound-toggle__wave i:nth-child(2) { animation-delay: -0.3s; }
.sound-toggle[aria-pressed="true"] .sound-toggle__wave i:nth-child(3) { animation-delay: -0.6s; }
.sound-toggle[aria-pressed="true"] .sound-toggle__wave i:nth-child(4) { animation-delay: -0.15s; }
@keyframes wave { 0%, 100% { height: 3px; } 50% { height: 13px; } }

/* ---------------------------------------------------------------- stave */
.stave {
  position: fixed; right: calc(var(--gutter) * 0.55); top: 50%; z-index: 25;
  transform: translateY(-50%);
}
.stave ol { display: grid; gap: 6px; position: relative; padding: 6px 0; }
.stave ol::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: var(--rule); transform: translateX(-50%);
}
.stave a {
  position: relative; display: grid; place-items: center;
  width: 26px; height: 26px; text-decoration: none; color: var(--ink-faint);
}
.stave a svg { width: 12px; height: 16px; overflow: visible; position: relative; z-index: 1; transition: transform 0.4s var(--ease-out); }
.stave a::before {
  content: ""; position: absolute; inset: 4px; background: var(--soot);
  opacity: 0; transition: opacity 0.3s;
}
body[data-tone="light"] .stave a::before { background: #efe6d6; }
.stave a:hover { color: var(--ink); }
.stave a[aria-current="true"] { color: var(--amber); }
.stave a[aria-current="true"]::before { opacity: 1; }
.stave a[aria-current="true"] svg { transform: scale(1.25); }

/* ---------------------------------------------------------------- hotspots */
.hotspots { position: fixed; inset: 0; z-index: 12; pointer-events: none; overflow: hidden; }
.hotspot {
  position: absolute; left: 0; top: 0;
  opacity: 0; transition: opacity 0.5s var(--ease-out);
  will-change: transform;
}
.hotspot.is-on { opacity: 1; }
.hotspot__dot {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--chalk); background: rgba(22, 22, 26, 0.35);
  box-shadow: 0 0 0 4px rgba(232, 227, 215, 0.12);
}
.hotspot__dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--chalk); }
.hotspot__line {
  position: absolute; left: 0; top: 0; height: 1px; background: rgba(232, 227, 215, 0.85);
  transform-origin: 0 50%;
}
.hotspot__label {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  color: var(--chalk); font-size: 0.86rem; line-height: 1.25;
  text-shadow: 0 1px 10px rgba(10, 10, 14, 0.9);
  pointer-events: auto; cursor: default;
}
.hotspot__label b { display: block; font-family: var(--f-display); font-size: 1.12rem; font-weight: 600; }
.hotspot__label span { color: rgba(232, 227, 215, 0.72); font-size: 0.78rem; letter-spacing: 0.02em; }
.hotspot__label .hotspot__more {
  display: block; max-width: 15rem; white-space: normal; margin-top: 6px; font-size: 0.8rem; color: rgba(232,227,215,.86);
  max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s var(--ease-out), opacity .4s;
}
.hotspot:hover .hotspot__more, .hotspot.is-open .hotspot__more { max-height: 9rem; opacity: 1; }
.hotspot--left .hotspot__label { text-align: right; }

/* ---------------------------------------------------------------- capítulos */
main { position: relative; z-index: 10; }
.chapter {
  position: relative;
  height: calc(var(--len, 2) * 100vh);
  height: calc(var(--len, 2) * 100svh);
}
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  pointer-events: none;
}
.stage a, .stage button, .stage input, .stage label, .stage .panel { pointer-events: auto; }

.step {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out), visibility 0s linear 0.7s;
}
.step.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.8s var(--ease-out) 0.08s, transform 1s var(--ease-out) 0.08s, visibility 0s;
}

.panel {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  width: var(--panel-w);
  translate: 0 -50%;
  color: var(--ink);
  text-shadow: var(--text-shadow);
}
.panel > * + * { margin-top: 1rem; }
.panel p { color: var(--ink-soft); }
.panel strong { color: var(--ink); font-weight: 600; }

.panel--hero { width: min(40rem, 52vw); translate: 0 -54%; }
.panel--book, .panel--phase, .panel--hero-card { width: min(29rem, 34vw); }
.panel--gallery { top: calc(var(--topbar-h) + 22px); translate: none; width: min(26rem, 32vw); }
.panel--contact { width: min(34rem, 44vw); translate: 0 -46%; }

/* ---------------------------------------------------------------- tipografia */
.eyebrow {
  font-family: var(--f-text);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft) !important;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::after { content: ""; flex: 0 0 38px; height: 1px; background: currentColor; opacity: 0.6; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; color: var(--ink); text-wrap: balance; }
h2 { font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.012em; }
h3 { font-size: var(--t-h3); line-height: 1.06; letter-spacing: -0.008em; }
.panel h2 + p, .panel h3 + p { margin-top: 1.1rem; }

.logotype { line-height: 0; margin-top: 1.1rem !important; }
.logotype__art { display: block; width: min(100%, 36rem); }
.logotype__art svg { width: 100%; height: auto; overflow: visible; }
.lede { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); line-height: 1.5; max-width: 30rem; }
.fine { font-size: var(--t-small); color: var(--ink-faint) !important; }

/* as duas metades de cada tira dobrada */
.lt-a { fill: currentColor; }
.lt-b { fill: currentColor; opacity: 0.6; }
body[data-tone="light"] .lt-a { opacity: 0.74; }
body[data-tone="light"] .lt-b { opacity: 1; }
.logo-mark { color: var(--ink); }

/* pop-up do logotipo (o JS liga .is-up em cada letra) */
.logotype__art .lt-letter {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: perspective(400px) rotateX(-88deg);
  opacity: 0;
  transition: transform 1.1s var(--ease-fold), opacity 0.4s linear;
}
.logotype__art .lt-letter.is-up { transform: none; opacity: 1; }

/* ---------------------------------------------------------------- botões */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 1.8rem !important; }
.btn {
  --corner: 12px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  font-family: var(--f-text); font-size: 0.94rem; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; text-shadow: none;
  border: 0; cursor: pointer;
  transition: --corner 0.35s var(--ease-out), background-color 0.3s, color 0.3s;
}
.btn--primary {
  background: var(--minium); color: var(--chalk);
  clip-path: polygon(0 0, calc(100% - var(--corner)) 0, 100% var(--corner), 100% 100%, 0 100%);
}
.btn--primary::after {
  content: ""; position: absolute; top: 0; right: 0;
  width: var(--corner); height: var(--corner);
  background: linear-gradient(to top right, var(--minium-deep) 50%, transparent 50%);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out);
}
.btn--primary:hover { --corner: 20px; background: #9e3019; }
.btn--primary:hover::after { width: 20px; height: 20px; }
.btn--primary:active { background: var(--minium-deep); }
.btn--ghost {
  min-height: 44px; padding: 0 2px;
  background: none; color: var(--ink);
  border-bottom: 1px solid currentColor;
  text-shadow: var(--text-shadow);
}
.btn--ghost::after { content: "→"; font-weight: 400; transition: transform 0.35s var(--ease-out); }
.btn--ghost:hover::after { transform: translateX(5px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

@property --corner { syntax: "<length>"; inherits: true; initial-value: 12px; }

/* ---------------------------------------------------------------- abertura */
/* bruma clara atrás do texto (o 3D continua visível) */
#abertura .stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(62% 78% at 8% 54%, rgba(241, 230, 212, 0.86) 0%, rgba(241, 230, 212, 0.55) 38%, rgba(241, 230, 212, 0) 70%),
    linear-gradient(to bottom, rgba(241, 230, 212, 0.35), rgba(241, 230, 212, 0) 18%);
}
.scroll-cue {
  position: absolute; left: var(--gutter); bottom: 30px;
  font-size: 0.8rem; letter-spacing: 0.08em; color: var(--ink-soft);
  display: flex; align-items: center; gap: 12px;
  text-shadow: var(--text-shadow);
}
.scroll-cue::before {
  content: ""; width: 1px; height: 34px; background: currentColor;
  transform-origin: top; animation: cue 2.2s var(--ease-fold) infinite;
}
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------------------------------------------------------------- ficha técnica */
.spec { display: flex; gap: 0; margin-top: 1.6rem !important; border-top: 1px solid var(--rule); }
.spec > div { flex: 1; padding: 14px 16px 0 0; }
.spec > div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.spec dt { font-size: var(--t-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.spec dd { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; margin-top: 2px; }

/* ---------------------------------------------------------------- livro */
.panel--book h3 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); }
.panel--book .chapter-text { font-family: var(--f-display); font-size: clamp(1.05rem, 1rem + 0.35vw, 1.28rem); line-height: 1.58; color: var(--ink); }
.panel--book .chapter-text::first-letter {
  float: left; font-size: 3.4em; line-height: 0.82; padding: 0.08em 0.12em 0 0; font-weight: 700; color: var(--amber);
}

/* ---------------------------------------------------------------- clãs */
.panel--hero-card { border-left: 2px solid var(--clan); padding-left: 22px; }
.panel--hero-card .role { font-family: var(--f-display); font-style: italic; font-size: 1.12rem; color: var(--ink) !important; }
.traits { display: grid; gap: 12px; margin-top: 1.3rem !important; }
.traits dt { font-size: var(--t-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.traits dd { margin-top: 3px; color: var(--ink-soft); font-size: 0.96rem; }
blockquote { font-family: var(--f-display); font-style: italic; font-size: 1.05rem; color: var(--ink-soft); padding-top: 1rem; border-top: 1px solid var(--rule); }

.hero-tabs {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  display: flex; gap: 4px; padding: 4px;
  background: rgba(22, 22, 26, 0.55); backdrop-filter: blur(6px);
}
.hero-tabs button {
  border: 0; background: none; color: rgba(232, 227, 215, 0.7); cursor: pointer;
  padding: 8px 16px; font-size: 0.86rem; letter-spacing: 0.02em;
}
.hero-tabs button:hover { color: var(--chalk); }
.hero-tabs button[aria-current="true"] { background: var(--chalk); color: var(--soot); }
.drag-hint {
  position: absolute; right: calc(var(--gutter) + 40px); bottom: 36px;
  font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
}
.drag-hint::before { content: "⟲"; font-size: 1rem; }
.drag-zone {
  position: absolute; left: 38%; right: 6%; top: 14%; bottom: 16%;
  pointer-events: none; cursor: grab; touch-action: pan-y;
}
#clas.is-active .drag-zone { pointer-events: auto; }
.drag-zone.is-dragging { cursor: grabbing; }

/* ---------------------------------------------------------------- cartas */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.4rem !important; }
.filters button {
  border: 1px solid var(--rule); background: rgba(22, 22, 26, 0.35); color: var(--ink-soft);
  padding: 7px 14px; font-size: 0.84rem; cursor: pointer; text-shadow: none;
}
.filters button:hover { color: var(--ink); border-color: var(--ink-faint); }
.filters button.is-on { background: var(--chalk); color: var(--soot); border-color: var(--chalk); }

.card-proxies { position: absolute; inset: 0; pointer-events: none; }
.card-proxy {
  position: absolute; left: 0; top: 0;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  pointer-events: auto;
  transform-origin: 0 0;
}
.card-proxy:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.card-proxy[hidden] { display: none; }

/* ---------------------------------------------------------------- regras */
.panel--phase h3 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.endings { display: grid; gap: 10px; margin-top: 1.3rem !important; }
.endings li { padding-left: 22px; position: relative; color: var(--ink-soft); }
.endings li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 10px; background: var(--minium); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* ---------------------------------------------------------------- contato */
.contact-lines { margin-top: 1.6rem !important; border-top: 1px solid var(--rule); }
.contact-lines li { display: grid; grid-template-columns: 6.5rem 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.contact-lines__label { font-size: var(--t-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.contact-lines__value { font-family: var(--f-display); font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-lines__value:hover { color: var(--amber); }
.copy-btn {
  border: 1px solid var(--rule); background: none; color: var(--ink-soft); padding: 6px 12px; font-size: 0.8rem; cursor: pointer; text-decoration: none; text-shadow: none;
}
.copy-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
.copy-btn.is-done { color: var(--amber); border-color: var(--amber); }
.live-stats { font-size: 0.8rem; color: var(--ink-faint) !important; margin-top: 1.6rem !important; }
.footer {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--ink-faint); text-shadow: var(--text-shadow);
}
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- folhas (dialog) */
.sheet {
  border: 0; padding: 0; max-width: min(58rem, calc(100vw - 32px)); width: 100%;
  background: #ece6d8; color: var(--soot);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.sheet::backdrop { background: rgba(12, 12, 16, 0.72); backdrop-filter: blur(3px); }
.sheet[open] { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); animation: sheet-in 0.5s var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(20px) rotateX(8deg); } to { opacity: 1; transform: none; } }
.sheet__card { background: #d9d0bd; display: grid; place-items: center; padding: 28px; }
.sheet__card canvas { width: 100%; max-width: 300px; height: auto; box-shadow: 0 14px 30px rgba(0,0,0,.25); }
.sheet__body { padding: 30px 32px; display: grid; gap: 14px; align-content: start; }
.sheet .eyebrow { color: rgba(22, 22, 26, 0.65) !important; }
.sheet h2 { color: var(--soot); font-size: clamp(1.8rem, 3vw, 2.5rem); }
.sheet__meta { display: flex; gap: 24px; }
.sheet__meta dt { font-size: var(--t-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(22,22,26,.55); }
.sheet__meta dd { font-family: var(--f-display); font-size: 1.4rem; font-weight: 600; }
.sheet__half { padding: 12px 14px; background: rgba(22, 22, 26, 0.05); border-left: 3px solid var(--minium); }
.sheet__half--fold { border-left-color: var(--fjord-2); }
.sheet__half span { font-size: var(--t-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; }
.sheet__half p { margin-top: 4px; }
.sheet__flavor { font-family: var(--f-display); font-style: italic; color: rgba(22, 22, 26, 0.7); }
.sheet form { margin-top: 6px; }
.sheet .btn--ghost { color: var(--soot); text-shadow: none; }
.sheet form .btn--ghost::after { content: none; }

.sheet--rules[open] { display: block; max-width: min(46rem, calc(100vw - 32px)); max-height: min(86vh, 900px); }
.sheet__scroll { padding: 34px 38px; overflow-y: auto; max-height: inherit; }
.sheet__scroll h3 { font-size: 1.35rem; margin: 1.5rem 0 0.4rem; color: var(--soot); }
.sheet__scroll p, .sheet__scroll li { color: rgba(22, 22, 26, 0.82); }
.sheet__scroll ol { list-style: decimal; padding-left: 1.3rem; display: grid; gap: 4px; }
.sheet__scroll ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: 4px; }
.sheet__scroll h2 { margin-bottom: 0.8rem; }

.noscript { position: fixed; inset: auto 16px 16px; z-index: 99; padding: 16px; background: var(--chalk); color: var(--soot); }

/* ---------------------------------------------------------------- sem WebGL */
.no-webgl #mundo { background: radial-gradient(120% 90% at 70% 30%, #2c4550 0%, #1e2e36 45%, #16161a 100%); }

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1100px) {
  .topbar__list { gap: 14px; }
  .topbar__list a { font-size: 0.78rem; }
}

@media (max-width: 860px) {
  :root { --topbar-h: 56px; --panel-w: auto; }

  .topbar__menu {
    display: inline-flex; background: none; border: 1px solid var(--rule); padding: 6px 12px;
    font-size: 0.8rem; cursor: pointer; color: var(--ink); text-shadow: none;
  }
  .topbar__list {
    position: fixed; inset: var(--topbar-h) 0 auto 0; display: none; flex-direction: column; gap: 0;
    background: rgba(22, 22, 26, 0.96); padding: 8px var(--gutter) 18px;
  }
  .topbar__list.is-open { display: flex; }
  .topbar__list a { display: block; padding: 12px 0; font-size: 1rem; color: var(--chalk); text-shadow: none; border-bottom: 1px solid rgba(232,227,215,.12); }
  .stave { display: none; }

  .panel, .panel--hero, .panel--book, .panel--phase, .panel--hero-card, .panel--contact {
    left: 16px; right: 16px; width: auto;
    top: auto; bottom: 18px; translate: none;
  }
  .panel--hero { bottom: 70px; }
  .panel::before {
    content: ""; position: absolute; inset: -60px -16px -18px; z-index: -1;
    background: linear-gradient(to top, rgba(18, 18, 22, 0.88) 55%, rgba(18, 18, 22, 0));
    pointer-events: none;
  }
  body[data-tone="light"] .panel::before { background: linear-gradient(to top, rgba(240, 232, 216, 0.92) 55%, rgba(240, 232, 216, 0)); }
  .panel--gallery { top: calc(var(--topbar-h) + 8px); bottom: auto; }
  .panel--gallery::before { inset: -18px -16px -40px; background: linear-gradient(to bottom, rgba(18,18,22,.9) 60%, rgba(18,18,22,0)); }
  .panel--gallery p:not(.eyebrow) { display: none; }
  .panel--hero-card { padding-left: 14px; }
  .panel--hero-card .traits div:last-child { display: none; }
  .panel--hero-card blockquote { display: none; }
  .panel--hero-card { bottom: 82px; }
  .hero-tabs { bottom: 16px; left: 16px; right: 16px; translate: none; justify-content: space-between; }
  .hero-tabs button { padding: 8px 6px; flex: 1; font-size: 0.8rem; }
  .drag-hint { display: none; }
  .drag-zone { left: 0; right: 0; top: 12%; bottom: 52%; }
  .panel--book .chapter-text { font-size: 1rem; }
  .spec dd { font-size: 1.2rem; }
  .contact-lines li { grid-template-columns: 1fr auto; }
  .contact-lines__label { grid-column: 1 / -1; }
  .footer { position: static; padding: 0 16px; display: none; }
  .scroll-cue { display: none; }
  #abertura .stage::before { background: linear-gradient(to top, rgba(241, 230, 212, 0.9) 0%, rgba(241, 230, 212, 0.6) 45%, rgba(241, 230, 212, 0) 75%); }
  .logotype__art { width: min(100%, 26rem); }

  .sheet[open] { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
  .sheet__card { padding: 18px; }
  .sheet__card canvas { max-width: 200px; }
  .sheet__body { padding: 22px; }
}

@media (max-height: 760px) and (min-width: 861px) {
  .panel > * + * { margin-top: 0.75rem; }
  h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
  .panel--hero-card blockquote, .panel--hero-card .traits div:last-child { display: none; }
  .contact-lines li { padding: 9px 0; }
}
@media (max-height: 620px) and (min-width: 861px) {
  .panel p:not(.eyebrow):not(.chapter-text):not(.lede) { display: none; }
  .spec { display: none; }
  .logotype__art { width: min(100%, 26rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .logotype__art .lt-letter { transform: none; opacity: 1; }
}
