:root {
  --bg: #f7f5f2;
  --bg-cream: #efeae4;
  --ink: #121110;
  --ink-soft: #4a4541;
  --ink-muted: #8a837c;
  --line: rgba(18, 17, 16, 0.12);
  --white: #ffffff;
  --accent: #9a8b7a;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 90px;
  --container: min(1280px, 92vw);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: rgba(154, 139, 122, 0.25); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }

h1, h2, h3, h4, .logo, .hero-title, .intro-quote, .section-head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  color: var(--ink);
  font-style: normal;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: var(--container); margin: 0 auto; }
.section { padding: clamp(88px, 12vw, 140px) 0; }
.bg-cream { background: var(--bg-cream); }

.tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-head--center { text-align: center; max-width: 640px; margin: 0 auto; }

/* Loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--white);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.loader-bar {
  width: 120px;
  height: 1px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}
.loader-bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 40%;
  background: var(--white);
  animation: loadBar 1.2s var(--ease) infinite;
}
@keyframes loadBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.header.is-solid {
  background: rgba(247, 245, 242, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--line);
}
.header.is-solid .logo,
.header.is-solid .nav-desktop a:not(.nav-cta),
.header.is-solid .menu-toggle span {
  color: var(--ink);
}
.header-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: 0.04em;
  color: var(--white);
  transition: color 0.4s var(--ease);
}
.logo em { font-style: italic; font-weight: 400; opacity: 0.85; }
.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 40px);
}
.nav-desktop a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  transition: opacity 0.3s;
}
.nav-desktop a:hover { opacity: 0.65; }
.nav-cta {
  padding: 12px 22px;
  border: 1px solid rgba(255,255,255,0.45);
  transition: all 0.35s var(--ease) !important;
}
.header.is-solid .nav-cta {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white) !important;
}
.header.is-solid .nav-cta:hover {
  background: transparent;
  color: var(--ink) !important;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--white);
  transition: all 0.35s var(--ease);
}
.header.is-solid .menu-toggle span { background: var(--ink); }
.menu-toggle.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.menu-overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.menu-overlay-nav a {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--white);
  padding: 8px 0;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.menu-overlay-nav a:hover { opacity: 0.55; transform: translateX(8px); }
.menu-overlay-meta {
  position: absolute;
  bottom: 48px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(48px, 8vw, 80px);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s var(--ease), transform 8s linear;
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18,17,16,0.35) 0%, transparent 35%),
    linear-gradient(0deg, rgba(18,17,16,0.75) 0%, rgba(18,17,16,0.2) 45%, transparent 70%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--header-h);
  max-width: 900px;
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  line-height: 0.95;
  color: var(--white);
  margin-bottom: 28px;
  font-weight: 400;
}
.hero-title .line { display: block; }
.hero-title .accent { font-style: italic; opacity: 0.92; }
.hero-lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.78);
  max-width: 480px;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  transition: gap 0.4s var(--ease), border-color 0.3s;
}
.hero-cta:hover { gap: 24px; border-color: var(--white); }
.hero-cta-arrow { font-size: 1.2rem; transition: transform 0.4s var(--ease); }
.hero-cta:hover .hero-cta-arrow { transform: translateX(4px); }

.hero-floor-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(48px, 8vh, 80px);
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.floor-tabs { display: flex; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; }
.floor-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: rgba(255,255,255,0.45);
  padding: 0 0 8px;
  border-bottom: 2px solid transparent;
  transition: all 0.4s var(--ease);
}
.floor-tab:hover { color: rgba(255,255,255,0.8); }
.floor-tab.is-active {
  color: var(--white);
  border-bottom-color: var(--white);
}
.hero-arrows { display: flex; gap: 12px; }
.arrow-btn {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.35s var(--ease);
}
.arrow-btn:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}

.scroll-hint {
  position: absolute;
  right: clamp(24px, 5vw, 48px);
  bottom: clamp(120px, 18vh, 180px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Intro */
.intro-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: clamp(48px, 8vw, 72px);
}
.intro-label {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 8px;
}
.intro-quote {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.35;
  margin-bottom: 48px;
  font-style: italic;
  font-weight: 400;
}
.intro-stats {
  display: flex;
  gap: clamp(32px, 6vw, 72px);
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.intro-stats strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}
.intro-stats span {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Projects */
.projects { padding-top: 0; }
.project-list { margin-bottom: clamp(48px, 8vw, 80px); }
.project-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: clamp(380px, 50vh, 520px);
  color: var(--ink);
  border-top: 1px solid var(--line);
  transition: background 0.5s var(--ease);
}
.project-row:hover { background: var(--bg-cream); }
.project-row--reverse { direction: rtl; }
.project-row--reverse > * { direction: ltr; }
.project-row-media {
  background-size: cover;
  background-position: center;
  min-height: 100%;
  transform: scale(1);
  transition: transform 1.2s var(--ease-out);
}
.project-row:hover .project-row-media { transform: scale(1.04); }
.project-row-info {
  padding: clamp(40px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-index {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  margin-bottom: 20px;
}
.project-row-info h3 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
  font-weight: 500;
}
.project-row-info p {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}
.project-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s var(--ease);
}
.project-row:hover .project-link {
  opacity: 1;
  transform: translateY(0);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: 12px;
}
.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.project-card--tall { grid-row: span 2; }
.project-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1s var(--ease-out);
}
.project-card:hover .project-card-img { transform: scale(1.08); }
.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18,17,16,0.85) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.project-card:hover .project-card-overlay { opacity: 1; }
.project-card-overlay h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 4px;
}
.project-card-overlay span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* Studio */
.studio-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.studio-image {
  position: relative;
  overflow: hidden;
}
.studio-image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: grayscale(15%);
  transition: transform 1.2s var(--ease-out), filter 0.6s;
}
.studio-image:hover img {
  transform: scale(1.03);
  filter: grayscale(0%);
}
.studio-image-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(18,17,16,0.6);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
}
.studio-text h2 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  margin-bottom: 28px;
  line-height: 1.15;
}
.studio-text p {
  margin-bottom: 20px;
  font-size: 1.05rem;
}
.studio-list {
  list-style: none;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.studio-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Approach */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
  margin-top: 56px;
}
.approach-item {
  padding: clamp(32px, 4vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.approach-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(18,17,16,0.08);
}
.approach-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 20px;
  display: block;
}
.approach-item h3 {
  font-size: 1.75rem;
  margin-bottom: 14px;
}
.approach-item p { font-size: 0.95rem; }

/* Contact */
.contact {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
}
.contact .tag { color: rgba(255,255,255,0.45); }
.contact h2 {
  color: var(--white);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  margin-bottom: 20px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact-details {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact-details strong {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}
.contact-details a {
  color: var(--white);
  transition: opacity 0.3s;
}
.contact-details a:hover { opacity: 0.7; }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 16px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.3s, background 0.3s;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: rgba(255,255,255,0.35); }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
}
.form-row select option { background: var(--ink); color: var(--white); }
.btn-submit {
  margin-top: 8px;
  padding: 18px 32px;
  background: var(--white);
  color: var(--ink);
  border: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.btn-submit:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-muted);
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--ink);
}
.footer-top {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.footer-top:hover { color: var(--ink); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }
  .project-card--tall { grid-row: span 1; }
  .studio-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .intro-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: flex; }
  .scroll-hint { display: none; }
  .project-row,
  .project-row--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    min-height: auto;
  }
  .project-row-media { min-height: 280px; }
  .approach-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .hero-floor-nav { flex-direction: column; align-items: flex-start; }
  .intro-stats { flex-direction: column; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-slide { transition: opacity 0.3s; }
}
