/* ============ Project pages (e.g. aether.html) — uses the colours and fonts from style.css ============ */
body.proj { background: var(--night); color: var(--white); }
body.proj::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.proj main { position: relative; z-index: 1; }
.proj .row-label { color: var(--grey-dark); border-color: var(--line-dark); }

/* ---------- top bar ---------- */
.pbar { position: sticky; top: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--pad); background: rgba(22, 22, 22, .78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-dark); }
.pbar-logo img { display: block; height: 34px; width: auto; transition: transform .5s var(--ease); }
.pbar-logo:hover img { transform: scale(1.04); }
.pbar-nav { display: flex; align-items: center; gap: 22px; font-family: var(--display); font-size: 1.2rem; letter-spacing: .02em; }
.pbar-back { color: var(--grey-dark); transition: color .3s; }
.pbar-back:hover { color: var(--white); }
.pbar-cta { display: inline-flex; align-items: center; gap: 10px; background: var(--white); color: var(--navy); padding: 8px 8px 6px 14px; border-radius: 6px; transition: background .4s var(--ease), color .4s var(--ease), transform .4s var(--ease); }
.pbar-cta span { width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: var(--white); display: grid; place-items: center; font-family: var(--body); font-size: .8rem; margin-top: -2px; transition: transform .5s var(--ease); }
.pbar-cta:hover { background: var(--blue); color: var(--white); transform: translateY(-2px); }
.pbar-cta:hover span { background: var(--white); color: var(--blue); transform: rotate(-45deg); }

/* ---------- hero ---------- */
.p-hero { position: relative; min-height: calc(100svh - 64px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-bottom: 1px solid var(--line-dark); }
.p-kicker { display: flex; justify-content: space-between; padding: 18px var(--pad); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey-dark); position: absolute; top: 0; left: 0; right: 0; }
.p-kicker span:last-child { color: var(--blue-soft); }
.p-title { position: relative; z-index: 2; display: flex; justify-content: space-between; font-family: var(--display); font-size: min(clamp(6rem, 25vw, 26rem), calc(94vw / (var(--n, 6) * .44))); line-height: .8; padding: 0 var(--pad); margin-bottom: 2vw; }
.p-title span { display: inline-block; transform: translateY(110%); opacity: 0; animation: p-rise 1.3s var(--ease) forwards; animation-delay: calc(.1s + var(--i, 0) * .07s); }
.p-title span:hover { color: var(--blue-soft); }
@keyframes p-rise { to { transform: none; opacity: 1; } }
.p-orb { position: absolute; z-index: 1; width: 52vmax; height: 52vmax; left: 50%; top: 42%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(125, 140, 255, .55), rgba(1, 37, 255, .25) 45%, transparent 70%); filter: blur(30px); transform: translate(-50%, -50%) translate(var(--mx, 0px), var(--my, 0px)); transition: transform 1.2s var(--ease); animation: p-breathe 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes p-breathe { from { scale: 1; opacity: .8; } to { scale: 1.18; opacity: 1; } }
.p-meta { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-dark); }
.p-meta div { padding: 16px var(--pad) 20px; border-right: 1px solid var(--line-dark); opacity: 0; transform: translateY(14px); animation: p-rise 1s var(--ease) forwards; animation-delay: calc(.7s + var(--i, 0) * .08s); }
.p-meta div:last-child { border-right: 0; }
.p-meta dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-dark); }
.p-meta dd { font-family: var(--display); font-size: clamp(1.3rem, 2vw, 1.9rem); margin-top: 4px; }
.p-scroll { position: absolute; z-index: 2; right: var(--pad); top: 14%; writing-mode: vertical-rl; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--grey-dark); }
.p-scroll span { display: inline-block; margin-top: 8px; animation: p-bob 1.6s ease-in-out infinite; }
@keyframes p-bob { 50% { transform: translateY(6px); } }

/* ---------- story card ---------- */
.p-story { border-bottom: 1px solid var(--line-dark); }
.story-wrap { padding: clamp(30px, 6vw, 90px) var(--pad); perspective: 1200px; }
.story-card { position: relative; max-width: 1100px; margin: 0 auto; padding: clamp(28px, 5vw, 64px); border-radius: 14px; background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease), border-color .4s; }
.story-card:hover { border-color: rgba(125, 140, 255, .45); }
.story-glow { position: absolute; width: 520px; height: 520px; left: var(--gx, 50%); top: var(--gy, 50%); transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(1, 37, 255, .38), transparent 62%); opacity: 0; transition: opacity .5s; pointer-events: none; }
.story-card:hover .story-glow { opacity: 1; }
.story-eyebrow { position: relative; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-soft); margin-bottom: 18px; }
.story-text { position: relative; font-family: var(--display); font-size: clamp(2rem, 4.4vw, 4.2rem); line-height: 1.02; text-transform: uppercase; transform: translateZ(30px); }
.story-text .w { display: inline-block; transition: transform .35s var(--ease), color .35s; transform: translateY(var(--wy, 0)) scale(var(--ws, 1)); }
.story-text .w.lit { color: var(--blue-soft); }
.story-text .w-in { display: inline-block; opacity: .12; transition: opacity .6s var(--ease); }
.story-text.shown .w-in { opacity: 1; transition-delay: calc(var(--k, 0) * 22ms); }
.story-stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(26px, 4vw, 48px); padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); transform: translateZ(20px); }
.story-stats b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 5vw, 4.6rem); line-height: 1; color: var(--white); }
.story-stats span { font-size: .8rem; color: var(--grey-dark); }
.story-stats li { transition: transform .5s var(--ease); }
.story-stats li:hover { transform: translateY(-6px); }
.story-stats li:hover b { color: var(--blue-soft); }

/* ---------- gallery ---------- */
.p-head { display: grid; grid-template-columns: 1fr; }
.p-h2 { font-family: var(--display); font-size: clamp(3.4rem, 9vw, 9rem); line-height: .9; text-transform: uppercase; padding: 18px var(--pad) 0; }
.p-h2 em { font-style: normal; color: var(--blue-soft); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 17vw, 260px); grid-auto-flow: dense; gap: 12px; padding: 24px var(--pad) clamp(40px, 6vw, 80px); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }
.g-item { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; background: #1f1f22; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
/* reveal: a cover in the page colour slides up off each tile as it scrolls into view */
.g-item::after { content: ""; position: absolute; inset: -1px; z-index: 3; background: var(--night); transform-origin: top; transition: transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); pointer-events: none; }
.g-item.in::after { transform: scaleY(0); }
.g-item:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 24px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(125, 140, 255, .5); z-index: 2; }
.g-media { position: absolute; inset: 0; transform: scale(1.18); transition: transform 1.4s var(--ease); }
.g-item.in .g-media { transform: scale(1); }
.g-item:hover .g-media { transform: scale(1.07); }
.g-media img, .g-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* placeholder look (only when the tile has no real image or video yet) */
.g-media:empty { background: linear-gradient(135deg, hsl(var(--h, 232) 45% 22%), #141418 60%, hsl(calc(var(--h, 232) + 30) 50% 18%)); }
.g-media:empty::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%); background-size: 250% 100%; animation: g-shine 3.2s ease-in-out infinite; }
.g-media:empty::after { content: attr(data-ph); position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 2.2rem); letter-spacing: .04em; color: rgba(255, 255, 255, .22); }
@keyframes g-shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.g-item figcaption { position: absolute; left: 12px; bottom: 10px; z-index: 2; font-family: var(--display); font-size: 1.25rem; letter-spacing: .02em; transform: translateY(8px); opacity: 0; transition: transform .5s var(--ease), opacity .4s; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.g-item:hover figcaption { transform: none; opacity: 1; }
.g-badge { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); padding: 5px 8px 4px; border-radius: 3px; }
.g-badge i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; animation: g-rec 1.4s ease-in-out infinite; }
@keyframes g-rec { 50% { opacity: .2; } }
.g-play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .35); display: grid; place-items: center; transition: transform .5s var(--ease), background .4s; }
.g-play::before { content: ""; border-left: 15px solid var(--white); border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.g-item:hover .g-play { transform: scale(1.15); background: var(--blue); border-color: var(--blue); }

/* ---------- film strip ---------- */
.p-strip { overflow: hidden; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); padding: 18px 0; }
.strip-track { display: flex; width: max-content; animation: s-move 38s linear infinite; }
.p-strip:hover .strip-track { animation-play-state: paused; }
.strip-set { display: flex; gap: 12px; padding-right: 12px; }
.s-tile { position: relative; width: clamp(150px, 16vw, 230px); aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; display: grid; place-items: end start; padding: 10px 12px; font-family: var(--display); font-size: 1.2rem; color: rgba(255, 255, 255, .7); background: linear-gradient(160deg, #23243a, #141418 65%, #1b2160); transition: transform .5s var(--ease); }
.s-tile::before { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); }
.s-tile::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -7px 0 0 -3px; border-left: 11px solid rgba(255, 255, 255, .8); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.s-tile:hover { transform: translateY(-8px) rotate(-1.5deg); }
@keyframes s-move { to { transform: translateX(-50%); } }

/* ---------- next ---------- */
.p-next { padding-bottom: clamp(40px, 6vw, 80px); }
.next-link { display: block; padding: clamp(30px, 5vw, 70px) var(--pad) 10px; }
.next-small { display: block; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey-dark); }
.next-big { display: inline-flex; align-items: center; gap: .25em; font-family: var(--display); font-size: clamp(3.6rem, 11vw, 11rem); line-height: .9; text-transform: uppercase; transition: color .4s var(--ease); }
.next-big span { display: inline-block; color: var(--blue-soft); transition: transform .6s var(--ease); }
.next-link:hover .next-big { color: var(--blue-soft); }
.next-link:hover .next-big span { transform: translateX(16px) rotate(-45deg); color: var(--white); }
.next-proj { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 26px var(--pad) 0; padding: 22px 0; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.np-name { font-family: var(--display); font-size: clamp(2rem, 4.4vw, 4.2rem); line-height: 1; text-transform: uppercase; transition: color .4s var(--ease), transform .6s var(--ease); }
.np-name span { display: inline-block; color: var(--blue-soft); transition: transform .6s var(--ease); }
.next-proj:hover .np-name { color: var(--blue-soft); transform: translateX(-10px); }
.next-proj:hover .np-name span { transform: translateX(14px); }
.next-back { display: inline-block; margin: 10px var(--pad) 0; font-family: var(--display); font-size: 1.2rem; color: var(--grey-dark); transition: color .3s; }
.next-back:hover { color: var(--white); }

/* ---------- viewer ---------- */
.lb { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 60px var(--pad) 30px; background: rgba(10, 10, 12, .9); backdrop-filter: blur(8px); opacity: 0; transition: opacity .4s var(--ease); }
.lb.show { opacity: 1; }
.lb[hidden] { display: none; }
.lb-stage { position: relative; height: min(78svh, 900px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transform: scale(.94); transition: transform .5s var(--ease); }
.lb.show .lb-stage { transform: none; }
.lb-media { position: relative; width: min(100%, 1100px); height: 100%; border-radius: 10px; overflow: hidden; background: #1f1f22; }
.lb-media img, .lb-media video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.lb-media.ph { background: linear-gradient(135deg, hsl(var(--h, 232) 45% 22%), #141418 60%, hsl(calc(var(--h, 232) + 30) 50% 18%)); display: grid; place-items: center; font-family: var(--display); font-size: clamp(2rem, 5vw, 4rem); color: rgba(255, 255, 255, .3); }
.lb-cap { font-family: var(--display); font-size: 1.4rem; letter-spacing: .02em; }
.lb-cap small { font-family: var(--body); font-size: .75rem; letter-spacing: .14em; color: var(--grey-dark); margin-left: 10px; }
.lb-nav, .lb-close { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: var(--white); font-size: 1.2rem; cursor: pointer; transition: background .4s var(--ease), border-color .4s, transform .4s var(--ease); }
.lb-nav:hover, .lb-close:hover { background: var(--blue); border-color: var(--blue); }
.lb-prev:hover { transform: translateX(-3px); }
.lb-next:hover { transform: translateX(3px); }
.lb-close { position: absolute; top: 14px; right: var(--pad); font-size: 1.6rem; }
.lb-close:hover { transform: rotate(90deg); }

/* ---------- custom cursor (only on devices with a mouse) ---------- */
.cur { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cur { display: grid; place-items: center; position: fixed; z-index: 100; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--white); mix-blend-mode: difference; pointer-events: none; transform: translate(var(--cx, -100px), var(--cy, -100px)); transition: width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease), background .3s; }
  .cur.big { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: var(--blue); mix-blend-mode: normal; }
  .cur.link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .cur-label { font-family: var(--display); font-size: 1rem; letter-spacing: .04em; color: var(--white); opacity: 0; transition: opacity .25s; }
  .cur.big .cur-label { opacity: 1; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(140px, 34vw, 240px); }
  .p-meta { grid-template-columns: 1fr 1fr; }
  .p-meta div:nth-child(2) { border-right: 0; }
  .p-meta div:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
  .story-stats { grid-template-columns: 1fr; gap: 14px; }
  .lb { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; }
  .lb-stage { grid-column: 1 / -1; grid-row: 1; height: min(70svh, 700px); }
  .lb-prev { justify-self: end; }
  .g-item figcaption { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .pbar-back { display: none; }
  .pbar-logo img { height: 28px; }
  .p-hero { min-height: 82svh; }
  .p-scroll { display: none; }
  .gallery { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .p-title span, .p-meta div { animation: none; transform: none; opacity: 1; }
  .p-orb, .strip-track, .g-media:empty::before, .p-scroll span, .g-badge i { animation: none; }
  .g-item::after { display: none; }
  .g-media { transform: none; }
  .story-text .w-in { opacity: 1; }
}
