/* ============================================
   MEDIA ASSIGNMENTS — DESIGN SYSTEM
   ============================================ */

:root {
  /* Colors — Dark (default) */
  --color-bg: #080808;
  --color-bg-elevated: #0f0f0f;
  --color-bg-card: rgba(255, 255, 255, 0.04);
  --color-surface: #141414;
  --color-border: rgba(198, 168, 125, 0.15);
  --color-border-hover: rgba(198, 168, 125, 0.35);
  --color-text: #f4f4f4;
  --color-text-muted: #a8a8a8;
  --color-text-dim: #6b6b6b;
  --color-accent: #c6a87d;
  --color-accent-light: #e1c69d;
  --color-accent-glow: rgba(198, 168, 125, 0.25);
  --color-success: #4ade80;
  --color-error: #f87171;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, rgba(8, 8, 8, 0.92) 0%, rgba(8, 8, 8, 0.65) 50%, rgba(198, 168, 125, 0.08) 100%);
  --gradient-accent: linear-gradient(135deg, #c6a87d 0%, #a8895a 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(198, 168, 125, 0.12) 0%, transparent 70%);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', system-ui, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;
  --text-hero: clamp(2.5rem, 5vw + 1rem, 4rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-padding: clamp(4rem, 8vw, 7rem);
  --container-max: 1280px;
  --container-padding: clamp(1.25rem, 5vw, 6%);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--color-accent-glow);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
  --duration-slow: 0.6s;

  /* Layout */
  --header-height: 80px;
  --z-loader: 10000;
  --z-cursor: 9999;
  --z-header: 1000;
  --z-modal: 2000;
  --z-float: 900;
}

[data-theme="light"] {
  --color-bg: #f8f6f3;
  --color-bg-elevated: #ffffff;
  --color-bg-card: rgba(0, 0, 0, 0.03);
  --color-surface: #ffffff;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(168, 137, 90, 0.4);
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-text-dim: #8a8a8a;
  --color-accent: #a8895a;
  --color-accent-light: #c6a87d;
  --gradient-hero: linear-gradient(135deg, rgba(248, 246, 243, 0.95) 0%, rgba(248, 246, 243, 0.75) 100%);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
}

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

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

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  transition: background var(--duration-slow) ease, color var(--duration-slow) ease;
}

body.custom-cursor {
  cursor: none;
}

body.custom-cursor a,
body.custom-cursor button,
body.custom-cursor [data-magnetic] {
  cursor: none;
}

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

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

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

ul { list-style: none; }

/* Typography utilities */
.heading-display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.heading-xl { font-size: var(--text-hero); }
.heading-lg { font-size: var(--text-4xl); }
.heading-md { font-size: var(--text-3xl); }
.heading-sm { font-size: var(--text-2xl); }

.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }

.label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
}

.section-header .label {
  margin-bottom: var(--space-4);
  display: block;
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin-block: var(--space-8);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.9rem 1.75rem;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) ease,
    background var(--duration-normal) ease,
    color var(--duration-normal) ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #0d0d0d;
  box-shadow: 0 4px 20px var(--color-accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--color-accent-glow);
}

.btn-outline {
  border: 1px solid var(--color-border-hover);
  color: var(--color-text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(198, 168, 125, 0.08);
}

.btn-ghost {
  color: var(--color-accent);
  padding-inline: var(--space-4);
}

.btn-ghost:hover {
  color: var(--color-accent-light);
}

/* Cards */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) ease,
    box-shadow var(--duration-normal) ease;
}

.card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
}

[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.7);
}

/* Image frame */
.img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-lg);
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.img-frame:hover img {
  transform: scale(1.05);
}

.img-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 8, 0.4), transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
}

.img-frame:hover::after {
  opacity: 1;
}

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-12);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-accent);
  z-index: calc(var(--z-header) + 1);
  transform-origin: left;
  transform: scaleX(0);
  width: 100%;
}

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

  html { scroll-behavior: auto; }
}
