/*
 * global.css
 * OverSpec Designs — v2
 *
 * Foundation layer: design tokens, resets, typography,
 * global utilities, and page-level effects.
 * Load on EVERY page.
 */

/* ══════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════ */
:root {
    --black:        #0A0A0A;
    --near-black:   #111111;
    --dark-metal:   #1A1D20;
    --charcoal:     #1a1a1a;
    --gunmetal:     #2C3539;
    --steel:        #6A7178;
    --iron:         #3a3a3a;
    --aluminum:     #B8C0C8;
    --silver:       #D8E0E8;
    --white:        #F8F9FA;
    --orange:       #FF6700;
    --orange-bright:#FF8833;
    --orange-dark:  #CC5200;
    --orange-dim:   rgba(255,103,0,0.15);
    --success:      #00FF88;

    --font-display: 'Barlow Condensed', sans-serif;
    --font-body:    'Rajdhani', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--black); }
::-webkit-scrollbar-thumb  { background: var(--steel); }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ══════════════════════════════════════
   PAGE-LEVEL EFFECTS
══════════════════════════════════════ */

/* Subtle grid overlay — fixed, behind everything */
.background-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image:
        linear-gradient(var(--steel) 1px, transparent 1px),
        linear-gradient(90deg, var(--steel) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Scanline texture */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.015) 2px,
        rgba(0,0,0,0.015) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* ══════════════════════════════════════
   LAYOUT
══════════════════════════════════════ */
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* v2 storefront uses tighter max-width */
.section-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* ══════════════════════════════════════
   TYPOGRAPHY SCALE
══════════════════════════════════════ */

/* Smallest technical tags */
.text-micro {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Metadata / under-labels */
.text-detail {
    font-size: 14px;
    color: var(--steel);
    line-height: 1.4;
    letter-spacing: 0.5px;
}

/* Secondary emphasis */
.text-label-sm {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.text-label-md {
    font-size: 20px;
    font-weight: 1000;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.heading-sm {
    font-family: var(--font-display);
    font-size: 24px;
    text-transform: uppercase;
    color: var(--silver);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Shared section header pattern */
.section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--orange);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
    font-weight: 700;
}

/* NOTE: .section-title and .section-header have slightly different values
   between style.css (r1-console) and index.html. The values below match
   style.css; index.html overrides inline via its own <style> block. */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--silver);
    text-transform: uppercase;
    margin-bottom: 20px;
}
.section-title em { font-style: normal; color: var(--orange); }

.section-subtitle {
    font-size: 20px;
    color: var(--aluminum);
    max-width: 700px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

hr.divider {
    border: none;
    border-top: 1px solid var(--steel);
}

/* ══════════════════════════════════════
   GLOBAL BUTTONS / CTAs
   (clip-path angular style from r1-console era)
══════════════════════════════════════ */
.primary-cta {
    padding: 18px 45px;
    background: var(--orange);
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(255, 103, 0, 0.3);
    position: relative;
    overflow: hidden;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.primary-cta::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.primary-cta:hover::before { left: 100%; }

.primary-cta:hover {
    background: var(--orange-bright);
    transform: translateY(-2px);
    box-shadow: 0 5px 40px rgba(255, 103, 0, 0.5);
}

.secondary-cta {
    padding: 18px 45px;
    background: var(--black);
    color: var(--silver);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.secondary-cta::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: var(--steel);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    z-index: -1;
    transition: background 0.3s ease;
}

.secondary-cta:hover {
    background: rgba(255, 103, 0, 0.08);
    color: var(--black);
}

.secondary-cta:hover::before { background: var(--silver); }

/* ── Machined angular button system (cart / configurator) ── */
.overspec-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    position: relative;
    overflow: visible;
}

.overspec-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.overspec-btn:hover::after { left: 100%; }
.overspec-btn:active { transform: translateY(0) !important; }

.btn-primary {
    background: var(--orange);
    color: var(--black);
    box-shadow: 0 0 20px rgba(255, 103, 0, 0.25);
}
.btn-primary:hover {
    background: var(--orange-bright);
    box-shadow: 0 4px 30px rgba(255, 103, 0, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gunmetal);
    color: var(--silver);
    border: none;
}
.btn-secondary::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: var(--steel);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    z-index: -1;
}
.btn-secondary:hover {
    background: var(--gunmetal);
    color: var(--white);
    transform: translateY(-2px);
}
.btn-secondary:hover::before { background: var(--aluminum); }

/* ── Flat button system (v2 storefront) ── */
/* btn-primary / btn-outline are redefined in storefront.css for the
   rounded/flat aesthetic of index.html. If both styles load, storefront.css
   wins via source order. Pages that only load global.css + product.css keep
   the angular machined look. */

/* ══════════════════════════════════════
   SHARED UTILITY CLASSES
══════════════════════════════════════ */
.flex-column-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    line-height: 1.2;
}

.quote-box {
    background: var(--black);
    border-left: 4px solid var(--orange);
    padding: 30px 40px;
    margin-bottom: 30px;
}

/* Status pulse dot */
.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--success);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 rgba(0, 255, 136, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0   rgba(0, 255, 136, 0.7); }
    70%  { box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0   rgba(0, 255, 136, 0); }
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════
   GLOBAL RESPONSIVE HELPERS
══════════════════════════════════════ */
@media (max-width: 768px) {
    .container { padding: 0 20px; }

    .flex-column-end { display: none; }

    .primary-cta,
    .secondary-cta {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 15px;
        letter-spacing: 1px;
        clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
        box-shadow: 0 0 30px rgba(255, 103, 0, 0.3);
        white-space: nowrap;
    }

    .quote-box { padding: 22px 24px; }
}

@media (max-width: 375px) {
    .container { padding: 0 15px; }
}