/* ============================================================
   DESIGN SYSTEM: Chérie L. Hughes | Soprano
   Direction: "Sunlit Recital"
   — Light, warm, dramatic. A sun-filled concert hall.
   ============================================================ */

/* --- CSS Reset (Modern) --- */
*, *::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;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

input, button, textarea, select {
  font: inherit;
}

/* <picture> wrappers must not affect layout; the inner <img> is styled as before */
picture {
  display: contents;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* --- Custom Properties (Design Tokens) --- */
:root {
  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-accent: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;

  /* Type Scale (fluid) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1rem + 1.25vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1rem + 2.5vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.25rem + 3.75vw, 3rem);
  --text-hero: clamp(3rem, 1rem + 8vw, 6.5rem);
  --text-hero-sub: clamp(1rem, 0.75rem + 1.25vw, 1.5rem);

  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
  --tracking-widest: 0.2em;

  /* Colors — Light warm palette */
  --color-white: #FFFFFF;
  --color-snow: #FDFCFA;
  --color-ivory: #FAF8F5;
  --color-cream: #F5F1EB;
  --color-linen: #EDE8E0;
  --color-warm-gray: #D4CFC7;
  --color-muted: #9E968A;
  --color-ash: #6B6560;
  --color-charcoal: #3D3835;
  --color-ink: #1C1917;
  --color-midnight: #0F0D0B;

  /* Accent colors — drawn from the photograph */
  --color-crimson: #A3293B;
  --color-crimson-deep: #8B1A2B;
  --color-crimson-light: #C94055;
  --color-crimson-muted: rgba(163, 41, 59, 0.12);
  --color-gold: #B8962E;
  --color-gold-rich: #9E7E1E;
  --color-gold-light: #D4B44A;
  --color-gold-muted: rgba(184, 150, 46, 0.15);

  /* Semantic colors — light theme */
  --color-bg: var(--color-snow);
  --color-surface: var(--color-ivory);
  --color-surface-raised: var(--color-white);
  --color-surface-contrast: var(--color-ink);
  --color-text: var(--color-charcoal);
  --color-text-muted: var(--color-muted);
  --color-text-heading: var(--color-ink);
  --color-accent: var(--color-crimson);
  --color-accent-hover: var(--color-crimson-deep);
  --color-accent-muted: var(--color-crimson-muted);
  --color-accent-secondary: var(--color-gold);
  --color-accent-secondary-hover: var(--color-gold-rich);
  --color-border: rgba(28, 25, 23, 0.08);
  --color-border-accent: rgba(163, 41, 59, 0.2);

  /* Hero-specific (dark overlay context) */
  --color-hero-text: #FFFFFF;
  --color-hero-muted: rgba(255, 255, 255, 0.85);
  --color-hero-subtle: rgba(255, 255, 255, 0.6);

  /* Spacing Scale */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-section: clamp(4rem, 2rem + 10vw, 8rem);

  /* Layout */
  --container-max: 72rem;
  --container-narrow: 48rem;
  --container-wide: 90rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;

  /* Borders & Shadows */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.16);
  --shadow-glow-crimson: 0 4px 24px rgba(163, 41, 59, 0.2);
  --shadow-glow-gold: 0 4px 24px rgba(184, 150, 46, 0.15);
}

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

/* --- Base Styles --- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-heading);
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-hero);
  letter-spacing: var(--tracking-tight);
  font-weight: 400;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 400;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
}

p {
  max-width: 65ch;
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-accent-hover);
}

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

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

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

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

/* --- Decorative Elements --- */
.accent-rule {
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--color-crimson);
  border: none;
  margin: var(--space-lg) auto;
}

.accent-rule--wide {
  width: 6rem;
}

.accent-rule--left {
  margin-left: 0;
}

/* Keep gold-rule class for backward compat but restyle */
.gold-rule {
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--color-crimson);
  border: none;
  margin: var(--space-lg) auto;
}

.gold-rule--wide {
  width: 6rem;
}

.gold-rule--left {
  margin-left: 0;
  background: var(--color-crimson);
}

/* Section heading */
.section-heading {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-heading h2 {
  margin-bottom: var(--space-xs);
}

.section-heading .subtitle {
  font-family: var(--font-accent);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
}

/* --- Button Styles --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-crimson);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-crimson-deep);
  color: var(--color-white);
  box-shadow: var(--shadow-glow-crimson);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  color: var(--color-charcoal);
  border: 1.5px solid var(--color-charcoal);
}

.btn--secondary:hover {
  border-color: var(--color-crimson);
  color: var(--color-crimson);
  transform: translateY(-1px);
}

/* Hero-context buttons (on dark backgrounds) */
.btn--hero-primary {
  background: var(--color-white);
  color: var(--color-ink);
  font-weight: 700;
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
}

.btn--hero-primary:hover {
  background: var(--color-cream);
  color: var(--color-ink);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn--hero-secondary {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255,255,255,0.5);
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
}

.btn--hero-secondary:hover {
  border-color: var(--color-white);
  color: var(--color-white);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-crimson);
  padding: var(--space-xs) 0;
  letter-spacing: var(--tracking-wide);
}

.btn--ghost::after {
  content: '\2192';
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn--ghost:hover::after {
  transform: translateX(4px);
}

.btn--ghost:hover {
  color: var(--color-crimson-deep);
}

/* --- Card Styles --- */
.card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* --- Scroll Animation Classes --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

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

.reveal--delay-1 {
  transition-delay: 100ms;
}

.reveal--delay-2 {
  transition-delay: 200ms;
}

.reveal--delay-3 {
  transition-delay: 300ms;
}

.reveal--delay-4 {
  transition-delay: 400ms;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 10000;
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-crimson);
  color: var(--color-white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-md);
}
