/* ============================================================
   main.css — Theme Variables, Reset, Typography
   Firework Lights B2B Website
   ============================================================ */

/* === CSS Custom Properties (Design Tokens) === */
:root {
  /* Color Palette — Dark background + Warm Gold accents */
  --color-gold-400: #E5A830;
  --color-gold-500: #B8860B;

  --color-bg-primary: #0A0A0A;
  --color-bg-secondary: #111111;
  --color-bg-tertiary: #1A1A1A;
  --color-bg-elevated: #1E1E1E;
  --color-bg-nav: rgba(10, 10, 10, 0.92);

  --color-text-primary: #F5F0E8;
  --color-text-secondary: #A09888;
  --color-text-muted: #6B6560;

  --color-success: #2D8B4E;
  --color-error: #C0392B;
  --color-border: #383838;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-h1: clamp(2.25rem, 5vw, 3.75rem);
  --text-h2: clamp(1.75rem, 4vw, 2.5rem);
  --text-h3: clamp(1.25rem, 2.5vw, 1.75rem);
  --text-h4: clamp(1.1rem, 2vw, 1.35rem);
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-caption: 0.75rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-section: clamp(4rem, 8vw, 7.5rem);

  /* Layout */
  --max-width: 1280px;
  --max-width-narrow: 800px;
  --max-width-wide: 1440px;
  --header-height: 76px;

  /* Borders & Shadows */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 24px rgba(184, 134, 11, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* z-index Layers */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
}

/* === Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

p + p {
  margin-top: var(--space-sm);
}

::selection {
  background-color: var(--color-gold-400);
  color: var(--color-bg-primary);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-gold-400);
  outline-offset: 2px;
}

/* === Utility Classes === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding-block: var(--space-section);
}

.section--sm {
  padding-block: var(--space-xl);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-gold {
  color: var(--color-gold-400);
}

.text-muted {
  color: var(--color-text-secondary);
}

.text-center {
  text-align: center;
}

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* === Section Headers === */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  max-width: 600px;
  margin-inline: auto;
}

.section-tag {
  display: inline-block;
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold-400);
  margin-bottom: var(--space-sm);
}

/* === Grid System === */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === Page Header (inner pages) === */
.page-hero {
  position: relative;
  padding-block: calc(var(--header-height) + var(--space-xl)) var(--space-xl);
  background-color: var(--color-bg-secondary);
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(229, 168, 48, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero h1 {
  margin-bottom: var(--space-sm);
}

.page-hero p {
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-inline: auto;
}

/* === Breadcrumb === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-small);
  color: var(--color-text-muted);
  padding-block: var(--space-sm);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-gold-400);
}

.breadcrumb .separator {
  user-select: none;
}
