/* ============ RESET / TOKENS ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --grey: #7a7a7a;
  --line: rgba(10,10,10,0.14);
  --line-strong: rgba(10,10,10,0.55);
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 74px;
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: 'Archivo', system-ui, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.4;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--black); color: var(--white); }

.section-head { padding: 0 var(--pad); margin-bottom: clamp(28px, 5vw, 64px); }
.section-head__label {
  display: block; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--grey); margin-bottom: 14px; font-weight: 600;
}
.section-head__title {
  font-family: 'Archivo Expanded', 'Archivo', sans-serif;
  font-weight: 800; font-size: clamp(44px, 9vw, 150px);
  line-height: 0.92; letter-spacing: -0.02em; text-transform: uppercase;
}

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 9999; background: var(--black); color: var(--white);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--pad); transition: transform 0.9s var(--ease); will-change: transform;
}
.preloader.is-done { transform: translateY(-100%); }
.preloader__inner { display: flex; width: 100%; justify-content: space-between; align-items: flex-end; }
.preloader__name { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; }
.preloader__count {
  font-family: 'Archivo Expanded','Archivo',sans-serif;
  font-weight: 800; font-size: clamp(64px, 18vw, 240px); line-height: 0.8; letter-spacing: -0.03em;
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-h); z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad); mix-blend-mode: difference; color: var(--white);
  transition: transform 0.5s var(--ease);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__brand { font-weight: 800; font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 44px); }
.nav__links a {
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; position: relative;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px;
  background: currentColor; transition: width 0.4s var(--ease);
}
.nav__links a:hover::after { width: 100%; }
.nav__menu { display: none; background: none; border: 0; flex-direction: column; gap: 6px; cursor: pointer; padding: 8px; }
.nav__menu span { display: block; width: 26px; height: 2px; background: var(--white); transition: transform 0.4s var(--ease), opacity 0.3s; }
body.menu-open .nav__menu span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.menu-open .nav__menu span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobilemenu {
  position: fixed; inset: 0; z-index: 850; background: var(--black); color: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transform: translateY(-100%); transition: transform 0.6s var(--ease);
}
body.menu-open .mobilemenu { transform: translateY(0); }
.mobilemenu a {
  font-family: 'Archivo Expanded','Archivo',sans-serif; font-weight: 800;
  font-size: clamp(38px, 12vw, 72px); text-transform: uppercase; letter-spacing: -0.02em;
}

/* ============ HERO ============ */
.hero { position: relative; height: 100vh; width: 100%; overflow: hidden; background: var(--white); }
.hero__media { position: absolute; inset: 0; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__img--render { z-index: 1; }
.hero__img--blueprint {
  z-index: 2; background: var(--white);
  -webkit-mask-image: linear-gradient(to bottom, black 100%, transparent 100%);
}
/* The reveal wipe: blueprint gets clipped away as user scrolls, exposing render */
.hero__reveal { display: none; }
/* Legibility scrim behind the headline (keeps the big-type effect readable over any image) */
.hero__scrim {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.66) 0%, rgba(0,0,0,0.40) 24%, rgba(0,0,0,0.08) 46%, rgba(0,0,0,0) 62%);
}

.hero__overlay {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column;
  justify-content: flex-end; padding: var(--pad);
  pointer-events: none;
}
.hero__headline { pointer-events: none; }
.hero__title {
  font-family: 'Archivo Expanded','Archivo',sans-serif; font-weight: 900;
  font-size: clamp(56px, 15vw, 230px); line-height: 0.85; letter-spacing: -0.03em;
  text-transform: uppercase; color: #fff;
  text-shadow: 0 2px 50px rgba(0,0,0,0.40), 0 1px 4px rgba(0,0,0,0.28);
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; will-change: transform; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px;
  font-size: clamp(13px, 1.4vw, 17px); font-weight: 500; letter-spacing: 0.02em;
  color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}
.hero__role { font-weight: 700; }
.hero__sep { opacity: 0.5; }
.hero__scroll {
  position: absolute; right: var(--pad); bottom: var(--pad); display: flex; flex-direction: column;
  align-items: center; gap: 12px; color: #fff;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
}
.hero__scroll span:first-child { writing-mode: vertical-rl; }
.hero__scrollline { width: 1px; height: 60px; background: currentColor; position: relative; overflow: hidden; }
.hero__scrollline::after {
  content: ''; position: absolute; top: -60px; left: 0; width: 100%; height: 60px; background: var(--white);
  animation: scrolldown 2s var(--ease) infinite;
}
@keyframes scrolldown { 0%{ transform: translateY(0);} 100%{ transform: translateY(120px);} }

/* ============ STATEMENT ============ */
.statement { padding: clamp(90px, 16vw, 220px) var(--pad); border-bottom: 1px solid var(--line); }
.statement__text {
  font-family: 'Archivo','sans-serif'; font-weight: 500;
  font-size: clamp(24px, 4.4vw, 62px); line-height: 1.14; letter-spacing: -0.02em; max-width: 20ch + 100%;
}
.statement__text em { font-style: normal; color: var(--grey); }

/* ============ WORK / PROJECTS ============ */
.work { padding-top: clamp(80px, 12vw, 160px); }
.projects { display: flex; flex-direction: column; }

.project {
  position: relative; border-top: 1px solid var(--line); cursor: pointer;
  display: grid; grid-template-columns: 1fr; overflow: hidden;
}
.project__media {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #eee;
}
.project__media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); will-change: transform;
}
.project:hover .project__media img { transform: scale(1.04); }
.project__num {
  position: absolute; top: 24px; left: 24px; z-index: 3; color: var(--white);
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; mix-blend-mode: difference;
}
.project__info {
  padding: 26px var(--pad) 46px; display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 12px;
}
.project__title {
  font-family: 'Archivo Expanded','Archivo',sans-serif; font-weight: 800;
  font-size: clamp(30px, 6vw, 92px); line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase;
}
.project__tags { display: flex; gap: 10px 22px; flex-wrap: wrap; font-size: 13px; color: var(--grey); font-weight: 500; }
.project__tags span { position: relative; }
.project__tools { color: var(--black); font-weight: 600; }
.project__cta {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px;
}
.project__cta::after { content: '→'; transition: transform 0.4s var(--ease); }
.project:hover .project__cta::after { transform: translateX(6px); }

/* ============ ABOUT ============ */
.about { padding: clamp(90px, 14vw, 200px) 0 clamp(70px, 10vw, 140px); border-top: 1px solid var(--line); }
.about__grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(30px, 6vw, 90px);
  padding: 0 var(--pad); align-items: start;
}
.about__photo { overflow: hidden; }
.about__photo img { width: 100%; filter: grayscale(1) contrast(1.05); }
.about__text p { font-size: clamp(18px, 2.1vw, 26px); line-height: 1.45; margin-bottom: 26px; max-width: 46ch; }
.about__text strong { font-weight: 700; }
.about__facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 40px; margin-top: 44px;
  border-top: 1px solid var(--line); padding-top: 36px;
}
.about__facts dt { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.about__facts dd { font-size: clamp(16px, 1.8vw, 21px); font-weight: 600; }

/* ============ SKILLS ============ */
.skills { padding: clamp(80px, 12vw, 160px) 0; border-top: 1px solid var(--line); background: var(--black); color: var(--white); }
.skills .section-head__label { color: rgba(255,255,255,0.55); }
.skills .section-head__title { color: var(--white); }
.skills__list { list-style: none; }
.skill {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  padding: clamp(18px, 2.4vw, 30px) var(--pad); border-top: 1px solid rgba(255,255,255,0.16);
  position: relative; overflow: hidden;
}
.skill:last-child { border-bottom: 1px solid rgba(255,255,255,0.16); }
.skill__fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0; background: rgba(255,255,255,0.08);
  z-index: 0; transition: width 1.2s var(--ease);
}
.skill > * { position: relative; z-index: 1; }
.skill__name {
  font-family: 'Archivo Expanded','Archivo',sans-serif; font-weight: 700;
  font-size: clamp(24px, 4.5vw, 60px); letter-spacing: -0.02em; text-transform: uppercase; line-height: 1;
}
.skill__name small { display: block; font-family: 'Archivo',sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: rgba(255,255,255,0.5); margin-top: 8px; }
.skill__meter { display: flex; gap: 7px; }
.skill__dot { width: 12px; height: 12px; border: 1.5px solid rgba(255,255,255,0.5); border-radius: 50%; }
.skill__dot.is-on { background: var(--white); border-color: var(--white); }
.skills__note { padding: clamp(40px,6vw,70px) var(--pad) 0; max-width: 900px; }
.skills__note p { font-size: clamp(18px, 2.2vw, 28px); line-height: 1.4; color: rgba(255,255,255,0.85); }
.skills__note strong { color: var(--white); font-weight: 700; }

/* ============ CONTACT ============ */
.contact { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding-top: clamp(90px, 14vw, 180px); }
.contact__inner { padding: 0 var(--pad); }
.contact__title {
  font-family: 'Archivo Expanded','Archivo',sans-serif; font-weight: 900;
  font-size: clamp(46px, 11vw, 170px); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase;
  margin: 18px 0 clamp(40px, 7vw, 90px);
}
.contact__links { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.contact__link {
  display: flex; flex-direction: column; gap: 10px; padding: 32px 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.contact__link + .contact__link { border-left: 1px solid var(--line); padding-left: 24px; }
.contact__link:hover { padding-left: 18px; }
.contact__link-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); }
.contact__link-value { font-size: clamp(16px, 2vw, 26px); font-weight: 700; }
.footer {
  display: flex; justify-content: space-between; padding: 28px var(--pad); border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); gap: 16px; flex-wrap: wrap;
}

/* ============ DETAIL OVERLAY ============ */
.detail {
  position: fixed; inset: 0; z-index: 1000; background: var(--white); color: var(--black);
  transform: translateY(100%); transition: transform 0.7s var(--ease); overflow: hidden; visibility: hidden;
}
.detail.is-open { transform: translateY(0); visibility: visible; }
.detail__close {
  position: fixed; top: 22px; right: var(--pad); z-index: 1010; background: var(--black); color: var(--white);
  border: 0; border-radius: 40px; padding: 12px 22px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer;
}
.detail__scroll { height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }

.dt-hero { position: relative; height: 92vh; width: 100%; overflow: hidden; }
.dt-hero img { width: 100%; height: 100%; object-fit: cover; }
.dt-hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.42) 22%, rgba(0,0,0,0.08) 45%, rgba(0,0,0,0) 62%);
}
.dt-hero__cap {
  position: absolute; left: var(--pad); bottom: var(--pad); right: var(--pad); color: #fff;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
}
.dt-hero__title { font-family:'Archivo Expanded','Archivo',sans-serif; font-weight: 900; font-size: clamp(40px, 9vw, 150px); line-height: 0.86; letter-spacing: -0.03em; text-transform: uppercase; text-shadow: 0 2px 50px rgba(0,0,0,0.42), 0 1px 4px rgba(0,0,0,0.30); }
.dt-hero__sub { font-size: clamp(14px, 1.6vw, 20px); font-weight: 500; text-shadow: 0 1px 12px rgba(0,0,0,0.5); }

.dt-body { padding: clamp(50px, 8vw, 120px) var(--pad); display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.dt-meta { display: flex; flex-direction: column; gap: 22px; }
.dt-meta__row { border-top: 1px solid var(--line); padding-top: 12px; }
.dt-meta__row dt { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); margin-bottom: 4px; }
.dt-meta__row dd { font-size: clamp(16px,1.6vw,20px); font-weight: 600; }
.dt-copy__intro { font-size: clamp(22px, 3vw, 40px); line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 34px; }
.dt-copy__body p { font-size: clamp(16px, 1.7vw, 21px); line-height: 1.55; margin-bottom: 22px; color: #222; max-width: 62ch; }

.dt-gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(8px, 1vw, 16px); padding: clamp(8px,1vw,16px); }
.dt-gallery figure { overflow: hidden; background: #eee; cursor: zoom-in; }
.dt-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.dt-gallery figure:hover img { transform: scale(1.03); }
.dt-gallery .g-wide { grid-column: span 12; aspect-ratio: 21/9; }
.dt-gallery .g-half { grid-column: span 6; aspect-ratio: 4/3; }
.dt-gallery .g-third { grid-column: span 4; aspect-ratio: 3/4; }

.dt-drawings { padding: clamp(50px,8vw,110px) var(--pad); border-top: 1px solid var(--line); }
.dt-drawings h3, .dt-gallery-head { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey); margin-bottom: 24px; padding: 0 var(--pad); font-weight: 600; }
.dt-drawings h3 { padding: 0; }
.dt-drawings__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.dt-drawings figure { border: 1px solid var(--line); background: var(--white); padding: 14px; cursor: zoom-in; }
.dt-drawings img { width: 100%; height: auto; }
.dt-drawings figcaption { margin-top: 12px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); font-weight: 600; display: flex; justify-content: space-between; gap: 10px; }
.dt-drawings figcaption em { font-style: normal; color: var(--black); opacity: 0; transition: opacity 0.3s var(--ease); }
.dt-drawings figure:hover figcaption em { opacity: 1; }
/* Stacked, full-width boards (e.g. micro-house): each takes the full page width */
.dt-boards { display: flex; flex-direction: column; gap: clamp(24px, 4vw, 56px); }
.dt-boards figure { width: 100%; border: 1px solid var(--line); background: var(--white); padding: clamp(10px, 1.6vw, 22px); cursor: zoom-in; }
.dt-boards img { width: 100%; height: auto; display: block; }
.dt-boards figcaption { margin-top: 14px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); font-weight: 600; display: flex; justify-content: space-between; gap: 10px; }
.dt-boards figcaption em { font-style: normal; color: var(--black); }
.dt-next { padding: clamp(50px,8vw,120px) var(--pad); border-top: 1px solid var(--line); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.dt-next__label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); }
.dt-next__title { font-family:'Archivo Expanded','Archivo',sans-serif; font-weight: 800; font-size: clamp(28px, 6vw, 90px); text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.95; }
.dt-next:hover .dt-next__title { text-decoration: underline; }

/* ============ LIGHTBOX ============ */
.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(8,8,8,0.94); display: none; flex-direction: column; }
.lightbox.is-open { display: flex; }
.lightbox__bar { flex: 0 0 auto; height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; background: #0a0a0a; border-bottom: 1px solid rgba(255,255,255,0.14); }
.lightbox__stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox iframe { display: none; width: 100%; height: 100%; border: 0; background: #fff; }
.lightbox__close { background: none; border: 1px solid rgba(255,255,255,0.4); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; padding: 9px 18px; border-radius: 30px; }
.lightbox__close:hover { background: rgba(255,255,255,0.12); }
.lightbox__open { display: none; align-items: center; gap: 6px; color: #fff; border: 1px solid rgba(255,255,255,0.4); padding: 9px 18px; border-radius: 30px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lightbox__open:hover { background: rgba(255,255,255,0.12); }

/* ============ REVEAL ANIM ============ */
[data-reveal] { opacity: 0; transform: translateY(26px); }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__menu { display: flex; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 340px; }
  .dt-body { grid-template-columns: 1fr; }
  .contact__links { grid-template-columns: 1fr; }
  .contact__link + .contact__link { border-left: 0; padding-left: 0; }
  .dt-gallery .g-third { grid-column: span 6; }
  .project__info { flex-direction: column; }
}
@media (max-width: 540px) {
  .dt-gallery .g-half, .dt-gallery .g-third { grid-column: span 12; }
  .hero__scroll span:first-child { display: none; }
}

/* Mobile: show every content image in full (no cropping), and let the
   container collapse to the image's real height (no empty boxes). The
   !important overrides the more specific desktop aspect-ratio rules. */
@media (max-width: 768px) {
  .project__media { aspect-ratio: auto !important; height: auto !important; }
  .project__media img { position: static; width: 100%; height: auto !important; object-fit: fill; transform: none !important; }
  .dt-hero { height: auto !important; }
  .dt-hero img { height: auto !important; }
  .dt-gallery { grid-template-columns: 1fr; }
  .dt-gallery figure,
  .dt-gallery figure.g-wide,
  .dt-gallery figure.g-half,
  .dt-gallery figure.g-third { aspect-ratio: auto !important; height: auto !important; grid-column: auto !important; cursor: zoom-in; }
  .dt-gallery img { height: auto !important; object-fit: fill; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
