/* Omnioculus
   Layout: every section is one band of a five-column grid, after an editorial "motion" layout:
   a numbered rail, a stack of small words, a tall duotone panel, the copy, and a second stack.
   Alternate bands mirror the panel to the right. Below 1000px the bands fold into one column.
   Palette: near-black with a single lavender-violet accent; images are baked to purple duotone
   and bloom into full colour on hover. */

:root {
  --bg: #08070a;
  --bg-2: #0f0d14;
  --ink: #ece8f3;
  --ink-2: #b3acc1;
  --ink-3: #7a738c;
  --rule: rgba(236, 232, 243, 0.13);
  --violet: #a68bff;
  --violet-2: #7c5cf0;
  --violet-deep: #2a1b52;
  --rail: 70px;
  --pad: clamp(16px, 3vw, 40px);
  --gap: clamp(18px, 2.6vw, 44px);
  --panel-w: clamp(220px, 19vw, 290px);
  --band-h: clamp(560px, 80vh, 780px);
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --script: "Homemade Apple", "Segoe Script", cursive;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 13px;
  line-height: 1.38;
  letter-spacing: 0.045em;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
::selection { background: var(--violet-2); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 14px; background: var(--ink); color: var(--bg); font-weight: 700; text-transform: uppercase; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- film grain over everything ---- */
.grain {
  position: fixed;
  inset: -40%;
  z-index: 200;
  pointer-events: none;
  opacity: 0.11;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---- small type: word stacks, labels ---- */
.stack {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}
.stack .dash { display: block; width: 14px; height: 1px; margin-top: 10px; background: currentColor; }

/* ---- top bar ---- */
.topbar {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) 1fr auto;
  align-items: center;
  gap: var(--gap);
  min-height: 64px;
  padding-right: var(--pad);
}
.topbar::before { content: ""; position: absolute; left: calc(var(--pad) + 8px); top: 0; bottom: 0; width: 1px; background: var(--ink-2); opacity: 0.55; }
.brand {
  grid-column: 1 / 3;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: calc(var(--pad) + 30px);
  text-decoration: none;
  font-weight: 800;
  font-variation-settings: "wdth" 125;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand svg { width: 30px; height: 18px; color: var(--ink); transition: transform 0.4s var(--ease); }
.brand:hover svg { transform: scaleY(0.2); }
.nav { position: absolute; left: calc(var(--pad) + 220px); display: flex; align-items: center; gap: 16px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; transition: color 0.2s; }
.nav a:hover { color: var(--violet); }
.nav .dot { color: var(--ink-3); font-size: 9px; }
.topbar .corner { grid-column: 3; padding: 14px 0; }

/* ---- the band: one section of the page ---- */
.sec {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) minmax(96px, 0.62fr) var(--panel-w) minmax(0, 2.3fr) minmax(96px, 0.62fr);
  grid-template-areas: "marker lstack visual copy rstack";
  column-gap: var(--gap);
  min-height: var(--band-h);
  padding-right: var(--pad);
  border-top: 1px solid var(--rule);
}
.sec::before { content: ""; position: absolute; left: calc(var(--pad) + 8px); top: 70px; bottom: 0; width: 1px; background: var(--ink-2); opacity: 0.55; }
.hero, .project:nth-of-type(even), .outro {
  grid-template-columns: var(--rail) minmax(0, 2.3fr) var(--panel-w) minmax(96px, 0.62fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "marker lstack visual rstack" "marker copy visual rstack";
}

.marker { grid-area: marker; position: relative; padding: 22px 0 0 var(--pad); }
.marker .num { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; }
.marker .sq { position: absolute; left: calc(var(--pad) + 3px); top: 50px; width: 11px; height: 11px; background: var(--ink); }
.marker .sq.hollow { background: transparent; border: 1px solid var(--ink); }
#work { counter-reset: project; }
.project { counter-increment: project; }
.project .marker .num::before { content: counter(project, decimal-leading-zero); }

.s-left { grid-area: lstack; padding-top: 34px; }
.s-right { grid-area: rstack; padding-top: 34px; }

/* the tall image panel */
.visual {
  grid-area: visual;
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  background: var(--violet-deep);
  isolation: isolate;
}
.visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.7s var(--ease), transform 1.4s var(--ease); }
.visual .color { opacity: 0; }
.visual::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8, 7, 10, 0) 55%, rgba(8, 7, 10, 0.55)); pointer-events: none; }
.project .visual:hover img, .project:has(.btn:hover) .visual img, .project:has(.btn:focus-visible) .visual img { transform: scale(1.045); }
.project .visual:hover .color, .project:has(.btn:hover) .color, .project:has(.btn:focus-visible) .color { opacity: 1; }
.s-in { position: absolute; z-index: 2; right: 14px; bottom: 16px; font-size: 11.5px; color: #f4f0fa; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
/* the handwriting takes one lower corner of the panel, so the little stack moves to the other */
.project:nth-of-type(odd) .s-in { right: auto; left: 14px; }

/* the copy */
.copy { grid-area: copy; align-self: center; container-type: inline-size; padding-block: 48px; }
.hero .copy, .project:nth-of-type(even) .copy, .outro .copy { align-self: start; padding-top: 30px; }
.hero .copy { align-self: center; padding-top: 0; }
.name { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--violet); }
.headline {
  margin: 0;
  font-weight: 850;
  font-variation-settings: "wdth" 125;
  font-size: clamp(40px, 15.5cqi, 116px);
  line-height: 0.88;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.headline span { display: block; }
.headline .solid { color: var(--ink); }
.headline .outline { color: transparent; -webkit-text-stroke: clamp(1px, 0.16cqi, 1.6px) var(--violet); }
.blurb { margin: 28px 0 0; max-width: 40ch; font-size: 12.5px; line-height: 1.42; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 11px 18px;
  background: var(--ink);
  color: #0b0a0e;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}
.btn span[aria-hidden] { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover { background: var(--violet); color: #0b0a0e; }
.btn:hover span[aria-hidden] { transform: translateX(4px); }
.project:nth-of-type(odd) .copy .btn { float: right; margin-right: 12%; }
.copy::after { content: ""; display: block; clear: both; }

/* handwriting laid over the panel's lower edge */
.script {
  grid-area: visual;
  align-self: end;
  justify-self: end;
  z-index: 3;
  margin: 0 0 84px;
  transform: translateX(46%) rotate(-11deg);
  font-family: var(--script);
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.35;
  letter-spacing: 0;
  color: #f2edf9;
  white-space: nowrap;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.hero .script, .project:nth-of-type(even) .script { justify-self: start; transform: translateX(-42%) rotate(-11deg); }

/* ---- 00: the eye ---- */
.hero { --band-h: clamp(600px, calc(100vh - 64px), 860px); }
.eye-panel { background: #0b0812; }
.eye-panel canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.eye-panel::after { background: radial-gradient(120% 80% at 50% 50%, transparent 55%, rgba(8, 7, 10, 0.7)); }

/* ---- the empty frame ---- */
.slot { background: repeating-linear-gradient(135deg, rgba(166, 139, 255, 0.07) 0 1px, transparent 1px 14px); outline: 1px dashed rgba(166, 139, 255, 0.45); outline-offset: -1px; }
.slot::after { display: none; }
.slot-num { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-weight: 850; font-variation-settings: "wdth" 125; font-size: clamp(64px, 7vw, 110px); color: transparent; -webkit-text-stroke: 1.2px var(--violet); }
.slot-num::before { content: counter(project, decimal-leading-zero); counter-increment: project; }

/* ---- footer ---- */
.foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px var(--pad) calc(26px + env(safe-area-inset-bottom, 0px)) calc(var(--pad) + 30px);
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--violet); }

/* ---- reveal on scroll ---- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .visual[data-reveal] { transform: none; clip-path: inset(100% 0 0 0); transition: opacity 0.6s var(--ease), clip-path 1.3s var(--ease); }
.js .visual[data-reveal].in { clip-path: inset(0 0 0 0); }

/* ---- narrower screens: the band folds into one column ---- */
@media (max-width: 999px) {
  :root { --rail: 34px; --gap: 18px; }
  .nav { left: auto; right: var(--pad); position: relative; justify-self: end; grid-column: 3; }
  .topbar { grid-template-columns: var(--rail) 1fr auto; }
  .topbar .corner { display: none; }
  .brand { margin-left: calc(var(--pad) + 14px); }
  .sec, .hero, .project:nth-of-type(even), .outro {
    grid-template-columns: var(--rail) 1fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: "marker lstack rstack" "marker visual visual" "marker copy copy";
    min-height: 0;
    padding-bottom: 44px;
  }
  .sec::before, .topbar::before { left: calc(var(--pad) + 5px); }
  .marker { padding-left: var(--pad); }
  .marker .sq { left: var(--pad); }
  .s-left, .s-right { padding-top: 22px; padding-bottom: 20px; }
  .visual { aspect-ratio: 3 / 4; max-height: 76vh; width: 100%; }
  .hero .visual { aspect-ratio: 4 / 5; }
  .copy, .hero .copy, .project:nth-of-type(even) .copy, .outro .copy { padding: 30px 0 0; align-self: start; }
  .headline { font-size: clamp(34px, 15cqi, 96px); }
  .project:nth-of-type(odd) .copy .btn { float: none; margin-right: 0; }
  .script { transform: translate(8%, 30%) rotate(-9deg); margin: 0; font-size: 15px; }
  .hero .script, .project:nth-of-type(even) .script { transform: translate(-8%, 30%) rotate(-9deg); }
  .nav a[aria-label] { display: none; }
  .nav .dot { display: none; }
}
@media (max-width: 999px) and (min-width: 600px) {
  .nav a[aria-label], .nav .dot { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .js [data-reveal], .js .visual[data-reveal] { opacity: 1; transform: none; clip-path: none; transition: none; }
  .visual img, .btn span[aria-hidden], .brand svg { transition: none; }
}
