/* ==========================================================================
   BASE & TYPOGRAPHY STYLES
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Background Film Grain Overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Luxury Cursor (Desktop Only) */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--color-accent-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease-out, opacity 0.2s ease, width 0.2s ease, height 0.2s ease;
  will-change: transform;
}

.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-accent-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease, width 0.25s ease, height 0.25s ease;
  will-change: transform;
}

.custom-cursor.hovering {
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0.4;
}

.custom-cursor-follower.hovering {
  transform: translate(-50%, -50%) scale(1.6);
  background-color: rgba(197, 161, 106, 0.12);
  border-color: var(--color-accent-gold);
}

@media (hover: none) or (pointer: coarse) {
  .custom-cursor,
  .custom-cursor-follower {
    display: none !important;
  }
}

/* Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent-gold), var(--color-accent-gold-light));
  z-index: 1001;
  transition: width 0.1s linear;
}

/* Typography Presets */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.font-serif {
  font-family: var(--font-serif);
}

.display-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.display-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent-gold-dark);
}

[data-theme="dark"] .display-title em {
  color: var(--color-accent-gold);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-gold-dark);
  margin-bottom: 0.9rem;
}

[data-theme="dark"] .section-label {
  color: var(--color-accent-gold);
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background-color: currentColor;
}

.lead-text {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

p {
  color: var(--color-text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

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

/* Accessibility: Focus visible */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Accessibility: Reduced Motion */
@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;
  }
}
