/*
Theme Name: C4 Fire & Security Theme
Theme URI: https://c4fire.co.za
Author: KM Digital Solutions
Author URI: https://km-digitalsolutions.com
Description: Custom WordPress theme for C4 Fire & Security. Bold, dark industrial design with GSAP animations. Fire prevention, detection & suppression services  - Western Cape, South Africa.
Version: 2.2.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://km-digitalsolutions.com/license
Text Domain: c4-fire
*/

/* ===== CSS RESET & CUSTOM PROPERTIES ===== */
:root {
  /* Brand Colors */
  --c4-red: #E82429;
  --c4-red-dark: #B81D21;
  --c4-red-glow: rgba(232, 36, 41, 0.15);
  --c4-yellow: #FFC200;
  --c4-yellow-dark: #CC9B00;
  --c4-charcoal: #595A5C;
  --c4-black: #010101;
  --c4-white: #FFFFFF;

  /* Extended Palette */
  --surface: #0a0a0c;
  --surface-elevated: #1A1A1D;
  --border: #2A2A2D;
  --text-muted: #8A8A8E;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Layout */
  --container-max: 1280px;
  --container-wide: 1440px;
  --header-height: 80px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.83, 0, 0.17, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.8s;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--c4-white);
  background-color: var(--c4-black);
  -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 {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* ===== UTILITY CLASSES ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.container--wide {
  max-width: var(--container-wide);
}

.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;
}

/* ===== TYPOGRAPHY ===== */
.h1 { font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.02em; }
.h2 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.01em; }
.h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 700; }
.h4 { font-size: clamp(1.125rem, 2vw, 1.375rem); font-weight: 600; }

.text-red { color: var(--c4-red); }
.text-yellow { color: var(--c4-yellow); }
.text-muted { color: var(--text-muted); }
.text-upper { text-transform: uppercase; letter-spacing: 0.08em; }

.label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c4-red);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--c4-red);
  color: var(--c4-white);
}

.btn--primary:hover {
  background: var(--c4-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 36, 41, 0.3);
}

.btn--secondary {
  background: transparent;
  color: var(--c4-white);
  border: 2px solid var(--c4-white);
}

.btn--secondary:hover {
  background: var(--c4-white);
  color: var(--c4-black);
}

.btn--yellow {
  background: var(--c4-yellow);
  color: var(--c4-black);
}

.btn--yellow:hover {
  background: var(--c4-yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 194, 0, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--c4-red);
  border: 2px solid var(--c4-red);
}

.btn--ghost:hover {
  background: var(--c4-red);
  color: var(--c4-white);
}

.btn--sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
}

.btn--lg {
  padding: 1.125rem 2.5rem;
  font-size: 1rem;
}

/* ===== SECTION SPACING ===== */
.section {
  padding-block: var(--space-3xl);
}

.section--dark {
  background: var(--c4-black);
}

.section--surface {
  background: var(--surface);
}

.section--elevated {
  background: var(--surface-elevated);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section__header .label {
  margin-bottom: var(--space-sm);
  display: block;
}

.section__header h2 {
  margin-bottom: var(--space-sm);
}

.section__header p {
  color: var(--text-muted);
  max-width: 640px;
  margin-inline: auto;
  font-size: 1.0625rem;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal--left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal--right {
  opacity: 0;
  transform: translateX(40px);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.9);
}

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