/* ============================================
   MOONSTRUCK VIDEOS — Base CSS & Design Tokens
   Wedding Videographer · Midlands & Cotswolds
   ============================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* === TYPE SCALE (fluid) === */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* === SPACING (4px base) === */
  --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;
  --space-32: 8rem;

  /* === WEDDING PALETTE — Light Mode === */
  --color-bg:              #f5f3ee;  /* warm ivory */
  --color-surface:         #faf9f6;  /* slightly lighter */
  --color-surface-2:       #ffffff;
  --color-surface-offset:  #ede9e0;
  --color-surface-dark:    #e8e2d5;
  --color-divider:         #ddd8ce;
  --color-border:          #d4cec2;

  --color-text:            #2c2c2c;  /* warm charcoal */
  --color-text-muted:      #7a7a72;
  --color-text-faint:      #b8b5aa;
  --color-text-inverse:    #faf9f6;

  --color-primary:         #7a8c6e;  /* muted sage */
  --color-primary-hover:   #5a6b4f;  /* dark sage */
  --color-primary-active:  #4a5940;
  --color-primary-light:   #d8e0d0;

  --color-gold:            #b8976a;  /* warm gold — CTAs */
  --color-gold-hover:      #9a7a52;
  --color-gold-active:     #7e6140;
  --color-gold-light:      #e8dcc8;

  /* === RADIUS === */
  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* === TRANSITIONS === */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* === SHADOWS (warm toned) === */
  --shadow-sm: 0 1px 3px rgba(44, 40, 30, 0.07);
  --shadow-md: 0 4px 16px rgba(44, 40, 30, 0.10);
  --shadow-lg: 0 12px 40px rgba(44, 40, 30, 0.14);
  --shadow-xl: 0 24px 64px rgba(44, 40, 30, 0.18);

  /* === CONTENT WIDTHS === */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;
  --content-full:    100%;

  /* === FONTS === */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Switzer', 'Helvetica Neue', sans-serif;
}

/* === DARK MODE — "Dark Film Suite" === */
[data-theme="dark"] {
  --color-bg:              #1a1917;  /* deep charcoal */
  --color-surface:         #201f1c;
  --color-surface-2:       #252320;
  --color-surface-offset:  #1d1c19;
  --color-surface-dark:    #171614;
  --color-divider:         #2e2c28;
  --color-border:          #3a3832;

  --color-text:            #e8e4db;
  --color-text-muted:      #8a8880;
  --color-text-faint:      #5a5852;
  --color-text-inverse:    #1a1917;

  --color-primary:         #9aad88;  /* sage brightened for dark */
  --color-primary-hover:   #7a8c6e;
  --color-primary-active:  #5a6b4f;
  --color-primary-light:   #2a3026;

  --color-gold:            #c9a87a;  /* gold brightened for dark */
  --color-gold-hover:      #b8976a;
  --color-gold-active:     #9a7a52;
  --color-gold-light:      #3a3020;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #1a1917;
    --color-surface:         #201f1c;
    --color-surface-2:       #252320;
    --color-surface-offset:  #1d1c19;
    --color-surface-dark:    #171614;
    --color-divider:         #2e2c28;
    --color-border:          #3a3832;
    --color-text:            #e8e4db;
    --color-text-muted:      #8a8880;
    --color-text-faint:      #5a5852;
    --color-text-inverse:    #1a1917;
    --color-primary:         #9aad88;
    --color-primary-hover:   #7a8c6e;
    --color-primary-active:  #5a6b4f;
    --color-primary-light:   #2a3026;
    --color-gold:            #c9a87a;
    --color-gold-hover:      #b8976a;
    --color-gold-active:     #9a7a52;
    --color-gold-light:      #3a3020;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.55);
  }
}

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body, sans-serif);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: rgba(184, 151, 106, 0.25);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }

a, button, [role="button"], input, textarea, select {
  transition: color var(--transition-interactive),
              background var(--transition-interactive),
              border-color var(--transition-interactive),
              box-shadow var(--transition-interactive),
              opacity var(--transition-interactive);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}
