/* ════════════════════════════════════════════════════════════════════════════
   STONESIDE CUSTOM HOMES — Extraordinary Design System v4
   Updated: Visual improvements, modal nav, process animation, mobile fixes
   ════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════ */
:root {
  /* Colors */
  --black: #0a0a0a;
  --ink: #1a1a1a;
  --charcoal: #2d2d2d;
  --slate: #4a4a4a;
  --stone: #8a8a8a;
  --silver: #b8b8b8;
  --pearl: #e8e8e8;
  --cream: #f5f5f3;
  --white: #fafafa;
  
  /* Accent */
  --bronze: #9d7b5a;
  --bronze-light: #c4a882;
  --bronze-dark: #6b5239;
  
  /* Typography */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 100px;
  
  /* Layout */
  --container: min(1400px, 90vw);
  --header-height: 72px;
  
  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

::selection {
  background: var(--bronze);
  color: var(--white);
}

.container {
  width: var(--container);
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM CURSOR — HIDDEN ON MOBILE/TOUCH DEVICES
═══════════════════════════════════════════════════════════ */
.cursor,
.cursor-glow,
#cursor,
#cursorGlow {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Only show on devices with hover capability (desktop) */
@media (hover: hover) and (pointer: fine) {
  .cursor,
  #cursor {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
  }
  
  .cursor-glow,
  #cursorGlow {
    display: block !important;
    visibility: visible !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(157, 123, 90, 0.15) 0%, transparent 70%);
    opacity: 0 !important;
    transition: opacity 0.5s;
  }
  
  .cursor-icon {
    width: 100%;
    height: 100%;
    color: var(--bronze);
    opacity: 0;
    position: absolute;
    inset: 0;
    transition: opacity 0.2s;
  }
  
  .cursor-icon.active {
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════
   PRELOADER
═══════════════════════════════════════════════════════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--cream);
}

.preloader-inner {
  text-align: center;
}

.preloader-year {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  opacity: 0;
  animation: fadeIn 0.6s var(--ease-out) 0.2s forwards;
}

.year-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--bronze), var(--bronze-light));
}

.preloader-brand {
  display: flex;
  justify-content: center;
  gap: 0.1em;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.brand-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
}

.brand-letter:nth-child(1) { animation: letterReveal 0.8s var(--ease-out) 0.4s forwards; }
.brand-letter:nth-child(2) { animation: letterReveal 0.8s var(--ease-out) 0.45s forwards; }
.brand-letter:nth-child(3) { animation: letterReveal 0.8s var(--ease-out) 0.5s forwards; }
.brand-letter:nth-child(4) { animation: letterReveal 0.8s var(--ease-out) 0.55s forwards; }
.brand-letter:nth-child(5) { animation: letterReveal 0.8s var(--ease-out) 0.6s forwards; }
.brand-letter:nth-child(6) { animation: letterReveal 0.8s var(--ease-out) 0.65s forwards; }
.brand-letter:nth-child(7) { animation: letterReveal 0.8s var(--ease-out) 0.7s forwards; }
.brand-letter:nth-child(8) { animation: letterReveal 0.8s var(--ease-out) 0.75s forwards; }
.brand-letter:nth-child(9) { animation: letterReveal 0.8s var(--ease-out) 0.8s forwards; }

@keyframes letterReveal {
  to { opacity: 1; transform: translateY(0); }
}

.preloader-tagline {
  margin-top: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bronze-light);
  opacity: 0;
  animation: fadeIn 0.6s var(--ease-out) 1.2s forwards;
}

.preloader-progress {
  margin-top: var(--space-xl);
  opacity: 0;
  animation: fadeIn 0.4s var(--ease-out) 1s forwards;
}

.progress-track {
  width: 200px;
  height: 2px;
  margin: 0 auto;
  background: var(--charcoal);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--bronze), var(--bronze-light));
  animation: progressFill 2s var(--ease-in-out) 1s forwards;
}

@keyframes progressFill {
  to { width: 100%; }
}

.preloader-wipe {
  position: absolute;
  inset: 0;
  background: var(--cream);
  transform: translateY(100%);
}

.preloader.exit .preloader-wipe {
  animation: wipeUp 1s var(--ease-in-out) forwards;
}

.preloader.exit .preloader-inner {
  animation: fadeOut 0.4s var(--ease-out) forwards;
}

@keyframes wipeUp { to { transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

.preloader.done { display: none; }

/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  background: transparent;
  transition: background 0.4s, backdrop-filter 0.4s;
}

.header.scrolled {
  background: rgba(245, 245, 243, 0.95);
  backdrop-filter: blur(20px);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-image {
  height: 78px; /* Increased from 52px */
}

@media (max-width: 768px) {
  .logo-image, .footer-logo-img { height: 48px; }
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-item {
  position: relative;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: color 0.3s;
}

.nav-item:hover {
  color: var(--bronze);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.nav-item:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  background: linear-gradient(135deg, var(--ink) 0%, var(--charcoal) 100%);
  border: 1px solid var(--charcoal);
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s var(--ease-out);
}

.header-cta:hover {
  background: linear-gradient(135deg, var(--bronze-dark) 0%, var(--bronze) 100%);
  border-color: var(--bronze);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(157, 123, 90, 0.3);
}

.header-menu {
  display: none;
  width: 32px;
  height: 24px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.menu-line {
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out);
}

.header-menu.active .menu-line:first-child {
  transform: translateY(4px) rotate(45deg);
  background: var(--bronze-light);
}

.header-menu.active .menu-line:last-child {
  transform: translateY(-4px) rotate(-45deg);
  background: var(--bronze-light);
}

@media (max-width: 900px) {
  .header-nav, .header-cta { display: none; }
  .header-menu { display: flex; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE NAV
═══════════════════════════════════════════════════════════ */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  text-align: center;
}

.mobile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 3rem);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), color 0.3s;
}

.mobile-nav.active .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }

.mobile-link:hover { color: var(--bronze-light); }

.mobile-link-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bronze);
}

.mobile-link-cta {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--charcoal);
}

.mobile-nav-footer {
  margin-top: var(--space-2xl);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--stone);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   HERO — Pristine, Professional, Brand-Aligned
═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cream);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink) 1px, transparent 1px);
  background-size: 100px 100px;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-sketch-layer,
.hero-photo-layer {
  position: absolute;
  inset: 0;
}

.hero-sketch,
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-sketch {
  filter: grayscale(1) contrast(1.1) brightness(1.05);
}

.hero-photo-layer {
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  transition: clip-path 1.5s var(--ease-out);
}

.hero.revealed .hero-photo-layer {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(245, 245, 243, 0.75) 0%,
    rgba(245, 245, 243, 0.5) 40%,
    rgba(245, 245, 243, 0.85) 100%
  );
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-height) + var(--space-lg)) var(--space-xl) var(--space-xl);
  min-height: 100vh;
  min-height: 100dvh;
}

/* UPDATED: Top Label - No Glow, Crisp */
.hero-top {
  position: absolute;
  top: calc(var(--header-height) + var(--space-lg));
  left: 0;
  right: 0;
  text-align: center;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
}

.location-dot {
  width: 6px;
  height: 6px;
  background: var(--bronze);
  border-radius: 50%;
}

.hero-center {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

.title-line {
  display: block;
  overflow: hidden;
}

.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: wordReveal 1s var(--ease-out) forwards;
}

.title-line-1 .word:nth-child(1) { animation-delay: 0.2s; }
.title-line-1 .word:nth-child(2) { animation-delay: 0.3s; }
.title-line-2 .word:nth-child(1) { animation-delay: 0.4s; }
.title-line-2 .word:nth-child(2) { animation-delay: 0.5s; }

@keyframes wordReveal {
  to { opacity: 1; transform: translateY(0); }
}

.word-accent {
  font-style: italic;
  color: var(--bronze);
}

/* UPDATED: Divider - Clean, No Glow */
.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-out) 0.8s forwards;
}

.divider-line {
  width: 50px;
  height: 1px;
  background: var(--bronze);
  opacity: 0.3;
}

.divider-year {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.hero-subtitle {
  max-width: 620px;
  margin: 0 auto;
  padding: var(--space-md) 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.8;
  color: var(--charcoal);
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-out) 1s forwards;
}

/* UPDATED: Bottom Layout */
.hero-bottom {
  position: absolute;
  bottom: var(--space-xl);
  left: var(--space-xl);
  right: var(--space-xl);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  /* Add padding to move stats away from edge */
  padding-left: var(--space-2xl);
  padding-right: var(--space-2xl);
}

.hero-stats {
  display: flex;
  gap: var(--space-2xl); /* More space between numbers */
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-out) 1.2s forwards;
}

.stat-item {
  text-align: left;
}

.stat-value {
  display: block;
  font-family: var(--font-body); /* Changed to body font for cleaner look */
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
  color: var(--ink);
  font-weight: 300;
}

.stat-label {
  display: block;
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  font-weight: 600;
}

/* UPDATED: Centered Button */
.hero-cta {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-out) 1.3s forwards;
}

.hero-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 16px 32px; /* Larger click area */
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: all 0.4s var(--ease-out);
}

.hero-btn:hover {
  color: var(--white);
  background: var(--ink);
}

.btn-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--ease-out);
}

.hero-btn:hover .btn-icon {
  transform: translate(3px, -3px);
}

/* UPDATED: Minimal Scroll Indicator */
.hero-scroll {
  /* Moved slightly up */
  position: relative;
  bottom: 10px;
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-out) 1.4s forwards;
}

.scroll-text {
  display: none; /* Hide the text */
}

.scroll-indicator {
  border: 1px solid var(--bronze);
  height: 40px;
  width: 24px;
  border-radius: 12px;
  position: relative;
}

.scroll-dot {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--bronze);
  border-radius: 50%;
  animation: scrollDrop 2s infinite;
}

@keyframes scrollDrop {
  0% { transform: translate(-50%, 0); opacity: 0; }
  20% { opacity: 1; }
  80% { transform: translate(-50%, 15px); opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 900px) {
  .hero-bottom {
    padding-left: 0;
    padding-right: 0;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  
  .hero-cta {
    position: relative;
    left: auto;
    transform: none;
    order: -1; /* Button above stats on mobile */
  }
  
  .hero-stats {
    width: 100%;
    justify-content: center;
    gap: 20px;
  }
  
  .hero-scroll {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   SECTION TAG UTILITY
═══════════════════════════════════════════════════════════ */
.section-tag {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: var(--space-lg);
}

.section-tag::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--bronze);
}

/* ═══════════════════════════════════════════════════════════
   LEGACY SECTION
═══════════════════════════════════════════════════════════ */
.legacy {
  padding: var(--space-2xl) 0;
  background: var(--cream);
}

.legacy-header {
  max-width: 700px;
  margin-bottom: var(--space-xl);
}

.legacy-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.legacy-title em {
  font-style: italic;
  color: var(--bronze);
}

.legacy-lead {
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--charcoal);
}

/* Timeline */
.timeline-wrapper {
  position: relative;
  margin: var(--space-xl) calc(-1 * var(--space-xl));
}

.timeline-track {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 5vw;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}

.timeline-track::-webkit-scrollbar { display: none; }
.timeline-track:active { cursor: grabbing; }

.timeline-item {
  flex: 0 0 min(320px, 75vw);
  scroll-snap-align: start;
  padding: var(--space-lg);
  background: var(--white);
  border: 1px solid var(--pearl);
  border-radius: 8px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.timeline-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 400;
  line-height: 1;
  color: var(--bronze);
  margin-bottom: var(--space-md);
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.timeline-content p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--slate);
}

.timeline-progress {
  margin-top: var(--space-lg);
  padding: 0 5vw;
}

.progress-bar {
  height: 2px;
  background: var(--pearl);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--bronze), var(--bronze-light));
  border-radius: 2px;
  transition: width 0.3s var(--ease-out);
}

.progress-years {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  color: var(--stone);
}

/* Legacy Numbers */
.legacy-numbers {
  margin-top: var(--space-xl);
  padding: var(--space-xl) 0;
  background: var(--white);
  border-top: 1px solid var(--pearl);
  border-bottom: 1px solid var(--pearl);
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  text-align: center;
}

@media (max-width: 768px) {
  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.number-item {
  padding: var(--space-md);
}

.number-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}

.number-suffix {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--bronze);
}

.number-label {
  display: block;
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ═══════════════════════════════════════════════════════════
   PHILOSOPHY — Improved Layout (Balanced)
═══════════════════════════════════════════════════════════ */
.philosophy {
  position: relative;
  padding: var(--space-3xl) 0;
  background: var(--black);
  color: var(--cream);
  overflow: hidden;
}

.philosophy-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.philosophy-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
}

.philosophy-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(157, 123, 90, 0.12), transparent 50%);
}

.philosophy-content {
  position: relative;
  z-index: 1;
}

.philosophy-statement {
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.philosophy-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
}

.philosophy-title em {
  font-style: italic;
  color: var(--bronze-light);
}

/* UPDATED: Aligns text to center vertically */
.philosophy-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-2xl);
  align-items: center; /* This fixes the floating text issue */
  margin-bottom: var(--space-2xl);
}

@media (max-width: 900px) {
  .philosophy-body {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }
}

.philosophy-lead {
  font-size: 1.25rem; /* Slightly larger for better balance */
  font-weight: 300;
  line-height: 1.8;
  color: var(--silver);
  max-width: 90%; /* Keeps lines from getting too long */
}

@media (max-width: 900px) {
  .philosophy-lead {
    margin: 0 auto;
    max-width: 100%;
  }
}

.philosophy-pillars {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.pillar {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: var(--space-lg);
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px; /* Sharper corners */
  transition: all 0.4s var(--ease-out);
}

.pillar:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--bronze);
  transform: translateX(5px);
}

.pillar-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--bronze);
  line-height: 1;
  opacity: 0.8;
}

.pillar-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.pillar-text {
  font-size: 0.9375rem;
  color: var(--stone);
  line-height: 1.5;
}

/* UPDATED: Elegant, centered verse (No heavy box) */
.philosophy-verse {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding-top: var(--space-xl);
}

/* Subtle gold line above verse */
.philosophy-verse::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--bronze);
  margin: 0 auto var(--space-lg);
  opacity: 0.5;
}

.philosophy-verse blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--cream);
  margin-bottom: var(--space-sm);
}

.philosophy-verse cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════
   PORTFOLIO — Better lead text positioning
═══════════════════════════════════════════════════════════ */
.portfolio {
  padding: var(--space-2xl) 0;
  background: var(--cream);
}

/* Portfolio header - title and lead positioned better */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.portfolio-header-left {
  flex: 1;
  min-width: 300px;
}

.portfolio-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}

.portfolio-title em {
  font-style: italic;
  color: var(--bronze);
}

.portfolio-lead {
  max-width: 400px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--charcoal);
  text-align: right;
}

@media (max-width: 768px) {
  .portfolio-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .portfolio-lead {
    text-align: left;
    margin-top: var(--space-md);
  }
}

/* Gallery */
.gallery-wrapper {
  position: relative;
  margin: 0 calc(-1 * var(--space-xl));
}

.gallery-track {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 5vw;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}

.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:active { cursor: grabbing; }

.gallery-item {
  flex: 0 0 min(450px, 80vw);
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.4s var(--ease-out);
}

.gallery-item:hover {
  transform: translateY(-8px);
}

.gallery-media {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.gallery-sketch,
.gallery-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-sketch {
  filter: grayscale(1) contrast(1.1);
}

.gallery-photo {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.gallery-item:hover .gallery-photo {
  opacity: 1;
}

.gallery-tag {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(10, 10, 10, 0.7);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

.gallery-info {
  padding: 0 var(--space-xs);
}

.gallery-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.gallery-location {
  font-size: 0.8125rem;
  color: var(--slate);
}

/* Gallery Controls */
.portfolio-controls {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--pearl);
}

.portfolio-controls .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.gallery-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--slate);
  border-radius: 50%;
  color: var(--ink);
  transition: all 0.3s var(--ease-out);
}

.gallery-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.gallery-btn svg {
  width: 18px;
  height: 18px;
}

.gallery-count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--slate);
}

.count-divider {
  margin: 0 var(--space-xs);
  color: var(--silver);
}

.portfolio-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.3s;
}

.portfolio-cta:hover {
  color: var(--bronze);
}

.portfolio-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease-out);
}

.portfolio-cta:hover svg {
  transform: translate(3px, -3px);
}

/* ═══════════════════════════════════════════════════════════
   PROCESS — Full-width centered title, animated steps
═══════════════════════════════════════════════════════════ */
.process {
  padding: var(--space-2xl) 0;
  background: var(--white);
}

/* Process header - full width centered */
.process-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.process-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}

.process-title em {
  font-style: italic;
  color: var(--bronze);
}

/* Process steps - animated */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
}

/* Desktop Layout (Default) */
.step {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--pearl);
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s var(--ease-out);
}

.step.visible {
  opacity: 1;
  transform: translateX(0);
}

.step:hover {
  background: linear-gradient(90deg, rgba(157, 123, 90, 0.03), transparent);
  padding-left: calc(var(--space-lg) + 10px);
}

.step-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--pearl);
  transition: all 0.4s var(--ease-out);
}

.step:hover .step-number {
  color: var(--bronze);
  transform: scale(1.1);
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--ink);
  transition: color 0.3s;
}

.step:hover .step-title {
  color: var(--bronze);
}

.step-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--slate);
}

.step-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  color: var(--bronze);
  background: rgba(157, 123, 90, 0.08);
  border-radius: 50%;
  opacity: 0.5;
  transition: all 0.4s var(--ease-out);
}

.step:hover .visual-icon {
  opacity: 1;
  transform: rotate(10deg) scale(1.1);
  background: rgba(157, 123, 90, 0.15);
}

/* ═══════════════════════════════════════════════════════════
   PROCESS MOBILE OVERRIDES (Placed at the end for priority)
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .step {
    /* 2 Columns: Number on left, Text on right */
    grid-template-columns: 50px 1fr; 
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    align-items: flex-start; /* Align number with top of text */
  }

  .step-number {
    font-size: 2rem; 
    line-height: 1.1;
  }

  /* Hide the icon to fix the layout break */
  .step-visual {
    display: none !important; 
  }

  .step-content {
    text-align: left; 
  }
}

/* ═══════════════════════════════════════════════════════════
   TESTIMONIALS — Editorial Masonry Layout
═══════════════════════════════════════════════════════════ */
.testimonial {
  position: relative;
  padding: var(--space-3xl) 0;
  background-color: var(--cream);
  /* Subtle pattern overlay */
  background-image: radial-gradient(var(--pearl) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow: hidden;
}

.testimonial-content {
  position: relative;
  z-index: 2;
}

/* Masonry Layout for organic flow */
.testimonials-grid {
  column-count: 2;
  column-gap: var(--space-lg);
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .testimonials-grid {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .testimonials-grid {
    column-count: 1;
  }
}

.testimonial-card {
  break-inside: avoid; /* Prevents card from splitting across columns */
  background: var(--white);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg); /* Bottom spacing for masonry items */
  border-radius: 4px;
  border-left: 4px solid var(--bronze); /* Thicker, more substantial accent */
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.02), 
    0 10px 15px -3px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 10px 20px -5px rgba(0, 0, 0, 0.05), 
    0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Quote Mark */
.testimonial-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--bronze);
  opacity: 0.2;
  margin-bottom: -10px; /* Pull closer to text */
  margin-left: -2px;
}

/* The Quote Text */
.testimonial-quote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: var(--space-lg);
  position: relative;
}

/* Author Section */
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: var(--space-md);
  border-top: 1px solid var(--pearl);
}

.author-name {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--charcoal);
  text-transform: uppercase;
}

.author-detail {
  font-family: var(--font-mono);
  font-size: 0.625rem; /* Small & sharp */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* ═══════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════ */
.contact {
  position: relative;
  padding: var(--space-2xl) 0;
  background: var(--cream);
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.contact-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--pearl) 1px, transparent 1px),
    linear-gradient(90deg, var(--pearl) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.4;
}

.contact-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.contact-title em {
  font-style: italic;
  color: var(--bronze);
}

.contact-lead {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--charcoal);
  margin-bottom: var(--space-lg);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.detail-item {
  display: flex;
  gap: var(--space-md);
}

.detail-label {
  width: 70px;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
}

.detail-value {
  font-size: 0.875rem;
  color: var(--ink);
}

.detail-value a {
  color: var(--ink);
  transition: color 0.3s;
}

.detail-value a:hover {
  color: var(--bronze);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--white);
  padding: var(--space-xl);
  border: 1px solid var(--pearl);
  border-radius: 12px;
}

.form-row {
  margin-bottom: var(--space-md);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--pearl);
  border-radius: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(157, 123, 90, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  background: linear-gradient(135deg, var(--ink) 0%, var(--charcoal) 100%);
  border: 1px solid var(--charcoal);
  border-radius: 0;
  transition: all 0.3s var(--ease-out);
}

.form-submit:hover {
  background: linear-gradient(135deg, var(--bronze-dark) 0%, var(--bronze) 100%);
  border-color: var(--bronze);
  transform: translateY(-2px);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-arrow {
  font-size: 1.125rem;
  transition: transform 0.3s var(--ease-out);
}

.form-submit:hover .submit-arrow {
  transform: translateX(4px);
}

.form-success {
  display: none;
  padding: var(--space-md);
  text-align: center;
  color: var(--bronze);
  background: rgba(157, 123, 90, 0.1);
  border-radius: 8px;
}

.form-success.visible {
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER — Simplified
═══════════════════════════════════════════════════════════ */
.footer {
  padding: var(--space-xl) 0;
  background: var(--ink);
  color: var(--cream);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer-logo-img {
  height: 75px; /* Increased from 50px */
  opacity: 1; /* Remove transparency for crispness */
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--stone);
}

@media (max-width: 768px) {
  .footer-logo-img {
    height: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════
   PROJECT MODAL — Larger, no scroll, with navigation
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.5s var(--ease-out);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  background: rgba(10, 10, 10, 0.6);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  transition: background 0.3s, transform 0.3s;
}

.modal-close:hover {
  background: rgba(10, 10, 10, 0.9);
  transform: rotate(90deg);
}

/* Modal Navigation Arrows */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  background: rgba(10, 10, 10, 0.6);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}

.modal-nav:hover {
  background: var(--bronze);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
  left: var(--space-md);
}

.modal-nav.next {
  right: var(--space-md);
}

.modal-nav svg {
  width: 24px;
  height: 24px;
}

.modal-nav.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Modal Content - No scroll */
.modal-content {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  height: auto;
  max-height: 90vh;
}

@media (max-width: 900px) {
  .modal-content {
    grid-template-columns: 1fr;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .modal-nav {
    display: none;
  }
  
  .modal {
    max-height: 90vh;
    margin: var(--space-sm);
  }
}

@media (max-width: 600px) {
  .modal-overlay {
    padding: var(--space-sm);
  }
  
  .modal {
    border-radius: 12px;
  }
  
  .modal-info {
    padding: var(--space-md);
  }
}

.modal-gallery {
  position: relative;
  aspect-ratio: 4/3;
  max-height: 70vh;
}

@media (max-width: 900px) {
  .modal-gallery {
    aspect-ratio: 16/10;
    max-height: 40vh;
  }
}

.modal-images {
  position: absolute;
  inset: 0;
}

.modal-sketch,
.modal-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-sketch {
  filter: grayscale(1) contrast(1.1) brightness(1.05);
}

.modal-photo {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.8s var(--ease-out);
}

.modal-images.revealed .modal-photo {
  clip-path: inset(0 0 0 0);
}

.modal-reveal {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(10, 10, 10, 0.7);
  border-radius: 0;
  backdrop-filter: blur(8px);
  transition: background 0.3s;
}

.modal-reveal:hover {
  background: var(--bronze);
}

/* Modal Info */
.modal-info {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-header {
  margin-bottom: var(--space-lg);
}

.modal-type {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bronze);
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--ink);
  margin: var(--space-xs) 0;
}

.modal-location {
  font-size: 0.875rem;
  color: var(--stone);
}

.modal-description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--charcoal);
  margin-bottom: var(--space-lg);
}

.modal-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--pearl);
  border-bottom: 1px solid var(--pearl);
  margin-bottom: var(--space-lg);
}

@media (max-width: 600px) {
  .modal-specs {
    grid-template-columns: repeat(2, 1fr);
  }
}

.modal-spec {
  text-align: center;
}

.spec-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
}

.modal-verse {
  padding: var(--space-md);
  background: linear-gradient(135deg, rgba(157, 123, 90, 0.1), rgba(157, 123, 90, 0.05));
  border-left: 2px solid var(--bronze);
  border-radius: 0 8px 8px 0;
  margin-bottom: var(--space-lg);
}

.modal-verse blockquote {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
}

.modal-verse cite {
  display: block;
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* View Details Button */
.modal-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: auto;
}

.modal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px var(--space-lg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  transition: all 0.3s var(--ease-out);
}

.modal-btn-primary {
  color: var(--cream);
  background: linear-gradient(135deg, var(--ink) 0%, var(--charcoal) 100%);
  border: 1px solid var(--charcoal);
}

.modal-btn-primary:hover {
  background: linear-gradient(135deg, var(--bronze-dark) 0%, var(--bronze) 100%);
  border-color: var(--bronze);
  transform: translateY(-2px);
}

.modal-btn-secondary {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
}

.modal-btn-secondary:hover {
  color: var(--cream);
  background: var(--ink);
}

.modal-btn svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
═══════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
═══════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ═══════════════════════════════════════════════════════════
   MOBILE & RESPONSIVE REPAIRS (The Fix)
═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  :root {
    --header-height: 60px;
    --space-xl: 32px;
    --space-2xl: 48px;
  }

  /* 1. HERO FIX: Remove overlap, use flex column */
  .hero-content {
    padding: calc(var(--header-height) + 20px) 20px 40px;
    justify-content: flex-start;
    min-height: auto;
    /* Ensure content sits naturally */
    height: auto; 
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .hero-top {
    position: relative;
    top: auto;
    margin-bottom: 20px;
  }

  .hero-center {
    padding: 0;
    margin: 0;
  }

  .hero-bottom {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
  }

  /* Fix Title Size & Wrapping */
  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 10px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    width: 100%;
    justify-items: center;
  }
  
  .stat-value { font-size: 1.75rem; }
  .stat-label { font-size: 0.5rem; }
}

@media (max-width: 768px) {
  
  /* 2. SECTION PADDING: Prevent content touching edges */
  .container {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .legacy, .philosophy, .portfolio, .process, .testimonial, .contact {
    padding: 40px 0;
  }

  /* 3. SCROLL CONTAINERS: Fix "Cutoff" on last item */
  .gallery-wrapper, .timeline-wrapper {
    margin: 20px 0;
    width: 100%;
  }

  .gallery-track, .timeline-track {
    padding: 10px 20px; /* Left padding */
    padding-right: 20px; /* Critical: Right padding for scroll end */
    scroll-snap-type: x mandatory;
  }

  .gallery-item, .timeline-item {
    scroll-snap-align: center;
    flex: 0 0 85vw; /* Show slightly less than full width to encourage scroll */
    margin-right: 15px;
  }
  
  /* Ensure last item doesn't get stuck */
  .gallery-item:last-child, .timeline-item:last-child {
    margin-right: 20px; 
  }

  /* 4. MODAL FIX: Enable scrolling on small screens */
  .modal-overlay {
    align-items: flex-start; /* Start from top */
    padding: 0;
    overflow-y: auto; /* Allow overlay to scroll if needed */
  }

  .modal {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
    max-height: none; /* Let it grow */
    transform: none !important;
  }

  .modal-content {
    display: flex;
    flex-direction: column;
    max-height: none;
    overflow: visible;
  }

  .modal-gallery {
    height: 300px; /* Fixed height for image area */
    max-height: none;
    aspect-ratio: auto;
  }

  .modal-info {
    padding: 24px 20px 40px; /* Bottom padding for scroll space */
  }

  .modal-close {
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.5); /* Make more visible */
  }

  /* 5. TYPOGRAPHY SCALING */
  .philosophy-title, .legacy-title, .portfolio-title {
    font-size: 2.25rem; /* Manageable size */
    word-wrap: break-word; /* Prevent overflow */
  }

  .philosophy-body {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  /* Fix philosophy pillar cutoff */
  .pillar {
    grid-template-columns: 30px 1fr;
    padding: 15px;
  }
  
  .pillar-num { font-size: 1.25rem; }
}