/* ============================================================
   JORGE — PORTFOLIO
   Single stylesheet shared by index.html, editorial.html,
   posters.html and sound.html.

   Page-specific rules are scoped with [data-page="…"], because
   the <html> tag of each page carries that attribute.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face { font-family: "Ring"; src: url(./fonts/RINGM__.TTF) format("truetype"); font-display: swap; }
@font-face { font-family: "GoreWild"; src: url(./fonts/Gorewild.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "SunAndMoon"; src: url(./fonts/SunandMoon.ttf) format("truetype"); font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #070707;
  --bg-img: url("./img/background.png");
  --ink: #f4f4f4;
  --display: "Ring", Impact, sans-serif;
  --symbols: "SunAndMoon", serif;
  --body: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-title: "Archivo", "Arial Black", sans-serif;
  --font-title-alt: "Chakra Petch", "Arial Black", sans-serif;
  --link: #1400ff;
  --poster-h: clamp(220px, 60vh, 780px);
  --poster-gap: clamp(10px, 1.1vw, 18px);
}
/* Each page keeps its own display face */
[data-page="index"] { --display: "GoreWild", Impact, sans-serif; }
[data-page="editorial"], [data-page="posters"], [data-page="sound"] { --display: "Ring", Impact, sans-serif; }

/* ---------- Reset + base ---------- */
* { box-sizing: border-box; margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body { background-color: var(--bg); color: var(--ink); }

[data-page="index"] body { font-family: var(--body); min-height: 100%; }
html[data-page="index"], html[data-page="index"] body { height: 100%; }
[data-page="posters"] body { font-family: var(--display); min-height: 100%; }
html[data-page="posters"], html[data-page="posters"] body { height: 100%; }
[data-page="editorial"] body, [data-page="sound"] body { font-family: var(--font-body); }

/* ---------- Drifting background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); pointer-events: none; }
.bg .par { position: absolute; inset: 0; will-change: transform; }
.bg .layer { position: absolute; inset: -10%; background: var(--bg-img) center / cover no-repeat; will-change: transform; }
.bg .a { animation: driftA 42s ease-in-out infinite alternate; }
.bg .b { opacity: calc(.55 + var(--boost, 0)); mix-blend-mode: screen; animation: driftB 67s ease-in-out infinite alternate; }
.bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.55) 100%); }
@keyframes driftA {
  from { transform: translate3d(-4%, -2%, 0) scale(1.05); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.22); }
}
@keyframes driftB {
  from { transform: translate3d(5%, 3%, 0) scaleX(-1) scale(1.3); }
  to   { transform: translate3d(-5%, -3%, 0) scaleX(-1) scale(1.12); }
}

/* Random static bursts (home page; timing set by the script) */
.bg .static { position: absolute; inset: 0; opacity: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.8 -.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 256px; mix-blend-mode: screen; }
.bg .tear { position: absolute; left: 0; right: 0; opacity: 0; background: var(--bg-img) var(--x, 0%) 50% / cover; filter: brightness(2.6) contrast(1.2); }
.bg .t1 { top: var(--t1y, 30%); height: var(--t1h, 4%); --x: var(--t1x, 10%); }
.bg .t2 { top: var(--t2y, 70%); height: var(--t2h, 2%); --x: var(--t2x, -10%); }
.bg.glitch .static { animation: staticFlicker var(--dur, 300ms) steps(1) both; }
.bg.glitch .tear { animation: tearFlash var(--dur, 300ms) steps(1) both; }
.bg.glitch .a { filter: brightness(1.7) contrast(1.25); }
@keyframes staticFlicker {
  0%   { background-position: 0 0;       opacity: .55; }
  20%  { background-position: -90px 70px; opacity: .2; }
  40%  { background-position: 110px -40px; opacity: .6; }
  60%  { background-position: -60px -120px; opacity: .3; }
  80%  { background-position: 40px 90px;  opacity: .5; }
  100% { background-position: 0 0;       opacity: 0; }
}
@keyframes tearFlash {
  0%   { opacity: 1; transform: translateX(0); }
  25%  { opacity: 0; }
  45%  { opacity: 1; transform: translateX(2.5%); }
  70%  { opacity: 0; }
  85%  { opacity: 1; transform: translateX(-1.5%); }
  100% { opacity: 0; }
}

/* Reveal on scroll (editorial / sound) */
.reveal { opacity: 0; transform: translateY(46px) scale(.985); filter: blur(10px) contrast(1.7) brightness(1.3);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1), filter .9s ease; transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Page shells ---------- */
.page { position: relative; }

[data-page="index"] .page {
  z-index: 1;
  overflow-x: clip;                       /* flames are nudged past the edge, so clip them here */
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
}
[data-page="editorial"] .page, [data-page="sound"] .page { z-index: 2; padding-bottom: clamp(80px, 12vh, 140px); }
[data-page="posters"] .page {
  z-index: 2;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
}

/* ---------- Header / title / return link ---------- */
header { display: flex; justify-content: space-between; align-items: flex-start; padding: clamp(18px, 4.5vh, 56px) clamp(20px, 3.4vw, 56px) 0; }
.title { font-family: var(--display); font-weight: normal; text-transform: uppercase; line-height: 1; font-size: clamp(24px, 2.4vw, 38px); letter-spacing: .02em; margin-top: .35em; margin-left: auto; }

.back { display: block; width: clamp(84px, 8vw, 128px); color: var(--ink); text-decoration: none; font-family: var(--display); }
[data-page="editorial"] .back, [data-page="sound"] .back { position: fixed; top: clamp(18px, 4.5vh, 56px); left: clamp(20px, 3.4vw, 56px); z-index: 20; }
[data-page="posters"] .back { position: relative; }
.back .eye { position: relative; display: block; aspect-ratio: 285 / 123; }
.back .eye img { position: absolute; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.back .eye .still { inset: 0; width: 100%; height: 100%; }
/* the gif canvas is 300x300 with the drawing offset, so it is scaled/offset to line up exactly with the still */
.back .eye .play { width: 105.263%; left: -2.456%; top: -71.54%; height: auto; display: none; max-width: none; }
.back.playing .still { visibility: hidden; }
.back.playing .play { display: block; }
.back .label { position: absolute; left: 0; right: 0; top: 100%; text-align: center; font-size: clamp(18px, 1.7vw, 26px); line-height: 1; margin-top: 4px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; pointer-events: none; }
.back:hover .label, .back:focus-visible .label { opacity: 1; transform: none; }
.back:focus-visible { outline: 2px solid #3cff3c; outline-offset: 6px; }

/* ---------- Shared layout (editorial / sound) ---------- */
[data-page="editorial"] section, [data-page="sound"] section { position: relative; padding: clamp(56px, 11vh, 130px) 0; }
.wrap { width: min(1100px, 90vw); margin: 0 auto; }

/* Images: a little bigger + soft halo on hover. [data-zoom] ones also open fullscreen. */
.hv { position: relative; display: block; isolation: isolate; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.hv img { width: 100%; box-shadow: 0 14px 44px rgba(0,0,0,.6); }
.hv::before { content: ""; position: absolute; inset: -9%; z-index: -1; border-radius: 14px; pointer-events: none; opacity: 0; transition: opacity .35s; filter: blur(16px);
  background: radial-gradient(closest-side, rgba(255,255,255,.2), rgba(110,110,255,.1) 60%, transparent 80%); }
.hv:hover, .hv:focus-visible { transform: scale(1.06); outline: none; }
.hv:hover::before, .hv:focus-visible::before { opacity: 1; }
[data-zoom] { cursor: zoom-in; }

/* Section headings (small overline + title) */
.sec-head { margin-bottom: clamp(20px, 4vh, 44px); }
.sec-head small { display: block; font-size: 14px; font-weight: 400; letter-spacing: .02em; color: #9a9a9a; margin-bottom: 6px; }
.sec-head h3 { font-family: var(--font-title); font-weight: 800; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.05; text-shadow: 0 4px 24px #000; }

/* ---------- Fullscreen image viewer ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; cursor: zoom-out; padding: 3vh 3vw; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-out; transform: scale(.94); transition: transform .25s ease; box-shadow: 0 20px 80px rgba(0,0,0,.8); }
.lightbox img.free { box-shadow: none; filter: drop-shadow(0 18px 38px rgba(0,0,0,.85)); }   /* transparent artwork: shadow follows the visible pixels */
.lightbox.open img { transform: none; }
.page { transition: filter .25s; }
.lb-open .page { filter: blur(14px); }
.lb-open .fly-item { z-index: 0 !important; }

/* ---------- Flames (bottom corners) ---------- */
.flame, .magicflamegif { --fl: clamp(150px, 18vw, 280px); position: fixed; bottom: 0; z-index: 3; width: var(--fl); height: auto; display: block; pointer-events: none; }
.flame.left, .magicflamegif.left { left: calc(var(--fl) * -0.12); }
.flame.right, .magicflamegif.right { right: calc(var(--fl) * -0.12); }

/* ---------- Back-to-top button ---------- */
.to-top { position: fixed; left: 50%; bottom: clamp(18px, 3vh, 30px); z-index: 4; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid #ffffff59; background: #00000080; color: var(--ink); font-size: 20px; line-height: 1; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translate(-50%, 10px);
  transition: opacity .25s, visibility .25s, transform .25s, background .2s; }
.to-top.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.to-top:hover, .to-top:focus-visible { background: #ffffff26; outline: none; }

/* ---------- EN / PT language switcher (markup injected by lang.js) ---------- */
.lang-switch { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 7px; padding: 6px 13px;
  font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .16em; line-height: 1; }
.lang-switch button { background: none; border: 0; padding: 2px 1px; font: inherit; letter-spacing: inherit; color: #8a8a8a; cursor: pointer; transition: color .2s; }
.lang-switch button:hover, .lang-switch button:focus-visible { color: #fff; outline: none; }
.lang-switch button.on { color: #fff; }
.lang-switch .sep { color: #ffffff3d; }

/* ============================================================
   HOME
   ============================================================ */
.moons { font-family: var(--symbols); text-align: center; font-size: clamp(22px, 3.2vw, 40px); letter-spacing: .15em;
  padding-top: calc(4vh + 22px);   /* clears the fixed EN / PT switcher */
  overflow: hidden; white-space: nowrap; }

nav { align-self: center; display: grid; grid-template-columns: 1fr 1fr minmax(180px, 22vw) 1fr 1fr;
  align-items: center; justify-items: center; max-width: 1400px; width: 100%; min-width: 0; margin: 0 auto; }
nav a { font-family: var(--display); font-size: clamp(28px, 4vw, 54px); color: var(--ink); text-decoration: none; text-transform: uppercase;
  line-height: 1; position: relative; z-index: 0; display: inline-block; transform-origin: center;
  transition: transform .28s cubic-bezier(.2,.7,.2,1); }

/* Hover: grow a little + scattered little pixels behind and around the word (text stays white) */
nav a::before, nav a::after { content: ""; position: absolute; z-index: -1; opacity: 0; pointer-events: none; background-repeat: repeat;
  transition: opacity .25s, transform .3s cubic-bezier(.2,.7,.2,1); }
nav a::before {   /* fine pixel dust right behind the letters */
  inset: -12px -15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cg fill='%23f4f4f4'%3E%3Crect x='1' y='2' width='2' height='2' opacity='.5'/%3E%3Crect x='13' y='1' width='2' height='2' opacity='.3'/%3E%3Crect x='22' y='6' width='2' height='2' opacity='.45'/%3E%3Crect x='5' y='11' width='2' height='2' opacity='.26'/%3E%3Crect x='16' y='14' width='2' height='2' opacity='.58'/%3E%3Crect x='0' y='20' width='2' height='2' opacity='.34'/%3E%3Crect x='10' y='22' width='2' height='2' opacity='.24'/%3E%3Crect x='20' y='20' width='2' height='2' opacity='.46'/%3E%3Crect x='7' y='6' width='2' height='2' opacity='.38'/%3E%3Crect x='24' y='16' width='2' height='2' opacity='.3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at center, #000 35%, transparent 88%);
  mask-image: radial-gradient(ellipse 100% 100% at center, #000 35%, transparent 88%);
  transform: scale(.96);
}
nav a::after {    /* a few fainter specks drifting further around it */
  inset: -24px -30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='%23f4f4f4'%3E%3Crect x='4' y='5' width='2' height='2' opacity='.42'/%3E%3Crect x='29' y='2' width='2' height='2' opacity='.26'/%3E%3Crect x='19' y='18' width='2' height='2' opacity='.34'/%3E%3Crect x='2' y='32' width='2' height='2' opacity='.22'/%3E%3Crect x='34' y='36' width='2' height='2' opacity='.36'/%3E%3Crect x='12' y='40' width='2' height='2' opacity='.2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 95% 95% at center, #000 25%, transparent 90%);
  mask-image: radial-gradient(ellipse 95% 95% at center, #000 25%, transparent 90%);
  transform: scale(.94);
}
nav a:hover, nav a:focus-visible { transform: scale(1.2); outline: none; }
nav a:hover::before, nav a:focus-visible::before,
nav a:hover::after, nav a:focus-visible::after { opacity: 1; transform: none; }
nav a:hover::before, nav a:focus-visible::before { animation: dustDriftA 13s linear infinite; }
nav a:hover::after, nav a:focus-visible::after { animation: dustDriftB 21s linear infinite; }
@keyframes dustDriftA {
  from { background-position: 0 0; }
  to   { background-position: 104px -52px; }   /* whole tiles: the loop is seamless */
}
@keyframes dustDriftB {
  from { background-position: 0 0; }
  to   { background-position: -132px 88px; }
}

#centereyegif { width: 100%; max-width: 374px; height: auto; display: block; transform: rotate(10deg); }

/* Bottom row: "about me" button between the two flames */
.intro { display: flex; justify-content: center; align-items: flex-end; }

.about-btn { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em;
  font-size: clamp(22px, 2.4vw, 34px); line-height: 1; color: var(--ink); position: relative; padding: 6px 10px;
  transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.about-btn::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: center; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.about-btn:hover, .about-btn:focus-visible { transform: scale(1.06); outline: none; }
.about-btn:hover::after, .about-btn:focus-visible::after { transform: scaleX(1); }

/* About overlay: the text fills the screen over a blurred page */
.about-view { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 8vh 7vw; background: rgba(5,5,5,.62);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; cursor: zoom-out; overflow-y: auto; }
.about-view.open { opacity: 1; visibility: visible; }
.about-body { max-width: 920px; margin: auto; text-align: left; text-transform: uppercase; font-weight: 700;
  font-size: clamp(14px, 1.6vw, 21px); line-height: 1.5; letter-spacing: -.005em;
  transform: translateY(14px); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.about-view.open .about-body { transform: none; }
.about-close { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 18px; font-family: var(--display);
  font-size: 26px; line-height: 1; padding: 8px 10px; color: var(--ink); opacity: .65; cursor: pointer; }
.about-close:hover, .about-close:focus-visible { opacity: 1; outline: none; }
[data-page="index"] .page, [data-page="index"] .magicflamegif { transition: filter .35s ease; }
.about-open .page, .about-open .magicflamegif { filter: blur(14px); }   /* the page behind the overlay goes soft */

/* Shown only while a gif file is missing */
.missing { min-height: 120px; min-width: 120px; border: 2px dashed #c11; border-radius: 50%; }

/* ============================================================
   EDITORIAL
   ============================================================ */
[data-page="editorial"] .feature { display: grid; grid-template-columns: auto minmax(0, 460px); gap: clamp(24px, 4.5vw, 64px); justify-content: center; align-items: center; }
[data-page="editorial"] .feature.left-img { grid-template-columns: minmax(0, 600px) minmax(0, 420px); }
[data-page="editorial"] .feature h1, [data-page="editorial"] .feature h2 { text-transform: uppercase; line-height: 1.05; font-size: clamp(30px, 4vw, 46px); font-weight: 800; margin-bottom: clamp(16px, 2.4vw, 28px); text-shadow: 0 4px 24px #000; }
[data-page="editorial"] .feature h1 { font-family: var(--font-title); }
[data-page="editorial"] .feature h2 { font-family: var(--font-title); text-transform: none; font-weight: 700; }
[data-page="editorial"] .feature p { font-size: 14px; line-height: 1.45; color: #e6e6e6; text-shadow: 0 2px 12px #000, 0 0 3px #000; max-width: 62ch; }
[data-page="editorial"] .cta { display: inline-block; margin: clamp(20px, 3vw, 34px) 0 clamp(16px, 2vw, 24px); font-weight: 800; font-size: clamp(16px, 1.6vw, 20px); text-transform: uppercase; color: var(--link); text-decoration: none; text-shadow: 0 0 22px #000, 0 0 10px #000, 0 2px 4px #000; }
[data-page="editorial"] .cta:hover, [data-page="editorial"] .cta:focus-visible { filter: brightness(1.5); outline: none; }
[data-page="editorial"] .strip { width: min(100%, 400px); }

[data-page="editorial"] .cover { width: clamp(200px, 26vw, 290px); }
.spreads { display: flex; gap: clamp(16px, 3vw, 40px); justify-content: center; align-items: center; margin-top: clamp(50px, 9vh, 110px); }
.spreads .hv:first-child { width: min(46%, 460px); }
.spreads .hv:last-child { width: min(36%, 360px); }

/* Flipbook */
.book-host { width: min(1100px, 92vw); margin: 0 auto; }
.book-host .stf__parent { margin: 0 auto; }
.book-host .stf__parent, .book-host .stf__wrapper, .book-host .stf__block { background: transparent !important; }
.bk-page { background: #111; overflow: hidden; } .bk-page img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* Loading state shown over the book while the PDF pages are rendered — bar + time only, no backdrop box */
.book-stage { position: relative; }
.book-load { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 2.4vh, 24px);
  background: none; transition: opacity .45s ease, visibility .45s; }
.book-load.done { opacity: 0; visibility: hidden; }
.ld-track { width: min(260px, 60%); height: 3px; border-radius: 3px; background: #ffffff26; overflow: hidden; }
.ld-bar { display: block; width: 0; height: 100%; background: #3cff3c; box-shadow: 0 0 12px #3cff3c99; transition: width .3s ease; }
.ld-time { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #9a9a9a; font-variant-numeric: tabular-nums; }
.book-ctl { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 22px; font-weight: 600; }
.book-ctl button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff66; font-size: 22px; line-height: 1; background: #00000066; transition: background .2s, transform .2s; }
.book-ctl button:hover, .book-ctl button:focus-visible { background: #ffffff26; transform: scale(1.1); outline: none; }
.book-note { text-align: center; font-size: 12px; color: #8d8d8d; margin-top: 10px; }

/* Flying gallery: transparent PNGs, so no box, no halo rectangle; shadows follow the artwork */
.fly { position: relative; width: min(1180px, 96vw); aspect-ratio: 1; margin: 0 auto; touch-action: pan-y; user-select: none; }
.fly-item { position: absolute; width: 40%; padding: 0; transform: rotate(var(--r, 0deg)); pointer-events: none; }   /* positions are driven by the script */
.fly-item .bob { display: block; animation: bob 6s ease-in-out infinite alternate; animation-delay: var(--bd, 0s); }
@keyframes bob { from { transform: translate3d(0, -6px, 0) rotate(-.6deg); } to { transform: translate3d(0, 8px, 0) rotate(.8deg); } }
.fly-item .lift { display: block; transition: transform .4s cubic-bezier(.2,.7,.2,1), filter .4s; filter: drop-shadow(0 18px 22px rgba(0,0,0,.55)); }
.fly-item.hov .lift { transform: scale(1.07); filter: drop-shadow(0 28px 34px rgba(0,0,0,.7)) drop-shadow(0 0 26px rgba(150,150,255,.25)); }
.fly-item.dragging .bob { animation: none; }
.fly-item.dragging .lift { filter: drop-shadow(0 30px 42px rgba(0,0,0,.8)); }
.fly-item img { width: 100%; height: auto; box-shadow: none; }

/* transparent hero image (Grammatizator): shadow and glow follow the artwork instead of a rectangle */
.hv.free::before { display: none; }
.hv.free img { box-shadow: none; filter: drop-shadow(0 16px 24px rgba(0,0,0,.55)); transition: filter .35s; }
.hv.free:hover img { filter: drop-shadow(0 22px 30px rgba(0,0,0,.65)) drop-shadow(0 0 24px rgba(150,150,255,.25)); }

/* Grids */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 30px); align-items: center; }
.grid2.narrow { width: min(900px, 100%); margin: 0 auto; }

/* ============================================================
   POSTERS
   ============================================================ */
[data-page="posters"] main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 0 0 clamp(20px, 4vh, 60px); }
[data-page="posters"] .row { overflow: hidden; width: 100%;
  padding: calc(var(--poster-h) * .07) 0;          /* room for the hover zoom so it isn't clipped */
  margin-top: calc(var(--poster-h) * -.02); margin-bottom: calc(var(--poster-h) * -.02);
  touch-action: pan-y; cursor: grab; }   /* horizontal swipes are handled by the script; vertical swipes still scroll the page */
[data-page="posters"] .row.dragging { cursor: grabbing; }
[data-page="posters"] .track { display: flex; gap: var(--poster-gap); width: max-content; will-change: transform; }   /* moved by the script */
[data-page="posters"] .poster {
  flex: none; height: var(--poster-h); aspect-ratio: 210 / 297;
  padding: 0; border: 0; background: #111; cursor: pointer; display: block;
  transition: transform .25s ease, box-shadow .25s ease; position: relative;
}
[data-page="posters"] .poster img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; user-select: none; }
[data-page="posters"] .poster:hover, [data-page="posters"] .poster:focus-visible { transform: scale(1.12); z-index: 2; box-shadow: 0 10px 40px rgba(0,0,0,.7); outline: none; }

/* ============================================================
   SOUND
   ============================================================ */
[data-page="sound"] .feature { display: grid; grid-template-columns: auto minmax(0, 440px); gap: clamp(24px, 4vw, 56px); justify-content: center; align-items: center; }
[data-page="sound"] .feature h1, [data-page="sound"] .feature h2 { line-height: 1.05; font-weight: 800; font-family: var(--font-title); text-shadow: 0 4px 24px #000; }
[data-page="sound"] .feature h1 { text-transform: none; font-size: clamp(32px, 4vw, 46px); margin-bottom: clamp(6px, .8vw, 10px); }
[data-page="sound"] .feature h2 { text-transform: none; font-weight: 700; font-size: clamp(16px, 1.5vw, 19px); margin-bottom: clamp(14px, 1.8vw, 20px); }
[data-page="sound"] .feature p { font-size: 14px; line-height: 1.45; color: #e6e6e6; text-shadow: 0 2px 12px #000, 0 0 3px #000; max-width: 46ch; }
[data-page="sound"] .feature .highlights { margin-top: clamp(14px, 1.8vw, 20px); }
[data-page="sound"] .feature .highlights > span { font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #fff; }
[data-page="sound"] .cta { display: inline-block; margin: clamp(20px, 3vw, 32px) 0 clamp(14px, 2vw, 22px); font-weight: 800; font-size: clamp(15px, 1.5vw, 19px); letter-spacing: .06em; text-transform: uppercase; color: var(--link); text-decoration: none; text-shadow: 0 0 22px #000, 0 0 10px #000, 0 2px 4px #000; }
[data-page="sound"] .cta:hover, [data-page="sound"] .cta:focus-visible { filter: brightness(1.6); outline: none; }
[data-page="sound"] .hero-img { width: clamp(220px, 26vw, 300px); }
[data-page="sound"] .strip { width: min(100%, 340px); }
[data-page="sound"] .spreads { gap: clamp(16px, 3vw, 44px); margin-top: 0; }
@media (min-width: 801px) {
  [data-page="sound"] .spreads .hv:last-child { width: min(40%, 400px); }
}

/* Releases grid */
.releases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3.4vw, 46px) clamp(18px, 2.6vw, 44px); width: min(720px, 100%); margin: 0 auto; }
.releases figure { margin: 0; }
.releases figcaption { margin-top: 10px; }
.rel-title { display: block; font-size: 14px; line-height: 1.35; color: #f0f0f0; }
.rel-year { display: block; font-size: 13px; line-height: 1.3; color: #bdbdbd; margin-top: 2px; }

/* SoundCloud slot: paste the player inside #soundcloud */
.sc-section { padding-top: clamp(30px, 6vh, 70px); }
.sc-embed { width: min(900px, 100%); margin: 0 auto; min-height: clamp(320px, 45vh, 480px);
  display: flex; align-items: center; justify-content: center; border: 1px dashed #ffffff2e; border-radius: 10px; }
.sc-embed iframe { width: 100%; border: 0; display: block; }
.sc-note { text-align: center; font-family: var(--font-title); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: clamp(14px, 1.4vw, 18px); color: #8d8d8d; }
.sc-note span { display: block; margin-top: 6px; font-family: var(--font-body); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; color: #6f6f6f; }

/* Sticky audio player (top right, under the page title) */
.player { position: fixed; top: clamp(86px, 13vh, 150px); right: clamp(20px, 3.4vw, 56px); z-index: 30;
  display: flex; flex-direction: column; align-items: flex-end; gap: 7px; padding: 9px 11px; border-radius: 12px;
  background: rgba(6,6,8,.55); border: 1px solid #ffffff26; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ptrack { font-size: 10px; line-height: 1; letter-spacing: .09em; text-transform: uppercase; color: #cfcfcf; text-shadow: 0 1px 6px #000;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow { display: flex; align-items: center; gap: 7px; transition: opacity .3s; }
.player:not(.ready) .prow { opacity: .5; }   /* dimmed until the SoundCloud player is ready */
.pbtn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  border: 1px solid #ffffff2e; background: #00000040; transition: background .2s, transform .2s; }
.pbtn:hover, .pbtn:focus-visible { background: #ffffff26; transform: scale(1.08); outline: none; }
.pbtn svg { width: 14px; height: 14px; fill: currentColor; display: block; }
#pMute { width: 28px; height: 28px; border-color: transparent; background: none; }
.pbtn .ico-pause, .pbtn .ico-mute { display: none; }
.pbtn.playing .ico-play { display: none; }
.pbtn.playing .ico-pause { display: block; }
.pbtn.muted .ico-vol { display: none; }
.pbtn.muted .ico-mute { display: block; }
.pvol { width: 72px; height: 3px; accent-color: #f4f4f4; cursor: pointer; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 800px) {
  /* editorial + sound hero stacks */
  [data-page="editorial"] .feature, [data-page="editorial"] .feature.left-img,
  [data-page="sound"] .feature { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  [data-page="editorial"] .feature.left-img .hv,
  [data-page="sound"] .feature .hero-img { order: -1; }
  .spreads { flex-direction: column; } .spreads .hv:first-child, .spreads .hv:last-child { width: min(92%, 460px); }
  .flame { --fl: 150px; } .flame.left { left: 10px; } .flame.right { right: 10px; }
  .fly { aspect-ratio: .66; } .fly-item { width: 58%; }   /* taller gallery so the floating pieces use the vertical space */
  .releases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* home */
  nav { grid-template-columns: 1fr; row-gap: 26px; }   /* nav buttons stacked, further apart */
  nav a { font-size: clamp(44px, 10vw, 50px); }
  #centereyegif { grid-column: 1; grid-row: 1; max-width: 264px; margin-top: -28px; }
  .magicflamegif { --fl: 150px; }
  .magicflamegif.left { left: 10px; }
  .magicflamegif.right { right: 10px; }
  .about-btn { font-size: 26px; }

  /* posters */
  :root { --poster-h: clamp(220px, 52vh, 480px); }
}
@media (max-width: 620px) {
  .grid2 { grid-template-columns: 1fr; }   /* one big picture per row on phones */
}

@media (prefers-reduced-motion: reduce) {
  .bg .layer, .fly-item .bob { animation: none; }
  .bg .static, .bg .tear { display: none; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  nav a:hover::before, nav a:focus-visible::before,
  nav a:hover::after, nav a:focus-visible::after { animation: none; }
}
