/* ============================================================
   PlumbGrade Design System
   Premium Digital Plumbing Media Brand
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand Colors: Vivid Electric Blue Theme */
  --color-primary: #1C3D6E;
  --color-primary-hover: #142C50;
  --color-primary-light: rgba(28, 61, 110, 0.08);
  --color-primary-border: rgba(28, 61, 110, 0.18);

  --color-accent: #1C3D6E;
  --color-accent-hover: #142C50;
  --color-accent-light: rgba(28, 61, 110, 0.08);
  --color-accent-border: rgba(28, 61, 110, 0.18);

  /* Lavender-Grey Body + White Card Canvas */
  --color-bg: #EEF2FF;
  --color-bg-alt: #E8EDFF;
  --color-bg-dark: #1C3D6E;
  --color-surface: #FFFFFF;
  --color-surface-hover: #F8FAFC;
  --color-text: #1E293B;
  --color-text-secondary: #475569;
  --color-secondary: #475569;
  --color-text-muted: #94A3B8;
  --color-text-inverse: #FFFFFF;
  --color-border: #D1D9F0;
  --color-border-light: #E8EDFF;

  /* Semantic */
  --color-success: #16A34A;
  --color-star: #F59E0B;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 3.75rem;

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.7;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-sm: 640px;
  --container-md: 800px;
  --container-lg: 1100px;
  --container-xl: 1240px;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows: Soft Multi-Layered Ambient Shadows */
  --shadow-xs: 0 1px 2px rgba(28, 61, 110, 0.04);
  --shadow-sm: 0 2px 6px rgba(28, 61, 110, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 61, 110, 0.08);
  --shadow-lg: 0 12px 36px rgba(28, 61, 110, 0.10);
  --shadow-xl: 0 20px 50px rgba(28, 61, 110, 0.12);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 { font-size: var(--text-4xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); font-weight: 800; }
h3 { font-size: var(--text-2xl); font-weight: 700; }
h4 { font-size: var(--text-xl); font-weight: 700; }
h5 { font-size: var(--text-lg); font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

p:last-child { margin-bottom: 0; }

.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-center { text-align: center; }
.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-xs);
  font-weight: 600;
}
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container,
.container-sm,
.container-md,
.container-lg {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container { max-width: var(--container-xl); }
.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }

/* Section Spacing */
.section {
  padding: var(--space-24) 0;
}

.section-sm {
  padding: var(--space-16) 0;
}

.section-lg {
  padding: var(--space-32) 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
  color: var(--color-text-inverse);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.7);
}

/* Section Header */
.section-header {
  max-width: 680px;
  margin-bottom: var(--space-12);
}

.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-header .section-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Spacing Utilities */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ============================================================
   RESPONSIVE TYPOGRAPHY
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --text-5xl: 3rem;
    --text-4xl: 2.5rem;
    --text-3xl: 2rem;
    --text-2xl: 1.5rem;
  }
}

@media (max-width: 640px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --text-2xl: 1.375rem;
    --text-xl: 1.25rem;
    --text-lg: 1.0625rem;
  }

  .section {
    padding: var(--space-16) 0;
  }

  .section-lg {
    padding: var(--space-20) 0;
  }

  .container {
    padding: 0 var(--space-5);
  }

  .section-header {
    margin-bottom: var(--space-8);
  }
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS (SAFE & ACCESSIBLE)
   ============================================================ */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.revealed > * {
  opacity: 1;
  transform: translateY(0);
}
