/* ============================================================
   DWG Design Studio — fonts
   ============================================================ */
@font-face {
  font-family: "Montserrat";
  src: url("Montserrat-Medium.ttf") format("truetype");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --red:   #ff2e17;
  --ink:   #141414;
  --paper: #f4f1ea;
  --paper-2: #e7e1d6;
  --dark:  #111110;
  --dark-2: #1b1a18;
  --muted: #8d877d;
  --line:  rgba(20,20,20,0.16);

  --bg: var(--paper);
  --fg: var(--ink);
  --logo-color: var(--ink);

  --bar-h: clamp(40px, 4.6vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: var(--dark);
  --fg: #f1ede5;
  --paper: var(--dark);
  --paper-2: var(--dark-2);
  --line: rgba(241,237,229,0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--red); color: #fff; }

/* ============================================================
   NAV BARS (top + bottom)
   ============================================================ */
.bar {
  position: fixed;
  left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  height: var(--bar-h);
  padding: 0 clamp(16px, 3vw, 44px);
  pointer-events: none;
  font-size: clamp(10px, 0.82vw, 12.5px);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.bar--top { top: 0; color: var(--bar-top-color, var(--fg)); transition: color .4s var(--ease); }
.bar--bottom { bottom: 0; color: var(--bar-bottom-color, var(--fg)); transition: color .4s var(--ease); }
.bar > * { pointer-events: auto; }   /* re-enable clicks on nav groups; empty bar area passes through */

.nav-group { display: flex; align-items: center; gap: clamp(12px, 1.7vw, 28px); }

.nav-link { position: relative; opacity: .8; padding: 8px 0; transition: opacity .25s var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"] { opacity: 1; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 4px; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

/* category sub-nav (buttons) */
.subnav { display: flex; align-items: center; gap: clamp(10px, 1.5vw, 24px); }
.subnav__item {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  opacity: .5; padding: 8px 0; position: relative; transition: opacity .25s var(--ease);
}
.subnav__item:hover { opacity: .85; }
.subnav__item.is-active { opacity: 1; }
.subnav__item.is-active::after {
  content: ""; position: absolute; left: 0; bottom: 4px; height: 1.5px; width: 100%; background: currentColor;
}

/* theme toggle */
.toggle-wrap { display: flex; align-items: center; }
.toggle {
  appearance: none; cursor: pointer; width: 34px; height: 18px; border-radius: 20px;
  border: 1.5px solid currentColor; background: none; padding: 0; position: relative; opacity: .8;
}
.toggle__knob {
  position: absolute; top: 50%; left: 2.5px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--red); transform: translateY(-50%); transition: left .3s var(--ease), background .3s var(--ease);
}
[data-theme="dark"] .toggle__knob { left: calc(100% - 13.5px); background: var(--fg); }

/* hide category sub-nav on the home page; keep the single (bottom) menu right-aligned */
[data-page="home"] .subnav { display: none; }
[data-page="home"] .bar { justify-content: flex-end; }

/* ============================================================
   STRETCHY DWG LOGO
   ============================================================ */
.logo {
  position: fixed; left: 0; top: 0; width: 100%;
  height: clamp(74px, 11vw, 140px);
  z-index: 30; pointer-events: none; display: block;
}
.logo svg { display: block; width: 100%; height: 100%; overflow: visible; }
.logo .glyph { fill: var(--logo-color); stroke: none; pointer-events: auto; cursor: pointer; transition: fill .16s var(--ease); }

/* interior pages: smaller logo, pushed to the right */
[data-logo-mode="static-right"] .logo { height: clamp(54px, 7vw, 92px); }

/* ============================================================
   HOME — full-screen project heroes
   ============================================================ */
.hero {
  position: relative; height: 100svh; width: 100%; overflow: hidden;
}
.hero .hero__media { position: absolute; inset: 0; }
.hero__title {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); text-align: center; width: min(90%, 680px);
  z-index: 5; color: var(--red);
}
.hero__title.is-white { color: #f7f4ef; }
.hero__title.is-dark  { color: var(--ink); }
.hero__title h1 {
  margin: 0; font-size: clamp(18px, 1.9vw, 28px); font-weight: 600; letter-spacing: .04em;
}
.hero__title p { margin: 5px 0 0; font-size: clamp(11px, .95vw, 14px); opacity: .92; }

/* progress dots */
.dots {
  position: fixed; right: clamp(16px, 3vw, 44px); bottom: calc(var(--bar-h) + 14px);
  z-index: 35; display: flex; gap: 9px;
}
[data-page="home"] .dots { display: flex; }
.dots { display: none; }
.dots button {
  appearance: none; border: 0; padding: 0; cursor: pointer; width: 8px; height: 8px; border-radius: 50%;
  background: var(--bar-bottom-color, var(--fg)); opacity: .35; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.dots button.is-active { opacity: 1; transform: scale(1.25); }

/* ============================================================
   PLACEHOLDER MEDIA
   ============================================================ */
.ph { position: relative; background-color: var(--paper-2); background-size: cover; background-position: center; overflow: hidden; }
.ph::after {
  content: attr(data-label); position: absolute; left: 14px; bottom: 12px;
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5);
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.16) 1px, transparent 0);
  background-size: 5px 5px; opacity: .22; mix-blend-mode: overlay;
}
.ph--lohia    { background-image: linear-gradient(135deg,#cabfae,#8c7f6c 60%,#5d5343); }
.ph--vivek1   { background-image: linear-gradient(120deg,#b9a98f,#7e6f57 55%,#3f3a31); }
.ph--vivek2   { background-image: linear-gradient(135deg,#e6e0d4,#c8bda8 60%,#a89e8a); }
.ph--kitchen  { background-image: linear-gradient(150deg,#7d6f5b,#473f33); }
.ph--bath     { background-image: linear-gradient(135deg,#9a9c8e,#5b5e50); }
.ph--wardrobe { background-image: linear-gradient(120deg,#cdbfa6,#8f7f63); }
.ph--office   { background-image: linear-gradient(135deg,#c9c2b4,#9a917f); }
.ph--display  { background-image: linear-gradient(150deg,#d8ccb6,#b3a07e); }
.ph--stone    { background-image: linear-gradient(135deg,#b6ada0,#7c7468); }
.ph--court    { background-image: linear-gradient(140deg,#c2b6a2,#6f6657); }
.ph--mag1 { background-image: linear-gradient(160deg,#d9cdb8,#a08c6c); }
.ph--mag2 { background-image: linear-gradient(160deg,#c4c9c1,#7c8378); }
.ph--mag3 { background-image: linear-gradient(160deg,#cdbcae,#8a7464); }
.ph--mag4 { background-image: linear-gradient(160deg,#cbc6bb,#8d8676); }

/* ============================================================
   INTERIOR PAGE SHELL
   ============================================================ */
.page {
  padding: clamp(96px, 12vw, 170px) clamp(16px, 3vw, 44px) calc(var(--bar-h) + 48px);
  min-height: 100svh;
}

/* PORTFOLIO grid */
/* portfolio filter bar (city tabs + count) */
.filters {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: clamp(20px,3vw,40px);
}
.cityfilter { display: flex; flex-wrap: wrap; gap: clamp(12px, 1.8vw, 30px); }
.city {
  appearance: none; border: 0; background: none; cursor: pointer; font: inherit; color: var(--fg);
  font-size: clamp(12px, 1vw, 15px); letter-spacing: .02em; opacity: .45; padding: 6px 0;
  position: relative; transition: opacity .25s var(--ease);
}
.city:hover { opacity: .8; }
.city.is-active { opacity: 1; }
.city.is-active::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--red); }
.work__count { color: var(--muted); font-size: clamp(10px,.82vw,12.5px); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.empty { color: var(--muted); font-size: clamp(14px,1.1vw,17px); padding: 48px 2px; }

/* portfolio: masonry grid of covers (varied ratios) */
.grid { display: flex; align-items: flex-start; gap: clamp(14px, 2vw, 28px); }
.pf-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(14px, 2vw, 28px); will-change: transform; }
.grid .card { display: block; opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.grid .card.in { opacity: 1; transform: none; }

/* project page: floating, scattered collage — images drift on scroll + gently float */
.pf { position: relative; width: 100%; }
.pf-item { position: absolute; will-change: transform; z-index: 2; }
.pf-item__float { animation: floaty 9s ease-in-out infinite; will-change: transform; }
@keyframes floaty { 0%, 100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,-16px,0); } }
.card { display: block; color: inherit; }
.pf .card { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.pf .card.in { opacity: 1; transform: none; }
.card__media { position: relative; display: block; width: 100%; overflow: hidden; background-color: var(--paper-2); box-shadow: 0 30px 60px rgba(0,0,0,.10); }
.card__img, .card__fill { display: block; width: 100%; transition: transform .7s var(--ease); }
.card__fill { position: absolute; inset: 0; height: 100%; }
.card__img { height: auto; }
.card:hover .card__img, .card:hover .card__fill { transform: scale(1.06); }
.pf .card__meta { display: none; }   /* the centred name replaces per-image captions */

/* centred project name (shows when a filter is active / nearest project while scrolling) */
.pfname { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 6;
  text-align: center; color: var(--red); pointer-events: none; width: max-content; max-width: 86vw;
  opacity: 0; transition: opacity .5s var(--ease); }
.pfname.is-on { opacity: 1; }
.pfname__t { display: block; font-size: clamp(15px, 1.5vw, 24px); font-weight: 600; letter-spacing: .04em; }
.pfname__s { display: block; font-size: clamp(11px, 1vw, 15px); margin-top: 6px; font-weight: 500; }

/* fallback selector kept for non-floating contexts */
.card__meta { font-size: clamp(11px,.86vw,13px); }
.card__name { font-weight: 600; margin-right: auto; }
.card__detail { color: var(--muted); }

/* section title */
.section-title { font-size: clamp(40px, 10vw, 150px); font-weight: 600; letter-spacing: -.02em; line-height: .9; margin: 0 0 clamp(28px,5vw,72px); }

/* AWARDS */
.awards__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px,3vw,50px); align-items: end; }
.award { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.award__obj { height: clamp(150px,22vw,320px); width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.award__obj::before { content: ""; display: block; filter: drop-shadow(0 24px 30px rgba(0,0,0,.22)); }
.award__obj--triangle::before { width: 45%; aspect-ratio: 1; background: linear-gradient(120deg,#caa86a,#8a6f3c); clip-path: polygon(50% 0,100% 100%,0 100%); }
.award__obj--wedge::before { width: 60%; aspect-ratio: .95; background: linear-gradient(110deg,#b9bdc0 0 50%,#7c5a3c 50% 100%); clip-path: polygon(0 0,100% 14%,78% 100%,18% 100%); }
.award__obj--column::before { width: 26%; height: 100%; background: repeating-linear-gradient(135deg,#3a3a3a 0 14px,#b89248 14px 28px); clip-path: polygon(20% 0,80% 0,72% 100%,28% 100%); }
.award__obj--terrazzo::before { width: 42%; aspect-ratio: .7;
  background: radial-gradient(circle at 30% 20%,#3a3a3a 3px,transparent 4px), radial-gradient(circle at 70% 55%,#8a6f3c 4px,transparent 5px), radial-gradient(circle at 45% 80%,#5d5343 3px,transparent 4px), linear-gradient(160deg,#ded6c2,#c3b69b);
  clip-path: polygon(28% 0,72% 6%,86% 100%,14% 100%); }
.award figcaption { margin-top: 22px; font-size: clamp(11px,.9vw,14px); font-weight: 600; display: flex; flex-direction: column; gap: 3px; }
.award figcaption span { color: var(--muted); font-weight: 400; }

/* MAGAZINES */
.mags { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px,2.4vw,36px); }
.mag { display: flex; flex-direction: column; gap: 14px; }
.mag__cover { aspect-ratio: 3/4; transition: transform .5s var(--ease); }
.mag:hover .mag__cover { transform: translateY(-6px); }
.mag span { font-size: clamp(11px,.86vw,13px); opacity: .8; }

/* ABOUT */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(20px,4vw,70px); align-items: start; }
.about__lead { font-size: clamp(18px,2.2vw,34px); font-weight: 500; line-height: 1.28; letter-spacing: -.01em; margin: 0; }
.about__col h3 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.about__col p { margin: 0; line-height: 1.6; font-size: clamp(13px,1vw,15px); }
.about__col a:hover { color: var(--red); }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .subnav { display: none !important; }
  .card, .card--tall, .card--wide { grid-column: span 6; grid-row: auto; }
  .card--tall .card__media { aspect-ratio: 4/3; height: auto; }
  .awards__row { grid-template-columns: repeat(2,1fr); gap: 30px 20px; }
  .mags { grid-template-columns: repeat(2,1fr); }
  .about__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav-group { gap: 12px; }
  .card, .card--tall, .card--wide { grid-column: span 12; }
  .awards__row { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}

/* ============================================================
   PROJECT CARDS AS LINKS + DETAIL PAGE
   ============================================================ */
.card { color: inherit; }
.card__media { position: relative; }
.card__count {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(0,0,0,.55); color: #fff; padding: 5px 9px; border-radius: 20px;
}

.project .back {
  display: inline-block; font-size: clamp(11px,.9vw,13px); letter-spacing: .04em;
  color: var(--muted); margin-bottom: clamp(20px,3vw,40px);
}
.project .back:hover { color: var(--fg); }
.project__head {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px 24px;
  border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: clamp(20px,3vw,40px);
}
.project__name { margin: 0; font-size: clamp(28px,5vw,64px); font-weight: 600; letter-spacing: -.02em; }
.project__meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: clamp(11px,.9vw,13px); color: var(--muted); }
.project__type { text-transform: capitalize; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(12px,1.6vw,24px); }
.gallery__item { margin: 0; overflow: hidden; background: var(--paper-2); aspect-ratio: 4/3; }
.gallery__item--lead { grid-column: 1 / -1; aspect-ratio: 16/9; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }

/* ============================================================
   AWARDS — centered infinite marquee of revolving objects
   ============================================================ */
.awards-page { min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.marquee { width: 100%; overflow: hidden; }
.marquee__track { display: flex; align-items: center; gap: clamp(44px, 7vw, 120px); width: max-content; will-change: transform; padding: 0 6vw; }
.trophy { flex: none; margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.trophy__stage { width: clamp(150px, 17vw, 270px); height: clamp(200px, 24vw, 340px);
  display: flex; align-items: center; justify-content: center; perspective: 900px; }
.trophy__obj { width: 62%; aspect-ratio: 1; transform-style: preserve-3d; animation: sway 5.5s ease-in-out infinite;
  filter: drop-shadow(0 26px 30px rgba(0,0,0,.22)); }
.trophy__img { max-height: 100%; max-width: 82%; object-fit: contain; animation: sway 6.5s ease-in-out infinite; }
.trophy__canvas { width: 100%; height: 100%; display: block; }
@keyframes sway { 0%, 100% { transform: rotateY(-38deg); } 50% { transform: rotateY(38deg); } }

.trophy__obj--triangle { background: linear-gradient(120deg,#caa86a,#8a6f3c); clip-path: polygon(50% 0,100% 100%,0 100%); }
.trophy__obj--wedge { width: 74%; background: linear-gradient(110deg,#b9bdc0 0 50%,#7c5a3c 50% 100%); clip-path: polygon(0 0,100% 14%,78% 100%,18% 100%); }
.trophy__obj--column { width: 34%; aspect-ratio: .4; background: repeating-linear-gradient(135deg,#3a3a3a 0 14px,#b89248 14px 28px); clip-path: polygon(20% 0,80% 0,72% 100%,28% 100%); }
.trophy__obj--terrazzo { width: 54%; aspect-ratio: .7;
  background: radial-gradient(circle at 30% 20%,#3a3a3a 3px,transparent 4px), radial-gradient(circle at 70% 55%,#8a6f3c 4px,transparent 5px), radial-gradient(circle at 45% 80%,#5d5343 3px,transparent 4px), linear-gradient(160deg,#ded6c2,#c3b69b);
  clip-path: polygon(28% 0,72% 6%,86% 100%,14% 100%); }

.trophy__cap { margin-top: 26px; font-size: clamp(11px,.9vw,14px); font-weight: 600; display: flex; flex-direction: column; gap: 3px; }
.trophy__cap span { color: var(--muted); font-weight: 400; }

@media (prefers-reduced-motion: reduce) { .trophy__obj, .trophy__img { animation: none; } }

/* ============================================================
   ABOUT — elaborated + founders
   ============================================================ */
.about__lead { font-size: clamp(20px,2.6vw,40px); font-weight: 400; line-height: 1.24; letter-spacing: -.01em; margin: 0 0 clamp(36px,6vw,80px); max-width: 22ch; }
.about__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px,4vw,64px); align-items: start; }
.about__block h3 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.about__block p { margin: 0; line-height: 1.65; font-size: clamp(13px,1vw,15px); }
.about__block a:hover { color: var(--red); }

.founders { margin-top: clamp(60px,9vw,130px); }
.founders__title { font-size: clamp(13px,1.1vw,15px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 clamp(22px,3vw,40px); border-top: 1px solid var(--line); padding-top: 22px; }
.founders__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px,4vw,56px); }
.founder { margin: 0; }
.founder__photo { display: block; width: 100%; aspect-ratio: 4/5; border-radius: 2px; }
.founder__cap { display: flex; flex-direction: column; gap: 3px; padding-top: 16px; }
.founder__name { font-size: clamp(16px,1.5vw,22px); font-weight: 600; }
.founder__role { font-size: clamp(11px,.9vw,13px); color: var(--muted); letter-spacing: .04em; }

@media (max-width: 900px) {
  .about__cols { grid-template-columns: 1fr; }
  .founders__grid { grid-template-columns: 1fr; }
}

/* awards: draggable to spin */
.trophy { cursor: grab; }
.trophy.grabbing { cursor: grabbing; }
.trophy__stage { touch-action: none; }

/* ============================================================
   LIGHTBOX (project galleries)
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(15,14,13,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 88vw; max-height: 86vh; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox__close, .lightbox__nav { appearance: none; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1; transition: background .2s var(--ease); display: flex; align-items: center; justify-content: center; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__close { position: absolute; top: 18px; right: 24px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 20px; } .lightbox__next { right: 20px; }
.lightbox__count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: 12px; letter-spacing: .12em; }
.gallery__item { cursor: zoom-in; }

/* about: founder bios + social */
.founder__bio { margin: 12px 0 0; font-size: clamp(13px,1vw,15px); line-height: 1.6; opacity: .85; max-width: 42ch; }
.about__social { margin-top: 14px; }
.about__social a { border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.about__social a:hover { color: var(--red); }
