/* Minieta: the page takes each wall's own paint as its ground, chapter by chapter */
:root {
  --black: #0f0f10;
  --paper: #eeeeec;      /* spray white */
  --red: #c81d16;        /* spray red, the one action colour */
  --ink: var(--paper);
  --bg: var(--black);
  --m: clamp(16px, 2.2vw, 32px);   /* the one pair of outer margins */
  --gap: 24px;
  --step-small: clamp(0.875rem, 0.84rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 4.6vw, 5.5rem);
  --step-giant: clamp(3.5rem, 10.5vw, 10rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-body)/1.5 "Epilogue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -0.04em; line-height: .9; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--paint, #f4c21b); outline-offset: 3px; }
::selection { background: var(--red); color: #fff; }

.link { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color .2s, opacity .2s; }
.link:hover { text-decoration-color: transparent; }

.btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px;
  background: var(--red); color: #fff; font-weight: 500; text-decoration: none; border-radius: 0;
  transition: transform .18s var(--ease), background-color .2s;
}
.btn:hover { background: #a9160f; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }

/* bar */
.bar {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 32px; padding: 20px var(--m);
  font-size: var(--step-small);
}
.mark { font-weight: 900; font-size: var(--step-lead); letter-spacing: -0.04em; text-decoration: none; }
.bar nav { display: flex; gap: 24px; margin-left: auto; }
.bar nav a { text-decoration: none; padding: 10px 0; transition: opacity .2s; }
.bar nav a:hover { opacity: .65; }

/* hero: the sentence holds its place while the walls pass through it */
.hero { position: relative; height: 190svh; }
.hero-stage {
  --fw: min(35vw, calc((100svh - 190px) * .75));
  --fh: calc(var(--fw) * 4 / 3);
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  background: var(--hg, var(--black)); color: var(--hi, var(--ink));
  transition: background-color .6s var(--ease), color .6s var(--ease);
}
.hero-title {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--m); font-size: var(--step-head); line-height: .92; z-index: 2;
}
.half { display: block; width: calc((100% - var(--fw)) / 2 - 24px); }
.half-r { text-align: right; }
.reel-window { position: absolute; left: 50%; top: 0; bottom: 0; width: var(--fw); transform: translateX(-50%); }
.reel {
  position: absolute; left: 0; right: 0; top: calc(50% - var(--fh) / 2);
  display: grid; gap: var(--gap); will-change: transform;
}
.reel li { position: relative; }
.reel img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }
.reel span { display: block; padding-top: 10px; font-size: var(--step-small); }
.hero-line {
  position: absolute; left: var(--m); bottom: 32px; max-width: 30ch;
}

/* walls intro + index */
.walls-intro {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap) 64px; align-items: end;
  padding: 160px var(--m) 120px;
}
.h2 { font-size: var(--step-head); }
.lead { font-size: var(--step-lead); line-height: 1.3; max-width: 30ch; margin-top: 32px; }
.venue-index { display: grid; gap: 4px; }
.venue-index a {
  display: inline-block; font-weight: 900; letter-spacing: -0.03em; font-size: var(--step-lead);
  text-decoration: none; padding: 6px 0; transition: transform .2s var(--ease), color .2s;
}
.venue-index a:hover { transform: translateX(8px); color: #f4c21b; }

/* venue chapters: each one painted in its own wall colour */
.venue {
  --ground: var(--black); --paint: var(--paper); --ink-v: var(--paper); --t: 0;
  background: var(--ground); color: var(--ink-v);
  padding: 112px var(--m) 128px; overflow: hidden;
}
.venue-light { --red: #c81d16; }
.tear {
  position: relative; text-align: center; text-transform: uppercase; color: var(--paint);
  font-size: var(--step-giant); line-height: .84; letter-spacing: -0.045em;
}
.tear-a { display: block; clip-path: inset(-10% 50% -10% -10%); transform: translateY(calc(var(--t) * -0.32em)); }
.tear::after {
  content: attr(data-t); white-space: pre-line; position: absolute; inset: 0; pointer-events: none;
  clip-path: inset(-10% -10% -10% 50%); transform: translateY(calc(var(--t) * 0.32em));
}
.venue-line { text-align: center; margin-top: 28px; font-weight: 500; }
.panes { display: flex; justify-content: center; gap: var(--gap); margin-top: 56px; }
.panes figure { width: min(calc((100% - var(--gap)) / 2), calc(74svh * .75)); }
.panes.n3 figure { width: min(calc((100% - 2 * var(--gap)) / 3), calc(74svh * .75)); }
figcaption { margin-top: 12px; font-size: var(--step-small); max-width: 42ch; }
.open {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; color: inherit;
}
.open img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; transition: opacity .3s; }
.open:hover img { opacity: .9; }

.venue-side { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.venue-side figure { justify-self: end; width: min(100%, calc(78svh * .75)); }
.venue-flip figure { justify-self: start; }
.tear-side { display: inline-block; text-align: left; font-size: var(--step-head); }
.venue-side .venue-line { text-align: left; }
.venue-note { margin-top: 24px; max-width: 36ch; }

/* design */
.design {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
  padding: 128px var(--m);
}
.design-text p + p { margin-top: 20px; max-width: 52ch; }
.design-text .lead + p { margin-top: 32px; }
.disciplines li {
  font-weight: 900; letter-spacing: -0.04em; line-height: 1; font-size: var(--step-head);
  padding: 4px 0;
}
.disciplines li:nth-child(3) { color: #f4c21b; }

/* about */
.about {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  padding: 96px var(--m) 160px;
}
.about-pic { width: min(100%, calc(78svh * .75)); }
.about-text > p:not(.lead) { margin-top: 24px; max-width: 48ch; }
.quote { margin: 40px 0 0; }
.quote p { font-weight: 900; letter-spacing: -0.03em; font-size: var(--step-lead); line-height: 1.15; color: #f4c21b; }
.quote footer { margin-top: 8px; font-size: var(--step-small); }
.facts { display: flex; gap: 48px; margin: 40px 0 0; }
.facts dt { font-size: var(--step-small); }
.facts dd { margin: 4px 0 0; font-weight: 500; }

/* footer: the close, on spray white */
.foot {
  position: relative; overflow: hidden; background: var(--paper); color: var(--black);
  display: flex; flex-direction: column; padding: 112px var(--m) 0;
  --paint: var(--red);
}
.foot-top { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
.foot-title { font-size: var(--step-head); margin-bottom: 40px; }
.foot-links { display: grid; gap: 10px; justify-self: end; }
.foot-links a { display: inline-block; padding: 4px 0; }
.foot-row {
  display: flex; justify-content: space-between; gap: 24px; margin-top: auto; padding-top: 64px;
  font-size: var(--step-small);
}
.foot-name {
  font-weight: 900; letter-spacing: -0.06em; line-height: .8; white-space: nowrap;
  font-size: 28vw; margin-bottom: -6vw; pointer-events: none; color: var(--black);
}

/* viewer: the whole photo, fitted between its bars */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0b0b0c; color: var(--paper);
  display: none; grid-template-rows: auto minmax(0, 1fr) auto;
}
.viewer[open] { display: grid; }
.viewer::backdrop { background: #0b0b0c; }
.viewer-bar, .viewer-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px var(--m); }
.viewer-cap { font-size: var(--step-small); max-width: 60ch; }
.viewer-stage { min-height: 0; display: grid; place-items: center; padding: 0 var(--m); }
.viewer-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.viewer button {
  min-height: 44px; padding: 0 18px; border: 0; background: var(--paper); color: var(--black);
  font: 500 var(--step-small) "Epilogue", sans-serif; cursor: pointer; transition: transform .15s var(--ease), opacity .2s;
}
.viewer button:hover { opacity: .85; }
.viewer button:active { transform: scale(.97); }

/* entrances: text rises, photos only fade */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-fade] { opacity: 0; transition: opacity .9s var(--ease); transition-delay: var(--d, 0ms); }
.js .in[data-rise], .js .in[data-fade] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-rise] { transform: none; transition: opacity .3s; }
  .tear-a, .tear::after { transform: none !important; }
}

/* tablet */
@media (max-width: 1024px) {
  .bar nav { display: none; }
  .about { grid-template-columns: 1fr; }
  .walls-intro, .design { gap: 40px; }
  .foot-top { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; }
}

/* phone: its own composition */
@media (max-width: 760px) {
  .hero-stage { background: var(--black); color: var(--ink); }
  .walls-intro, .design { grid-template-columns: 1fr; }
  .bar { gap: 12px; padding: 14px var(--m); }
  .hero { height: auto; }
  .hero-stage { position: relative; height: auto; overflow: visible; padding: 92px 0 48px; }
  .hero-title { position: static; display: block; padding: 0; font-size: 9vw; }
  .hero-title br { display: none; }
  .half { width: auto; padding: 0 var(--m); text-align: left; }
  .reel-window { position: static; transform: none; width: auto; margin: 28px var(--m) 0; }
  .reel { position: static; grid-template-columns: 1fr 1fr; gap: 16px 12px; transform: none !important; }
  .hero-line { position: static; margin: 28px var(--m) 0; }
  .walls-intro { padding: 120px var(--m) 96px; }
  .venue { padding: 112px var(--m) 120px; }
  .tear { font-size: 13vw; }
  .panes { flex-direction: column; align-items: center; margin-top: 48px; gap: 40px; }
  .panes figure, .panes.n3 figure { width: min(100%, calc(78svh * .75)); }
  .venue-side { grid-template-columns: 1fr; gap: 40px; }
  .venue-flip .side-text { order: -1; }
  .venue-side figure { justify-self: center; width: min(100%, calc(78svh * .75)); }
  .tear-side { font-size: 12vw; }
  .side-text { text-align: center; }
  .venue-side .venue-line, .venue-note { text-align: center; margin-left: auto; margin-right: auto; }
  .design { padding: 120px var(--m); gap: 48px; }
  .about { padding: 64px var(--m) 120px; gap: 40px; }
  .about-pic { justify-self: center; width: min(100%, calc(78svh * .75)); }
  .foot { padding-top: 96px; }
  .foot-title { font-size: 11vw; }
  .disciplines { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
  .disciplines li { font-size: var(--step-lead); }
  .h2 { font-size: 11vw; }
  .foot .btn { width: 100%; justify-content: center; min-height: 56px; }
  .foot-name { font-size: 34vw; margin-right: -12vw; }
}
@media (max-width: 420px) {
  .bar .btn-small { padding: 0 12px; }
  .bar .btn-small { font-size: .875rem; }
}
