/*
Theme Name: That One Firm
Author: Cipher1-TheSpark~!csmcmanus~TOF
Description: Defragmented & Purged Core Stylesheet (Bootstrap 5 Architecture)
Version: 2.0 (Clean Slate)
*/

/* =========================================
   1. CORE VARIABLES & GLOBAL TYPOGRAPHY
   ========================================= */
:root {
    --navy: #001529;
    --navy-dark: #000d1a;
    --maroon: #FF3366;
    --paper: #F4F1EA;
    --white: #ffffff;
    --font-head: 'Oswald', sans-serif;
    --font-body: system-ui, -apple-system, sans-serif;
    --font-mono: 'Courier New', monospace;
}

body {
    font-family: var(--font-body);
    color: var(--navy);
    background-color: var(--navy-dark);
    -webkit-font-smoothing: antialiased;
}

/* Base Typographic Overrides */
.font-head { font-family: var(--font-head) !important; text-transform: uppercase; }
.font-body { font-family: var(--font-body) !important; line-height: 1.7; }
.font-mono { font-family: var(--font-mono) !important; letter-spacing: 1px; }

/* =========================================
   2. BRAND UTILITIES & COLOR
   ========================================= */
.bg-navy-dark { background-color: var(--navy-dark) !important; color: var(--white) !important; }
.bg-navy { background-color: var(--navy) !important; color: var(--white) !important; }
.bg-paper { background-color: var(--paper) !important; color: var(--navy) !important; }

.text-maroon { color: var(--maroon) !important; }
.text-navy { color: var(--navy) !important; }

/* Clean up default links globally */
a { text-decoration: none; transition: all 0.3s ease; }

/* =========================================
   3. HEADER & LOGO LOCKUP (CONFLICT RESOLVED)
   ========================================= */
.tof-header {
    background-color: var(--navy-dark);
    border-bottom: 2px solid #333333;
}

/* Force the link to ignore Bootstrap's default blue */
a.logo-lockup {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-decoration: none !important;
    color: var(--white) !important;
    transition: all 0.3s ease !important;
}

.tof-favicon {
    width: 55px;
    height: auto;
    filter: invert(1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tof-brand-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Force the H1 to stay white and Oswald, overriding Bootstrap */
.tof-brand-box h1 {
    border: 1px solid var(--white) !important;
    padding: 6px 12px !important;
    color: var(--white) !important;
    font-family: var(--font-head) !important;
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    line-height: 1 !important;
}

.tof-brand-box span {
    color: var(--paper) !important; /* ADA Fix: Swapped maroon for paper */
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
    display: block !important;
    margin-top: 4px !important;
    text-align: right !important;
    transition: all 0.3s ease !important;
}

/* Hover State Inversions */
a.logo-lockup:hover .tof-favicon {
    transform: scale(1.1) rotate(5deg);
}

a.logo-lockup:hover .tof-brand-box h1 {
    background-color: var(--white) !important;
    color: var(--navy) !important;
    border-color: var(--white) !important;
}

a.logo-lockup:hover .tof-brand-box span {
    color: var(--white) !important;
}

/* Global Navigation Link Styling */
.tof-header nav a {
    transition: color 0.3s ease;
}
.tof-header nav a:hover:not(.btn) {
    color: var(--paper) !important;
    text-decoration: underline !important;
    text-decoration-color: var(--maroon) !important;
    text-underline-offset: 5px;
}

/* =========================================
   4. INDUSTRIAL FUNK BUTTONS
   ========================================= */
/* Master Button Reset */
.btn, button, input[type="submit"] {
    font-family: var(--font-head) !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    border-radius: 0 !important; /* Sharp corners */
    padding: 15px 30px;
    transition: all 0.3s ease !important;
}

/* Outline White -> Solid Maroon Hover */
.btn-outline-light {
    border: 2px solid var(--white) !important;
    color: var(--white) !important;
    background: transparent !important;
}
.btn-outline-light:hover {
    background-color: var(--maroon) !important;
    border-color: var(--maroon) !important;
    color: var(--white) !important;
}

/* =========================================
   5. COMPONENTS & EFFECTS (Bootstrap Enhancements)
   ========================================= */

/* Dossier Hover Lift */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
}
.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--maroon) !important; /* Maroon border on hover */
}

/* Background Pulse Animation */
@keyframes pulse-glow {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}
.pulse-glow {
    animation: pulse-glow 10s infinite;
}

.x-small { font-size: 0.75rem !important; }

/* =========================================
   6. HERO RADAR ANIMATION
   ========================================= */
.radar-sweep {
    background: conic-gradient(from 0deg, rgba(128, 0, 0, 0) 70%, rgba(128, 0, 0, 0.1) 80%, rgba(128, 0, 0, 0.8) 100%);
    animation: radar-spin 4s linear infinite;
    z-index: 1;
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================================
   7. KINETIC DATA GRID (STEWARDSHIP HERO)
   ========================================= */
.kinetic-grid-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
}

.kinetic-grid {
    position: absolute;
    top: -100%; left: 0; width: 100%; height: 200%;
    background-image: 
        linear-gradient(rgba(255, 51, 102, 0.15) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(255, 51, 102, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: grid-descend 15s linear infinite;
}

@keyframes grid-descend {
    0% { transform: translateY(0); }
    100% { transform: translateY(50%); }
}

/* =========================================
   8. WORDPRESS CORE OVERRIDES (PAGES ONLY)
   ========================================= */
/* Hide default WP page titles and dates on static PAGES, but protect the BLOG */
.page .wp-block-post-title,
.page .wp-block-post-date,
.page .wp-block-post-author,
.page .wp-block-post-terms {
    display: none !important;
}

/* =========================================
   9. KINETIC SECTOR SCAN (LOYALTY HERO)
   ========================================= */
.sector-scan-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

.sector-scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: #FF3366;
    box-shadow: 0 0 15px #FF3366, 0 0 30px #FF3366;
    animation: sector-sweep 6s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes sector-sweep {
    0%, 100% { top: -10px; opacity: 0; }
    10%, 90% { opacity: 0.8; }
    50% { top: 100%; }
}

/* =========================================
   10. KINETIC SIGNAL WAVES (CONTACT HERO)
   ========================================= */
.signal-waves-wrapper {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
    pointer-events: none;
}

.signal-wave {
    position: absolute;
    border: 2px solid rgba(255, 51, 102, 0.4);
    border-radius: 50%;
    animation: wave-broadcast 6s infinite ease-out;
    opacity: 0;
}

.signal-wave.w1 { animation-delay: 0s; }
.signal-wave.w2 { animation-delay: 2s; }
.signal-wave.w3 { animation-delay: 4s; }

@keyframes wave-broadcast {
    0% { width: 0; height: 0; opacity: 1; border-width: 4px; }
    100% { width: 1200px; height: 1200px; opacity: 0; border-width: 1px; }
}

/* =========================================
   11. KINETIC DATA UPLINK & CASE FILES (PROOF)
   ========================================= */
.data-uplink-wrapper {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(0deg, rgba(255,51,102,0.05) 0%, transparent 100%);
    z-index: 0;
    overflow: hidden;
}

.uplink-bar {
    position: absolute;
    bottom: -100%;
    width: 2px;
    background: rgba(255,51,102,0.5);
    animation: data-rise 3s infinite ease-in;
}

.uplink-bar:nth-child(1) { left: 10%; animation-duration: 4s; animation-delay: 0s; }
.uplink-bar:nth-child(2) { left: 30%; animation-duration: 2.5s; animation-delay: 1s; }
.uplink-bar:nth-child(3) { left: 50%; animation-duration: 5s; animation-delay: 0.5s; }
.uplink-bar:nth-child(4) { left: 70%; animation-duration: 3.5s; animation-delay: 2s; }
.uplink-bar:nth-child(5) { left: 90%; animation-duration: 4.5s; animation-delay: 0.2s; }

@keyframes data-rise {
    0% { bottom: -100%; height: 10px; opacity: 1; }
    100% { bottom: 100%; height: 150px; opacity: 0; }
}

/* Split Screen Image Overlays */
.pane-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 0;
    transition: opacity 0.5s ease, transform 5s linear;
}

.split-pane:hover .pane-bg-img {
    opacity: 0.3;
    transform: scale(1.05);
}

/* =========================================
   12. KINETIC BLUEPRINT GRID (PROTOCOLS HERO)
   ========================================= */
.blueprint-grid-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
    background-color: #000d1a;
    background-image: 
        linear-gradient(rgba(255, 51, 102, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 51, 102, 0.15) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-pulse 6s infinite alternate ease-in-out;
}

@keyframes grid-pulse {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

/* Custom List Bullets for Protocols */
.protocol-list {
    list-style: none;
    padding-left: 0;
}
.protocol-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    font-weight: 700;
}
.protocol-list li::before {
    content: '►';
    position: absolute;
    left: 0;
    top: 2px;
    color: #FF3366;
    font-size: 0.8rem;
}

/* =========================================
   13. KINETIC SCANNER & CASE FILES (WORK)
   ========================================= */
/* Decryption Background Animation */
.decryption-scanner {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(255,51,102,0.15) 5px, transparent 6px);
    background-size: 100% 40px;
    animation: scan-scroll 15s linear infinite;
}
@keyframes scan-scroll { 
    0% { background-position: 0 0; } 
    100% { background-position: 0 1000px; } 
}

/* Giant Background Numbers */
.giant-number-bg {
    position: absolute; font-family: var(--font-head); font-size: 30rem; font-weight: 900; line-height: 0.8;
    top: 50%; transform: translateY(-50%); z-index: 0; opacity: 0.03; user-select: none; pointer-events: none;
}
.giant-number-bg.left { left: -2%; color: var(--white); }
.giant-number-bg.right { right: -2%; color: transparent; -webkit-text-stroke: 4px var(--navy); }

/* Project Image Tilts */
.project-tilt-left { transform: rotate(-2deg); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.project-tilt-right { transform: rotate(2deg); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.project-tilt-left:hover, .project-tilt-right:hover { transform: rotate(0deg) scale(1.02); z-index: 5; position: relative; }

/* Responsive Overlap Logic */
.overlap-card-right, .overlap-card-left {
    position: relative; z-index: 3; margin-top: -30px; /* Slight overlap on mobile */
}
@media (min-width: 992px) {
    .overlap-card-right { margin-top: 0; margin-left: -80px; }
    .overlap-card-left { margin-top: 0; margin-right: -80px; }
    .giant-number-bg { font-size: 40rem; }
}

/* =========================================
   14. DOSSIER IMAGE EFFECTS (CASE STUDY)
   ========================================= */
.dossier-img-wrapper {
    overflow: hidden;
    position: relative;
}
.dossier-img-wrapper img {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dossier-img-wrapper:hover img {
    transform: scale(1.05);
}
.crt-overlay {
    position: absolute; top: 0; left: 0; w-100; h-100; pointer-events: none;
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    z-index: 1;
}

/* =========================================
   15. KINETIC DATA TICKER (INTEL ARCHIVE)
   ========================================= */
.intel-ticker-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    background-color: #001529;
    border-top: 1px solid rgba(255,51,102,0.3);
    border-bottom: 1px solid rgba(255,51,102,0.3);
    padding: 8px 0;
    position: relative;
    z-index: 5;
}

.intel-ticker-track {
    display: inline-block;
    animation: ticker-scroll 30s linear infinite;
    padding-left: 100%; /* Starts off-screen to the right */
}

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

/* Pause ticker on hover so they can read it */
.intel-ticker-wrapper:hover .intel-ticker-track {
    animation-play-state: paused;
}

/* =========================================
   16. INTEL ARTICLE FORMATTING
   ========================================= */
.intel-article blockquote,
.intel-article .wp-block-quote {
    padding: 2rem !important;
    background-color: #ffffff !important;
    border-left: 5px solid #FF3366 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    margin: 3rem 0 !important;
}
.intel-article blockquote p,
.intel-article .wp-block-quote p {
    font-size: 1.25rem !important;
    font-style: italic !important;
    color: var(--navy) !important;
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
}