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

   ALIGNMENT STANDARD (applies to every page, every width):
   - Reading decks stay LEFT-ALIGNED inside one shared container.
   - The mascot-first arrival (the full first screen) and the studio center
     plate are the sanctioned centered compositions; labels that name art
     center with that art.
   - Lime fill = where you are. White fill = hover. Never the same treatment
     for both. */

: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;
  --wrap: 1560px;
  --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; scroll-padding-top: var(--bar); }

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;
  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__in {
  height: 100%; max-width: var(--wrap); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.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;
}
/* lime marks where you are; hover is white, never lime */
.bar__nav a[aria-current="page"] { color: var(--qevr-ink); background: var(--brand); border-color: var(--brand); font-weight: 700; }
.bar__nav a:not([aria-current="page"]):hover,
.bar__nav a:not([aria-current="page"]):focus-visible { color: var(--qevr-ink); background: var(--qevr-light); border-color: var(--qevr-light); outline: none; }

/* the PT / EN boxes: two tabs bleeding off the right edge, just under the
   bar, stacked. same grammar as everything: lime = the language you are in,
   white = hover. they live on the arrival, out of the reading's way. */
.lang {
  position: absolute; top: calc(var(--bar) + 14px); right: 0; z-index: 55;
  display: flex; flex-direction: column;
  /* its own patch of ground: invisible on the manifesto, and on the studio it
     carves a clean notch out of the belt, the same way the bar and plate do */
  background: var(--ground); padding: 8px 0 8px 8px;
}
.lang button {
  font: inherit; text-transform: uppercase; cursor: pointer;
  background: var(--ground); color: var(--qevr-muted);
  font-size: 11px; letter-spacing: .14em; padding: 10px 12px;
  border: var(--rule) solid var(--qevr-hair); border-right: 0;
}
.lang button + button { margin-top: -1px; }
.lang button[aria-pressed="true"] { color: var(--qevr-ink); background: var(--brand); border-color: var(--brand); font-weight: 700; }
.lang button:not([aria-pressed="true"]):hover,
.lang button:not([aria-pressed="true"]):focus-visible { color: var(--qevr-ink); background: var(--qevr-light); border-color: var(--qevr-light); outline: none; }

/* ---------- 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: him and the colour question own the whole first screen ---------- */

.arrival {
  min-height: calc(100svh - var(--bar));
  max-width: var(--wrap); margin-inline: auto;
  padding: clamp(18px, 3.4vh, 38px) var(--gut) clamp(22px, 4vh, 44px);
  border-bottom: var(--rule) solid var(--qevr-hair);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(14px, 2.6vh, 28px);
}
/* him and his one instruction are a lockup: the label centers under the art */
.arrival__mascot { display: grid; justify-items: center; gap: clamp(8px, 1.3vh, 14px); }
.arrival__hint { font-size: clamp(11px, 1.1vw, 13px); letter-spacing: .24em; color: var(--brand); text-align: center; }
.arrival__color { display: grid; justify-items: center; gap: clamp(10px, 1.6vh, 16px); width: min(100%, 400px); }
.arrival__question { color: var(--qevr-light); font-size: clamp(11px, 1.1vw, 14px); letter-spacing: .2em; text-align: center; }
.arrival__color-controls { display: flex; justify-content: center; width: min(100%, 300px); }

/* ---------- the one door left: the studio exit at the end of the read ---------- */

.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);
  color: var(--qevr-light); min-width: 0;
}
.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--exit { margin-top: clamp(24px, 4vh, 44px); }
/* same grammar as the bar: hover is white */
.door:hover, .door:focus-visible { background: var(--qevr-light); border-color: var(--qevr-light); color: var(--qevr-ink); outline: none; }
.door:hover span, .door:focus-visible span { color: var(--qevr-ink); opacity: .7; }

/* ---------- segmented controls: shared by arrival and studio ---------- */

.ctl {
  font: inherit; text-transform: uppercase; letter-spacing: .12em;
  font-size: 11px; padding: 10px 13px; cursor: pointer;
  background: transparent; color: var(--qevr-light);
  border: var(--rule) solid var(--qevr-hair); margin: 0 -1px 0 0;
  flex: 1; text-align: center;
}
.ctl:hover, .ctl:focus-visible { background: var(--qevr-light); color: var(--qevr-ink); border-color: var(--qevr-light); outline: none; }
.ctl[aria-pressed="true"] { background: var(--brand); color: var(--qevr-ink); border-color: var(--brand); font-weight: 700; }
.ctl--swatch { display: flex; align-items: center; justify-content: center; gap: 7px; }
.ctl--swatch i { width: 10px; height: 10px; display: block; flex: none; }
.ctl--green i { background: var(--qevr-body); }
.ctl--pink i { background: var(--qevr-pink); }
/* a pressed swatch sits on its own colour: flip the square to ink so it never vanishes */
.ctl--swatch[aria-pressed="true"] i { background: var(--qevr-ink); }

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

.blocks {
  max-width: var(--wrap); margin-inline: auto;
  padding: clamp(20px, 3.5vh, 40px) var(--gut) clamp(40px, 7vh, 84px);
}
.block { border: var(--rule) solid var(--qevr-hair); margin-bottom: -1px; }
.heading--toggle {
  background: transparent; border: 0; width: 100%;
  padding: clamp(14px, 1.8vh, 20px) 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__text { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.heading--toggle canvas { display: block; image-rendering: pixelated; }
/* the label says what sits behind it */
.heading__sub { font-size: clamp(10px, .95vw, 11.5px); letter-spacing: .18em; color: var(--qevr-muted); }
/* closed = a plus (this opens); open = the long brand dash */
.heading__mark { display: block; position: relative; width: 14px; height: 14px; background: transparent; flex: none; }
.heading__mark::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 6px; background: var(--qevr-muted); }
.heading__mark::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 6px; background: var(--qevr-muted); }
[data-open="true"] > .heading--toggle .heading__mark { width: 30px; height: 6px; }
[data-open="true"] > .heading--toggle .heading__mark::before { top: 0; background: var(--brand); }
[data-open="true"] > .heading--toggle .heading__mark::after { content: none; }
.block__body { padding: 0 clamp(15px, 1.8vw, 24px) clamp(20px, 3vh, 32px); }
[data-open="false"] .block__body { display: none; }

/* ---------- a cena ---------- */

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

/* the intro line reads before the tiles; an absent intro leaves no gap */
#peopleIntro:empty { display: none; }
#peopleIntro { margin-bottom: clamp(14px, 2.2vh, 26px); }

/* the people are a deck like every other list: numbered tiles, same borders */
.people__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  max-width: 880px;
  border-top: var(--rule) solid var(--qevr-hair);
  border-left: var(--rule) solid var(--qevr-hair);
}
.world__close { margin-top: clamp(14px, 2.2vh, 26px); padding-top: clamp(12px, 1.8vh, 20px); border-top: var(--rule) solid var(--qevr-hair); max-width: 880px; }
.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: every deck on this page is this one 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);
}
/* a deck always ends on a full row: when the last tile opens a new row alone,
   it takes the whole row — a wide closing tile, never a hole */
.stances__grid > .stance:nth-child(3n+1):last-child { grid-column: 1 / -1; }
.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); }

/* still tiles: same skin, nothing to press, body always out */
.stance--still { cursor: default; min-height: 0; }
.stance--still:hover { background: transparent; }
.stance--still .stance__body { display: block; }
.stance--still::after { content: none; }

/* ---------- 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 ---------- */

/* a true corner: small zone, so he never sits on the reading (soul: never covers content) */
.companion { position: fixed; right: clamp(8px, 1.6vw, 22px); bottom: clamp(8px, 1.6vh, 22px); z-index: 50; width: 130px; height: 130px; 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 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stances__grid > .stance:nth-child(2n+1):last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  /* the landing is two pages, not a scroll with half-states: a swipe settles
     on him or on the read, never between. inside the read (an area taller
     than the screen) scrolling stays free — snap only guards the two doors.
     (body carries overflow-x: hidden, so it is the propagated scroller:
     the snap-type must sit on BOTH roots or chromium ignores it) */
  html, body { scroll-snap-type: y mandatory; }
  .arrival { scroll-snap-align: start; }
  .blocks { scroll-snap-align: start; }

  .stances__grid, #neversList, .people__grid { grid-template-columns: minmax(0, 1fr); }
  /* GP's ruling: on the read he takes the bottom-right corner, same as the
     app. small zone, small cell, and only he himself takes the tap */
  .companion { width: 92px; height: 92px; right: 10px; bottom: 12px; }
  .lang button { font-size: 10px; padding: 9px 10px; }
  .thermo { width: 6px; }
  main { padding-left: 6px; }
  .arrival { padding-inline: 16px; gap: 14px; }
  .door { padding: 13px 16px; }
  .arrival__color-controls { width: min(100%, 260px); }
  .copy p { font-size: 13px; line-height: 1.62; }
  .world__close p { font-size: 12px; }
  .stance { min-height: 0; padding: 12px 14px; }
  .stance__head { font-size: 12.5px; line-height: 1.45; }
  .stance::after { margin-top: 9px; }
  .heading__sub { letter-spacing: .14em; }
  .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; }
}
