/* =============================================
   WILLOW & STONE CABINETRY — Design System
   Preset E: Neo-Classical Gallery
   ============================================= */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #F4F1EB;
  --charcoal: #1A1816;
  --gold: #B8955B;
  --warm-stone: #E8E3D9;
  --charcoal-90: rgba(26,24,22,0.9);
  --charcoal-70: rgba(26,24,22,0.7);
  --charcoal-50: rgba(26,24,22,0.5);
  --charcoal-20: rgba(26,24,22,0.2);
  --charcoal-10: rgba(26,24,22,0.1);
  --charcoal-05: rgba(26,24,22,0.05);
  --cream-90: rgba(244,241,235,0.9);
  --cream-60: rgba(244,241,235,0.6);
  --cream-30: rgba(244,241,235,0.3);
  --gold-50: rgba(184,149,91,0.5);
  --gold-20: rgba(184,149,91,0.2);

  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'DM Sans', sans-serif;
  --font-mono: 'Fira Code', monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;
  --space-5xl: 12rem;

  --max-width: 1280px;
  --nav-height: 80px;
  --gutter: clamp(1.5rem, 4vw, 4rem);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--cream);
  color: var(--charcoal);
  cursor: none;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: none; border: none; background: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--gold-20); }

/* Noise */
.noise {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03; mix-blend-mode: multiply;
}

/* Cursor */
.cursor-dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 10001; transform: translate(-50%,-50%); }
.cursor-ring { width: 44px; height: 44px; border: 1px solid var(--gold-50); border-radius: 50%; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 10000; transform: translate(-50%,-50%); }

/* Typography */
.t-display { font-family: var(--font-serif); font-weight: 300; line-height: 0.92; letter-spacing: -0.02em; }
.t-xl { font-size: clamp(3rem, 7vw, 6.5rem); }
.t-lg { font-size: clamp(2.25rem, 5.5vw, 4.5rem); }
.t-md { font-size: clamp(1.75rem, 3.5vw, 3rem); }
.t-sm { font-size: clamp(1.375rem, 2.5vw, 2rem); }
.t-italic { font-style: italic; }

.t-body-xl { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); font-weight: 300; line-height: 1.75; }
.t-body-lg { font-size: clamp(0.9375rem, 1.3vw, 1.0625rem); font-weight: 300; line-height: 1.8; }
.t-body { font-size: 0.9375rem; font-weight: 300; line-height: 1.8; }
.t-body-sm { font-size: 0.8125rem; font-weight: 400; line-height: 1.7; }

.t-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

/* Layout */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-5xl) 0; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: var(--space-lg) var(--gutter) var(--space-md);
  display: flex; align-items: flex-start; justify-content: space-between;
  transition: transform 0.4s cubic-bezier(0.4,0,0,1), background-color 0.4s ease;
}
.nav--scrolled { background: rgba(244,241,235,0.95); backdrop-filter: blur(12px); }
.nav--hidden { transform: translateY(-100%); }

.nav__brand { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; }
.nav__logo-icon { width: 36px; height: 36px; border: 1px solid var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 6px; flex-shrink: 0; }
.nav__logo-icon svg { width: 100%; height: 100%; }
.nav__brand-text { display: flex; flex-direction: column; justify-content: center; margin-top: -1px; }
.nav__brand-name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500; letter-spacing: 0.02em; line-height: 1.1; }
.nav__brand-sub { font-size: 0.5625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: var(--charcoal-50); }
.nav__logo-img { height: 56px; width: auto; }

/* Nav on dark hero — start light, then go dark on scroll */
.nav--hero { color: var(--cream); }
.nav--hero .nav__brand-sub { color: var(--cream-60); }
.nav--hero .nav__logo-icon { border-color: var(--gold); }
.nav--hero .nav__logo-img { filter: none; }
.nav--hero.nav--scrolled { color: var(--charcoal); }
.nav--hero.nav--scrolled .nav__brand-sub { color: var(--charcoal-50); }
.nav--hero.nav--scrolled .nav__logo-img { filter: brightness(0); }

/* Nav on light pages — dark logo by default */
.nav:not(.nav--hero) .nav__logo-img { filter: brightness(0); }

.nav__links { display: none; align-items: center; gap: var(--space-xl); }
@media (min-width: 768px) { .nav__links { display: flex; } }

.nav__link { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; opacity: 0.7; transition: opacity 0.3s; }
.nav__link:hover { opacity: 1; }
.nav__link--active { opacity: 1; color: var(--gold); }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 0.875rem 2.25rem; font-size: 0.625rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.25em;
  overflow: hidden; transition: all 0.3s ease; border-radius: 2px;
}
.btn__fill { position: absolute; top: 100%; left: 0; width: 100%; height: 100%; z-index: 1; transition: top 0.45s cubic-bezier(0.4,0,0,1); }
.btn__text { position: relative; z-index: 2; transition: color 0.35s ease; }
.btn:hover .btn__fill { top: 0; }

.btn--gold { background: var(--gold); color: var(--charcoal); }
.btn--gold .btn__fill { background: var(--charcoal); }
.btn--gold:hover .btn__text { color: var(--cream); }

.btn--dark { background: var(--charcoal); color: var(--cream); }
.btn--dark .btn__fill { background: var(--gold); }
.btn--dark:hover .btn__text { color: var(--charcoal); }

.btn--outline { background: transparent; border: 1px solid var(--charcoal-20); color: var(--charcoal); }
.btn--outline .btn__fill { background: var(--gold); }
.btn--outline:hover .btn__text { color: var(--charcoal); }
.btn--outline:hover { border-color: transparent; }

.btn--outline-light { background: transparent; border: 1px solid var(--cream-30); color: var(--cream); }
.btn--outline-light .btn__fill { background: var(--gold); }
.btn--outline-light:hover .btn__text { color: var(--charcoal); }

.btn--lg { padding: 1.125rem 3rem; font-size: 0.6875rem; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: var(--charcoal); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 120%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,24,22,0.3) 0%, rgba(26,24,22,0.8) 100%); z-index: 1; }
.hero__content { position: relative; z-index: 2; padding: calc(var(--nav-height) + var(--space-2xl)) var(--gutter) var(--space-4xl); }

/* Split Grid */
.split { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--charcoal-10); }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; } }
.split__panel { padding: var(--space-3xl); display: flex; flex-direction: column; justify-content: center; }

/* Tier Cards */
.tier { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--charcoal); border: 1px solid var(--charcoal); }
@media (min-width: 768px) { .tier { grid-template-columns: 1fr 1fr; } }
.tier__card { padding: var(--space-3xl) var(--space-2xl); display: flex; flex-direction: column; transition: background 0.4s ease; }
.tier__card:hover { background: var(--cream); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--charcoal-10); border-bottom: 1px solid var(--charcoal-10); }
.stat { text-align: center; padding: var(--space-2xl) var(--space-sm); border-right: 1px solid var(--charcoal-10); }
.stat:last-child { border-right: none; }
.stat__number { font-family: var(--font-serif); font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; color: var(--gold); margin-bottom: var(--space-xs); }
.stat__label { font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.15em; color: var(--charcoal-50); }

/* Image Grid */
.img-grid { display: grid; gap: 1px; background: var(--charcoal-10); }
.img-grid--2 { grid-template-columns: 1fr 1fr; }
.img-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.img-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

/* Process Steps */
.process { counter-reset: step; }
.process__step { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); padding: var(--space-2xl) 0; border-bottom: 1px solid var(--charcoal-10); }
@media (min-width: 768px) { .process__step { grid-template-columns: 200px 1fr; } }
.process__step:last-child { border-bottom: none; }
.process__number { font-family: var(--font-serif); font-size: clamp(3rem, 6vw, 4.5rem); color: var(--gold-20); line-height: 1; }

/* Footer */
.footer { background: var(--charcoal); color: var(--cream); padding: var(--space-3xl) 0 var(--space-xl); }
.footer__top { display: flex; flex-direction: column; gap: var(--space-2xl); margin-bottom: var(--space-2xl); }
@media (min-width: 768px) { .footer__top { flex-direction: row; justify-content: space-between; align-items: flex-end; } }
.footer__links { display: flex; gap: var(--space-3xl); }
.footer__col { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer__col-title { font-family: var(--font-serif); font-style: italic; font-size: 1.125rem; color: var(--gold); margin-bottom: var(--space-xs); }
.footer__col a { font-size: 0.8125rem; color: var(--cream-60); transition: color 0.3s; }
.footer__col a:hover { color: var(--gold); }
.footer__bottom { display: flex; flex-direction: column; gap: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid rgba(255,255,255,0.05); }
@media (min-width: 768px) { .footer__bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer__status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.5625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: var(--cream-60); }
.footer__status-dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Dark sections */
.section--dark { background: var(--charcoal); color: var(--cream); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); }

/* Contact Form */
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.form-field label { font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: var(--charcoal-50); }
.form-field input, .form-field textarea, .form-field select {
  background: transparent; border: none; border-bottom: 1px solid var(--charcoal-20);
  padding: 0.75rem 0; font-family: var(--font-sans); font-size: 1rem; color: var(--charcoal);
  transition: border-color 0.3s; outline: none;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--gold); }
.form-field textarea { resize: vertical; min-height: 120px; }

/* Utilities */
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--charcoal-50); }
.text-light-muted { color: var(--cream-60); }
.text-center { text-align: center; }
.max-w-lg { max-width: 600px; }
.max-w-xl { max-width: 720px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Mobile menu */
.hamburger { display: flex; flex-direction: column; gap: 5px; width: 22px; cursor: pointer; z-index: 101; }
.hamburger span { display: block; width: 100%; height: 1.5px; background: currentColor; transition: all 0.3s; transform-origin: center; }
@media (min-width: 768px) { .hamburger { display: none; } }
/* Hamburger → X when menu open */
.hamburger--open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.hamburger--open span:nth-child(2) { opacity: 0; }
.hamburger--open span:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }
.hamburger--open span { background: var(--cream); }
.mobile-menu { position: fixed; inset: 0; background: var(--charcoal); color: var(--cream); z-index: 99; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-xl); opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.mobile-menu--open { opacity: 1; pointer-events: all; }
.mobile-menu a { font-family: var(--font-serif); font-size: 2.5rem; }

/* Mobile-first responsive tweaks */
@media (max-width: 767px) {
  .section { padding: var(--space-3xl) 0; }
  .split__panel { padding: var(--space-2xl) var(--space-lg); }
  .tier__card { padding: var(--space-2xl) var(--space-lg); }
  .process__step { flex-direction: column; gap: var(--space-md); }
  .hero__content { padding-bottom: var(--space-2xl); }
  .stats { flex-direction: column; gap: var(--space-xl); }
}
