/* ═══════════════════════════════════════════════════════
   BRAM FILLIAERT — LUXURY PORTFOLIO
   Aesthetic: High-end editorial. Think Wallpaper*, 
   Bottega Veneta digital, a Parisian agency's site.
   Dark base, warm cream accents, surgical typography.
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Outfit:wght@200;300;400;500;600&display=swap');

/* ─── TOKENS ─── */
:root {
  --ink:      #0a0a0a;
  --ink-2:    #111111;
  --ink-3:    #1a1a1a;
  --cream:    #ede8df;
  --cream-2:  #d9d2c5;
  --warm:     #c8a45e;
  --warm-dim: rgba(200,164,94,0.12);
  --warm-glow:rgba(200,164,94,0.06);

  --t-1: #ede8df;
  --t-2: rgba(237,232,223,0.52);
  --t-3: rgba(237,232,223,0.24);

  --s-1: rgba(255,255,255,0.028);
  --s-2: rgba(255,255,255,0.055);
  --b-1: rgba(237,232,223,0.07);
  --b-2: rgba(237,232,223,0.13);

  --sh-sm: 0 4px 20px rgba(0,0,0,0.45);
  --sh-md: 0 12px 50px rgba(0,0,0,0.55);
  --sh-lg: 0 30px 90px rgba(0,0,0,0.6);
  --sh-xl: 0 60px 140px rgba(0,0,0,0.7);

  --ease: cubic-bezier(0.19,1,0.22,1);
  --max:  1480px;
  --pad:  clamp(20px, 3.5vw, 56px);
  --nav:  72px;
  --r:    2px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 20px); font-size: 16px; }

body {
  background: var(--ink);
  color: var(--t-1);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: 0; background: 0; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--warm); color: var(--ink); }

::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb { background: var(--warm); }

/* ─── AMBIENT ─── */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.orb {
  position: fixed; border-radius: 50%; pointer-events: none;
  filter: blur(90px); z-index: 0;
}
.orb-a { width: 700px; height: 700px; top: -250px; right: -150px; background: radial-gradient(circle, rgba(200,164,94,0.055) 0%, transparent 65%); }
.orb-b { width: 900px; height: 900px; bottom: -300px; left: -200px; background: radial-gradient(circle, rgba(80,100,200,0.035) 0%, transparent 65%); }

/* ─── CURSOR ─── */
.cursor {
  position: fixed; z-index: 9999; pointer-events: none;
  top: 0; left: 0;
}
.c-ring {
  position: absolute;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(237,232,223,0.7);
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), border-color 0.3s, opacity 0.3s;
}
.c-dot {
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--warm);
  transform: translate(-50%, -50%);
}
.cursor.big .c-ring { width: 56px; height: 56px; border-color: rgba(200,164,94,0.5); }
.cursor.hidden { opacity: 0; }

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav);
  display: flex; align-items: center;
  padding: 0 var(--pad);
  transition: background 0.6s, backdrop-filter 0.6s;
}

.nav.solid {
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--b-1);
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex; align-items: baseline; gap: 2px;
}

.nav-brand-last { color: var(--warm); margin-left: 6px; }

.nav-links {
  display: flex; gap: 32px; list-style: none;
  margin-left: auto; padding-right: 36px;
}

.nav-links a {
  font-size: 0.7rem; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--t-2); position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 1px; background: var(--warm);
  transition: width 0.4s var(--ease);
}
.nav-links a:hover { color: var(--t-1); }
.nav-links a:hover::after { width: 100%; }

.nav-pill {
  font-size: 0.68rem; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 9px 22px; border: 1px solid var(--b-2);
  color: var(--t-1);
  transition: border-color 0.3s, background 0.3s;
  white-space: nowrap;
}
.nav-pill:hover { border-color: var(--warm); background: var(--warm-dim); }

.nav-burger { display: none; margin-left: auto; flex-direction: column; gap: 5px; padding: 6px; }
.nav-burger span { display: block; height: 1px; background: var(--t-1); transition: transform 0.4s var(--ease), opacity 0.3s; }
.nav-burger span:nth-child(1) { width: 22px; }
.nav-burger span:nth-child(2) { width: 14px; }
.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); width: 22px; }
.nav-burger.open span:nth-child(2) { transform: translateY(-6px) rotate(-45deg); width: 22px; }

.nav-mobile {
  position: fixed; inset: 0; z-index: 190;
  background: var(--ink); padding: var(--pad); padding-top: calc(var(--nav) + 32px);
  display: flex; flex-direction: column; gap: 0;
  opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease);
}
.nav-mobile.open { opacity: 1; pointer-events: all; }

.nav-mobile a {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 8vw, 5.5rem); font-weight: 300;
  color: var(--t-2); padding: 18px 0;
  border-bottom: 1px solid var(--b-1);
  transition: color 0.3s, padding-left 0.4s var(--ease);
  letter-spacing: -0.02em;
}
.nav-mobile a:hover { color: var(--t-1); padding-left: 16px; }

/* ═══════════════════════════════════════════════════════
   SHARED LAYOUT
   ═══════════════════════════════════════════════════════ */
.wrap {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--warm);
}
.eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--warm); flex-shrink: 0; }

/* Reveal animations */
[data-r] {
  opacity: 0; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}
[data-r="up"]    { transform: translateY(44px); }
[data-r="left"]  { transform: translateX(-36px); }
[data-r="right"] { transform: translateX(36px); }
[data-r="scale"] { transform: scale(0.95); }
[data-r].in { opacity: 1; transform: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 15px 30px; position: relative; overflow: hidden;
  white-space: nowrap; transition: color 0.4s;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.btn:hover::before { transform: scaleX(1); }
.btn-gold { border: 1px solid var(--warm); color: var(--warm); }
.btn-gold::before { background: var(--warm); }
.btn-gold:hover { color: var(--ink); }
.btn-line { border: 1px solid var(--b-2); color: var(--t-2); }
.btn-line::before { background: var(--s-2); }
.btn-line:hover { color: var(--t-1); }
.btn-arr { gap: 12px; }
.btn-arr .arr { display: inline-block; transition: transform 0.4s var(--ease); }
.btn-arr:hover .arr { transform: translateX(5px); }

/* ═══════════════════════════════════════════════════════
   HOMEPAGE — HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  padding-top: var(--nav);
  display: grid; grid-template-rows: 1fr auto;
  position: relative; overflow: hidden;
}

.hero-body {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: end; gap: 60px;
  padding: 80px var(--pad) 64px;
  position: relative; z-index: 2;
}

.hero-location {
  font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--t-3); margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.hero-location::before { content: ''; width: 20px; height: 1px; background: var(--b-2); }

.hero-h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(4.5rem, 8.5vw, 11rem);
  font-weight: 300; line-height: 0.88;
  letter-spacing: -0.035em; margin-bottom: 40px;
}
.hero-h1 em { font-style: italic; color: var(--warm); }

.hero-line { display: block; overflow: hidden; }
.hero-word {
  display: inline-block;
  animation: wup 1.1s var(--ease) both;
}
.hero-line:nth-child(2) .hero-word { animation-delay: 0.08s; }
.hero-line:nth-child(3) .hero-word { animation-delay: 0.16s; }
.hero-line:nth-child(4) .hero-word { animation-delay: 0.24s; }

@keyframes wup {
  from { transform: translateY(105%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.hero-sub {
  font-size: 0.92rem; font-weight: 300; color: var(--t-2);
  max-width: 380px; line-height: 1.8; margin-bottom: 44px;
  animation: fin 1s 0.5s var(--ease) both;
}

.hero-btns {
  display: flex; gap: 14px; flex-wrap: wrap;
  animation: fin 1s 0.65s var(--ease) both;
}

@keyframes fin {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ─ Device column ─ */
.hero-device-col {
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  animation: fin 1s 0.3s var(--ease) both;
}

.device-outer {
  width: 100%; max-width: 600px; position: relative;
}

.dev-glow {
  position: absolute; inset: -60px;
  background: radial-gradient(ellipse, rgba(200,164,94,0.06) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

/* Mac frame */
.dev-mac {
  position: relative; z-index: 1;
  background: #161618;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: var(--sh-xl), 0 0 0 1px rgba(255,255,255,0.02) inset;
  overflow: visible;
}

.dev-mac-top {
  background: #0e0e10; padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px 10px 0 0;
  display: flex; align-items: center; gap: 10px;
}

.dev-dots { display: flex; gap: 5px; }
.dev-dots span { width: 9px; height: 9px; border-radius: 50%; }
.dev-dots span:nth-child(1) { background: #ff5f57; }
.dev-dots span:nth-child(2) { background: #febc2e; }
.dev-dots span:nth-child(3) { background: #28c840; }

.dev-url {
  flex: 1; max-width: 300px; margin: 0 auto; text-align: center;
  font-size: 0.65rem; color: var(--t-3);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px; padding: 3px 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all 0.4s;
}

.dev-screen {
  height: 360px; overflow: hidden; position: relative;
  background: #0d0d0f; border-radius: 0 0 10px 10px;
}
.dev-screen iframe { width: 100%; height: 100%; border: 0; transition: opacity 0.5s; display: block; }

/* Phone overlay */
.dev-phone {
  position: absolute; right: -28px; bottom: -28px; z-index: 3;
  width: 120px;
  background: #151518;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  transition: transform 0.55s var(--ease), opacity 0.4s;
}
.dev-phone.gone { transform: scale(0.5) translate(20px,20px); opacity: 0; pointer-events: none; }

.dev-phone-top { height: 18px; background: #0e0e10; display: flex; align-items: center; justify-content: center; }
.dev-phone-top::after { content: ''; width: 44px; height: 4px; background: rgba(255,255,255,0.12); border-radius: 99px; }
.dev-phone-screen { height: 190px; overflow: hidden; position: relative; background: #0d0d0f; }
.dev-phone-screen iframe {
  width: 390px; height: 700px; border: 0;
  transform-origin: top left;
  transform: scale(0.308);
  pointer-events: none; display: block;
}

/* Iframe fallback overlay */
.iframe-fallback {
  position: absolute; inset: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #0d0d0f; text-align: center; padding: 32px;
}
.iframe-fallback.show { display: flex; }
.iframe-fallback .eyebrow { margin-bottom: 4px; }
.iframe-fallback p { font-size: 0.8rem; color: var(--t-2); max-width: 240px; line-height: 1.65; }

/* Controls row */
.dev-controls {
  width: 100%; max-width: 600px;
  display: flex; gap: 6px; justify-content: flex-end;
}

.dctrl {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; border: 1px solid var(--b-1);
  font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--t-3); transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.dctrl svg { width: 12px; height: 12px; }
.dctrl:hover, .dctrl.on { border-color: var(--warm); color: var(--warm); background: var(--warm-dim); }

/* Hero strip */
.hero-strip {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--b-1);
}

.hs-item {
  padding: 22px var(--pad);
  border-right: 1px solid var(--b-1);
  display: flex; align-items: center; gap: 18px;
  animation: fin 1s 0.9s var(--ease) both;
}
.hs-item:last-child { border-right: 0; }

.hs-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem; font-weight: 300; color: var(--warm); line-height: 1;
  flex-shrink: 0;
}
.hs-label strong { display: block; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1px; }
.hs-label span   { font-size: 0.74rem; color: var(--t-2); }

/* ═══════════════════════════════════════════════════════
   SECTION STRUCTURE
   ═══════════════════════════════════════════════════════ */
.section { padding: 130px 0; position: relative; z-index: 2; }

.s-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  padding-bottom: 36px; margin-bottom: 64px;
  border-bottom: 1px solid var(--b-1);
}

.s-head-left { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }

.s-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 5.5vw, 6.5rem);
  font-weight: 300; line-height: 0.93; letter-spacing: -0.03em;
}
.s-title em { font-style: italic; color: var(--warm); }

.s-desc { font-size: 0.86rem; color: var(--t-2); max-width: 440px; line-height: 1.85; }

/* ═══════════════════════════════════════════════════════
   WEBSITES SHOWCASE
   ═══════════════════════════════════════════════════════ */
.showcase-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px; align-items: start;
}

/* Left: project selector */
.proj-selector { display: flex; flex-direction: column; }

.ps-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 0; border-bottom: 1px solid var(--b-1);
  gap: 12px; cursor: pointer; position: relative;
  transition: padding-left 0.45s var(--ease);
}
.ps-item::before {
  content: ''; position: absolute; left: -1px; top: 0; bottom: 0;
  width: 2px; background: var(--warm);
  transform: scaleY(0); transition: transform 0.45s var(--ease);
}
.ps-item.on { padding-left: 18px; }
.ps-item.on::before { transform: scaleY(1); }

.ps-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem; font-weight: 400; line-height: 1.1;
  transition: color 0.3s;
}
.ps-item.on .ps-name { color: var(--warm); }

.ps-cat {
  display: block; margin-top: 4px;
  font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-3);
}

.ps-arr { font-size: 0.9rem; color: var(--t-3); flex-shrink: 0; margin-top: 4px; transition: transform 0.4s var(--ease), color 0.3s; }
.ps-item.on .ps-arr { transform: rotate(45deg); color: var(--warm); }

.proj-meta { margin-top: 28px; display: flex; flex-direction: column; }

.pm-row {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; padding: 11px 0; border-bottom: 1px solid var(--b-1);
  gap: 10px;
}
.pm-row:last-child { border-bottom: 0; }
.pm-k { color: var(--t-3); letter-spacing: 0.12em; text-transform: uppercase; }
.pm-v { color: var(--t-2); text-align: right; max-width: 160px; }

/* Right: preview */
.proj-preview { display: flex; flex-direction: column; gap: 14px; }

.pp-header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

.pp-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem; font-weight: 400; letter-spacing: -0.02em;
}

.pp-toggles { display: flex; gap: 6px; }

.pp-frame {
  border: 1px solid var(--b-1); overflow: hidden; position: relative;
  background: #0d0d0f;
  transition: max-width 0.6s var(--ease), border-radius 0.6s var(--ease);
}
.pp-frame.desk { border-radius: 6px; }
.pp-frame.phone { max-width: 390px; margin: 0 auto; border-radius: 28px; border-width: 3px; }

.pp-iframe { width: 100%; height: 560px; border: 0; display: block; transition: opacity 0.5s; }
.pp-frame.phone .pp-iframe { height: 700px; }

.pp-block {
  position: absolute; inset: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #0d0d0f; text-align: center; padding: 40px;
}
.pp-block.show { display: flex; }
.pp-block p { font-size: 0.82rem; color: var(--t-2); max-width: 260px; line-height: 1.7; }
.pp-block .eyebrow { margin-bottom: 6px; }

.pp-footer { display: flex; gap: 10px; justify-content: flex-end; }

/* ═══════════════════════════════════════════════════════
   PHOTO TEASER
   ═══════════════════════════════════════════════════════ */
.photo-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: end;
}

.photo-text { display: flex; flex-direction: column; gap: 24px; }
.photo-text .s-title { font-size: clamp(2.4rem, 4.5vw, 5.5rem); }
.photo-text p { font-size: 0.86rem; color: var(--t-2); max-width: 360px; line-height: 1.85; }

.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 44px;
  gap: 7px;
}

.pm-cell { overflow: hidden; background: var(--ink-3); }
.pm-cell img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.7) brightness(0.82); transition: transform 0.8s var(--ease), filter 0.6s; }
.pm-cell:hover img { transform: scale(1.06); filter: saturate(1) brightness(0.95); }

.pm-cell:nth-child(1) { grid-column: 1 / span 5; grid-row: 1 / span 6; }
.pm-cell:nth-child(2) { grid-column: 6 / span 4; grid-row: 1 / span 4; }
.pm-cell:nth-child(3) { grid-column: 10 / span 3; grid-row: 1 / span 3; }
.pm-cell:nth-child(4) { grid-column: 6 / span 3; grid-row: 5 / span 4; }
.pm-cell:nth-child(5) { grid-column: 9 / span 4; grid-row: 4 / span 5; }
.pm-cell:nth-child(6) { grid-column: 1 / span 3; grid-row: 7 / span 4; }
.pm-cell:nth-child(7) { grid-column: 4 / span 5; grid-row: 7 / span 4; }
.pm-cell:nth-child(8) { grid-column: 9 / span 4; grid-row: 9 / span 3; }

/* ═══════════════════════════════════════════════════════
   DESIGN TEASER
   ═══════════════════════════════════════════════════════ */
.design-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px;
}

.ds-item { aspect-ratio: 3/4; overflow: hidden; background: var(--ink-3); position: relative; }
.ds-item:first-child, .ds-item:last-child { aspect-ratio: 3/5; }
.ds-item img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.65) brightness(0.8); transition: transform 0.8s var(--ease), filter 0.5s; }
.ds-item:hover img { transform: scale(1.05); filter: saturate(0.95) brightness(0.9); }

/* ═══════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════ */
.about-grid {
  display: grid; grid-template-columns: 1fr 460px;
  gap: 100px; align-items: center;
}

.about-left { display: flex; flex-direction: column; gap: 28px; }
.about-left .s-title { font-size: clamp(2.4rem, 4.5vw, 5.5rem); }
.about-desc { font-size: 0.9rem; color: var(--t-2); line-height: 1.85; max-width: 480px; }

.about-pts { display: flex; flex-direction: column; border-top: 1px solid var(--b-1); margin-top: 4px; }

.apt {
  display: grid; grid-template-columns: 36px 1fr; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--b-1); align-items: start;
}

.apt-n { font-family: 'Cormorant Garamond', serif; font-size: 0.82rem; font-style: italic; color: var(--warm); padding-top: 1px; }
.apt-t { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 3px; }
.apt-d { font-size: 0.8rem; color: var(--t-2); }

/* Portrait */
.about-portrait { position: relative; }

.portrait-wrap { aspect-ratio: 3/4; overflow: hidden; position: relative; }
.portrait-wrap::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(10,10,10,0.5) 0%, transparent 50%);
}
.portrait-wrap img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) contrast(1.05); transition: transform 10s var(--ease); }
.portrait-wrap:hover img { transform: scale(1.04); }

.portrait-cap {
  position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
}
.portrait-name { font-family: 'Cormorant Garamond', serif; font-size: 0.9rem; font-style: italic; color: var(--cream-2); }
.portrait-tag {
  font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--t-3); padding: 6px 12px; border: 1px solid var(--b-2);
  background: rgba(10,10,10,0.7); backdrop-filter: blur(10px);
}

.portrait-deco-1 { position: absolute; top: -14px; right: -14px; width: 60px; height: 60px; border: 1px solid rgba(200,164,94,0.18); pointer-events: none; }
.portrait-deco-2 { position: absolute; bottom: -14px; left: -14px; width: 44px; height: 44px; border: 1px solid rgba(200,164,94,0.1); pointer-events: none; }

/* ═══════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════ */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 80px; align-items: start;
}

.contact-left { display: flex; flex-direction: column; gap: 28px; }
.contact-left .s-title { font-size: clamp(2.2rem, 4vw, 5rem); }
.contact-left > p { font-size: 0.86rem; color: var(--t-2); line-height: 1.85; max-width: 380px; }

.contact-items { display: flex; flex-direction: column; border-top: 1px solid var(--b-1); }

.ci {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--b-1);
  transition: padding-left 0.35s var(--ease);
}
a.ci:hover { padding-left: 8px; }

.ci-label { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--t-3); }
.ci-value { font-size: 0.82rem; color: var(--t-2); transition: color 0.3s; }
a.ci:hover .ci-value { color: var(--warm); }

/* Form */
.contact-form { border: 1px solid var(--b-1); }

.cf-row { display: grid; grid-template-columns: 1fr 1fr; }

.cf-field {
  position: relative;
  border-bottom: 1px solid var(--b-1);
}
.cf-row .cf-field:first-child { border-right: 1px solid var(--b-1); }

.cf-label {
  position: absolute; top: 14px; left: 18px;
  font-size: 0.58rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--t-3);
  pointer-events: none;
}

.cf-input {
  display: block; width: 100%;
  padding: 34px 18px 12px;
  background: transparent; border: 0;
  font-size: 0.86rem; color: var(--t-1);
  transition: background 0.3s;
}
.cf-input:focus { outline: none; background: rgba(255,255,255,0.018); }
.cf-input::placeholder { color: transparent; }

.cf-select {
  display: block; width: 100%;
  padding: 34px 18px 12px;
  background: transparent; border: 0;
  font-size: 0.86rem; color: var(--t-2);
  -webkit-appearance: none; cursor: pointer;
}
.cf-select:focus { outline: none; }
.cf-select option { background: var(--ink-2); }

.cf-textarea {
  display: block; width: 100%;
  padding: 34px 18px 14px;
  background: transparent; border: 0;
  font-size: 0.86rem; color: var(--t-1); resize: vertical; min-height: 130px; line-height: 1.6;
}
.cf-textarea:focus { outline: none; background: rgba(255,255,255,0.018); }

.cf-footer {
  padding: 18px 20px; display: flex; justify-content: flex-end;
  border-top: 1px solid var(--b-1);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--b-1); padding: 44px 0;
  position: relative; z-index: 2;
}

.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }

.footer-brand { font-family: 'Cormorant Garamond', serif; font-size: 1rem; letter-spacing: 0.1em; }
.footer-brand span { color: var(--warm); }

.footer-nav { display: flex; gap: 26px; }
.footer-nav a { font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--t-3); transition: color 0.3s; }
.footer-nav a:hover { color: var(--t-1); }

.footer-copy { font-size: 0.64rem; color: var(--t-3); letter-spacing: 0.06em; }

/* ═══════════════════════════════════════════════════════
   PROJECT / CASE STUDY PAGE
   ═══════════════════════════════════════════════════════ */
.project-page { padding-top: var(--nav); }

.proj-hero { padding: 72px 0 88px; border-bottom: 1px solid var(--b-1); }

.proj-hero-grid {
  display: grid; grid-template-columns: 1fr 440px;
  gap: 80px; align-items: end;
}

.proj-eyebrow { margin-bottom: 24px; }

.proj-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.2rem, 7vw, 9rem);
  font-weight: 300; line-height: 0.88; letter-spacing: -0.035em;
  margin-bottom: 24px;
}

.proj-tagline { font-size: 0.9rem; color: var(--t-2); max-width: 400px; line-height: 1.8; margin-bottom: 36px; }

.proj-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.proj-tag { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 7px 15px; border: 1px solid var(--b-1); color: var(--t-2); }

.proj-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Rail */
.proj-rail { display: flex; flex-direction: column; }
.rail-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--b-1); }
.rail-row:last-child { border-bottom: 0; }
.rr-k { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--t-3); }
.rr-v { font-size: 0.8rem; color: var(--t-2); text-align: right; }

/* Body */
.proj-body { padding: 100px 0; }

.proj-content-grid {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 80px; align-items: start;
}

.proj-nav { position: sticky; top: calc(var(--nav) + 20px); display: flex; flex-direction: column; }

.pn-item {
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--t-3);
  padding: 13px 0; border-bottom: 1px solid var(--b-1); cursor: pointer;
  transition: color 0.3s, padding-left 0.35s var(--ease);
}
.pn-item:hover { color: var(--warm); padding-left: 6px; }
.pn-item.active { color: var(--warm); border-left: 2px solid var(--warm); padding-left: 10px; }

/* Content sections */
.cs { padding: 56px 0; border-bottom: 1px solid var(--b-1); }
.cs:last-child { border-bottom: 0; }

.cs-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 3rem); font-weight: 300; letter-spacing: -0.02em;
  margin: 14px 0 18px; line-height: 1.05;
}

.cs-text { font-size: 0.88rem; color: var(--t-2); line-height: 1.85; max-width: 620px; }

.cs-imgs { display: grid; gap: 10px; margin-top: 32px; }
.cs-imgs.two { grid-template-columns: 1fr 1fr; }
.cs-imgs.three { grid-template-columns: 2fr 1fr; }

.cs-img { overflow: hidden; aspect-ratio: 4/3; background: var(--ink-3); }
.cs-imgs.three .cs-img:first-child { grid-row: span 2; aspect-ratio: auto; }
.cs-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.cs-img:hover img { transform: scale(1.03); }

/* Outcomes */
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--b-1); margin-top: 48px; }
.oc { background: var(--ink); padding: 28px 22px; display: flex; flex-direction: column; gap: 10px; }
.oc-num { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; font-weight: 300; color: var(--warm); line-height: 1; }
.oc-t { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.oc-d { font-size: 0.78rem; color: var(--t-2); line-height: 1.65; }

/* CTA bar */
.proj-cta {
  border-top: 1px solid var(--b-1); padding: 68px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap;
}
.proj-cta-text .s-title { font-size: clamp(1.8rem, 3.5vw, 4rem); }
.proj-cta-text p { font-size: 0.86rem; color: var(--t-2); margin-top: 10px; max-width: 380px; }
.proj-cta-btns { display: flex; gap: 12px; }

/* ═══════════════════════════════════════════════════════
   GALLERY PAGE (Photo + Design)
   ═══════════════════════════════════════════════════════ */
.gallery-page { padding-top: var(--nav); }

.gallery-header { padding: 64px 0 48px; border-bottom: 1px solid var(--b-1); }

.gallery-header-inner {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}

.gallery-big-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(4rem, 9vw, 11rem);
  font-weight: 300; letter-spacing: -0.04em; line-height: 0.85;
}
.gallery-big-title em { font-style: italic; color: var(--warm); }

.gallery-count { font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--t-3); padding-bottom: 10px; }

/* Masonry */
.masonry { columns: 3; column-gap: 7px; padding: 28px 0; }

.masonry-item {
  break-inside: avoid; margin-bottom: 7px;
  overflow: hidden; position: relative; background: var(--ink-3); cursor: pointer;
}
.masonry-item img { display: block; width: 100%; filter: saturate(0.75) brightness(0.85); transition: transform 0.8s var(--ease), filter 0.6s; }
.masonry-item:hover img { transform: scale(1.04); filter: saturate(1) brightness(1); }

.masonry-overlay {
  position: absolute; inset: 0;
  background: rgba(10,10,10,0);
  display: flex; align-items: flex-end; padding: 18px;
  transition: background 0.4s;
}
.masonry-item:hover .masonry-overlay { background: rgba(10,10,10,0.28); }

.masonry-num {
  font-family: 'Cormorant Garamond', serif; font-size: 0.78rem; font-style: italic;
  color: transparent; transition: color 0.4s;
}
.masonry-item:hover .masonry-num { color: rgba(237,232,223,0.45); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5,5,5,0.97);
  display: none; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }

.lb-inner { position: relative; max-width: min(1200px, 100%); }
.lb-img { max-height: 88vh; max-width: 100%; object-fit: contain; display: block; }
.lb-close {
  position: absolute; top: -40px; right: 0;
  font-size: 0.64rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--t-2); cursor: pointer;
  transition: color 0.3s;
}
.lb-close:hover { color: var(--t-1); }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  left: -56px; right: -56px;
  display: flex; justify-content: space-between; pointer-events: none;
}
.lb-btn {
  pointer-events: all; cursor: pointer;
  width: 44px; height: 44px; border: 1px solid var(--b-2);
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  color: var(--t-2); transition: background 0.3s, color 0.3s;
}
.lb-btn:hover { background: rgba(255,255,255,0.08); color: var(--t-1); }
.lb-caption {
  position: absolute; bottom: -32px; left: 0; right: 0; text-align: center;
  font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--t-3);
}

/* Design gallery */
.design-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding-top: 28px; }

.dg-item { aspect-ratio: 1; overflow: hidden; position: relative; background: var(--ink-3); cursor: pointer; }
.dg-item img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.65) brightness(0.8); transition: transform 0.8s var(--ease), filter 0.5s; }
.dg-item:hover img { transform: scale(1.06); filter: saturate(0.95) brightness(0.9); }

.dg-hover {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.88) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px; opacity: 0; transition: opacity 0.4s;
}
.dg-item:hover .dg-hover { opacity: 1; }
.dg-title { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 400; }
.dg-cat { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--warm); margin-top: 4px; }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--t-3); border: 1px solid var(--b-1); padding: 10px 18px;
  transition: color 0.3s, border-color 0.3s, transform 0.35s var(--ease);
}
.back-link:hover { color: var(--t-1); border-color: var(--b-2); transform: translateX(-4px); }
.back-link::before { content: '←'; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .hero-body { grid-template-columns: 1fr; text-align: center; }
  .hero-device-col { align-items: center; order: -1; }
  .hero-sub { margin: 0 auto 44px; }
  .hero-btns { justify-content: center; }
  .showcase-grid { grid-template-columns: 1fr; }
  .proj-selector { display: grid; grid-template-columns: repeat(3, 1fr); }
  .ps-item { flex-direction: column; gap: 6px; border-left: 0; border-bottom: 1px solid var(--b-1); }
  .ps-item.on { padding-left: 0; padding-top: 12px; border-top: 2px solid var(--warm); }
  .ps-item.on::before { display: none; }
  .photo-split { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 440px; }
  .contact-grid { grid-template-columns: 1fr; }
  .proj-hero-grid { grid-template-columns: 1fr; }
  .proj-content-grid { grid-template-columns: 1fr; }
  .proj-nav { position: static; flex-direction: row; flex-wrap: wrap; border-top: 1px solid var(--b-1); margin-bottom: 32px; }
  .pn-item { border-right: 1px solid var(--b-1); border-bottom: 0; padding: 12px 18px; }
  .pn-item.active { border-left: 0; border-bottom: 2px solid var(--warm); padding-left: 18px; }
  .outcomes { grid-template-columns: 1fr 1fr; }
  .proj-cta { flex-direction: column; gap: 28px; }
  .design-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .nav-links, .nav-pill { display: none; }
  .nav-burger { display: flex; }
  .hero-strip { grid-template-columns: 1fr; }
  .hs-item { border-right: 0; border-bottom: 1px solid var(--b-1); }
  .masonry { columns: 2; }
  .design-strip { grid-template-columns: repeat(3, 1fr); }
  .ds-item:last-child { display: none; }
}

@media (max-width: 768px) {
  :root { --pad: 18px; }
  .section { padding: 80px 0; }
  .s-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .photo-mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 32px; }
  .pm-cell:nth-child(n) { grid-column: auto; grid-row: auto; }
  .pm-cell:nth-child(1) { grid-column: span 2; grid-row: span 5; }
  .pm-cell:nth-child(2), .pm-cell:nth-child(3) { grid-row: span 3; }
  .pm-cell:nth-child(4), .pm-cell:nth-child(5) { grid-row: span 3; }
  .pm-cell:nth-child(n+6) { display: none; }
  .design-strip { grid-template-columns: repeat(2, 1fr); }
  .ds-item:nth-child(n+4) { display: none; }
  .cf-row { grid-template-columns: 1fr; }
  .cf-row .cf-field:first-child { border-right: 0; }
  .cs-imgs.two, .cs-imgs.three { grid-template-columns: 1fr; }
  .cs-imgs.three .cs-img:first-child { aspect-ratio: 4/3; grid-row: auto; }
  .outcomes { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .design-grid { grid-template-columns: 1fr 1fr; }
  .proj-selector { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 520px) {
  .hero-btns, .proj-btns, .proj-cta-btns { flex-direction: column; width: 100%; }
  .btn { width: 100%; justify-content: center; }
  .dev-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .design-grid { grid-template-columns: 1fr; }
}
/* ═══════════════════════════════════════════════════════
   SOFTWARE CAROUSEL
   ═══════════════════════════════════════════════════════ */
.software-carousel {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.software-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: swScroll 34s linear infinite;
  will-change: transform;
}

.software-carousel:hover .software-track {
  animation-play-state: paused;
}

@keyframes swScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 9px)); }
}

.sw-card {
  width: clamp(300px, 28vw, 430px);
  min-width: clamp(300px, 28vw, 430px);
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--b-1);
  overflow: hidden;
  position: relative;
  box-shadow: var(--sh-md);
  transition: transform 0.6s var(--ease), border-color 0.35s, background 0.35s;
}

.sw-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 30%),
    radial-gradient(circle at top right, rgba(200,164,94,0.08), transparent 38%);
  opacity: 0.9;
}

.sw-card:hover {
  transform: translateY(-8px);
  border-color: rgba(200,164,94,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.028) 0%, rgba(255,255,255,0.012) 100%);
}

.sw-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-3);
  border-bottom: 1px solid var(--b-1);
}

.sw-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) brightness(0.82);
  transition: transform 0.9s var(--ease), filter 0.5s;
}

.sw-card:hover .sw-media img {
  transform: scale(1.05);
  filter: saturate(0.95) brightness(0.92);
}

.sw-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 22px;
  min-height: 240px;
  position: relative;
  z-index: 1;
}

.sw-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sw-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
  padding: 7px 10px;
  border: 1px solid rgba(200,164,94,0.18);
  background: rgba(200,164,94,0.06);
}

.sw-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.65rem, 2.4vw, 2.2rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--t-1);
}

.sw-desc {
  font-size: 0.82rem;
  color: var(--t-2);
  line-height: 1.8;
  max-width: 95%;
}

/* Optional slight stagger feel */
.software-track .sw-card:nth-child(2n) {
  transform: translateY(14px);
}
.software-track .sw-card:nth-child(2n):hover {
  transform: translateY(6px);
}

/* Responsive */
@media (max-width: 1100px) {
  .software-track {
    gap: 14px;
    animation-duration: 28s;
  }

  .sw-card {
    width: clamp(280px, 44vw, 360px);
    min-width: clamp(280px, 44vw, 360px);
  }
}

@media (max-width: 768px) {
  .software-carousel {
    mask-image: none;
    -webkit-mask-image: none;
  }

  .software-track {
    gap: 12px;
    animation-duration: 24s;
  }

  .sw-card {
    width: 84vw;
    min-width: 84vw;
  }

  .sw-body {
    padding: 18px;
    min-height: 220px;
  }

  .sw-desc {
    max-width: 100%;
  }

  .software-track .sw-card:nth-child(2n) {
    transform: translateY(0);
  }

  .software-track .sw-card:nth-child(2n):hover {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .software-track {
    animation: none;
  }

  .software-carousel {
    overflow-x: auto;
    padding-bottom: 6px;
  }
}