/* ═══════════════════════════════════════ LIGHT MODE (default) ═══════════════════════════════════════ */
:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --surface-el: #F0EDE6;
  --txt-pri: #1A1712;
  --txt-sec: #6B6560;
  --txt-mut: #A39E98;
  --accent: #B87333;
  --accent-h: #9A5E28;
  --border: rgba(26, 23, 18, 0.08);
  --border-s: rgba(26, 23, 18, 0.15);
  --nav-bg: rgba(247, 245, 240, 0.88);
  --nav-bdr: rgba(26, 23, 18, 0.06);
  --card-shadow: 0 1px 3px rgba(26, 23, 18, 0.06);
  --card-shadow-hover: 0 8px 30px rgba(26, 23, 18, 0.10);
  color-scheme: light dark;
}

/* ═══════════════════════════════════════ DARK MODE ═══════════════════════════════════════ */
.dark {
  --bg: #050505;
  --surface: #111111;
  --surface-el: #1A1A1A;
  --txt-pri: #ECEFF4;
  --txt-sec: #B0B8C4;
  --txt-mut: #6B7280;
  --accent: #B87333;
  --accent-h: #E8C9A8;
  --border: rgba(255, 255, 255, 0.06);
  --border-s: rgba(255, 255, 255, 0.12);
  --nav-bg: rgba(5, 5, 5, 0.85);
  --nav-bdr: rgba(31, 31, 31, 0.5);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--txt-pri);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ═══════════════════════════════════════ NAV SCROLL ═══════════════════════════════════════ */
#nav {
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
#nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-bdr);
}

/* ═══════════════════════════════════════ THEME TOGGLE ═══════════════════════════════════════ */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-s);
  background: var(--surface);
  color: var(--txt-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════ FADE IN ═══════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animations for hero */
.anim-1 { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.anim-2 { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out 0.1s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s; }
.anim-3 { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out 0.2s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s; }
.anim-4 { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out 0.3s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s; }

body.loaded .anim-1,
body.loaded .anim-2,
body.loaded .anim-3,
body.loaded .anim-4 {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════ REDUCED MOTION ═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in, .anim-1, .anim-2, .anim-3, .anim-4 {
    transition: none;
    opacity: 1;
    transform: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════ UTILITIES ═══════════════════════════════════════ */
[id] { scroll-margin-top: 5rem; }

input[type="tel"], input[type="email"], input[type="text"] {
  font-size: 16px !important;
}

@media (hover: none) and (pointer: coarse) {
  a, button, input { min-height: 44px; min-width: 44px; }
}

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

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-s); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--txt-mut); }
