/* QEVR / qevr.party
   VENOM only. Square corners, hard offset shadows, uppercase SpaceMono.
   Four brand colors, locked. The one licensed glow is ON FIRE. */

:root {
  --qevr-ink: #09090B;
  --qevr-body: #CCFF00;
  --qevr-pink: #FF007F;
  --qevr-light: #FFFFFF;
  --qevr-muted: #9A9AA5;
  --qevr-surface: #141416;
  --qevr-hair: #27272A;
  --qevr-fire: #FF2A6D;

  --ground: var(--qevr-ink);
  --brand: var(--qevr-body);
  --accent: var(--qevr-body);

  --gut: clamp(16px, 4vw, 64px);
  --rule: 1px;
  --bar: calc(52px + env(safe-area-inset-top, 0px));
}

html[data-mode="party"] { --brand: var(--qevr-pink); --accent: var(--qevr-pink); }
html[data-mode="dawn"]  { --ground: #0C0C0E; --brand: var(--qevr-body); --accent: var(--qevr-pink); }

* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0 !important; }

html { background: var(--ground); scroll-behavior: smooth; }

body {
  background: var(--ground);
  color: var(--qevr-light);
  font-family: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- bar ---------- */

.bar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: env(safe-area-inset-top, 0px) var(--gut) 0 calc(var(--gut) + 10px);
  background: var(--ground);
  border-bottom: var(--rule) solid var(--qevr-hair);
}
.bar__mark canvas { display: block; image-rendering: pixelated; }
.bar__nav { display: flex; gap: 0; }
.bar__nav a {
  color: var(--qevr-muted); text-decoration: none;
  font-size: clamp(10px, 1.05vw, 12px); letter-spacing: .16em;
  padding: 9px 14px; border: var(--rule) solid var(--qevr-hair); margin-left: -1px;
}
.bar__nav a:hover, .bar__nav a:focus-visible { color: var(--qevr-ink); background: var(--brand); outline: none; }
.bar__nav a[aria-current="page"] { color: var(--qevr-light); border-color: var(--qevr-muted); }

/* ---------- thermometer ---------- */

.thermo { position: fixed; left: 0; top: 0; bottom: 0; width: 10px; background: var(--qevr-hair); z-index: 70; }
.thermo__fill { position: absolute; left: 0; right: 0; top: 0; height: 0; background: var(--brand); }
.thermo.is-fire .thermo__fill { background: var(--qevr-fire); box-shadow: 0 0 18px 2px var(--qevr-fire); }

main { padding-left: 10px; padding-top: var(--bar); }

/* ---------- arrival ---------- */

.arrival {
  min-height: calc(100svh - var(--bar));
  padding: clamp(24px, 4vh, 56px) var(--gut);
  border-bottom: var(--rule) solid var(--qevr-hair);
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: clamp(24px, 5vw, 88px);
}
.arrival__left { display: flex; flex-direction: column; gap: clamp(14px, 2.6vh, 30px); }
.arrival__word canvas, .arrival__city canvas { display: block; image-rendering: pixelated; }
.arrival__rule { width: clamp(40px, 8vw, 96px); height: 6px; background: var(--brand); box-shadow: 4px 4px 0 var(--qevr-hair); }
.arrival__mascot { display: grid; place-items: center; gap: 14px; }
.arrival__hint { font-size: clamp(10px, 1.05vw, 12px); letter-spacing: .2em; color: var(--qevr-muted); text-align: center; }

.doors { display: flex; flex-wrap: wrap; gap: 0; margin-top: clamp(10px, 2vh, 22px); }
.door {
  display: flex; flex-direction: column; gap: 7px;
  padding: clamp(16px, 2vw, 24px) clamp(20px, 2.6vw, 34px);
  text-decoration: none; border: var(--rule) solid var(--qevr-hair);
  margin: 0 -1px -1px 0; color: var(--qevr-light); min-width: min(100%, 230px);
}
.door strong { font-size: clamp(14px, 1.5vw, 19px); font-weight: 700; letter-spacing: .1em; }
.door span { font-size: clamp(9.5px, 1vw, 11px); color: var(--qevr-muted); letter-spacing: .12em; }
.door--lead { background: var(--brand); color: var(--qevr-ink); box-shadow: 6px 6px 0 var(--qevr-hair); }
.door--lead span { color: var(--qevr-ink); opacity: .85; }
.door:hover, .door:focus-visible { background: var(--qevr-surface); color: var(--qevr-light); outline: none; }
.door--lead:hover, .door--lead:focus-visible { background: var(--brand); color: var(--qevr-ink); box-shadow: 2px 2px 0 var(--qevr-hair); transform: translate(4px, 4px); }

/* ---------- the four blocks: one stack, identical at every width ---------- */

.blocks { padding: clamp(24px, 5vh, 64px) var(--gut) clamp(48px, 9vh, 110px); }
.block { border: var(--rule) solid var(--qevr-hair); margin-bottom: -1px; }
.heading--toggle {
  background: transparent; border: 0; width: 100%;
  padding: clamp(15px, 2vh, 22px) clamp(15px, 1.8vw, 24px);
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  overflow: hidden;
}
.heading--toggle:hover { background: var(--qevr-surface); }
.heading--toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; }
.heading--toggle canvas { display: block; image-rendering: pixelated; }
.heading__mark { display: block; width: 14px; height: 6px; background: var(--qevr-hair); flex: none; }
[data-open="true"] > .heading--toggle .heading__mark { width: 30px; background: var(--brand); }
.block__body { padding: 0 clamp(15px, 1.8vw, 24px) clamp(20px, 3vh, 32px); }
[data-open="false"] .block__body { display: none; }

/* ---------- world ---------- */

.copy p { font-size: clamp(13.5px, 1.2vw, 17px); line-height: 1.75; letter-spacing: .045em; max-width: 64ch; }
.copy p + p { margin-top: 1.3em; }
.copy p.dim { color: var(--qevr-muted); }
.copy p.mark { color: var(--brand); }

.world__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3.4vw, 64px); align-items: start; }
.world__col { min-width: 0; }
.people__lead { font-size: clamp(12.5px, 1.05vw, 15px); color: var(--brand); font-weight: 700; line-height: 1.6; margin-bottom: clamp(10px, 1.8vh, 18px); }
.person { display: grid; gap: 4px; padding: clamp(8px, 1.1vh, 13px) 0; border-bottom: var(--rule) solid var(--qevr-hair); }
.person:first-of-type { border-top: var(--rule) solid var(--qevr-hair); }
.person__term { font-size: clamp(11.5px, .95vw, 14px); color: var(--brand); font-weight: 700; letter-spacing: .1em; }
.person__def { font-size: clamp(11.5px, .92vw, 13px); color: var(--qevr-muted); line-height: 1.6; }
.world__close { margin-top: clamp(14px, 2.2vh, 26px); padding-top: clamp(12px, 1.8vh, 20px); border-top: var(--rule) solid var(--qevr-hair); }
.world__close p { font-size: clamp(12px, 1vw, 14px); line-height: 1.65; color: var(--qevr-muted); }
.world__close p + p { margin-top: .85em; }
.world__close p:last-child { color: var(--brand); }

/* ---------- tiles: O JEITO DELE and REGRAS use the same component ---------- */

.stances__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border-top: var(--rule) solid var(--qevr-hair);
  border-left: var(--rule) solid var(--qevr-hair);
}
#neversList { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stance {
  border-right: var(--rule) solid var(--qevr-hair);
  border-bottom: var(--rule) solid var(--qevr-hair);
  background: transparent; color: inherit; font: inherit;
  text-transform: inherit; letter-spacing: inherit; text-align: left;
  padding: clamp(13px, 1.7vw, 22px);
  cursor: pointer; display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-start;
  min-height: clamp(96px, 11vh, 132px); width: 100%;
}
.stance:hover, .stance:focus-visible { background: var(--qevr-surface); outline: none; }
.stance[aria-expanded="true"] { background: var(--qevr-surface); }
.stance__idx { font-size: 10px; color: var(--qevr-muted); display: block; margin-bottom: 8px; }
.stance[aria-expanded="true"] .stance__idx { color: var(--brand); }
.stance__head { font-size: clamp(12.5px, 1vw, 15px); line-height: 1.5; font-weight: 700; }
.stance__body { display: none; order: 2; margin-top: 12px; padding-top: 12px; border-top: var(--rule) solid var(--qevr-hair); }
.stance[aria-expanded="true"] .stance__body { display: block; }
.stance__body p { font-size: clamp(11px, .9vw, 13px); line-height: 1.7; color: var(--qevr-muted); }
.stance__body p + p { margin-top: .8em; }
.stance::after { content: ""; display: block; order: 3; margin-top: auto; width: 14px; height: 6px; background: var(--qevr-hair); }
.stance:hover::after, .stance:focus-visible::after { background: var(--qevr-muted); }
.stance[aria-expanded="true"]::after { width: 36px; background: var(--brand); }

/* ---------- gift ---------- */

.gift p { font-size: clamp(14px, 1.3vw, 19px); line-height: 1.7; max-width: 52ch; }
.stamp {
  margin-top: clamp(18px, 3vh, 34px); padding-top: clamp(14px, 2.2vh, 24px);
  border-top: 3px solid var(--brand);
  font-size: clamp(15px, 1.9vw, 28px); line-height: 1.4; font-weight: 700;
  color: var(--qevr-light); letter-spacing: .04em; max-width: 30ch;
}
.stamp b { color: var(--brand); font-weight: 700; }

/* ---------- companion ---------- */

.companion { position: fixed; right: clamp(10px, 2.4vw, 36px); bottom: clamp(10px, 2.4vh, 36px); z-index: 50; width: 220px; height: 220px; display: grid; place-items: center; pointer-events: none; }
.companion .mascot { pointer-events: auto; }
.mascot { background: transparent; border: 0; padding: 0; cursor: pointer; display: block; will-change: transform; }
.mascot canvas { display: block; image-rendering: pixelated; }
.mascot:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

@media (max-width: 1100px) {
  .stances__grid, #neversList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .world__grid { grid-template-columns: 1fr; gap: clamp(18px, 3vh, 30px); }
  .arrival { grid-template-columns: 1fr; align-content: center; }
  .arrival__mascot { justify-self: start; }
  .arrival__hint { text-align: left; }
}

@media (max-width: 720px) {
  .stances__grid, #neversList { grid-template-columns: minmax(0, 1fr); }
  /* on a phone there is no free corner: he never covers content (soul rule),
     so once the arrival scrolls away he steps offstage instead of sitting on the copy */
  .companion { display: none; }
  .thermo { width: 6px; }
  main { padding-left: 6px; }
  .door { min-width: 100%; }
  .copy p { font-size: 14px; line-height: 1.7; }
  .stance { min-height: 0; padding: 12px 14px; }
  .stance__head { font-size: 12.5px; line-height: 1.45; }
  .stance::after { margin-top: 9px; }
  .stamp { font-size: 15px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .thermo.is-fire .thermo__fill { box-shadow: none; }
}
