
:root {
  --base: #0A0E1A;
  --panel: #141830;
  --primary-accent: #18908d;
  --text-heading: #FFFFFF;
  --text-body: #8A93A8;
  --success: #4ADE80;
  --danger: #F87171;

  /* Backward compatibility mappings */
  --cream: var(--base);
  --charcoal: var(--panel);
  --gold: var(--primary-accent);
  --gold-light: #2bc1bd;
  --burgundy: var(--panel);
  --forest: var(--panel);
  --midnight: var(--panel);
  --bronze: var(--panel);
  --deep-purple: var(--panel);
  --teal: var(--panel);
  --dark-red: var(--panel);
  --warm-slate: var(--panel);

  --border-light: rgba(138, 147, 168, 0.15);
  --border-gold: rgba(24, 144, 141, 0.3);

  --font-serif: 'Inter', 'Outfit', system-ui, sans-serif;
  --font-sans: 'Inter', 'Outfit', system-ui, sans-serif;

  --ease-premium: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);

  --duration-fast: 0.3s;
  --duration-base: 0.6s;
  --duration-slow: 1s;
  --duration-slower: 1.4s;
}

header,
.header-container,
.mobile-menu-container {
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
}

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

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--base);
  color: var(--text-body);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Skip rendering off-screen sections to reduce layout and paint cost during scroll */
main > section:not(:first-of-type) {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

footer {
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

body.custom-cursor-active,
body.custom-cursor-active * {
  cursor: none !important;
}

/* Typography styles overrides */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.display {
  color: var(--text-heading) !important;
}

/* Override inline colors for body text and overlays */
[style*="color: var(--charcoal)"],
[style*="color: 'var(--charcoal)'"],
[style*="color:var(--charcoal)"],
[style*="color: \"var(--charcoal)\""],
[style*="color:var(--cream)"] {
  color: var(--text-heading) !important;
}

[style*="color: rgba(26, 26, 26"],
[style*="color:rgba(26,26,26"],
[style*="color: rgba(247, 244, 239"],
[style*="color:rgba(247,244,239"] {
  color: var(--text-body) !important;
}

/* Override hardcoded page-specific container & section backgrounds/borders */
section[style*="f2efe8" i],
section[style*="242, 239, 232" i],
section[style*="242,239,232" i] {
  background: var(--base) !important;
  background-color: var(--base) !important;
}

div[style*="f2efe8" i],
div[style*="242, 239, 232" i],
div[style*="242,239,232" i] {
  background: var(--panel) !important;
  background-color: var(--panel) !important;
}

[style*="border-bottom: 1px solid rgba(26, 26, 26"],
[style*="border-bottom:1px solid rgba(26,26,26"],
[style*="border-bottom: 1px solid rgba(26, 26, 26"],
[style*="border-top: 1px solid var(--border-light)"],
[style*="border-top:1px solid var(--border-light)"] {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

p,
li,
span.body-text,
.body-lg {
  color: var(--text-body);
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }
}

/* Typography Scale */
.display {
  font-family: var(--font-serif);
  font-size: clamp(52px, 8vw, 120px);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.h3 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 38px);
  font-weight: 400;
  line-height: 1.2;
}

.overline {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.body-lg {
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.7;
  font-weight: 300;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 2px;
}

/* Selection */
::selection {
  background: var(--gold);
  color: #fff;
}

/* Container */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 80px);
}

/* Animation classes */
.will-animate {
  opacity: 0;
  transform: translateY(50px);
}

.will-animate.animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

/* Clip reveal animation */
.clip-hidden {
  clip-path: inset(100% 0 0 0);
}

.clip-visible {
  clip-path: inset(0% 0 0 0);
  transition: clip-path 1s var(--ease-out-expo);
}

/* Gold text gradient */
.text-gradient-gold {
  background: linear-gradient(135deg, #B8953A 0%, #D4AF5A 50%, #B8953A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Divider */
.divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
}

/* Line hover effect */
.lh {
  position: relative;
  display: inline-block;
}

.lh::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease-premium);
}

.lh:hover::after {
  width: 100%;
}

/* No scroll during preloader */
body.preloading {
  overflow: hidden;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Image utility */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section spacing */
.section-py {
  padding: clamp(60px, 8vh, 120px) 0;
}

.section-py-lg {
  padding: clamp(80px, 12vh, 160px) 0;
}

/* Background variants */
.bg-cream {
  background-color: var(--cream);
}

.bg-charcoal {
  background-color: var(--charcoal);
  color: var(--cream);
}

.bg-midnight {
  background-color: var(--midnight);
  color: var(--cream);
}

.bg-forest {
  background-color: var(--forest);
  color: var(--cream);
}

/* Back link utility */
.back-link {
  transition: color var(--duration-fast) var(--ease-premium);
}

.back-link:hover {
  color: var(--gold) !important;
}

/* Service card hover utility */
.service-card-hover {
  border-top-color: var(--border-light) !important;
  transition: border-color var(--duration-fast) var(--ease-premium);
}

.service-card-hover:hover {
  border-top-color: var(--gold) !important;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .will-animate,
  .clip-hidden {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}

/* Contact page form input styles */
.contact-input {
  width: 100%;
  padding: 12px 0;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(138, 147, 168, 0.25) !important;
  color: #FFFFFF !important;
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  border-radius: 0 !important;
  transition: border-color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.contact-input::placeholder {
  color: rgba(138, 147, 168, 0.4) !important;
}

.contact-input:focus {
  border-bottom-color: var(--gold) !important;
}

/* Specific select dropdown overrides */
select.contact-input {
  padding-left: 4px !important;
  padding-right: 24px !important;
}

/* Status pulse animation (compositor-only opacity, no repaint) */
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.animated-status-dot {
  box-shadow: 0 0 8px currentColor;
  animation: status-pulse 2s ease-in-out infinite;
}

