/* ==========================================================================
   D' STUDIO — Architecture & Interiors
   Design system + page styles  (Bootstrap 5.3 + GSAP 3)
   ========================================================================== */

:root {
  /* Palette — taken from the logo tiles */
  --paper: #f8f6f2;        /* page background            */
  --white: #ffffff;
  --sand: #ebe6dc;         /* soft panels, menu overlay  */
  --tile: #dcd3c4;         /* beige logo tile            */
  --stone: #c3c4c6;        /* grey logo tile             */
  --ink: #2c2b29;          /* text + dark footer         */
  --ink-soft: #6f6b65;     /* secondary text             */
  --line: #ddd8cf;         /* hairlines                  */
  --red: #8e1014;          /* the logo's dot             */
  --red-dark: #6f0b0e;

  --font: "Jost", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 92px;
  --gutter: clamp(20px, 4.5vw, 72px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; overflow-x: clip; }
@media (max-width: 767.98px) { .container-ds .row { --bs-gutter-x: 1.5rem; } }
body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
::selection { background: var(--red); color: #fff; }

.container-ds { padding-left: var(--gutter); padding-right: var(--gutter); max-width: 1680px; margin: 0 auto; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  font-weight: 400; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow .dot, .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; flex: none;
}
.display-xl { font-weight: 200; font-size: clamp(44px, 7.4vw, 124px); line-height: 1.02; letter-spacing: -.01em; }
.display-l  { font-weight: 200; font-size: clamp(36px, 4.6vw, 72px); line-height: 1.08; }
.display-m  { font-weight: 300; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.3; }
.lead-ds    { font-size: clamp(16px, 1.15vw, 18px); line-height: 1.8; color: var(--ink-soft); }
.label      { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 400; }
.meta       { font-size: 12px; letter-spacing: .08em; color: var(--ink-soft); }
.count      { font-size: 13px; color: var(--ink-soft); vertical-align: super; margin-left: 6px; letter-spacing: .1em; }

.link-arrow {
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; font-weight: 400;
  display: inline-flex; align-items: center; gap: 10px; position: relative; padding-bottom: 4px;
}
.link-arrow::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.link-arrow:hover::after { transform: scaleX(1); transform-origin: left; }
.link-arrow .arr { transition: transform .4s var(--ease); }
.link-arrow:hover .arr { transform: translateX(5px); }

/* Red circle button — the logo's dot */
.btn-dot {
  width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: transform .5s var(--ease), background .3s;
}
.btn-dot svg { width: 20px; height: 20px; transition: transform .5s var(--ease); }
.btn-dot-wrap { display: inline-flex; align-items: center; gap: 22px; }
.btn-dot-wrap:hover .btn-dot { transform: scale(1.08); background: var(--red-dark); }
.btn-dot-wrap:hover .btn-dot svg { transform: translateX(3px); }

.btn-line {
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase; font-weight: 400;
  padding: 15px 38px; border-radius: 0; transition: background .35s, color .35s;
}
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-red {
  background: var(--red); color: #fff; border: 0; border-radius: 0;
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase; padding: 16px 44px; font-weight: 400;
  transition: background .3s;
}
.btn-red:hover { background: var(--red-dark); color: #fff; }

/* ---------- Logo wordmark ---------- */
.logo { display: inline-flex; flex-direction: column; line-height: 1; }
.logo-word { font-size: 25px; font-weight: 300; letter-spacing: .04em; }
.logo-sub  { font-size: 7.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; margin-top: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .45s var(--ease), color .45s, height .45s var(--ease), box-shadow .45s;
  color: var(--ink); background: var(--white);
  border-bottom: 1px solid transparent;
}
.site-header .container-ds { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.site-header.is-transparent { background: transparent; color: #fff; }
.site-header.is-scrolled { background: rgba(248, 246, 242, .94); color: var(--ink); height: 74px; border-bottom-color: var(--line); backdrop-filter: blur(10px); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header { transition: transform .5s var(--ease), background .45s var(--ease), color .45s, height .45s var(--ease); }

.nav-ds { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); }
.nav-ds a {
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase; font-weight: 400;
  position: relative; display: none; align-items: center; gap: 8px; padding: 6px 0;
}
.nav-ds a::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  transform: scale(0); transition: transform .35s var(--ease); margin-left: -14px; position: absolute;
}
.nav-ds a:hover::before, .nav-ds a.active::before { transform: scale(1); }
.nav-ds a.active { color: var(--red); }
.site-header.is-transparent .nav-ds a.active { color: #fff; }

/* Tile icon — 3x3 from the logo grid with the red dot */
.tile-btn {
  width: 34px; height: 34px; border: 0; background: none; padding: 6px; margin-left: 8px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; cursor: pointer; color: inherit;
}
.tile-btn span { background: currentColor; opacity: .9; transition: transform .45s var(--ease), opacity .3s; }
.tile-btn span:nth-child(7) { background: var(--red); border-radius: 50%; opacity: 1; }
.tile-btn:hover span:nth-child(odd) { transform: rotate(45deg) scale(.8); }

@media (max-width: 991.98px) {
  :root { --header-h: 72px; }
}

/* ---------- Overlay menu ---------- */
.menu-overlay {
  position: fixed; inset: 0; z-index: 1100; background: var(--sand); color: var(--ink);
  display: flex; flex-direction: column; visibility: hidden; clip-path: inset(0 0 100% 0);
  overflow-y: auto; pointer-events: none;
  transition: clip-path .45s var(--ease), visibility 0s .45s;
}
.menu-overlay.is-open { visibility: visible; clip-path: inset(0); pointer-events: auto; transition-delay: 0s; }
.menu-overlay > .container-ds { width: 100%; }
.menu-overlay .menu-top { height: var(--header-h); flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; }
.menu-close { width: 40px; height: 40px; border: 0; background: none; position: relative; color: var(--ink); }
.menu-close::before, .menu-close::after { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 1px; background: currentColor; }
.menu-close::before { transform: rotate(45deg); } .menu-close::after { transform: rotate(-45deg); }
.menu-body { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; padding-top: 32px; padding-bottom: 32px; }
.menu-links { list-style: none; padding: 0; margin: 0; }
.menu-links li { overflow: hidden; }
.menu-links a {
  font-size: clamp(42px, 7vw, 96px); font-weight: 200; line-height: 1.25; display: inline-flex; align-items: center; gap: 22px;
  transition: color .3s, transform .5s var(--ease);
}
.menu-links a .dot { width: 12px; height: 12px; transform: scale(0); transition: transform .4s var(--ease); }
.menu-links a:hover .dot, .menu-links a.active .dot { transform: scale(1); }
.menu-links a:hover { transform: translateX(12px); }
.menu-foot { padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 8px 40px; font-size: 14px; color: var(--ink-soft); }
.menu-foot a:hover { color: var(--red); }
@media (max-width: 991.98px) {
  .menu-links { display: flex; flex-direction: column; gap: 20px; }
  .menu-links a { font-size: clamp(48px, 8vw, 80px); }
}
@media (max-width: 575.98px) {
  .menu-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .menu-links a { gap: 14px; }
}

/* ---------- Page curtain (transitions between pages) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 3000; pointer-events: none;
  --ri: 0px; --ro: 7px;
  background: radial-gradient(circle at 50% 50%,
    transparent calc(var(--ri) - .5px), var(--red) var(--ri),
    var(--red) calc(var(--ro) - .5px), #fff var(--ro));
}
.curtain .dot { display: none; }

/* ---------- Loader (home, once per visit) ---------- */
.loader { position: fixed; inset: 0; z-index: 4000; pointer-events: auto; background: #fdfdfd; }
.loader-mark { --size:clamp(22px,5vmin,42px); position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); display:grid; grid-template-columns:repeat(3,var(--size)); gap:calc(var(--size)*.24); }
.loader-mark span { width:var(--size); height:var(--size); background:var(--tile); transform-origin:center; }
.loader-mark span:nth-child(3n+2) { background:var(--stone); }
.loader-mark .mark-dot { background:var(--red); border-radius:50%; }
.loader-reveal {
  position: absolute; inset: 0; --ri: 0px;
  background: radial-gradient(circle at var(--cx) var(--cy),
    transparent calc(var(--ri) - .5px), #8e1014 var(--ri),
    #8e1014 calc(var(--ro) - .5px), #fdfdfd var(--ro));
}
.loader-bg {
  position: absolute; inset: 0;
  --ri: 0px; --ro: 0px; --cx: 50%; --cy: 50%;
  background: radial-gradient(circle at var(--cx) var(--cy),
    transparent calc(var(--ri) - .5px), var(--red) var(--ri),
    var(--red) calc(var(--ro) - .5px), #fff var(--ro));
}
.loader-grid {
  --t: clamp(26px, 5.2vmin, 50px); --g: calc(var(--t) * .22);
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; grid-template-columns: repeat(5, var(--t)); grid-template-rows: repeat(5, var(--t)); gap: var(--g);
}
.loader-grid .tl { width: var(--t); height: var(--t); background: var(--tile); will-change: transform, opacity; }
.loader-grid .tl.g { background: var(--stone); }
.loader { display: none; }
.play-loader .loader { display: block; animation: failsafe-hide 0s 10s forwards; }
.js .curtain { animation: failsafe-hide 0s 5s forwards; }
.no-js .curtain, .curtain.is-off { display: none; }
@keyframes failsafe-hide { to { visibility: hidden; opacity: 0; pointer-events: none; } }
.loader-grid .tl.slot { background: transparent; }
.loader-dot { position: absolute; border-radius: 50%; background: var(--red); will-change: transform; }
.loader-skip {
  position: absolute; right: var(--gutter); bottom: 32px; z-index: 2; background: none; border: 0;
  font: 400 11px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft);
}
.loader-skip:hover { color: var(--red); }

/* ---------- Image reveal helpers ---------- */
.img-wrap { position: relative; overflow: hidden; background: var(--tile); }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.ratio-wide  { aspect-ratio: 16 / 10; }
.ratio-tall  { aspect-ratio: 4 / 5; }
.ratio-sq    { aspect-ratio: 1 / 1; }
.ratio-land  { aspect-ratio: 3 / 2; }

/* ==========================================================================
   HOME
   ========================================================================== */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; color: #fff; background: var(--ink); }
.hero-slides, .hero-slide { position: absolute; inset: 0; }
/* Contain animated slide z-indexes below the stationary overlay and text. */
.hero-slides { z-index: 0; isolation: isolate; }
.hero-slide { opacity: 0; visibility: hidden; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,18,16,.50) 0%, rgba(20,18,16,.30) 30%, rgba(20,18,16,.45) 55%, rgba(20,18,16,.75) 100%);
}
.hero-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(48px, 9vh, 110px); }
.hero .eyebrow { color: rgba(255,255,255,.85); margin-bottom: 26px; }
.hero h1 { margin: 0 0 clamp(30px, 5vh, 56px); }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .ln > span { display: inline-block; }
.hero .btn-dot-wrap .label { color: #fff; }
.hero .btn-dot {
  background: transparent;
  border: 1px solid rgba(255,255,255,.8);
  color: #fff;
  transition: background .4s, border-color .4s, transform .5s var(--ease);
}
.hero .btn-dot-wrap:hover .btn-dot,
.hero .btn-dot-wrap:focus-visible .btn-dot {
  background: var(--red);
  border-color: var(--red);
  transform: rotate(-45deg);
}
.hero .btn-dot-wrap:hover .btn-dot svg,
.hero .btn-dot-wrap:focus-visible .btn-dot svg { transform: none; }
.hero-side {
  position: absolute; z-index: 2; left: calc(var(--gutter) * .45); top: 50%;
  transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
  font-size: 10px; letter-spacing: .42em; text-transform: uppercase; color: rgba(255,255,255,.75);
}
.hero-index { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(48px, 9vh, 110px); display: flex; align-items: flex-end; gap: 34px; }
.hero-info { width: 230px; }
.hero-info .name { font-size: 20px; font-weight: 300; margin: 6px 0 2px; }
.hero-info .city { font-size: 12px; letter-spacing: .1em; color: rgba(255,255,255,.7); }
.hero-progress { display: flex; gap: 6px; margin-top: 14px; }
.hero-progress button { flex: 1; height: 14px; border: 0; background: none; padding: 6px 0; cursor: pointer; }
.hero-progress button i { display: block; height: 2px; background: rgba(255,255,255,.3); position: relative; overflow: hidden; }
.hero-progress button i b { position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: left; }
.hero-next { width: 170px; cursor: pointer; border: 0; background: none; padding: 0; text-align: left; color: #fff; }
.hero-next small { display: block; font-size: 10px; letter-spacing: .3em; margin-bottom: 8px; color: rgba(255,255,255,.75); }
.hero-next .img-wrap { aspect-ratio: 16/11; border: 1px solid rgba(255,255,255,.5); }
.hero-next:hover img { transform: scale(1.08); }
.hero-scroll {
  position: absolute; z-index: 2; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 9px; letter-spacing: .4em; color: rgba(255,255,255,.75);
}
.hero-scroll .rail { width: 1px; height: 48px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.hero-scroll .rail .dot { position: absolute; left: -3px; top: 0; width: 7px; height: 7px; }

@media (max-width: 991.98px) {
  .hero-index { left: var(--gutter); right: var(--gutter); bottom: 34px; justify-content: space-between; }
  .hero-inner { padding-bottom: 170px; }
  .hero-next { display: none; }
  .hero-info { width: 100%; }
  .hero-scroll, .hero-side { display: none; }
}

/* Studio statement */
.section { padding: clamp(80px, 12vw, 180px) 0; }
.statement-text { font-weight: 300; font-size: clamp(28px, 3vw, 46px); line-height: 1.32; margin: 26px 0 50px; }
.statement-text .w { display: inline-block; }
.founder small { display: block; font-size: 11px; color: var(--ink-soft); letter-spacing: .06em; }
.founder span { font-size: 14px; }
.card-cap { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.card-cap .label { font-size: 11px; }

/* Two entry points */
.entries { display: grid; grid-template-columns: 1fr 1fr; }
.entry { position: relative; height: clamp(420px, 62vh, 720px); overflow: hidden; color: #fff; display: block; }
.entry img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 1.6s var(--ease); }
.entry::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.6) 100%); transition: background .6s; }
.entry:hover img { transform: scale(1.12); }
.entry-cap { position: absolute; z-index: 2; left: clamp(24px, 3.5vw, 56px); right: clamp(24px, 3.5vw, 56px); bottom: clamp(26px, 4vw, 56px); display: flex; align-items: flex-end; justify-content: space-between; }
.entry-cap small { display: block; font-size: 11px; letter-spacing: .3em; margin-bottom: 8px; }
.entry-cap h3 { font-weight: 200; font-size: clamp(34px, 3.6vw, 60px); margin: 0; }
.entry-arrow { width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; transition: background .4s, border-color .4s, transform .5s var(--ease); }
.entry-arrow svg { width: 18px; }
.entry:hover .entry-arrow { background: var(--red); border-color: var(--red); color: #fff; transform: rotate(-45deg); }
@media (max-width: 767.98px) { .entries { grid-template-columns: 1fr; } .entry { height: 64vh; } }

/* Selected work */
.work-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: clamp(40px, 5vw, 72px); gap: 20px; }
.work-card { display: block; }
.work-card .img-wrap { background: var(--tile); }
.work-card:hover img { transform: scale(1.05); }
.work-card .card-cap .label b { font-weight: 400; color: var(--ink-soft); margin-right: 10px; }

/* In frames */
.frames { background: var(--sand); padding: clamp(60px, 8vw, 110px) 0; overflow: hidden; }
.frames-row { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px); }
.frame { flex: 1 1 0; aspect-ratio: 1; overflow: hidden; display: block; background: var(--tile); position: relative; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.frame:hover img { transform: scale(1.1); }
.frame.plain-sand { background: var(--tile); }
.frame.plain-stone { background: var(--stone); }
.frame.diamond { overflow: visible; background: transparent; display: flex; align-items: center; justify-content: center; }
.frame.diamond .inner { width: 72%; height: 72%; transform: rotate(45deg); overflow: hidden; }
.frame.diamond .inner img { transform: rotate(-45deg) scale(1.45); }
.frame.diamond:hover .inner img { transform: rotate(-45deg) scale(1.6); }
.frame-dot { flex: 0 0 auto; width: clamp(34px, 4vw, 64px); aspect-ratio: 1; border-radius: 50%; background: var(--red); }
@media (max-width: 767.98px) {
  .frames-row { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .frame { flex: 0 0 44vw; scroll-snap-align: start; }
}

/* Dark contact + footer (home) */
.closing { background: var(--ink); color: #f2efe9; padding: clamp(80px, 10vw, 150px) 0 0; overflow: hidden; }
.closing h2 { font-weight: 200; font-size: clamp(42px, 5.6vw, 92px); line-height: 1.08; margin: 0; }
.talk {
  position: relative; isolation: isolate;
  width: clamp(120px, 11vw, 160px); aspect-ratio: 1; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; text-align: center; flex: none;
  transition: background .3s;
}
.talk:hover { background: var(--red-dark); color: #fff; }
.talk::before, .talk::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 3px solid var(--red); border-radius: 50%;
  opacity: 0; pointer-events: none;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .talk:hover::before, .talk:hover::after {
    animation: talk-ripple 1.8s ease-out infinite;
  }
  .talk:hover::after { animation-delay: .9s; }
}
@media (prefers-reduced-motion: no-preference) {
  .talk:focus-visible::before, .talk:focus-visible::after {
    animation: talk-ripple 1.8s ease-out infinite;
  }
  .talk:focus-visible::after { animation-delay: .9s; }
}
@keyframes talk-ripple {
  0% { transform: scale(1); opacity: .65; }
  100% { transform: scale(1.6); opacity: 0; }
}
.talk svg { width: 18px; }
.closing-cols { border-top: 1px solid rgba(255,255,255,.14); margin-top: clamp(60px, 7vw, 100px); padding-top: 44px; }
.closing-cols h6 { font-size: 10px; letter-spacing: .32em; text-transform: uppercase; font-weight: 400; color: rgba(255,255,255,.5); margin-bottom: 16px; }
.closing-cols p, .closing-cols a { font-size: 14px; line-height: 1.9; color: rgba(255,255,255,.82); margin: 0; display: block; }
.closing-cols a:hover { color: #fff; }
.closing-cols a.logo { display: inline-flex; color: #fff; }
.giant { font-weight: 200; font-size: clamp(80px, 19vw, 330px); line-height: .8; letter-spacing: -.01em; color: rgba(255,255,255,.06); white-space: nowrap; margin-top: 40px; user-select: none; }
/* Signature bar */
.closing-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px 32px; padding:26px 0 30px; margin-top:26px; border-top:1px solid rgba(255,255,255,.14); font-size:13px; line-height:1.7; color:rgba(255,255,255,.72); }
.closing-copyright { margin:0; }
.closing-brand { color:#fff; font-weight:500; }
.closing-credit { display:inline-flex; align-items:center; gap:11px; color:rgba(255,255,255,.72); text-decoration:none; }
.credit-link { color:#fff; font-weight:500; margin-left:4px; text-decoration:none; }
.credit-dot { width:7px; height:7px; flex:none; border-radius:50%; background:#cf444a; }
.credit-arrow { display:grid; place-items:center; width:28px; height:28px; border:1px solid rgba(255,255,255,.25); border-radius:50%; color:#fff; transition:background .2s,border-color .2s,transform .2s; }
.credit-link:hover { color:#fff; text-decoration:underline; text-underline-offset:4px; }
.closing-credit:has(.credit-link:hover) .credit-arrow { background:var(--red); border-color:var(--red); transform:translate(2px,-2px); }
.credit-link:focus-visible { outline:2px solid #fff; outline-offset:6px; border-radius:3px; }
@media(max-width:575.98px) { .closing-bar { flex-direction:column; align-items:center; text-align:center; gap:14px; padding:22px 0 26px; font-size:12px; } }
@media(prefers-reduced-motion:reduce) { .credit-arrow { transition:none; } }

/* Light footer (inner pages) */
.footer-light { background: var(--sand); padding: 60px 0 30px; margin-top: 0; }
.footer-light h6 { font-size: 10px; letter-spacing: .32em; text-transform: uppercase; font-weight: 400; margin-bottom: 14px; }
.footer-light p, .footer-light a { font-size: 13px; line-height: 1.9; color: var(--ink-soft); margin: 0; display: block; }
.footer-light a:hover { color: var(--red); }
.footer-light .bar { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); }

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.page-top { padding-top: calc(var(--header-h) + clamp(50px, 7vw, 110px)); }
.page-title { display: flex; align-items: center; gap: 18px; font-weight: 200; font-size: clamp(48px, 6.4vw, 104px); line-height: 1; margin: 0; }
.page-title .dot { width: 14px; height: 14px; }
.filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin: clamp(36px, 4vw, 60px) 0 clamp(36px, 4vw, 56px); }
.filter-list { display: flex; flex-wrap: wrap; gap: 8px 40px; list-style: none; margin: 0; padding: 0; }
.filter-btn {
  background: none; border: 0; padding: 6px 0; color: var(--ink); position: relative;
  font: 400 12px/1 var(--font); letter-spacing: .26em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 9px;
}
.filter-btn .dot { transform: scale(0); transition: transform .35s var(--ease); width: 6px; height: 6px; }
.filter-btn.active { color: var(--red); }
.filter-btn.active .dot { transform: scale(1); }
.filter-btn:hover .dot { transform: scale(1); }
.cat-select {
  appearance: none; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%232c2b29'/%3E%3C/svg%3E") no-repeat right 16px center;
  font: 400 11px/1 var(--font); letter-spacing: .24em; text-transform: uppercase; padding: 15px 44px 15px 18px; color: var(--ink); border-radius: 0; min-width: 220px;
}
.cat-select:focus { outline: 1px solid var(--ink); }

.masonry { display: flex; gap: clamp(18px, 2vw, 34px); align-items: flex-start; }
.masonry-col { flex: 1; display: flex; flex-direction: column; gap: clamp(30px, 3vw, 50px); min-width: 0; }
.p-card { display: block; }
.p-card .img-wrap img { transition: transform 1.6s var(--ease); }
.p-card:hover .img-wrap img { transform: scale(1.07); }
.p-tags {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; z-index: 2; color: #fff;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.45));
  opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.p-card:hover .p-tags, .p-card:focus-visible .p-tags { opacity: 1; transform: none; }
.p-card .p-name { margin-top: 16px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; font-weight: 400; }
.p-card .p-city { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.empty-note { text-align: center; color: var(--ink-soft); padding: 60px 0; }
.page-projects main { padding-bottom: clamp(64px, 9vw, 130px); }
.view-more-wrap { text-align: center; padding: clamp(50px, 6vw, 90px) 0 0; }

/* ==========================================================================
   PROJECT DETAIL
   ========================================================================== */
.pd-cover { margin-top: var(--header-h); height: calc(100vh - var(--header-h)); min-height: 460px; max-height: 920px; }
.pd-cover img { transform: scale(1.12); }
.pd-head { padding: clamp(50px, 6vw, 90px) 0 clamp(36px, 4vw, 56px); }
.pd-crumb { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px; display: inline-block; }
.pd-crumb:hover { color: var(--red); }
.pd-title { font-weight: 200; font-size: clamp(42px, 5.4vw, 88px); line-height: 1.04; margin: 0 0 clamp(30px, 4vw, 50px); }
.pd-facts { border-top: 1px solid var(--line); padding-top: 22px; }
.pd-facts small { display: block; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.pd-facts span { font-size: 16px; }
.pd-note { max-width: 760px; margin-top: 34px; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.65; color: var(--ink-soft); }
.gallery { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 24px); }
.gallery-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.6vw, 24px); }
.g-item { cursor: zoom-in; border: 0; padding: 0; background: var(--tile); width: 100%; }
.g-item.full { aspect-ratio: 16 / 9; }
.g-item.half { aspect-ratio: 4 / 5; }
.g-item:hover img { transform: scale(1.04); }
@media (max-width: 767.98px) { .gallery-pair { grid-template-columns: 1fr; } .g-item.full { aspect-ratio: 4/3; } }
.pd-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: clamp(70px, 8vw, 120px) 0; }
.pd-nav .prev { justify-self: start; } .pd-nav .next { justify-self: end; }
.pd-next-card { text-align: center; display: block; }
.pd-next-card .img-wrap { width: clamp(180px, 20vw, 300px); aspect-ratio: 3/2; margin: 0 auto 14px; }
.pd-next-card:hover img { transform: scale(1.07); }
.pd-next-card small { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); }
.pd-next-card div.name { font-size: 18px; font-weight: 300; margin-top: 4px; }
@media (max-width: 575.98px) { .pd-nav { grid-template-columns: 1fr 1fr; } .pd-next-card { grid-column: 1 / -1; order: -1; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 2500; background: rgba(24, 22, 20, .96); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 84vh; object-fit: contain; }
.lb-btn { position: absolute; background: none; border: 0; color: #fff; font: 300 12px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; padding: 16px; }
.lb-btn:hover { color: var(--tile); }
.lb-close { top: 18px; right: 18px; } .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); } .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: 12px; letter-spacing: .2em; }

/* ==========================================================================
   ABOUT & CONTACT
   ========================================================================== */
.about-portrait { aspect-ratio: 4 / 5.4; }
.about-name { font-weight: 200; font-size: clamp(40px, 4.6vw, 76px); line-height: 1.06; margin: 18px 0 34px; }
.about-copy { font-size: clamp(16px, 1.2vw, 19px); line-height: 1.85; color: var(--ink-soft); max-width: 560px; }
.about-studio { aspect-ratio: 21 / 9; margin-top: clamp(60px, 8vw, 120px); }
.contact-block small { display: block; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.contact-block p, .contact-block a { font-size: 17px; line-height: 1.8; margin: 0; display: block; }
.contact-block a:hover { color: var(--red); }
.social-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.social-btns .btn-line { padding: 14px 26px; display: inline-flex; align-items: center; gap: 10px; }
.social-btns svg { width: 15px; height: 15px; }
.form-ds .field { position: relative; margin-bottom: 30px; }
.form-ds label { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.form-ds .form-control {
  border: 0; border-bottom: 1px solid var(--tile); border-radius: 0; background: transparent; padding: 10px 0;
  font: 300 17px/1.5 var(--font); color: var(--ink); box-shadow: none !important;
}
.form-ds .form-control:focus { border-bottom-color: var(--ink); background: transparent; }
.form-ds textarea.form-control { resize: none; min-height: 110px; }
.form-ds .invalid-feedback { font-size: 12px; color: var(--red); }
.form-ds .form-control.is-invalid { border-bottom-color: var(--red); background-image: none; padding-right: 0; }
.form-ds .form-control.is-valid { border-bottom-color: var(--tile); background-image: none; padding-right: 0; }
.form-done { display: none; padding: 26px 0; }
.form-done.show { display: block; }
.map-wrap { aspect-ratio: 21 / 8; background: var(--stone); margin-top: clamp(50px, 6vw, 90px); filter: grayscale(1) contrast(.95); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 767.98px) { .map-wrap { aspect-ratio: 4 / 3; } }

/* ---------- Reveal defaults (JS sets the start state, so no-JS stays visible) ---------- */
.no-js .reveal { opacity: 1 !important; transform: none !important; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Black & white images, colour on hover (mouse/trackpad devices) ----------
   Phones and tablets have no hover, so they always show colour. */
@media (hover: hover) and (pointer: fine) {
  .img-wrap img, .entry img, .frame img {
    filter: grayscale(100%);
    transition: transform 1.4s var(--ease), filter .8s var(--ease);
  }
  .entry img { transition: transform 1.6s var(--ease), filter .8s var(--ease); }
  .img-wrap:hover img, a:hover .img-wrap img, button:hover img,
  .entry:hover img, .frame:hover img { filter: grayscale(0%); }
}

/* Shared public-site contact tab, below menus and page transitions. */
.whatsapp-float {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 900;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 15px; width: 56px; padding: 20px 10px; border-radius: 0;
  background: #000; color: #fff; text-decoration: none;
  transition: background .2s;
}
.whatsapp-float:hover { background: var(--red); color: #fff; }
.whatsapp-float:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.whatsapp-float svg { display: block; flex-shrink: 0; }
.whatsapp-float-label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 17px; font-weight: 400; letter-spacing: .03em; line-height: 1.2;
}
@media (max-width: 575.98px) {
  .whatsapp-float { width: 44px; padding: 15px 8px; gap: 12px; }
  .whatsapp-float svg { width: 25px; height: 25px; }
  .whatsapp-float-label { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { transition: none; }
}
