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

:root {
    --orange: #FF6B35;
    --slate: #8A9BB5;
    --gold: #E8B931;
    --teal: #00D4AA;
    --silver: #C8D1DE;
    --midnight: #0B1528;
    --cream: #F5F0E8;
    --navy: #1C2B4A;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Barlow Condensed', sans-serif;
    background: var(--midnight);
    color: var(--cream);
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
.wordmark {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(6rem, 18vw, 16rem);
    letter-spacing: 0.02em;
    line-height: 0.9;
    color: var(--cream);
    text-shadow: 4px 4px 0 var(--orange), -2px -2px 0 var(--gold);
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.02em;
    line-height: 0.95;
    color: var(--cream);
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.tagline {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    letter-spacing: 0.15em;
    color: var(--silver);
    margin-top: 1rem;
}

/* === STICKER LABELS === */
.sticker-label {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    background: var(--orange);
    color: var(--midnight);
    padding: 0.25rem 0.75rem;
    transform: rotate(-2deg);
    margin-bottom: 1rem;
}

/* === CAUTION STRIPES === */
.caution-stripe {
    height: 12px;
    background: repeating-linear-gradient(
        -45deg,
        var(--gold),
        var(--gold) 10px,
        var(--midnight) 10px,
        var(--midnight) 20px
    );
    width: 100%;
}
.caution-bottom { position: absolute; bottom: 0; left: 0; }
.caution-top { position: absolute; top: 0; left: 0; }

/* === HERO === */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    overflow: hidden;
}

.hero-grain {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

/* === TICKER STRIP === */
.ticker-strip {
    margin-top: 2.5rem;
    overflow: hidden;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orange);
    padding: 0.5rem 0;
}

.ticker-inner {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--midnight);
    letter-spacing: 0.08em;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === METRICS === */
.metrics-section {
    padding: 6rem 2rem;
    background: var(--midnight);
}

.metrics-section .section-title {
    text-align: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.dash-card {
    background: var(--navy);
    border: 1px solid rgba(200, 209, 222, 0.15);
    padding: 2rem 1.5rem;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.dash-card:hover {
    border-color: var(--orange);
    transform: translateY(-4px);
}

.dash-card--wide { grid-column: span 2; }
.dash-card--tall { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }

.card-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--slate);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.card-metric {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--cream);
    line-height: 1;
}

.card-unit {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--slate);
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* Sparkline & bar chart placeholders rendered via JS */
.sparkline, .mini-bar-chart {
    margin-top: 1rem;
    height: 40px;
    position: relative;
}

.sparkline svg, .mini-bar-chart svg { width: 100%; height: 100%; }

/* === CAPABILITIES / PUZZLE GRID === */
.capabilities-section {
    padding: 6rem 2rem;
    background: var(--navy);
}

.capabilities-section .section-title {
    text-align: center;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.puzzle-piece {
    background: var(--midnight);
    border: 2px solid rgba(200, 209, 222, 0.1);
    padding: 2.5rem 2rem;
    position: relative;
    transition: border-color 0.3s ease, transform 0.3s ease;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.puzzle-piece:hover {
    border-color: var(--orange);
    transform: translateY(-4px) rotate(-0.5deg);
}

.puzzle-piece:nth-child(even):hover {
    border-color: var(--teal);
    transform: translateY(-4px) rotate(0.5deg);
}

.puzzle-icon { margin-bottom: 1.25rem; }

.puzzle-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.02em;
    color: var(--cream);
    margin-bottom: 0.75rem;
}

.puzzle-desc {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--silver);
}

/* === STORY === */
.story-section {
    padding: 6rem 2rem;
    background: var(--midnight);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
}

.story-body {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--silver);
    margin-bottom: 1.25rem;
}

/* Rotating Puzzle Viz */
.rotating-puzzle {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    position: relative;
    animation: slowSpin 30s linear infinite;
}

@keyframes slowSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rp-piece {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid;
    border-radius: 8px;
    transition: transform 0.6s ease;
}

.rp-piece--1 { top: 10px; left: 10px; border-color: var(--orange); background: rgba(255, 107, 53, 0.1); }
.rp-piece--2 { top: 10px; right: 10px; border-color: var(--gold); background: rgba(232, 185, 49, 0.1); }
.rp-piece--3 { bottom: 10px; left: 10px; border-color: var(--teal); background: rgba(0, 212, 170, 0.1); }
.rp-piece--4 { bottom: 10px; right: 10px; border-color: var(--silver); background: rgba(200, 209, 222, 0.1); }

/* === CONTACT === */
.contact-section {
    position: relative;
    padding: 6rem 2rem 2rem;
    background: var(--navy);
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    padding-top: 2rem;
}

.contact-desc {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--silver);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    color: var(--midnight);
    background: var(--orange);
    padding: 0.8rem 2.5rem;
    text-decoration: none;
    border: 3px solid var(--orange);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.cta-button:hover {
    background: transparent;
    color: var(--orange);
    transform: translateY(-2px);
}

.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 0 1rem;
    max-width: 1100px;
    margin: 0 auto;
    border-top: 1px solid rgba(200, 209, 222, 0.1);
    margin-top: 4rem;
}

.footer-copy {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--slate);
}

.footer-mono {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--slate);
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .story-grid { grid-template-columns: 1fr; }
    .dash-card--wide { grid-column: span 1; }
    .puzzle-grid { grid-template-columns: 1fr; }
}
