/* ==========================================================================
   MARIE STUDIO — DESIGN SYSTEM & TOKENS (REFINED LUXURY EDITION)
   Palette: Warm Ivory, Deep Chocolate, Olive/Sage, Terracotta
   ========================================================================== */

:root {
  /* Color Palette - Warm Ivory & Earth Contrast */
  --bg-primary: #FAF7F2;
  --bg-secondary: #F0EAE1;
  --bg-surface: #FFFFFF;
  --bg-surface-trans: rgba(255, 255, 255, 0.85);
  --bg-surface-glass: rgba(250, 247, 242, 0.9);
  
  --text-primary: #15100D;
  --text-secondary: #3D332D;
  --text-muted: #7A6F68;
  --text-inverse: #FAF7F2;

  --chocolate-900: #120D0A;
  --chocolate-800: #1E1612;
  --chocolate-700: #2C211B;
  
  --olive-800: #34402E;
  --olive-600: #4E5F46;
  --olive-500: #657A5B;
  --olive-200: #C2CDBE;
  --olive-100: #E6ECE3;

  --terracotta-500: #C2653E;
  --terracotta-400: #D87B53;
  --terracotta-100: #F7EDE8;
  
  --border-light: rgba(21, 16, 13, 0.1);
  --border-subtle: rgba(21, 16, 13, 0.05);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(18, 13, 10, 0.04);
  --shadow-md: 0 12px 32px rgba(18, 13, 10, 0.07);
  --shadow-lg: 0 24px 64px rgba(18, 13, 10, 0.11);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s var(--ease-out-expo);
  --transition-slow: 0.8s var(--ease-out-expo);

  /* Layout */
  --container-max: 1280px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

/* Dark Theme - Chocolate Noir */
[data-theme="chocolate-noir"] {
  --bg-primary: #100B08;
  --bg-secondary: #18120E;
  --bg-surface: #201814;
  --bg-surface-trans: rgba(32, 24, 20, 0.85);
  --bg-surface-glass: rgba(16, 11, 8, 0.9);

  --text-primary: #FAF6EF;
  --text-secondary: #D2C6BC;
  --text-muted: #94877D;
  --text-inverse: #100B08;

  --border-light: rgba(250, 246, 239, 0.1);
  --border-subtle: rgba(250, 246, 239, 0.05);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Subtle Film Grain */
.grain-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Magnetic Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--terracotta-500);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
  mix-blend-mode: difference;
}

.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--terracotta-500);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.25s ease, height 0.25s ease;
}

.cursor-hover .custom-cursor {
  width: 36px;
  height: 36px;
  background-color: var(--olive-500);
  opacity: 0.6;
}

.cursor-hover .custom-cursor-follower {
  width: 52px;
  height: 52px;
  border-color: var(--olive-500);
}

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

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
}

p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  font-weight: 400;
}

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

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

/* Container & Section Spacing */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
  position: relative;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--olive-600);
  background-color: rgba(78, 95, 70, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(78, 95, 70, 0.18);
}

[data-theme="chocolate-noir"] .section-tag {
  color: var(--olive-200);
  background-color: rgba(194, 205, 190, 0.1);
}

.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--olive-500);
}

.section-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--chocolate-900);
  color: var(--text-inverse);
  border: 1px solid var(--chocolate-800);
}

.btn-primary:hover {
  background-color: var(--olive-600);
  border-color: var(--olive-500);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(78, 95, 70, 0.25);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--bg-surface);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-terra {
  background-color: var(--terracotta-500);
  color: #FFFFFF;
}

.btn-terra:hover {
  background-color: var(--terracotta-400);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(194, 101, 62, 0.3);
}

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.8125rem;
}

/* Editorial Media Placeholders */
.media-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(78, 95, 70, 0.12) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.placeholder-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
}

.placeholder-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.placeholder-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--olive-600);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.media-placeholder:hover .placeholder-icon-wrap {
  transform: scale(1.08);
  background: var(--olive-600);
  color: #FFFFFF;
}

.placeholder-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(21, 16, 13, 0.06);
  color: var(--text-muted);
}

[data-theme="chocolate-noir"] .placeholder-tag {
  background: rgba(250, 246, 239, 0.08);
}

.placeholder-ratio {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 0.6875rem;
  font-family: monospace;
  color: var(--text-muted);
  background: var(--bg-surface-trans);
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-subtle);
}

/* Animations */
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.reveal-init {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

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