/* ============================================================
   Discover Louisville Design System
   Heritage Editorial — v1.0

   Single source of truth for all DL apps and pages.
   Import this file into any vanilla HTML project.
   For React/Tailwind apps, use dl-tailwind-tokens.css instead.
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Outfit:wght@400;500;600;700&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */

:root {
  /* --- Colors --- */
  --dl-bourbon: #A25815;
  --dl-bourbon-light: #C06A1A;
  --dl-gold: #E4AE41;
  --dl-gold-muted: #C49E5D;
  --dl-cream: #F5F2EC;
  --dl-cream-warm: #EDE6D8;
  --dl-white: #FFFDF8;
  --dl-charcoal: #2D2D2D;
  --dl-navy: #20364C;
  --dl-teal: #4A9084;
  --dl-rose: #C0395B;

  /* --- Color Aliases (semantic) --- */
  --dl-bg-page: var(--dl-cream);
  --dl-bg-card: var(--dl-white);
  --dl-bg-surface: var(--dl-cream-warm);
  --dl-bg-dark: var(--dl-navy);
  --dl-text-primary: var(--dl-charcoal);
  --dl-text-on-dark: var(--dl-cream);
  --dl-accent: var(--dl-bourbon);
  --dl-accent-hover: var(--dl-bourbon-light);
  --dl-accent-secondary: var(--dl-gold);
  --dl-success: var(--dl-teal);

  /* --- Typography --- */
  --dl-font-display: 'DM Serif Display', Georgia, serif;
  --dl-font-heading: 'Outfit', system-ui, sans-serif;
  --dl-font-body: 'Source Serif 4', Georgia, serif;
  --dl-font-ui: 'Outfit', system-ui, sans-serif;

  /* --- Type Scale (fluid, clamp-based) --- */
  --dl-text-xs: 0.75rem;     /* 12px — meta, captions */
  --dl-text-sm: 0.8125rem;   /* 13px — small labels */
  --dl-text-base: 0.9375rem; /* 15px — body text */
  --dl-text-md: 1.0625rem;   /* 17px — large body */
  --dl-text-lg: 1.25rem;     /* 20px — card titles */
  --dl-text-xl: 1.5rem;      /* 24px — section headings */
  --dl-text-2xl: clamp(1.75rem, 4vw, 2.25rem);  /* subheadings */
  --dl-text-3xl: clamp(2.25rem, 5vw, 3rem);     /* page titles */
  --dl-text-hero: clamp(2.8rem, 7vw, 5rem);     /* hero display */

  /* --- Line Heights --- */
  --dl-leading-tight: 1.2;
  --dl-leading-normal: 1.5;
  --dl-leading-relaxed: 1.7;

  /* --- Spacing (4px base) --- */
  --dl-space-1: 0.25rem;  /* 4px */
  --dl-space-2: 0.5rem;   /* 8px */
  --dl-space-3: 0.75rem;  /* 12px */
  --dl-space-4: 1rem;     /* 16px */
  --dl-space-5: 1.25rem;  /* 20px */
  --dl-space-6: 1.5rem;   /* 24px */
  --dl-space-8: 2rem;     /* 32px */
  --dl-space-10: 2.5rem;  /* 40px */
  --dl-space-12: 3rem;    /* 48px */
  --dl-space-16: 4rem;    /* 64px */

  /* --- Border Radius --- */
  --dl-radius-sm: 6px;
  --dl-radius-md: 10px;
  --dl-radius-lg: 16px;
  --dl-radius-pill: 50px;

  /* --- Shadows --- */
  --dl-shadow-sm: 0 1px 3px rgba(45, 45, 45, 0.06);
  --dl-shadow-md: 0 4px 12px rgba(45, 45, 45, 0.08);
  --dl-shadow-lg: 0 8px 28px rgba(45, 45, 45, 0.07);
  --dl-shadow-xl: 0 16px 48px rgba(45, 45, 45, 0.1);

  /* --- Transitions --- */
  --dl-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dl-duration-fast: 0.15s;
  --dl-duration-normal: 0.25s;
  --dl-duration-slow: 0.35s;

  /* --- Layout --- */
  --dl-max-width: 1100px;
  --dl-header-height: 64px;
}


/* ============================================================
   2. BASE STYLES
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--dl-font-body);
  font-size: var(--dl-text-base);
  line-height: var(--dl-leading-relaxed);
  color: var(--dl-text-primary);
  background: var(--dl-bg-page);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--dl-font-heading);
  line-height: var(--dl-leading-tight);
  margin: 0 0 var(--dl-space-4);
}

p { margin: 0 0 var(--dl-space-4); }
a { color: var(--dl-accent); text-decoration: none; }
a:hover { color: var(--dl-accent-hover); }

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

::selection {
  background: var(--dl-gold);
  color: var(--dl-charcoal);
}

:focus-visible {
  outline: 2px solid var(--dl-bourbon);
  outline-offset: 2px;
}


/* ============================================================
   3. COMPONENT PATTERNS
   ============================================================ */

/* --- Site Header --- */
.dl-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--dl-header-height);
  background: var(--dl-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--dl-space-6);
  z-index: 100;
  border-bottom: 2px solid var(--dl-gold);
}

.dl-header-brand {
  font-family: var(--dl-font-heading);
  font-weight: 700;
  font-size: var(--dl-text-lg);
  color: var(--dl-white);
  letter-spacing: -0.01em;
}

.dl-header-nav {
  display: flex;
  gap: var(--dl-space-5);
}

.dl-header-nav a {
  font-family: var(--dl-font-ui);
  font-weight: 500;
  font-size: var(--dl-text-sm);
  color: var(--dl-cream);
  opacity: 0.85;
  transition: opacity var(--dl-duration-fast) var(--dl-ease);
}

.dl-header-nav a:hover { opacity: 1; color: var(--dl-gold); }

/* --- Card --- */
.dl-card {
  background: var(--dl-bg-card);
  border-radius: var(--dl-radius-md);
  border-top: 3px solid var(--dl-bourbon);
  box-shadow: var(--dl-shadow-sm);
  overflow: hidden;
  transition: transform var(--dl-duration-normal) var(--dl-ease),
              box-shadow var(--dl-duration-normal) var(--dl-ease);
}

.dl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dl-shadow-lg);
}

.dl-card-body {
  padding: var(--dl-space-6);
}

.dl-card-footer {
  background: var(--dl-bg-surface);
  padding: var(--dl-space-4) var(--dl-space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Buttons --- */
.dl-btn {
  font-family: var(--dl-font-ui);
  font-weight: 600;
  font-size: var(--dl-text-sm);
  padding: var(--dl-space-2) var(--dl-space-5);
  border-radius: var(--dl-radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--dl-duration-fast) var(--dl-ease);
  display: inline-flex;
  align-items: center;
  gap: var(--dl-space-2);
  line-height: 1;
}

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

.dl-btn-primary:hover {
  background: var(--dl-bourbon-light);
}

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

.dl-btn-secondary:hover {
  background: var(--dl-bourbon);
  color: var(--dl-white);
}

.dl-btn-gold {
  background: var(--dl-gold);
  color: var(--dl-charcoal);
  font-weight: 700;
}

.dl-btn-gold:hover {
  background: var(--dl-bourbon-light);
  color: var(--dl-white);
}

/* --- Pills / Tags --- */
.dl-pill {
  font-family: var(--dl-font-ui);
  font-weight: 500;
  font-size: var(--dl-text-xs);
  padding: var(--dl-space-1) var(--dl-space-3);
  border-radius: var(--dl-radius-pill);
  background: rgba(162, 88, 21, 0.08);
  color: var(--dl-bourbon);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dl-pill-active {
  background: var(--dl-bourbon);
  color: var(--dl-white);
  box-shadow: 0 2px 8px rgba(162, 88, 21, 0.25);
}

.dl-pill-teal {
  background: var(--dl-teal);
  color: var(--dl-white);
}

/* --- Footer --- */
.dl-footer {
  background: var(--dl-navy);
  border-top: 2px solid var(--dl-gold);
  padding: var(--dl-space-8) var(--dl-space-6);
  text-align: center;
}

.dl-footer-brand {
  font-family: var(--dl-font-ui);
  font-weight: 400;
  font-size: var(--dl-text-sm);
  color: var(--dl-cream);
  opacity: 0.7;
}

.dl-footer-nav {
  display: flex;
  justify-content: center;
  gap: var(--dl-space-6);
  margin-top: var(--dl-space-4);
}

.dl-footer-nav a {
  font-family: var(--dl-font-ui);
  font-weight: 500;
  font-size: var(--dl-text-xs);
  color: var(--dl-cream);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dl-footer-nav a:hover { opacity: 1; color: var(--dl-gold); }

/* --- Newsletter CTA Block --- */
.dl-newsletter {
  background: var(--dl-navy);
  padding: var(--dl-space-16) var(--dl-space-6);
  text-align: center;
}

.dl-newsletter-title {
  font-family: var(--dl-font-display);
  font-size: var(--dl-text-2xl);
  color: var(--dl-cream);
  margin-bottom: var(--dl-space-3);
}

.dl-newsletter-subtitle {
  font-family: var(--dl-font-body);
  font-size: var(--dl-text-base);
  color: var(--dl-cream);
  opacity: 0.7;
  margin-bottom: var(--dl-space-8);
}

.dl-newsletter-form {
  display: flex;
  gap: var(--dl-space-3);
  max-width: 440px;
  margin: 0 auto;
}

.dl-newsletter-input {
  flex: 1;
  padding: var(--dl-space-3) var(--dl-space-5);
  border: 1.5px solid rgba(228, 174, 65, 0.3);
  border-radius: var(--dl-radius-pill);
  background: rgba(255, 253, 248, 0.08);
  color: var(--dl-cream);
  font-family: var(--dl-font-ui);
  font-size: var(--dl-text-sm);
}

.dl-newsletter-input::placeholder {
  color: rgba(245, 242, 236, 0.4);
}

.dl-newsletter-input:focus {
  outline: none;
  border-color: var(--dl-gold);
  background: rgba(255, 253, 248, 0.12);
}

/* --- Dividers --- */
.dl-divider {
  border: none;
  height: 1px;
  background: var(--dl-cream-warm);
  margin: var(--dl-space-6) 0;
}

.dl-divider-bourbon {
  background: var(--dl-bourbon);
  opacity: 0.3;
}

/* --- Eyebrow Text --- */
.dl-eyebrow {
  font-family: var(--dl-font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--dl-bourbon);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* --- Display Title --- */
.dl-display {
  font-family: var(--dl-font-display);
  font-weight: 400;
  color: var(--dl-charcoal);
}

/* --- Callout Block (Louisville Story, etc.) --- */
.dl-callout {
  background: var(--dl-cream);
  border-left: 4px solid var(--dl-bourbon);
  padding: var(--dl-space-5) var(--dl-space-6);
  border-radius: 0 var(--dl-radius-sm) var(--dl-radius-sm) 0;
}

.dl-callout-label {
  font-family: var(--dl-font-heading);
  font-weight: 600;
  font-size: var(--dl-text-sm);
  color: var(--dl-bourbon);
  margin-bottom: var(--dl-space-2);
}

.dl-callout-text {
  font-family: var(--dl-font-body);
  font-style: italic;
  font-size: var(--dl-text-base);
  color: var(--dl-charcoal);
  line-height: var(--dl-leading-relaxed);
}


/* ============================================================
   4. UTILITY CLASSES
   ============================================================ */

.dl-container {
  max-width: var(--dl-max-width);
  margin: 0 auto;
  padding: 0 var(--dl-space-6);
}

.dl-text-bourbon { color: var(--dl-bourbon); }
.dl-text-gold { color: var(--dl-gold); }
.dl-text-navy { color: var(--dl-navy); }
.dl-text-teal { color: var(--dl-teal); }
.dl-text-muted { opacity: 0.65; }

.dl-bg-cream { background: var(--dl-cream); }
.dl-bg-navy { background: var(--dl-navy); }
.dl-bg-white { background: var(--dl-white); }


/* ============================================================
   5. SCROLL ANIMATIONS
   ============================================================ */

.dl-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--dl-ease), transform 0.5s var(--dl-ease);
}

.dl-fade-in.dl-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   6. ACCESSIBILITY & MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .dl-fade-in { opacity: 1; transform: none; }
  .dl-card:hover { transform: none; }
}


/* ============================================================
   7. PRINT
   ============================================================ */

@media print {
  body {
    background: white;
    color: black;
    font-family: 'Source Serif 4', Georgia, serif;
  }

  .dl-header, .dl-footer, .dl-newsletter {
    display: none;
  }

  .dl-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .dl-card:hover {
    transform: none;
    box-shadow: none;
  }

  .dl-btn { display: none; }

  a { color: var(--dl-charcoal); text-decoration: underline; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; opacity: 0.6; }
}
