/* ==========================================================================
   Design System
   ==========================================================================
   Complete design system with CSS Custom Properties.
   Override :root variables per client to customize the entire theme.
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */

:root {
    /* ──────────────────────────────────────────────────────────────────────
       LUM-TECH BRAND TOKENS
       Source of truth: projects/lum-tech/brand-guidelines.json
       Dark-envelope system: most surfaces live on #0A1628 deep navy bg.
       ────────────────────────────────────────────────────────────────────── */

    /* ── Core Brand Colors ──────────────────────────────────────────────── */
    --color-primary: #19477B;           /* Lum-Tech Navy — brand anchor */
    --color-primary-light: #2A5B95;
    --color-primary-dark: #12365F;
    --color-primary-50: #E8F0F8;
    --color-primary-100: #C5D6E8;
    --color-primary-200: #9FB9D7;
    --color-primary-500: #19477B;
    --color-primary-600: #12365F;
    --color-primary-700: #0D2747;
    --color-primary-800: #081A31;
    --color-primary-900: #0A1628;

    --color-secondary: #0A1628;         /* Deep Navy Background — dark-envelope surface */
    --color-secondary-light: #122038;   /* Elevated surface */
    --color-secondary-dark: #050B18;    /* Deepest accent for hero overlays */
    --color-secondary-rgb: 10, 22, 40;  /* For shadow tinting */

    --color-accent: #0066CC;            /* Electric Blue — CTAs, links, focus */
    --color-accent-light: #1A7AD9;
    --color-accent-dark: #004F9E;

    /* ── Dark-Envelope Neutrals ─────────────────────────────────────────── */
    --gray-50: #F5F7FA;
    --gray-100: #E8EEF5;                /* Near-White — primary text on dark */
    --gray-200: #D4DCE7;
    --gray-300: #A8B5C5;                /* Muted Cool Gray — secondary text */
    --gray-400: #7A8899;
    --gray-500: #5B6A7E;
    --gray-600: #3D4A5F;
    --gray-700: #1B2B45;                /* Border / Surface Alt */
    --gray-800: #122038;                /* Elevated surface */
    --gray-900: #0A1628;                /* Background */
    --gray-950: #050B18;                /* Deepest */

    /* ── Semantic Colors ────────────────────────────────────────────────── */
    --color-success: #22C55E;
    --color-warning: #EAB308;
    --color-error: #EF4444;
    --color-info: #0066CC;

    /* ── Background Colors (dark-first) ─────────────────────────────────── */
    --bg-primary: #0A1628;              /* Default surface = deep navy */
    --bg-secondary: #122038;            /* Elevated panels */
    --bg-dark: #0A1628;
    --bg-darker: #050B18;

    /* ── Text Colors (on dark) ──────────────────────────────────────────── */
    --text-primary: #E8EEF5;            /* Near-white on dark bg */
    --text-secondary: #A8B5C5;          /* Muted cool gray */
    --text-tertiary: #7A8899;
    --text-inverse: #0A1628;            /* Used on rare light panels */
    --text-link: var(--color-accent);
    --text-link-hover: var(--color-accent-light);

    /* ── Hairline Borders (thin-line aesthetic per client pref) ─────────── */
    --border-color: rgba(232, 238, 245, 0.12);
    --border-color-dark: rgba(232, 238, 245, 0.18);
    --border-width: 1px;

    /* ── Typography ─────────────────────────────────────────────────────── */
    --font-heading: 'Inter Display', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes (clamp for responsiveness) */
    /* Scaled up for luxury/premium feel per Sean v1-review feedback (2026-04-20).
       Minimums raised ~15-25%, maximums raised ~20-40% across display sizes. */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
    --text-sm: clamp(0.8125rem, 0.775rem + 0.25vw, 0.9375rem);
    --text-base: clamp(1rem, 0.95rem + 0.3vw, 1.0625rem);
    --text-md: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
    --text-lg: clamp(1.1875rem, 1.1rem + 0.45vw, 1.375rem);
    --text-xl: clamp(1.375rem, 1.2rem + 0.85vw, 1.875rem);
    --text-2xl: clamp(1.75rem, 1.45rem + 1.2vw, 2.5rem);
    --text-3xl: clamp(2.25rem, 1.75rem + 1.8vw, 3.25rem);
    --text-4xl: clamp(2.75rem, 2rem + 2.4vw, 4.75rem);
    --text-5xl: clamp(3.5rem, 2.5rem + 3.25vw, 6rem);
    --text-6xl: clamp(4.25rem, 3rem + 4.25vw, 7.5rem);
    --text-7xl: clamp(5rem, 3.25rem + 5vw, 9rem);                  /* hero display */
    --text-eyebrow: clamp(0.6875rem, 0.65rem + 0.15vw, 0.75rem);   /* tracked-out label */

    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;
    --leading-loose: 2;

    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* ── Spacing Scale ──────────────────────────────────────────────────── */
    --space-xs: 0.25rem;     /* 4px */
    --space-sm: 0.5rem;      /* 8px */
    --space-md: 1rem;        /* 16px */
    --space-lg: 1.5rem;      /* 24px */
    --space-xl: 2rem;        /* 32px */
    --space-2xl: 3rem;       /* 48px */
    --space-3xl: 4rem;       /* 64px */
    --space-4xl: 6rem;       /* 96px — luxury generous */
    --space-5xl: 8rem;       /* 128px — hero/credibility margins */
    --space-cta-above: 4rem;  /* 64px minimum gap before any trailing section CTA */

    /* Section padding bumped for premium/luxury vertical rhythm. */
    --section-padding: clamp(4.5rem, 8vw, 9rem);
    --section-padding-sm: clamp(3rem, 5vw, 5rem);   /* for compact sections like trust strip */
    --container-max: 1280px;
    --container-wide: 1440px;
    --container-padding: clamp(1rem, 3vw, 2rem);
    --container-narrow: 800px;

    /* ── Radius (tight, technical, spec-grade feel) ─────────────────────── */
    --radius-sm: 2px;        /* Brand guidelines: small */
    --radius-md: 4px;        /* Brand guidelines: medium */
    --radius-lg: 8px;        /* Brand guidelines: large */
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;

    /* ── Shadows (brand-tinted, not generic black) ────────────────────── */
    /* NOTE: Define --color-secondary-rgb (e.g., 58, 72, 77) per client brand colors */
    --shadow-sm: 0 1px 3px rgba(var(--color-secondary-rgb), 0.08),
                 0 1px 2px rgba(var(--color-secondary-rgb), 0.06);
    --shadow-md: 0 4px 12px rgba(var(--color-secondary-rgb), 0.08);
    --shadow-lg: 0 10px 25px rgba(var(--color-secondary-rgb), 0.1),
                 0 4px 10px rgba(var(--color-secondary-rgb), 0.05);
    --shadow-xl: 0 20px 50px rgba(var(--color-secondary-rgb), 0.12),
                 0 8px 20px rgba(var(--color-secondary-rgb), 0.06);
    --shadow-2xl: 0 25px 60px rgba(var(--color-secondary-rgb), 0.15),
                  0 10px 25px rgba(var(--color-secondary-rgb), 0.08);

    /* ── Transitions (spring easing, not generic ease) ────────────────── */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.33, 0, 0.2, 1);
    --ease-smooth: cubic-bezier(0.215, 0.61, 0.355, 1);
    --transition-fast: 150ms;
    --transition-base: 300ms;
    --transition-slow: 500ms;
    --transition-slower: 750ms;

    /* ── Icon Size Tiers ──────────────────────────────────────────────── */
    --icon-sm: 20px;    /* Inline text, badges */
    --icon-md: 32px;    /* Nav, small UI elements */
    --icon-lg: 48px;    /* Service/feature card headers, trust signals */
    --icon-xl: 64px;    /* Section feature icons */
    --icon-2xl: 80px;   /* Hero/emergency section focal icons */

    /* ── Z-Index Scale ──────────────────────────────────────────────────── */
    --z-behind: -1;
    --z-base: 0;
    --z-raised: 10;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-toast: 600;
    --z-max: 9999;
}


/* --------------------------------------------------------------------------
   CSS Reset
   -------------------------------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

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

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

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

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

address {
    font-style: normal;
}


/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

/* Lum-Tech overrides: thin heading weights per client "thinner fonts and lines" preference. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-light);           /* 300 — thin-line aesthetic */
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

h1, h2 {
    text-wrap: balance;
}

h1 {
    font-size: var(--text-6xl);
    font-weight: 200;                         /* Extra thin for display */
    letter-spacing: var(--tracking-tighter);
    line-height: 1.04;
}

h2 {
    font-size: var(--text-5xl);
    font-weight: 200;                         /* Extra thin for display */
    line-height: 1.08;
}

h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-light);           /* 300 */
    line-height: 1.15;
}

h4 {
    font-size: var(--text-xl);
    font-weight: var(--font-regular);         /* 400 */
}

h5 {
    font-size: var(--text-lg);
    font-weight: var(--font-regular);         /* 400 */
    text-transform: uppercase;                /* Eyebrow-style per brand */
    letter-spacing: var(--tracking-widest);   /* 0.15em tracking */
}

h6 {
    font-size: var(--text-md);
    font-weight: var(--font-medium);          /* 500 */
}

p {
    margin-bottom: var(--space-md);
    line-height: var(--leading-normal);
    color: var(--text-secondary);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: var(--font-semibold);
}


/* --------------------------------------------------------------------------
   Layout: Container
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

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

.container--wide {
    max-width: 1440px;
}


/* --------------------------------------------------------------------------
   Layout: Section
   -------------------------------------------------------------------------- */

.section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

.section--alt {
    background-color: var(--bg-secondary);
}

.section--dark {
    background-color: var(--bg-dark);
    color: var(--text-inverse);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
    color: var(--text-inverse);
}

.section--dark p {
    color: var(--gray-300);
}

.section__header {
    text-align: center;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-4xl);
}

.section__title {
    margin-bottom: var(--space-lg);
    text-wrap: balance;
}

.section__title--left {
    text-align: left;
}

.section__title--sm {
    font-size: var(--text-3xl);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 52ch;
    margin-left: auto;
    margin-right: auto;
}

/* Section eyebrow and header-left variants live in sections.css. */

.section--dark .section__subtitle {
    color: var(--gray-300);
}


/* --------------------------------------------------------------------------
   Flexbox 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-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}


/* --------------------------------------------------------------------------
   Grid Utilities
   -------------------------------------------------------------------------- */

.grid {
    display: grid;
    gap: var(--space-xl);
}

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

@media (max-width: 768px) {
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
}


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    /* Enlarged for luxury presence per v1-review feedback. */
    padding: 1.125rem 2.25rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base) var(--ease-out);
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Primary Button — Electric Blue CTA per brand guidelines (CTAs, links). */
.btn--primary {
    background-color: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px -10px rgba(0, 102, 204, 0.5);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background-color: var(--color-accent-light);
    border-color: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 14px 40px -10px rgba(0, 102, 204, 0.65);
    outline: none;
}

/* Ghost — thin hairline outline, the quietest CTA. */
.btn--ghost {
    background-color: transparent;
    color: var(--text-primary);
    border-color: rgba(232, 238, 245, 0.35);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
    border-color: var(--color-accent);
    color: var(--color-accent);
    outline: none;
    transform: translateY(-2px);
}

/* Secondary Button */
.btn--secondary {
    background-color: var(--color-secondary);
    color: var(--text-inverse);
    border-color: var(--color-secondary);
}

.btn--secondary:hover {
    background-color: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Outline Button */
.btn--outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--outline:hover {
    background-color: var(--color-primary);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Button Sizes */
.btn--sm {
    padding: 0.625rem 1.375rem;
    font-size: var(--text-xs);
}

.btn--lg {
    padding: 1.25rem 2.75rem;
    font-size: var(--text-base);
    gap: var(--space-md);
}

.btn--xl {
    padding: 1.5rem 3.25rem;
    font-size: var(--text-base);
    gap: var(--space-md);
    letter-spacing: 0.1em;
}

/* Full Width Button */
.btn--full {
    width: 100%;
}

.btn__icon {
    display: inline-flex;
    flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   Form Elements
   -------------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}


/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    :root {
        --section-padding: clamp(3.5rem, 6vw, 6rem);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: clamp(3rem, 5vw, 4.5rem);
    }

    .section__header {
        margin-bottom: var(--space-3xl);
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }
}
