/* ==========================================================================
   PHI LAB — CORE DESIGN TOKENS
   Single source of truth for colors, typography, layout accents, and motion.
   ========================================================================== */

:root {
    /* ─── Core Brand Palette ─── */
    --navy: #0F1D2E;
    --paper: #F3F5F7;
    --paper-card: #E8ECEF;
    --slate: #5B6B7D;
    --amber: #E8A33D;
    --amber-soft: rgba(232, 163, 61, 0.14);
    --amber-glow: rgba(232, 163, 61, 0.3);

    /* ─── Functional Tone Tokens ─── */
    --text-dark: var(--navy);
    --text-light: #F8FAFC;
    --text-muted: var(--slate);
    --border-dark: rgba(255, 255, 255, 0.12);
    --border-light: rgba(15, 29, 46, 0.1);

    /* ─── Backward-Compatibility Aliases (Smooth migration) ─── */
    --bg-milky-white: var(--paper);
    --bg-milky-card: var(--paper-card);
    --navy-creamy-dark: var(--navy);
    --navy-creamy-mid: #16263B;
    --blue-accent: var(--amber);

    /* ─── Typography ─── */
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --font-serif: var(--font-heading);
    --font-sans: var(--font-body);
}

/* ─── Global Base & Reset ─── */
body {
    background-color: var(--paper);
    color: var(--navy);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── Headings: Manrope 800 with light 300 for secondary words ─── */
h1, h2, h3, h4, h5, h6,
.section-title, .footer-brand, .hero h1, .hero-content h1, .page-hero h1, .vision-container h2, .dd-title, .quiet-hero h1 {
    font-family: var(--font-heading) !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em;
    color: inherit;
}

.heading-light,
h1 .light, h2 .light, h3 .light {
    font-weight: 300 !important;
    opacity: 0.9;
}

/* ─── Labels and Metadata: IBM Plex Mono, uppercase, tracked ─── */
.section-label,
.program-tag,
.nav-panel-tag,
.div-tag,
.hero-mission-tag,
.meta-label,
.stack-label,
.phi-landscape-badge,
.news-tag {
    font-family: var(--font-mono) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
}

.metric-label {
    font-family: var(--font-mono) !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: var(--slate) !important;
}

/* ─── Heading Accent: Amber vertical line ─── */
.heading-accent {
    position: relative;
    padding-left: 1.1rem;
}
.heading-accent::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.18em;
    bottom: 0.18em;
    width: 3px;
    background: var(--amber);
    border-radius: 2px;
}

/* ─── Seven-Dot Arc Section Divider ─── */
.phi-arc-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 0;
    width: 100%;
}
.phi-arc-divider svg {
    display: block;
    height: 18px;
    width: 110px;
}

/* ─── Contrast & Palette Application ─── */
/* Hero, Footer, and Deep Panels are Dark Navy */
.hero,
footer,
.validation-cta,
.telemetry-strip {
    background-color: var(--navy) !important;
    color: var(--text-light) !important;
}

/* Content Sections are Paper */
.vision-strip,
.programs-section,
.latest-news-section,
.phi-landscape,
.ongoing-project,
.suite-story,
.stand-section,
.principles-section,
.history-section,
.zone-card,
.service-block,
.service-detail-section {
    background-color: var(--paper) !important;
    color: var(--navy) !important;
}

/* Video Navy Overlay for Legibility */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 29, 46, 0.72) 0%, rgba(15, 29, 46, 0.90) 100%);
    z-index: 1;
}

/* Strict Color Rule: Never amber text on paper.
   Amber is only an accent (border, dot, dark pill, or on navy). */
.paper-text-amber-prohibited {
    color: var(--navy);
}

/* On paper, links are Navy with slate or subtle amber underline */
.vision-strip a,
.programs-section a.btn-link,
.latest-news-section a.news-card-link {
    color: var(--navy);
    font-weight: 600;
}
.programs-section a.btn-link:hover,
.latest-news-section a.news-card-link:hover {
    color: var(--amber);
}

/* ─── Focus & Hover Accessibility ─── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
}

/* ─── Motion Accessibility (Prefers Reduced Motion) ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    video {
        autoplay: false !important;
    }
}
