/* WaveIntent Visual Effects — Redesigned
   Explainer design system: flat borders, no gradients, no glass, no glow.
   Loaded by all pages: <link rel="stylesheet" href="/shared/visual-fx.css">
   Works with visual-fx.js for scroll-triggered animations */

/* ═══════════════════════════════════════════════════════
   1. SCROLL ANIMATIONS (kept from original)
   ═══════════════════════════════════════════════════════ */

[data-vfx] {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-vfx="fade-up"]   { transform: translateY(30px); }
[data-vfx="fade-in"]   { transform: none; }
[data-vfx="slide-left"]  { transform: translateX(40px); }
[data-vfx="slide-right"] { transform: translateX(-40px); }
[data-vfx="scale-in"]    { transform: scale(0.95); }

[data-vfx].vfx-visible {
    opacity: 1;
    transform: none;
}

/* Stagger delays */
.vfx-d1 { transition-delay: 0.1s; }
.vfx-d2 { transition-delay: 0.2s; }
.vfx-d3 { transition-delay: 0.3s; }
.vfx-d4 { transition-delay: 0.4s; }
.vfx-d5 { transition-delay: 0.5s; }
.vfx-d6 { transition-delay: 0.6s; }

/* ═══════════════════════════════════════════════════════
   2. ANIMATED BAR GROWTH (kept from original)
   ═══════════════════════════════════════════════════════ */

.vfx-bar {
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                height 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vfx-bar-initial {
    width: 0 !important;
    height: 0 !important;
}

/* ═══════════════════════════════════════════════════════
   3. SVG DRAW-IN LINES (kept from original)
   ═══════════════════════════════════════════════════════ */

.vfx-draw-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.8s ease-out;
}

.vfx-draw-line.vfx-visible {
    stroke-dashoffset: 0;
}

/* ═══════════════════════════════════════════════════════
   4. NAV SCROLL STATE
   ═══════════════════════════════════════════════════════ */

#wv-nav {
    transition: background 0.3s ease, border-color 0.3s ease;
}

#wv-nav.nav-scrolled {
    background: rgba(8, 8, 8, 0.98) !important;
    border-color: #1a1a1a !important;
}

/* ═══════════════════════════════════════════════════════
   5. BACKWARD-COMPATIBLE CLASS REMAPS
   Pages still referencing old classes get the new flat style
   ═══════════════════════════════════════════════════════ */

/* vfx-glass → flat bordered card */
.vfx-glass {
    background: #0d0d0d;
    border: 1px solid #222;
    transition: border-color 0.2s ease;
}

.vfx-glass:hover {
    border-color: #333;
}

/* vfx-mesh → plain positioned container (no gradient) */
.vfx-mesh {
    position: relative;
    overflow: hidden;
}

/* vfx-divider → subtle line */
.vfx-divider {
    height: 1px;
    background: #1a1a1a;
    border: none;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════
   6. EXPLAINER DESIGN SYSTEM — Component Classes
   ═══════════════════════════════════════════════════════ */

/* Eyebrow label */
.wi-eyebrow {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #9a9590;
}

/* Large headline */
.wi-headline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1.1;
    color: #f0ede6;
}

.wi-headline em {
    font-style: italic;
    color: #c8b89a;
}

/* Body text */
.wi-body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 1.65;
    color: #f0ede6;
}

/* Zone cards */
.wi-zone {
    border: 1px solid #222;
    padding: 28px 20px;
}

.wi-zone-1 { border-top: 2px solid #8b3a3a; }
.wi-zone-2 { border-top: 2px solid #c8b89a; }
.wi-zone-3 { border-top: 2px solid #2d5a3d; }

.wi-zone-1 .wi-zone-title { color: #c87070; }
.wi-zone-2 .wi-zone-title { color: #c8b89a; }
.wi-zone-3 .wi-zone-title { color: #70a882; }

.wi-zone-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 12px;
}

.wi-zone-num {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.3em;
    color: #9a9590;
    margin-bottom: 16px;
}

.wi-zone-desc {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    color: #9a9590;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* Stat blocks */
.wi-stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(48px, 6vw, 80px);
    font-weight: 300;
    color: #c87070;
}

.wi-stat-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #9a9590;
    text-transform: uppercase;
    margin-top: 8px;
}

/* Receipt / audit block */
.wi-receipt {
    border: 1px solid #222;
    padding: 32px;
    background: #0d0d0d;
}

.wi-receipt-header {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.3em;
    color: #9a9590;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #1a1a1a;
}

.wi-receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #131313;
}

.wi-receipt-key {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #9a9590;
    letter-spacing: 0.1em;
}

.wi-receipt-val {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #c8b89a;
    letter-spacing: 0.05em;
    max-width: 300px;
    text-align: right;
    word-break: break-all;
}

/* Pipeline steps */
.wi-pipeline-step {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid #1a1a1a;
    text-align: left;
}

.wi-step-num {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #9a9590;
    min-width: 20px;
    padding-top: 2px;
}

.wi-step-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 400;
    color: #f0ede6;
    margin-bottom: 4px;
}

.wi-step-detail {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    color: #9a9590;
    letter-spacing: 0.02em;
}

.wi-step-accent {
    color: #c8b89a;
}

/* Ghost buttons */
.wi-btn {
    background: none;
    border: 1px solid #333;
    color: #9a9590;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    padding: 14px 40px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.wi-btn:hover {
    border-color: #c8b89a;
    color: #c8b89a;
}

/* Smaller ghost button variant */
.wi-btn-sm {
    background: none;
    border: 1px solid #333;
    color: #9a9590;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 10px 24px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.wi-btn-sm:hover {
    border-color: #c8b89a;
    color: #c8b89a;
}

/* Commitments grid */
.wi-commitments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #1a1a1a;
}

.wi-commitment {
    background: #080808;
    padding: 24px 20px;
    text-align: left;
}

.wi-commitment-num {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #9a9590;
    letter-spacing: 0.3em;
    margin-bottom: 10px;
}

.wi-commitment-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 400;
    color: #c8b89a;
    margin-bottom: 8px;
}

.wi-commitment-desc {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #9a9590;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* Standard border utility */
.wi-border {
    border: 1px solid #222;
}

/* Surface background utility */
.wi-surface {
    background: #0d0d0d;
}

/* Cost comparison bars */
.wi-cost-bar {
    width: 80px;
    border: 1px solid #222;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 12px;
    position: relative;
}

.wi-cost-bar.standard {
    background: rgba(139, 58, 58, 0.08);
    border-color: #3a2020;
}

.wi-cost-bar.waveintent {
    background: rgba(45, 90, 61, 0.12);
    border-color: #1a3024;
}

/* Tag/pill — flat, no rounded corners */
.wi-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #222;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #9a9590;
    transition: border-color 0.2s, color 0.2s;
}

.wi-tag:hover {
    border-color: #c8b89a;
    color: #c8b89a;
}

/* ═══════════════════════════════════════════════════════
   7. REDUCED MOTION
   ═══════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    [data-vfx] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ═══════════════════════════════════════════════════════
   8. MOBILE — faster transitions, responsive grid
   ═══════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    [data-vfx] {
        transition-duration: 0.4s;
    }

    .wi-commitments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
