/* mermer — shared styles
   Phase 1: static layout and type only. Motion arrives in Phase 2,
   atmosphere (dusk, candle, grain) in Phase 3. */

/* ---------- Tokens: the two-colour mermer palette ---------- */
:root{
  --ink:#333333;          /* Dark Charcoal */
  --paper:#FDFBF9;        /* Matte White */
  --bg:var(--paper);
  --fg:var(--ink);
  --display:"Antonio","Arial Narrow",sans-serif;
  --body:"Montserrat","Helvetica Neue",Arial,sans-serif;
  --gutter:clamp(1.1rem,4vw,3rem);
  --rule:color-mix(in srgb,var(--fg) 22%,transparent);
  color-scheme:light;     /* always matte white, whatever the phone's setting */
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:5rem}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--body);font-size:1rem;line-height:1.6;overflow-x:hidden;-webkit-font-smoothing:antialiased}
a,button{color:inherit;font:inherit}
img{display:block;max-width:100%;height:auto}
h1,h2,h3{text-wrap:balance}
p,li,figcaption{text-wrap:pretty}
:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Abloh-style quotation-mark labels */
.q::before{content:"\201C"}.q::after{content:"\201D"}
.sec-note{font-size:.85rem;font-weight:500;margin:0 0 2rem}

.skip{position:absolute;left:var(--gutter);top:-4rem;z-index:50;background:var(--ink);color:var(--paper);padding:.6rem 1rem;text-decoration:none}
.skip:focus{top:1rem}

/* ---------- Header ---------- */
.site-head{position:fixed;top:0;left:0;right:0;z-index:20;display:flex;justify-content:space-between;align-items:baseline;gap:1rem;
  padding:calc(env(safe-area-inset-top,0px) + 1.1rem) var(--gutter) 1rem;mix-blend-mode:difference;color:#FDFBF9;font-size:.85rem;font-weight:500}
.site-head a{text-decoration:none}
.site-head nav{display:flex;gap:1.5rem}
.site-head nav a[aria-current="page"]{text-decoration:underline;text-underline-offset:.35em;text-decoration-thickness:1px}
.wordmark{display:block;line-height:0}
.wordmark svg{display:block;height:clamp(.7rem,.55rem + .6vw,1.05rem);width:auto}
@media (max-width:420px){
  .site-head{font-size:.8rem}
  .site-head nav{gap:.9rem}
  .site-head{flex-wrap:wrap;row-gap:.6rem}
}

main{position:relative;z-index:1}

/* Film grain: takes the digital edge off, like low light */
body::before{content:"";position:fixed;inset:0;z-index:40;pointer-events:none;opacity:.09;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .2 0 0 0 .8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}

/* Pages other than home start below the header */
.page{padding:clamp(6.5rem,16vh,10rem) var(--gutter) clamp(4rem,10vh,7rem)}

/* ---------- Placeholder plates (until real images arrive) ---------- */
.plate{margin:0;position:relative;aspect-ratio:4/3;display:grid;place-items:center;font-size:.8rem;
  background:repeating-linear-gradient(-45deg,color-mix(in srgb,var(--ink) 10%,transparent) 0 1px,transparent 1px 10px);
  border:1px solid color-mix(in srgb,var(--ink) 30%,transparent)}

/* ================= HOME ================= */

/* 1. Murmur */
.murmur{min-height:100vh;min-height:100svh;display:grid;align-content:end;padding:6rem var(--gutter) clamp(2rem,6vh,4rem)}
.whisper{max-width:30ch;font-size:.95rem;margin:0 0 2rem}
.hero-line{font-family:var(--display);font-weight:130;font-size:clamp(3.6rem,14vw,13rem);line-height:.86;margin:0;letter-spacing:-.01em}
.cue{margin:3rem 0 0;font-size:.8rem}

/* 2. Swell */
.swell{padding:clamp(4rem,12vh,9rem) var(--gutter)}
.projects{list-style:none;margin:0;padding:0}
.projects li{border-top:1px solid var(--rule)}
.projects li:last-child{border-bottom:1px solid var(--rule)}
.project{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.35rem 0;text-decoration:none}
.project .title{font-family:var(--display);font-weight:400;font-size:clamp(2.6rem,10.5vw,9.5rem);line-height:.92;text-transform:uppercase;text-wrap:balance}
.project .hint{font-size:.8rem;white-space:nowrap;opacity:0}
@media (hover:hover){
  .projects:hover .project{opacity:.2}
  .projects .project:hover,.projects .project:focus-visible{opacity:1}
  .project:hover .hint,.project:focus-visible .hint{opacity:1}
}

/* Murmurs preview: small, light, clearly secondary */
.preview{padding:clamp(2rem,6vh,4rem) var(--gutter) clamp(4rem,12vh,8rem)}
.preview-head{display:flex;justify-content:space-between;align-items:baseline;gap:1rem}
.preview-head a{font-size:.85rem;font-weight:500;text-underline-offset:.35em;text-decoration-thickness:1px}
.preview ol{list-style:none;margin:0;padding:0;display:grid;gap:1.25rem}
.preview li{display:grid;grid-template-columns:5.5rem 1fr;gap:1rem;align-items:start}
.preview .plate{aspect-ratio:4/5}
.preview p{margin:0;font-size:.85rem;line-height:1.5}
.preview .post-meta{margin-top:.35rem}
@media (min-width:760px){
  .preview ol{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(1.5rem,3vw,2.5rem);max-width:56rem}
  .preview li{grid-template-columns:1fr;gap:.8rem}
}

/* 3. Roar — shown here in its full-dusk state; the gradual dimming comes in Phase 3 */
.roar{overflow:hidden;padding:clamp(6rem,18vh,12rem) var(--gutter);background:var(--ink);color:var(--paper)}
.stack{position:relative;font-family:var(--display);font-weight:700;text-transform:uppercase;line-height:.78;margin:0 0 clamp(3rem,10vh,7rem)}
.w{display:block;font-size:clamp(5rem,23vw,22rem)}
.w.outline{color:transparent;-webkit-text-stroke:2px var(--paper)}
.w2{margin-left:12vw}
.w3{position:absolute;right:4vw;top:18%;font-size:clamp(2rem,7vw,6rem);font-weight:300;rotate:-90deg}
.w4{margin-left:-3vw;margin-top:-4vw}
.w5{text-align:right;margin-right:-2vw}
.manifesto{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,34ch);gap:2rem;align-items:start}
.manifesto p{margin:0;font-size:clamp(1rem,1.3vw,1.15rem)}
@media (max-width:640px){
  .manifesto{grid-template-columns:1fr}
  .w2{margin-left:6vw}.w4{margin-top:-2vw}
  .w.outline{-webkit-text-stroke:1.5px var(--paper)}
}

/* 4. Ebb (also the Contact page) */
.ebb{min-height:90vh;min-height:90svh;display:grid;align-content:center;padding:clamp(6rem,12vh,9rem) var(--gutter)}
.ebb h1,.ebb h2{font-family:var(--display);font-weight:100;font-size:clamp(3rem,11vw,10rem);line-height:.9;margin:0 0 2.5rem}
.links{display:flex;flex-wrap:wrap;gap:1.25rem 2.5rem;margin:0 0 5rem;padding:0;list-style:none}
.links a{font-weight:500;text-decoration:underline;text-underline-offset:.35em;text-decoration-thickness:1px}
.foot{font-size:.8rem;max-width:40ch;margin:0}

/* ================= CASE FILE ================= */
.case-top{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;font-size:.85rem;margin-bottom:3rem}
.case-top a,.case-end a{font-weight:500;text-underline-offset:.35em;text-decoration-thickness:1px}
.case h1{font-family:var(--display);font-weight:700;text-transform:uppercase;font-size:clamp(3.2rem,13vw,12rem);line-height:.84;margin:0 0 2rem;max-width:12ch}
.meta{display:flex;flex-wrap:wrap;gap:.5rem 2.5rem;font-size:.85rem;margin:0 0 4rem;padding:0;list-style:none}
.meta b{font-weight:600}
.cf-label{font-size:.85rem;font-weight:600;margin:0 0 .8rem}
.brief{margin:0 0 clamp(4rem,10vw,7rem)}
.brief p:last-child{font-size:clamp(1.05rem,1.6vw,1.3rem);margin:0;max-width:36ch}
.cf-section{margin-top:clamp(4rem,10vw,8rem)}
.cf-section > .cf-label{margin-bottom:clamp(1.5rem,4vw,2.5rem)}
.cf-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:clamp(1rem,2.5vw,2rem);row-gap:clamp(2.5rem,6vw,5rem);align-items:start}

/* Each image keeps its own shape; build.py places it on the broken grid via --col */
.shot{position:relative;margin:0;grid-column:var(--col);width:100%;max-width:var(--max)}
.shot img{width:100%;height:auto}
.shot.right{margin-top:clamp(2rem,6vw,5rem);justify-self:end}
.tilt0{rotate:1.5deg}.tilt1{rotate:-1deg}
.note{position:absolute;max-width:20ch;font-size:.8rem;font-style:italic;background:var(--paper);color:var(--ink);padding:.35rem .6rem;border-left:2px solid var(--ink);rotate:-2deg;line-height:1.4}
.n-a{left:-.75rem;bottom:-1.2rem}.n-b{right:-.5rem;top:-1.1rem}.n-c{left:6%;bottom:-1.3rem}
.case-ack{margin:clamp(4rem,10vw,7rem) 0 0;max-width:52ch;font-size:.85rem}
.case-end{margin-top:clamp(4rem,10vh,7rem);padding-top:1.5rem;border-top:1px solid var(--rule);font-size:.85rem}
@media (max-width:720px){
  .shot{grid-column:1 / -1;rotate:0deg}
  .shot.right{margin-top:0}
  /* Portrait pieces sit a little narrower, alternating sides, so the column still feels broken */
  .shot.port{width:82%}
  .shot.port.right{justify-self:end}
  .note{position:static;display:inline-block;margin-top:.6rem;rotate:0deg}
}

/* ================= MURMURS ================= */
.page-title{font-family:var(--display);font-weight:100;font-size:clamp(3.6rem,14vw,11rem);line-height:.86;margin:0 0 1.5rem}
.intro{max-width:38ch;margin:0 0 3rem}
.filters{display:flex;flex-wrap:wrap;gap:.6rem;margin:0 0 3rem;padding:0;list-style:none}
.filters button{background:none;border:1px solid var(--ink);padding:.45rem 1rem;font-size:.85rem;font-weight:500;cursor:pointer}
.filters button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.feed{list-style:none;margin:0;padding:0;display:grid;gap:clamp(3rem,8vw,5rem) clamp(1.5rem,5vw,4rem);max-width:64rem}
@media (min-width:760px){.feed{grid-template-columns:repeat(2,minmax(0,1fr))}}
.feed figure{margin:0}
.feed .plate{aspect-ratio:4/5}
.feed figcaption{margin-top:1rem}
.feed figcaption p{margin:0;max-width:40ch}
.post-meta{display:flex;gap:.6rem;font-size:.8rem;font-weight:500;margin-top:.5rem}
.post-open{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in}
.lightbox .plate{aspect-ratio:4/5}
.feed img,.preview img,.lightbox img{width:100%;aspect-ratio:4/5;height:auto;object-fit:cover}
.feed-status{margin:0;max-width:40ch}
.feed-status:empty{display:none}
.more[hidden]{display:none}
.more{display:block;margin:clamp(3rem,8vw,5rem) 0 0;background:none;border:1px solid var(--ink);padding:.7rem 1.4rem;font-size:.85rem;font-weight:500;cursor:pointer}

/* Lightbox: one Murmur, larger, with its line */
.lightbox{border:0;padding:0;margin:auto;background:var(--paper);color:var(--ink);width:min(90vw,56vh + 2rem,40rem);max-height:94vh;max-height:94dvh;overflow:auto}
.lightbox::backdrop{background:color-mix(in srgb,var(--ink) 88%,transparent)}
.lightbox figure{margin:0}
.lightbox .close{position:absolute;top:.6rem;right:.6rem;z-index:1;background:var(--paper);border:1px solid var(--ink);padding:.45rem 1rem;font-size:.85rem;font-weight:500;cursor:pointer}
.lightbox-caption{padding:1rem 1.1rem 1.3rem}
.lightbox-caption p:first-child{margin:0}
.lightbox-link{display:inline-block;margin-top:.8rem;font-size:.85rem;font-weight:500;text-underline-offset:.35em;text-decoration-thickness:1px}
html:has(.lightbox[open]){overflow:hidden}

/* ================= ABOUT ================= */
.about-title{font-family:var(--display);font-weight:700;text-transform:uppercase;font-size:clamp(3.2rem,12vw,11rem);line-height:.86;margin:0 0 3rem;max-width:14ch}
.bio{display:grid;gap:1.25rem;max-width:38ch;font-size:clamp(1.05rem,1.5vw,1.25rem)}
.bio p{margin:0}
.bio .sec-note{margin:clamp(1.5rem,4vw,2.5rem) 0 0}
.bio .sec-note:first-child{margin-top:0}
@media (min-width:900px){
  .about-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,38ch);gap:2rem}
}

/* ================= MOTION (Phase 2) =================
   Only when .motion is on: JavaScript is running and the visitor
   hasn't asked their device for reduced motion. */
.motion{--tide:cubic-bezier(.22,1,.36,1)}

/* Hero: letters arrive one by one, out of a soft blur */
.motion .hero-line .word{display:inline-block;white-space:nowrap}
.motion .hero-line .word span{display:inline-block;opacity:0;filter:blur(10px);transform:translateY(.06em);
  transition:opacity 1.8s var(--tide),filter 2.2s var(--tide),transform 2.2s var(--tide)}
.motion.arrived .hero-line .word span{opacity:1;filter:none;transform:none}
.motion .whisper{opacity:0;transition:opacity 2.4s var(--tide) 1.2s}
.motion .cue{opacity:0;transition:opacity 2s ease 2.6s}
.motion.arrived .whisper,.motion.arrived .cue{opacity:1}

/* Swell: weight and lean are eased by motion.js; hover drifts the active title */
.motion .project{transition:opacity 1.4s var(--tide),transform 1.6s var(--tide)}
.motion .project .title{transform-origin:left bottom;transition:letter-spacing 1.6s var(--tide);will-change:transform}
.motion .project .hint{transform:translateX(-1rem);transition:opacity 1s var(--tide),transform 1.2s var(--tide)}
@media (hover:hover){
  .motion .projects .project:hover,.motion .projects .project:focus-visible{transform:translateX(2vw)}
  .motion .project:hover .title{letter-spacing:.025em}
  .motion .project:hover .hint,.motion .project:focus-visible .hint{transform:none}
}

/* Roar */
.motion .w{will-change:transform}

/* Case file: rises in softly, pieces settle one by one */
.motion .settle{opacity:0;translate:0 1.5rem;transition:opacity 1.2s var(--tide),translate 1.4s var(--tide)}
.motion.arrived .settle{opacity:1;translate:0 0}
.motion.arrived .s1{transition-delay:.15s}.motion.arrived .s2{transition-delay:.3s}.motion.arrived .s3{transition-delay:.45s}
.motion.arrived .s4{transition-delay:.6s}.motion.arrived .s5{transition-delay:.75s}.motion.arrived .s6{transition-delay:.9s}

/* Between pages: the old page fades, the new one rises in. The header travels with the page.
   Browsers that can't do this simply change page as normal. */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:.5s cubic-bezier(.22,1,.36,1) both mm-out}
  ::view-transition-new(root){animation:.9s cubic-bezier(.22,1,.36,1) .1s both mm-in}
}
@keyframes mm-out{to{opacity:0}}
@keyframes mm-in{from{opacity:0;transform:translateY(3rem)}}

/* ================= ATMOSPHERE (Phase 3) =================
   With motion on, the roar loses its fixed charcoal: motion.js dims the
   whole page into it instead, and lights a candle. */
.dusk-ready .roar{background:transparent;color:inherit}
.dusk-ready .w.outline{-webkit-text-stroke-color:var(--fg)}
.candle{position:fixed;left:0;top:0;width:70vmax;height:70vmax;border-radius:50%;pointer-events:none;z-index:0;opacity:0;
  background:radial-gradient(circle,color-mix(in srgb,var(--paper) 16%,transparent) 0%,color-mix(in srgb,var(--paper) 6%,transparent) 35%,transparent 65%);will-change:transform,opacity}

/* Murmurs: posts fade and drift gently into place; the lightbox fades in and out */
.motion .drift{opacity:0;translate:0 1.5rem;transition:opacity 1.4s var(--tide),translate 1.6s var(--tide)}
.motion .drift.in{opacity:1;translate:0 0}
.motion .preview li:nth-child(2){transition-delay:.15s}.motion .preview li:nth-child(3){transition-delay:.3s}
.motion .lightbox,.motion .lightbox::backdrop{opacity:0;transition:opacity .9s var(--tide),overlay .9s allow-discrete,display .9s allow-discrete}
.motion .lightbox[open],.motion .lightbox[open]::backdrop{opacity:1}
@starting-style{.motion .lightbox[open],.motion .lightbox[open]::backdrop{opacity:0}}
