/* Brualla — shared styles for all project pages. One file = one place to change all eight projects. */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --white:#f9f8f6;--off:#f2f0ec;--stone:#e8e4de;--mid:#b8b2a8;
  --soft:#6f695f;--dark:#2a2825;--ink:#1a1917;
  --coral:#E85B3F;        /* primary action + large display accents (3.3:1 on page, 5.0:1 under ink text) */
  --coral-text:#BC3D27;   /* small coral text on light backgrounds (AA) */
  --coral-btn:#EE6247;    /* buttons only: ink label reaches 5.4:1 */
  --tan:#c8a882;          /* secondary decorative tone only */
  --accent:var(--coral);--accent-text:var(--coral-text);
  --line:rgba(42,40,37,.1);
  --display:'Clash Display',sans-serif;--sans:'Jost',sans-serif;--mono:'DM Mono',monospace;
  --cap:1440px;            /* content cap; grows on genuinely large screens */
  --pad-x:max(3.5rem,calc((100% - var(--cap))/2 + 3.5rem));
  --hero-overlay:.4;       /* flat dark overlay on project hero (desktop). 0 = none */
  --lb-w:80vw;--lb-h:80vh;
}
@media (min-width:2200px){:root{--cap:1680px}}
@media (min-width:3200px){:root{--cap:1840px}}

html{scroll-behavior:smooth;scrollbar-gutter:stable}
html.lb-open{overflow:hidden}
body{background:var(--white);color:var(--ink);font-family:var(--sans);font-weight:300;overflow-x:hidden}
img{max-width:100%}
picture{display:block}
a{color:inherit}
button{font:inherit;color:inherit;cursor:pointer}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.todo{background:rgba(232,91,63,.18);padding:0 .25em}
.skip-link{position:fixed;left:1rem;top:-4rem;z-index:20000;background:var(--ink);color:var(--white);padding:.7rem 1.1rem;font-family:var(--mono);font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;text-decoration:none;transition:top .2s}
.skip-link:focus{top:1rem}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

/* ── custom cursor (mouse/trackpad only) ── */
.custom-cursor,.custom-cursor a,.custom-cursor button{cursor:none}
.cursor,.cursor-ring{position:fixed;left:0;top:0;pointer-events:none;border-radius:50%;opacity:0;transition:width .25s,height .25s,background .25s,opacity .3s}
.cursor{width:8px;height:8px;background:var(--ink);z-index:20001}
.cursor-ring{width:32px;height:32px;border:1px solid var(--ink);z-index:20000}
.cursor-on .cursor{opacity:1}.cursor-on .cursor-ring{opacity:.3}
.cursor.hover{width:13px;height:13px;background:var(--coral)}
.cursor-ring.hover{width:48px;height:48px;opacity:.18}
.lb-open .cursor,.lb-open .cursor-ring{opacity:0!important}

/* ── NAV: everything (bar, logo scale, light→dark crossfade, link colour) is driven by --p (0 at top → 1 after 280px) ── */
.site-nav{--p:0;position:fixed;top:0;left:0;right:0;z-index:100;display:flex;align-items:flex-start;justify-content:space-between;
  padding:calc(1.4rem - .8rem*var(--p)) var(--pad-x);
  background:rgba(249,248,246,calc(.9*var(--p)));backdrop-filter:blur(calc(16px*var(--p)));-webkit-backdrop-filter:blur(calc(16px*var(--p)))}
.nav-logo-wrap{position:relative;display:flex;text-decoration:none;transform-origin:left top;will-change:transform;margin-top:.2rem}
.logo{display:inline-flex;align-items:center}
.logo img{display:block;height:52px;width:auto}
.logo-text{display:none;font-family:var(--display);font-size:1.5rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;line-height:1}
.logo.failed img{display:none}.logo.failed .logo-text{display:inline}
.logo-dark{opacity:var(--p)}.logo-dark .logo-text{color:var(--ink)}
.logo-light{position:absolute;left:0;top:0;opacity:calc(1 - var(--p))}.logo-light .logo-text{color:var(--white)}
.nav-links{display:flex;gap:1.1rem;list-style:none;align-items:flex-start;margin-top:-.2rem}
.nav-links a{display:inline-block;padding:.95rem .7rem;font-family:var(--mono);font-size:.68rem;font-weight:400;letter-spacing:.12em;text-transform:uppercase;text-decoration:none;position:relative;
  color:var(--white);text-shadow:0 0 18px rgba(0,0,0,calc(.35*(1 - var(--p))))}
@supports (color:color-mix(in srgb,red,blue)){.nav-links a{color:color-mix(in srgb,var(--dark) calc(var(--p)*100%),var(--white))}}
.nav-links a::after{content:'';position:absolute;left:.7rem;right:.7rem;bottom:.6rem;height:1px;background:var(--coral);transform:scaleX(0);transform-origin:left;transition:transform .3s}
.nav-links a:hover::after{transform:scaleX(1)}
.site-nav :focus-visible{outline-color:var(--coral)}

/* ── PROJECT HERO: full-width, fixed 80vh, cropped (cover) around a per-project focal point; not clickable ── */
.project-hero{position:relative;height:clamp(520px,80vh,1300px);overflow:hidden;display:flex;align-items:flex-end;background:var(--stone)}
.hero-media{position:absolute;inset:0}
.hero-media picture{width:100%;height:100%}
.hero-media img{width:100%;height:100%;object-fit:cover;object-position:var(--hero-pos,50% 50%);display:block}
.hero-media::after{content:'';position:absolute;inset:0;background:rgba(26,25,23,var(--hero-overlay));pointer-events:none}
.project-hero-content{position:relative;z-index:2;width:100%;padding:4rem var(--pad-x);display:grid;grid-template-columns:1fr auto;align-items:end;gap:4rem}
.project-hero-title{font-family:var(--display);font-size:clamp(2.4rem,5.6vw,6.4rem);font-weight:600;line-height:1;letter-spacing:-.025em;color:var(--white);text-shadow:0 1px 30px rgba(0,0,0,.3);text-wrap:balance;opacity:0;animation:fadeUp .8s .05s forwards}
.project-hero-subtitle{font-size:1.1rem;font-weight:300;color:rgba(249,248,246,.92);margin-top:1.1rem;max-width:40rem;text-shadow:0 1px 20px rgba(0,0,0,.3);opacity:0;animation:fadeUp .8s .15s forwards}
.project-meta{display:flex;flex-direction:column;gap:1.3rem;opacity:0;animation:fadeUp .8s .25s forwards}
.meta-label{font-family:var(--mono);font-size:.6rem;letter-spacing:.18em;text-transform:uppercase;color:rgba(249,248,246,.7);margin-bottom:.3rem}
.meta-value{font-family:var(--mono);font-size:.74rem;letter-spacing:.06em;line-height:1.55;color:var(--white);max-width:27rem}

/* ── PROJECT BODY ── */
.project-body{max-width:var(--cap);margin:0 auto;padding:7rem 3.5rem}
.project-intro{display:grid;grid-template-columns:1fr 1.6fr;gap:6rem;margin-bottom:6.5rem;align-items:start}
.project-intro-label{font-family:var(--mono);font-size:.64rem;letter-spacing:.22em;text-transform:uppercase;color:var(--ink);display:flex;align-items:center;gap:1rem;margin-bottom:1.2rem}
.project-intro-label::before{content:'';width:28px;height:2px;background:var(--coral);flex-shrink:0}
.project-intro-title{font-family:var(--display);font-size:clamp(1.9rem,3.2vw,3rem);font-weight:600;line-height:1.05;letter-spacing:-.025em;position:sticky;top:8rem}
.desc-block+.desc-block{margin-top:2.2rem}
.desc-label{font-family:var(--mono);font-size:.62rem;font-weight:400;letter-spacing:.18em;text-transform:uppercase;color:var(--soft);margin-bottom:.6rem}
.project-description p{font-size:1.08rem;line-height:1.8;color:var(--dark)}

/* ── GALLERY (rows are art-directed in the HTML; no masonry) ── */
.project-gallery{display:flex;flex-direction:column;gap:1.5rem}
.gallery-row{display:grid;gap:1.5rem}
.gallery-row.single{grid-template-columns:1fr}
.gallery-row.duo{grid-template-columns:1fr 1fr}
.gallery-row.mix{display:flex}                      /* portrait + landscape side by side: widths ∝ ratio ⇒ equal heights, full width */
.gallery-row.mix .gallery-item{flex:var(--g) 1 0%;min-width:0}
.gallery-item{position:relative;overflow:hidden;background:var(--stone);aspect-ratio:var(--ar,4/3)}
.gallery-btn{position:absolute;inset:0;display:block;width:100%;height:100%;border:0;padding:0;background:none}
.gallery-btn picture{width:100%;height:100%}
.gallery-btn img{width:100%;height:100%;object-fit:cover;object-position:center;display:block;transition:transform .7s ease}
@media (hover:hover) and (pointer:fine){.gallery-btn:hover img{transform:scale(1.02)}}
.gallery-btn:focus-visible{outline-offset:-6px}
/* concept groups (e.g. project 003) */
.concept-head{margin:5.5rem 0 1.2rem;display:grid;grid-template-columns:auto 1fr;gap:.35rem 1.4rem;align-items:baseline}
.concept-head:first-child{margin-top:0}
.concept-num{font-family:var(--mono);font-size:.7rem;letter-spacing:.2em;color:var(--coral-text)}
.concept-title{font-family:var(--display);font-weight:600;font-size:clamp(2rem,3.6vw,3.6rem);line-height:1;letter-spacing:-.025em}
.concept-sub{grid-column:2;font-size:1.1rem;color:var(--soft)}

/* ── CTA + PROJECT NAV ── */
.project-cta{background:var(--off);padding:6rem var(--pad-x)}
.cta-inner{max-width:var(--cap);margin:0 auto;display:flex;justify-content:space-between;align-items:center;gap:3rem}
.cta-title{font-family:var(--display);font-size:clamp(1.9rem,3.6vw,3.4rem);font-weight:600;line-height:1.03;letter-spacing:-.025em}
.cta-title em{font-style:normal;color:var(--coral)}
.cta-text{font-size:.98rem;line-height:1.7;color:var(--soft);margin-top:.9rem;max-width:30rem}
.cta-actions{display:flex;align-items:center;gap:1.8rem;flex-wrap:wrap}
.btn-primary{font-family:var(--display);font-size:.82rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--ink);background:var(--coral-btn);padding:1rem 2rem;text-decoration:none;display:inline-block;transition:background .25s,color .25s}
.btn-primary:hover{background:var(--ink);color:var(--white)}
.btn-link{font-family:var(--mono);font-size:.72rem;letter-spacing:.08em;color:var(--dark);text-decoration:none;border-bottom:1px solid var(--coral);padding:.5rem 0}
.btn-link:hover{color:var(--coral-text)}
.project-nav-wrap{padding:3rem var(--pad-x)}
.project-nav{max-width:var(--cap);margin:0 auto;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:2rem}
.project-nav-link{font-family:var(--mono);font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:var(--dark);text-decoration:none;display:flex;align-items:center;gap:.9rem;padding:.6rem 0;transition:color .3s}
.project-nav-link:hover{color:var(--coral-text)}
.project-nav-link.next{justify-content:flex-end;text-align:right}
.project-nav-link .arrow{transition:transform .3s}
.project-nav-link.prev:hover .arrow{transform:translateX(-4px)}.project-nav-link.next:hover .arrow{transform:translateX(4px)}
.pn-kicker{display:block;font-size:.58rem;letter-spacing:.15em;color:var(--soft);margin-bottom:.3rem}
.pn-title{display:block;font-family:var(--display);font-size:1rem;font-weight:500;letter-spacing:0;text-transform:none;color:var(--ink)}
.project-nav-link.all{justify-content:center;border-bottom:1px solid var(--coral)}

/* ── FOOTER ── */
.footer-outer{background:var(--ink);width:100%}
footer{padding:2.5rem var(--pad-x);display:flex;justify-content:space-between;align-items:center;gap:2rem}
.footer-logo-wrap{display:flex;align-items:center}
.footer-logo-img{height:36px;width:auto;display:block;filter:brightness(0) invert(1);opacity:.85}
.footer-logo-txt{display:none;font-family:var(--display);font-size:1rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--white)}
.footer-logo-wrap.failed .footer-logo-img{display:none}.footer-logo-wrap.failed .footer-logo-txt{display:inline}
.footer-links{display:flex;gap:2rem;list-style:none}
.footer-links a,.footer-legal a{font-family:var(--mono);font-size:.6rem;letter-spacing:.14em;text-transform:uppercase;color:rgba(249,248,246,.65);text-decoration:none;transition:color .3s;padding:.4rem 0;display:inline-block}
.footer-links a:hover,.footer-legal a:hover{color:var(--coral)}
.footer-meta{display:flex;flex-direction:column;align-items:flex-end;gap:.3rem}
.footer-copy{font-family:var(--mono);font-size:.58rem;letter-spacing:.1em;color:rgba(249,248,246,.55)}
.footer-legal{display:flex;gap:1.4rem}.footer-legal a{font-size:.55rem}
.footer-outer :focus-visible{outline-color:var(--white)}

/* ── LIGHTBOX ── */
.lb{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;background:rgba(26,25,23,.92);opacity:0;visibility:hidden;transition:opacity .25s,visibility 0s .25s;touch-action:none;overscroll-behavior:contain}
.lb.open{opacity:1;visibility:visible;transition:opacity .25s}
.lb-fig{margin:0;display:flex;align-items:center;justify-content:center}
.lb-img{display:block;max-width:var(--lb-w);max-height:var(--lb-h);width:auto;height:auto;object-fit:contain;background:var(--stone)}
.lb-btn{position:absolute;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid rgba(249,248,246,.35);border-radius:50%;background:rgba(26,25,23,.4);color:var(--white);transition:background .2s,border-color .2s}
.lb-btn:hover{background:rgba(249,248,246,.15);border-color:var(--white)}
.lb-btn:focus-visible{outline:2px solid var(--white);outline-offset:3px}
.lb-close{top:1.25rem;right:1.25rem}
.lb-prev{left:1.25rem;top:50%;transform:translateY(-50%)}.lb-next{right:1.25rem;top:50%;transform:translateY(-50%)}
.lb-count{position:absolute;bottom:1.25rem;left:0;right:0;text-align:center;font-family:var(--mono);font-size:.68rem;letter-spacing:.14em;color:rgba(249,248,246,.8)}
.custom-cursor .lb,.custom-cursor .lb *{cursor:auto}.custom-cursor .lb button{cursor:pointer}

/* ── MOTION ── */
@keyframes fadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
.js .reveal{opacity:0;transform:translateY(24px);transition:opacity .75s ease,transform .75s ease}
.js .reveal.visible{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
  .project-hero-title,.project-hero-subtitle,.project-meta{opacity:1}
  .js .reveal{opacity:1;transform:none}
  .gallery-btn:hover img{transform:none!important}
}

/* ── TABLET / MOBILE ── */
@media (max-width:900px){
  :root{--pad-x:1.5rem}
  .site-nav{--p:1!important;padding:.8rem var(--pad-x);align-items:center}
  .logo img{height:40px}
  .nav-logo-wrap{transform:none!important}
  .logo-light{display:none}
  .nav-links{margin-top:0;gap:.4rem;align-items:center}
  .nav-links a{padding:.9rem .6rem}
  .nav-links a::after{left:.6rem;right:.6rem}
  .project-hero{height:auto;display:block;padding-top:64px;background:var(--white)}  /* natural ratio, full width, text below */
  .hero-media{position:relative;inset:auto}
  .hero-media picture{height:auto}
  .hero-media img{height:auto;object-fit:initial}
  .hero-media::after{display:none}
  .project-hero-content{padding:1.75rem var(--pad-x) 0;grid-template-columns:1fr;gap:1.5rem}
  .project-hero-title{color:var(--ink);text-shadow:none;font-size:clamp(2rem,9vw,3rem)}
  .project-hero-subtitle{color:var(--soft);text-shadow:none}
  .project-meta{display:grid;grid-template-columns:1fr 1fr;gap:1.1rem 1.5rem}
  .meta-label{color:var(--soft)}.meta-value{color:var(--ink)}
  .project-body{padding:3.5rem var(--pad-x)}
  .project-intro{grid-template-columns:1fr;gap:1.5rem;margin-bottom:3rem}
  .project-intro-title{position:static}
  .project-gallery,.gallery-row{gap:1rem}
  .gallery-row.single,.gallery-row.duo{grid-template-columns:1fr}
  .gallery-row.mix{display:grid;grid-template-columns:1fr}
  .gallery-item{aspect-ratio:auto}
  .gallery-btn{position:static}
  .gallery-btn picture{height:auto}
  .gallery-btn img{height:auto}
  .concept-head{margin-top:3.5rem}
  .project-cta{padding:3.5rem var(--pad-x)}
  .cta-inner{flex-direction:column;align-items:flex-start;gap:1.8rem}
  .project-nav{grid-template-columns:1fr;gap:1rem}
  .project-nav-link.next{justify-content:flex-start;text-align:left}
  .project-nav-link.all{justify-content:flex-start;width:max-content}
  footer{flex-direction:column;gap:1.4rem;text-align:center}
  .footer-meta{align-items:center}
  .footer-links{flex-wrap:wrap;justify-content:center;gap:.6rem 1.5rem}
  .lb-prev{left:.5rem}.lb-next{right:.5rem}.lb-close{top:.75rem;right:.75rem}
}
