/* ── RESET ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: #F4F0E8; color: #1A1714;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; cursor: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: #3355FF; color: #F4F0E8; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #F4F0E8; }
::-webkit-scrollbar-thumb { background: #D8D0C0; border-radius: 2px; }

@media (max-width: 900px) { body { cursor: auto; } }

/* ── PRELOAD SCREEN ──────────────────────── */
.preload {
  position: fixed; inset: 0; z-index: 1001; background: #F4F0E8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  transition: opacity .5s ease;
}
.preload.hidden { opacity: 0; pointer-events: none; }
.preload-imgs { display: flex; gap: .6rem; }
.preload-imgs img {
  width: 70px; height: 70px; object-fit: cover; border-radius: .25rem;
  filter: grayscale(1) brightness(.9); opacity: .35;
  animation: preloadPulse 1.4s ease-in-out infinite;
}
.preload-imgs img:nth-child(2) { animation-delay: .12s; }
.preload-imgs img:nth-child(3) { animation-delay: .24s; }
.preload-imgs img:nth-child(4) { animation-delay: .36s; }
.preload-imgs img:nth-child(5) { animation-delay: .48s; }
@keyframes preloadPulse { 0%,100% { opacity: .3; } 50% { opacity: .75; } }
.preload-mark {
  display:flex; align-items:center; gap:.6rem;
  font-family:'JetBrains Mono',monospace; font-size:.7rem; letter-spacing:.25em; text-transform:uppercase; color:#6E6A62;
}
.preload-mark .dot { width:6px; height:6px; border-radius:50%; background:#3355FF; animation: pulse 1s ease-in-out infinite; }
@media (max-width: 600px) {
  .preload-imgs img { width: 46px; height: 46px; }
  .preload-imgs { gap: .4rem; }
}

/* ── GRAIN ───────────────────────────────── */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%; z-index: 999; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 1s steps(6) infinite;
}
@keyframes grainShift {
  0%{transform:translate(0,0);} 20%{transform:translate(-2%,2%);} 40%{transform:translate(2%,-2%);}
  60%{transform:translate(-1%,1%);} 80%{transform:translate(1%,-1%);} 100%{transform:translate(0,0);}
}

/* ── CUSTOM CURSOR ───────────────────────── */
.cur-dot { position: fixed; top:0; left:0; width:6px; height:6px; border-radius:50%; background:#3355FF; pointer-events:none; z-index:1000; transform:translate(-50%,-50%); }
.cur-ring {
  position: fixed; top:0; left:0; width:40px; height:40px; border-radius:50%;
  border:1px solid rgba(26,23,20,.4); pointer-events:none; z-index:1000;
  transform:translate(-50%,-50%); transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease;
  display:flex; align-items:center; justify-content:center;
  font-family:'JetBrains Mono',monospace; font-size:.6rem; letter-spacing:.1em; color:#F4F0E8; text-transform:uppercase;
}
.cur-ring.active { width:50px; height:50px; background:#3355FF; border-color:#3355FF; }
@media (max-width: 900px) { .cur-dot, .cur-ring { display:none; } }

/* ── NAV ─────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 3rem; font-family:'JetBrains Mono',monospace;
  transition: padding .35s ease, background .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(244,240,232,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 1.1rem 3rem; border-color: rgba(26,23,20,.08);
}
.nav-mark { display:flex; align-items:center; gap:.5rem; font-size:.66rem; letter-spacing:.1em; text-transform:uppercase; color:#1A1714; }
.nav-mark .dot { width:6px; height:6px; border-radius:50%; background:#3355FF; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.25;} }
.nav-right { display:flex; align-items:center; gap:2rem; }
.nav-links { display:flex; align-items:center; gap:1.5rem; list-style:none; margin:0; padding:0; }
.nav-links a { font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; color:#6E6A62; transition:color .25s ease; }
.nav-links a:hover, .nav-links a.current { color:#1A1714; }
.nav-contact { display:flex; align-items:center; font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; color:#6E6A62; transition:color .2s; }
.nav-contact:hover { color:#1A1714; }
@media (max-width: 768px) { .nav { padding:1.25rem 1.5rem; } .nav.scrolled{ padding:.9rem 1.5rem; } .nav-right{ gap:1rem; } .nav-links{ gap:1.25rem; } .nav-links a{ font-size:.58rem; } }

/* ── MARQUEE ─────────────────────────────── */
.marquee { border-top:1px solid rgba(26,23,20,.08); border-bottom:1px solid rgba(26,23,20,.08); overflow:hidden; white-space:nowrap; padding:1.3rem 0; position:relative; z-index:1; }
.marquee-track { display:inline-flex; animation: scroll 32s linear infinite; }
.marquee span {
  font-family:'JetBrains Mono',monospace; font-size:.85rem; letter-spacing:.2em; text-transform:uppercase; color:#6E6A62;
  display:inline-flex; align-items:center; gap:2.5rem; padding:0 1.25rem;
}
.marquee span b { color:#3355FF; font-weight:500; }
.marquee span::after { content:'/'; color:rgba(26,23,20,.2); }
@keyframes scroll { from{transform:translateX(0);} to{transform:translateX(-50%);} }

/* ── SECTION SHELL ───────────────────────── */
.section { padding:7rem 3rem; max-width:1280px; margin:0 auto; position:relative; z-index:1; }
.section-label {
  font-family:'JetBrains Mono',monospace; font-size:.72rem; letter-spacing:.2em; text-transform:uppercase;
  color:#3355FF; margin-bottom:2.5rem; display:flex; align-items:center; gap:.75rem;
}

/* ── WORK (infinite scroll card-catalog) ─── */
.work-v2 { padding: 7rem 0; position: relative; z-index: 1; }
.work-v2.work-landing { min-height: 100vh; padding-top: 9rem; padding-bottom: 0; }
.work-v2-grid {
  display: grid; grid-template-columns: 220px 1fr 280px; gap: 2rem;
  max-width: 1400px; margin: 0 auto; padding: 0 3rem; align-items: start;
}

/* left index */
.work-left {
  position: sticky; top: 38vh; align-self: start; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
}
.work-left-inner { display: flex; flex-direction: column; gap: 1.1rem; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.work-item {
  display: flex; align-items: baseline; gap: .8rem;
  font-family:'JetBrains Mono',monospace; font-size:.78rem; letter-spacing:.05em;
  color: rgba(26,23,20,.28); transition: color .4s ease; cursor: none;
}
.work-item .wi-num { color: rgba(26,23,20,.18); font-size:.7rem; transition: color .4s ease; }
.work-item.active { color: #1A1714; }
.work-item.active .wi-num { color: #3355FF; }

/* center scroller + brackets */
.work-center-row { display: flex; align-items: flex-start; justify-content: center; gap: 1rem; min-width: 0; }
.bracket {
  position: sticky; top: 20vh; flex: 1; height: 60vh;
  display: flex; align-items: center; justify-content: center;
  user-select: none; pointer-events: none;
}
.bracket span {
  font-family:'JetBrains Mono',monospace; font-size:.65rem; letter-spacing:.4em; text-transform:uppercase;
  color: rgba(26,23,20,.22); writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap;
}
.bracket-arrow {
  width: 0; height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 22px solid rgba(26,23,20,.08);
}
.work-track {
  flex: 0 0 auto; width: min(260px, 60vw);
  display: flex; flex-direction: column; gap: 7rem; padding: 5rem 0;
}
.work-fig {
  border-radius: .3rem; overflow: hidden; background: #EAE3D6;
  display: flex; align-items: center; justify-content: center;
}
.work-fig img {
  display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto;
  filter: grayscale(.45) contrast(1.05);
  transition: filter .8s ease;
}
.work-fig.active img { filter: grayscale(0) contrast(1.05); }
.work-fig.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #EAE3D6 0%, #E0D7C8 100%);
  font-family:'JetBrains Mono',monospace; font-size:.6rem; letter-spacing:.15em; text-transform:uppercase;
  color: rgba(26,23,20,.2); text-align: center; padding: 1rem;
}

/* right: sparse static blurb + tiny active label */
.work-right { position: sticky; top: 30vh; align-self: start; }
.work-right-static {
  font-family:'JetBrains Mono',monospace; font-size:.7rem; letter-spacing:.04em;
  color: rgba(26,23,20,.35); max-width: 22ch; line-height: 1.7; margin-bottom: 3.5rem;
}
.work-right-inner { position: relative; min-height: 70px; }
.work-detail {
  position: absolute; top: 0; left: 0; right: 0;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease; pointer-events: none;
}
.work-detail.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.wd-name { font-family:'JetBrains Mono',monospace; font-size:.7rem; letter-spacing:.1em; text-transform:uppercase; color:#1A1714; margin-bottom:.5rem; }
.wd-tags { display: flex; flex-direction: column; gap: .2rem; }
.wd-tags span {
  font-family:'JetBrains Mono',monospace; font-size:.66rem; letter-spacing:.05em;
  color:#6E6A62;
}
.wd-tags span:first-child { color: #3355FF; }
.wd-extra {
  font-family:'Cormorant Garamond', serif; font-size: .98rem; line-height: 1.5; font-style: italic;
  color: #1A1714; max-width: 26ch; margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(26,23,20,.12);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .5s cubic-bezier(.16,1,.3,1), opacity .4s ease, margin-top .5s ease, padding-top .5s ease;
}
.work-detail.selected .wd-extra { max-height: 10rem; opacity: 1; }
.work-fig { cursor: pointer; }
.work-fig.selected { outline: 1px solid rgba(51,85,255,.35); outline-offset: 4px; }

/* Caption embedded in each work-fig — hidden on desktop, where the same
   info is shown in the sticky left/right columns instead. */
.work-fig-caption { display: none; }

@media (max-width: 1024px) {
  /* On mobile there's no room for separate index/detail columns, so we
     hide them and instead show each image's caption directly beneath it,
     right inside the same looping track — keeping the infinite scroll. */
  .work-v2-grid { grid-template-columns: 1fr; gap: 0; padding: 0 1.5rem; }
  .work-left, .work-right { display: none; }
  .bracket { display: none; }
  .work-center-row { justify-content: center; }
  .work-track { width: min(440px, 100%); gap: 4rem; padding: 1.5rem 0; }
  .work-fig {
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    background: transparent; border-radius: 0;
  }
  .work-fig img {
    max-height: none; width: 100%; height: auto; border-radius: .3rem;
    background: #EAE3D6;
  }
  .work-fig-caption {
    display: block; padding-top: 1rem;
  }
  .wfc-name {
    font-family:'JetBrains Mono',monospace; font-size:.7rem; letter-spacing:.1em;
    text-transform:uppercase; color:#1A1714; margin-bottom:.5rem;
  }
  .wfc-tags { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .75rem; }
  .wfc-tags span {
    font-family:'JetBrains Mono',monospace; font-size:.66rem; letter-spacing:.05em; color:#6E6A62;
  }
  .wfc-tags span:first-child { color: #3355FF; }
  .wfc-extra {
    font-family:'Cormorant Garamond', serif; font-size: .98rem; line-height: 1.5;
    font-style: italic; color: #1A1714; max-width: 32ch;
    max-height: 0; overflow: hidden; opacity: 0; margin-top: 0; padding-top: 0;
    transition: max-height .5s cubic-bezier(.16,1,.3,1), opacity .4s ease, margin-top .5s ease, padding-top .5s ease;
  }
  /* Tap an image to reveal its extra blurb, matching the desktop
     click-to-expand behavior. */
  .work-fig.selected .wfc-extra {
    max-height: 12rem; opacity: 1; margin-top: .75rem; padding-top: .75rem;
    border-top: 1px solid rgba(26,23,20,.12);
  }
}

/* ── SPLIT (AI section) ──────────────────── */
.split { display:grid; grid-template-columns:1fr 1fr; position:relative; z-index:1; }
.split-img { position:relative; overflow:hidden; aspect-ratio:4/5; }
.split-img img { width:100%; height:100%; object-fit:cover; filter:grayscale(.3) contrast(1.05); transform:scale(1.12); transition: transform 1.2s cubic-bezier(.16,1,.3,1), filter .6s ease; }
.split-img:hover img { transform:scale(1); filter:grayscale(0) contrast(1.05); }
.split-text { display:flex; flex-direction:column; justify-content:center; padding:5rem; gap:1.25rem; }
.split-text .num { font-family:'JetBrains Mono',monospace; font-size:.8rem; color:#3355FF; letter-spacing:.15em; text-transform:uppercase; }
.split-text h2 { font-family:'Cormorant Garamond',serif; font-size:clamp(2rem,4.5vw,3.6rem); font-weight:500; line-height:1.08; }
.split-text p { color:#6E6A62; max-width:42ch; }
.split.reverse { direction:rtl; }
.split.reverse .split-text { direction:ltr; }

/* ── ABOUT EXTRA (tiny dense text) ───────── */
.about-extra {
  max-width: 640px; margin: 0 0 5rem; font-family:'JetBrains Mono',monospace;
  font-size:.7rem; line-height:1.9; color: rgba(26,23,20,.45); letter-spacing:.01em;
}
.about-extra .ae-line { margin-bottom: 2.5rem; }
.ae-contrast { display:flex; flex-direction:column; gap:.4rem; margin-bottom: 2.5rem; }
.ae-row { display:flex; gap:.6rem; }
.ae-arrow { color:#3355FF; }
.ae-to { color: rgba(26,23,20,.3); }
.ae-questions { display:flex; flex-direction:column; gap:.4rem; margin-bottom: 2.5rem; color: rgba(26,23,20,.3); }
.ae-ai b { color:#1A1714; }

/* ── BIG LOGO ────────────────────────────── */
.big-logo {
  padding: 4rem 3rem 2rem; text-align:center; position:relative; z-index:1;
  font-family:'Orbitron',sans-serif; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  font-size: clamp(2.4rem, 10vw, 9rem); line-height:1; color:#1A1714;
  user-select:none;
}
.big-logo sup { font-size: .3em; vertical-align: super; }

/* ── ABOUT ───────────────────────────────── */
.about-grid { display:grid; grid-template-columns:1fr 1fr; gap:6rem; align-items:start; }
.about-h2 { font-family:'Cormorant Garamond',serif; font-size:clamp(2rem,3.5vw,3.2rem); font-weight:500; line-height:1.2; margin-bottom:1.75rem; }
.about-h2 em { color:#3355FF; font-style:italic; }
.about-body { font-size:.95rem; color:#6E6A62; line-height:1.8; }
.about-body p + p { margin-top:1.1rem; }
.team-list { display:flex; flex-direction:column; }
.team-person { padding:1.6rem 0; border-top:1px solid rgba(26,23,20,.08); }
.team-person:last-of-type { border-bottom:1px solid rgba(26,23,20,.08); }
.team-name { font-family:'Cormorant Garamond',serif; font-size:1.4rem; font-weight:500; margin-bottom:.2rem; }
.team-role { font-family:'JetBrains Mono',monospace; font-size:.72rem; letter-spacing:.05em; color:#6E6A62; }
.team-li { display:inline-flex; align-items:center; gap:.35rem; margin-top:.75rem; font-size:.75rem; color:#6E6A62; transition:color .2s; }
.team-li:hover { color:#3355FF; }

/* ── CONTACT ─────────────────────────────── */
.contact-wrap { padding:0 3rem 7rem; max-width:1280px; margin:0 auto; position:relative; z-index:1; }
.contact-block { border:1px solid rgba(26,23,20,.1); border-radius:.6rem; padding:5rem 4rem; display:grid; grid-template-columns:1fr 1fr; gap:5rem; align-items:start; }
.contact-h2 { font-family:'Cormorant Garamond',serif; font-size:clamp(1.9rem,3.5vw,3rem); font-weight:500; line-height:1.2; color:#1A1714; margin-bottom:1rem; }
.contact-h2 em { color:#3355FF; font-style:italic; }
.contact-sub { font-family:'JetBrains Mono',monospace; font-size:.85rem; color:#6E6A62; line-height:1.7; }
.form-pair { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.fg { margin-bottom:.9rem; }
.fg label { display:block; font-family:'JetBrains Mono',monospace; font-size:.65rem; font-weight:500; letter-spacing:.15em; text-transform:uppercase; color:#6E6A62; margin-bottom:.5rem; }
.fg input, .fg textarea {
  width:100%; background:rgba(26,23,20,.04); border:1px solid rgba(26,23,20,.12); border-radius:.3rem;
  padding:.75rem 1rem; font-family:'DM Sans',sans-serif; font-size:.88rem; color:#1A1714; outline:none;
  transition: border-color .2s, background .2s;
}
.fg input::placeholder, .fg textarea::placeholder { color:rgba(26,23,20,.25); }
.fg input:focus, .fg textarea:focus { border-color:#3355FF; background:rgba(26,23,20,.07); }
.fg textarea { min-height:110px; resize:vertical; }
.btn-send {
  display:inline-flex; align-items:center; gap:.6rem; padding:.85rem 1.8rem; background:#3355FF; color:#F4F0E8;
  font-family:'JetBrains Mono',monospace; font-size:.78rem; font-weight:500; letter-spacing:.1em; text-transform:uppercase;
  border:none; border-radius:2rem; cursor: none; margin-top:.5rem; transition: transform .15s, gap .2s;
}
.btn-send:hover { transform: translateY(-1px); gap:.9rem; }

/* ── FOOTER ──────────────────────────────── */
footer {
  padding:2rem 3rem; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem;
  border-top:1px solid rgba(26,23,20,.08); position:relative; z-index:1;
  font-family:'JetBrains Mono',monospace;
}
.footer-copy { font-size:.72rem; letter-spacing:.05em; color:#6E6A62; }
.footer-links { display:flex; gap:1.5rem; }
.footer-links a { font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color:#6E6A62; transition:color .2s; }
.footer-links a:hover { color:#3355FF; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns:1fr; gap:3rem; }
  .split, .split.reverse { grid-template-columns:1fr; direction:ltr; }
  .split-text { padding:3rem 1.5rem; }
}
@media (max-width: 768px) {
  .section { padding:4.5rem 1.5rem; }
  .contact-wrap { padding:0 1.5rem 4rem; }
  .contact-block { grid-template-columns:1fr; gap:2.5rem; padding:2.5rem 1.75rem; }
  .form-pair { grid-template-columns:1fr; }
  footer { padding:1.5rem; }
}
