/* ==========================================================================
   Gift Basket Course - Global Design System
   Editorial/Magazine Aesthetic - Warm Coral + Navy Palette
   ========================================================================== */

/* ==========================================================================
   CSS Reset - Modern Minimal Reset
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.5;
  min-height: 100vh;
}

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

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

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

/* ==========================================================================
   CSS Custom Properties - Design Tokens
   ========================================================================== */

:root {
  /* Color Palette - Navy + Emerald */
  --color-primary: #2E4057;      /* Warm navy - editorial trust, headings */
  --color-accent: #2E8B6F;       /* Rich emerald - confident CTAs, stat numbers */
  --color-warm: #C4873C;         /* Warm golden amber - urgency CTAs */
  --color-gold: #D4A76A;         /* Honey gold - blockquotes, premium feel */
  --color-background: #FAFCFA;   /* Clean warm white */

  /* Grays for text and UI */
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #4a5568;
  --color-text-muted: #718096;
  --color-border: #e8dfd8;
  --color-ui-light: #faf7f5;

  /* Typography */
  --font-display: 'Fraunces', 'Merriweather', 'Georgia', serif;
  --font-body: 'Figtree', 'Inter', 'Segoe UI', sans-serif;

  /* Spacing System - 8px baseline */
  --spacing-base: 8px;
  --spacing-xs: calc(var(--spacing-base) * 1);    /* 8px */
  --spacing-sm: calc(var(--spacing-base) * 2);    /* 16px */
  --spacing-md: calc(var(--spacing-base) * 3);    /* 24px */
  --spacing-lg: calc(var(--spacing-base) * 4);    /* 32px */
  --spacing-xl: calc(var(--spacing-base) * 5);    /* 40px */
  --spacing-2xl: calc(var(--spacing-base) * 6);   /* 48px */
  --spacing-3xl: calc(var(--spacing-base) * 8);   /* 64px */

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 14px rgba(46, 139, 111, 0.3);
  --shadow-lg: 0 6px 20px rgba(46, 139, 111, 0.4);
  --shadow-elevated: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-dramatic: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Typography - Fluid Scaling with clamp()
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
}

h1 {
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.4;
  margin-bottom: var(--spacing-sm);
}

p {
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  max-width: 65ch; /* Optimal reading width */
}

.subheadline {
  font-size: clamp(18px, 3vw, 22px);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
}

/* Bold dollar amounts in copy */
strong, b {
  font-weight: 600;
  color: var(--color-primary);
}

/* ==========================================================================
   Animation Keyframes
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideRight {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(196, 135, 60, 0.3);
  }
  50% {
    box-shadow: 0 4px 24px rgba(196, 135, 60, 0.5), 0 0 40px rgba(196, 135, 60, 0.15);
  }
}

/* ==========================================================================
   Scroll Reveal System
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}

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

.reveal-fade {
  opacity: 0;
  transition: opacity 0.6s ease;
  transition-delay: var(--delay, 0s);
}

.reveal-fade.visible {
  opacity: 1;
}

/* ==========================================================================
   Stat Number Styling
   ========================================================================== */

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}

/* ==========================================================================
   CTA Button Styles - Three Variants
   ========================================================================== */

.button {
  display: inline-block;
  width: 100%; /* Full-width on mobile */
  min-height: 60px;
  padding: 18px 24px;

  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;

  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;

  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Primary CTA - Green (for CTAs #1 and #2) */
.button-primary {
  background-color: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-md);
}

.button-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
  background-color: #257A5F;
}

.button-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Urgent CTA - Orange (for CTA #3 final close) */
.button-urgent {
  background-color: var(--color-warm);
  color: white;
  min-height: 64px;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(196, 135, 60, 0.3);
}

.button-urgent:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(196, 135, 60, 0.45);
  background-color: #B07832;
}

.button-urgent:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(196, 135, 60, 0.3);
}

/* Secondary button style (if needed) */
.button-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  box-shadow: none;
}

.button-secondary:hover {
  background-color: var(--color-accent);
  color: white;
  transform: translateY(-2px);
}

/* Desktop: constrain button width */
@media (min-width: 768px) {
  .button {
    width: auto;
    min-width: 300px;
  }
}

/* ==========================================================================
   Common Utility Classes
   ========================================================================== */

/* Article body container - centered single column */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

/* Section padding - vertical rhythm */
.section-padding {
  padding: var(--spacing-3xl) var(--spacing-md);
}

@media (min-width: 768px) {
  .section-padding {
    padding: 80px var(--spacing-xl);
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding: 96px var(--spacing-2xl);
  }
}

/* Container with max-width */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
  }
}

/* Text alignment */
.text-center {
  text-align: center;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Mobile-first approach:
   - Base styles target 375px viewport (iPhone baseline)
   - Scale up with min-width media queries

   Breakpoints:
   - 768px: Tablet
   - 1024px: Desktop
*/

@media (min-width: 768px) {
  .article-body {
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
  }
}

@media (min-width: 1024px) {
  .article-body {
    padding-left: var(--spacing-2xl);
    padding-right: var(--spacing-2xl);
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Visually hidden but accessible to screen readers */
.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;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  body {
    background: white;
    color: black;
  }

  .button,
  .comments-section,
  header nav {
    display: none;
  }
}

/* ==========================================================================
   Reduced Motion - Accessibility
   ========================================================================== */

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

  .button {
    transition: none;
  }

  .module-card {
    transition: none;
  }

  @keyframes pulseGlow {
    0%, 50%, 100% {
      box-shadow: 0 4px 14px rgba(196, 135, 60, 0.3);
    }
  }
}
