/* ============================================
   HORROR STORIES – Design System & Core Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Inter:wght@300;400;500;600;700&family=Nosifer&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colors */
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #0e0e18;
  --color-bg-card: rgba(15, 15, 25, 0.7);
  --color-bg-modal: rgba(5, 5, 10, 0.95);
  --color-bg-glass: rgba(20, 15, 30, 0.45);

  --color-blood: #8b0000;
  --color-blood-bright: #cc1100;
  --color-crimson: #dc143c;
  --color-ember: #ff4500;

  --color-purple-deep: #2d1b4e;
  --color-purple: #6b21a8;
  --color-purple-glow: #9333ea;

  --color-text-primary: #e8e0d4;
  --color-text-secondary: #a09888;
  --color-text-muted: #5a5248;
  --color-text-accent: #ff6b6b;

  --color-fog: rgba(200, 200, 220, 0.03);
  --color-border: rgba(139, 0, 0, 0.3);
  --color-border-glow: rgba(220, 20, 60, 0.4);
  --color-border-purple: rgba(147, 51, 234, 0.3);

  /* Typography */
  --font-display: 'Creepster', cursive;
  --font-accent: 'Nosifer', cursive;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 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.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  --text-hero: clamp(3rem, 8vw, 7rem);

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

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.8);
  --shadow-glow-red: 0 0 30px rgba(139, 0, 0, 0.4), 0 0 60px rgba(139, 0, 0, 0.2);
  --shadow-glow-purple: 0 0 30px rgba(107, 33, 168, 0.4), 0 0 60px rgba(107, 33, 168, 0.2);
  --shadow-glow-crimson: 0 0 20px rgba(220, 20, 60, 0.5), 0 0 40px rgba(220, 20, 60, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-bg: -1;
  --z-base: 1;
  --z-nav: 100;
  --z-modal: 200;
  --z-toast: 300;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--color-blood) var(--color-bg-primary);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-blood);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-blood-bright);
}

::selection {
  background: var(--color-blood);
  color: var(--color-text-primary);
}

a {
  color: var(--color-text-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

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

.text-center {
  text-align: center;
}

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

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

.text-glow {
  text-shadow: 0 0 10px rgba(220, 20, 60, 0.5), 0 0 30px rgba(220, 20, 60, 0.3);
}

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

/* Section titles */
.section-title {
  font-size: var(--text-5xl);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-blood-bright), transparent);
  border-radius: var(--radius-full);
}

.section-title.centered::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: var(--space-lg) auto 0;
  font-weight: 300;
}

/* Glassmorphism base */
.glass {
  background: var(--color-bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* Gradient dividers */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-glow), transparent);
  border: none;
  margin: 0;
}

/* ── Responsive Core ── */
@media (max-width: 768px) {
  .section-title {
    font-size: var(--text-4xl);
  }

  .section-subtitle {
    font-size: var(--text-base);
    padding: 0 var(--space-md);
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: var(--text-3xl);
  }

  .section {
    padding: 4rem 0;
  }
}