/* ===================================
   ExploitEdge — Dossier Redesign CSS
   =================================== */

:root {
    --ink: #14171A;
    --ink-soft: #262B2F;
    --paper: #E9E4D6;
    --paper-soft: #F2EEE3;
    --paper-line: #C9C0AA;
    --signal: #B3261E;
    --signal-soft: #8C1D17;
    --text: #20211D;
    --text-muted: #5B5548;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --font-sans: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--paper);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Texture */
body::before {
    content: ""; position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: .04; mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Animated Background Grid */
body::after {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image: 
        linear-gradient(to right, var(--paper-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--paper-line) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.25;
    animation: scrollGrid 30s linear infinite;
}
@keyframes scrollGrid {
    0% { background-position: 0 0; }
    100% { background-position: -50px -50px; }
}

/* System Loader */
.sys-loader {
    position: fixed; inset: 0;
    background: var(--ink); color: var(--signal);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s ease-out, visibility 0.6s;
}
.sys-loader.fade-out { opacity: 0; visibility: hidden; }
.loader-content { width: 320px; font-family: var(--font-mono); }
.loader-text { font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.loader-bar-bg { width: 100%; height: 2px; background: var(--ink-soft); margin-bottom: 8px; }
.loader-bar-fill { width: 0%; height: 100%; background: var(--signal); transition: width 0.1s linear; box-shadow: 0 0 8px var(--signal); }
.loader-status { font-size: 10px; color: var(--paper-line); text-align: right; }

/* Frame Borders */
.frame { position: fixed; background: var(--ink); z-index: 1000; }
.frame-top { top: 0; left: 0; right: 0; height: 12px; }
.frame-bottom { bottom: 0; left: 0; right: 0; height: 12px; }
.frame-left { top: 0; left: 0; bottom: 0; width: 12px; }
.frame-right { top: 0; right: 0; bottom: 0; width: 12px; }

.site-wrapper { max-width: 1200px; margin: 0 auto; padding: 60px 40px; position: relative; }

/* Utilities */
.c-signal { color: var(--signal); }
.w-full { width: 100%; text-align: center; }
a { color: inherit; text-decoration: none; }

/* Buttons */
.btn-solid, .btn-outline {
    display: inline-block; padding: 12px 24px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
    text-transform: uppercase; cursor: pointer; transition: 0.2s;
}
.btn-solid { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* Navigation */
.navbar {
    display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink);
    padding-bottom: 16px; margin-bottom: 60px; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
}
.nav-brand { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.blinking-dot { width: 8px; height: 8px; background: var(--signal); animation: blink 1.5s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-sys-info { color: var(--text-muted); }
.nav-links { display: flex; gap: 24px; }
.nav-link:hover { color: var(--signal); }

/* Hero Panel */
.hero-panel { border: 1px solid var(--paper-line); background: var(--paper-soft); margin-bottom: 80px; }
.hero-header {
    display: flex; justify-content: space-between; padding: 12px 24px; border-bottom: 1px solid var(--paper-line);
    font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
    opacity: 0; animation: systemBoot 0.8s ease-out forwards;
}
.hero-body { display: grid; grid-template-columns: 1.2fr 0.8fr; }
.hero-text-col { padding: 60px 40px; border-right: 1px solid var(--paper-line); }
.hero-visual-col { display: flex; align-items: center; justify-content: center; padding: 40px; background: #e0dacc; }

@keyframes systemBoot {
    0% { opacity: 0; transform: translateY(15px); filter: blur(3px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.headline { font-family: var(--font-mono); font-size: 56px; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.03em; font-weight: 700; opacity: 0; animation: systemBoot 0.8s ease-out 0.1s forwards; }
.hero-desc { font-size: 16px; color: var(--text-muted); margin-bottom: 40px; max-width: 500px; opacity: 1; }
.hero-meta { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink); margin-bottom: 40px; border-left: 2px solid var(--signal); padding-left: 16px; opacity: 0; animation: systemBoot 0.8s ease-out 0.5s forwards; }
.hero-actions { display: flex; gap: 16px; opacity: 0; animation: systemBoot 0.8s ease-out 0.7s forwards; }

/* Advanced Robotic Animation HUD */
.hud-wrapper { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.hud-diag { position: absolute; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); opacity: 0.8; z-index: 10; line-height: 1.4; }
.hud-tl { top: -20px; left: -20px; text-align: left; border-left: 1px solid var(--signal); padding-left: 8px; }
.hud-tr { top: -20px; right: -20px; text-align: right; border-right: 1px solid var(--signal); padding-right: 8px; }
.hud-bl { bottom: 0; left: -20px; text-align: left; border-left: 1px solid var(--signal); padding-left: 8px; }
.hud-br { bottom: 0; right: -20px; text-align: right; border-right: 1px solid var(--signal); padding-right: 8px; }

.advanced-robo-container {
    width: 100%; height: 300px; max-width: 400px;
    position: relative; display: flex; align-items: center; justify-content: center;
}
.robo-svg {
    width: 100%; height: 100%;
    overflow: visible;
}
.robo-svg * {
    fill: none; stroke: var(--signal); stroke-width: 1.5;
    stroke-linecap: round; stroke-linejoin: round;
}
.robo-svg .joint { fill: var(--paper); stroke-width: 2; }
.robo-svg .arm-base { fill: rgba(179,38,30,0.05); stroke-width: 2; }
.robo-svg .arm-trail { stroke: var(--signal); stroke-width: 4; opacity: 0; filter: url(#glow); }
.robo-svg .particle { fill: var(--signal); stroke: none; opacity: 0; }
.robo-svg .scan-ring { stroke: var(--signal); opacity: 0; }

/* Document Animation */
.doc-hologram { animation: docSequence 8s infinite; transform-origin: 65px 115px; }
@keyframes docSequence {
    0%, 5% { opacity: 0; transform: translateY(10px) scale(0.9); }
    15%, 35% { opacity: 1; transform: translateY(0) scale(1); filter: url(#glow); }
    40%, 65% { opacity: 1; transform: translateY(-20px) scale(1); filter: url(#glow); } /* Lifted */
    70%, 85% { opacity: 1; transform: translateY(0) scale(1); filter: url(#glow); } /* Placed back */
    95%, 100% { opacity: 0; transform: translateY(10px) scale(0.9); }
}

/* Scan Sweep */
.scan-sweep { opacity: 0; animation: sweep 8s infinite; }
@keyframes sweep {
    0%, 15% { opacity: 0; transform: translateY(0); }
    18% { opacity: 1; transform: translateY(0); }
    28% { opacity: 1; transform: translateY(70px); }
    30%, 100% { opacity: 0; transform: translateY(70px); }
}

/* Scan Ring */
.scan-ring { animation: ringExpand 8s infinite; transform-origin: 65px 115px; }
@keyframes ringExpand {
    0%, 50% { opacity: 0; transform: scale(0); }
    52% { opacity: 0.8; transform: scale(1); stroke-width: 2; }
    60%, 100% { opacity: 0; transform: scale(5); stroke-width: 0.5; }
}

/* Arm Kinematics */
.arm-seg-1 { transform-origin: 250px 180px; animation: moveArm1 8s infinite cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes moveArm1 {
    0%, 5% { transform: rotate(0deg); }
    7%, 10% { transform: rotate(1deg); } /* vibration */
    12%, 15% { transform: rotate(0deg); }
    25%, 35% { transform: rotate(5deg); } /* reach out */
    40%, 65% { transform: rotate(15deg); } /* lift */
    70%, 85% { transform: rotate(5deg); } /* place back */
    95%, 100% { transform: rotate(0deg); }
}

.arm-seg-2 { transform-origin: 200px 100px; animation: moveArm2 8s infinite cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes moveArm2 {
    0%, 5% { transform: rotate(0deg); }
    7%, 10% { transform: rotate(-1deg); }
    12%, 15% { transform: rotate(0deg); }
    25%, 35% { transform: rotate(-15deg); } /* extend */
    40%, 65% { transform: rotate(-25deg); } /* lift compensation */
    70%, 85% { transform: rotate(-15deg); } 
    95%, 100% { transform: rotate(0deg); }
}

/* Claw Gripping */
.claw-top { transform-origin: 0 0; animation: gripTop 8s infinite; }
.claw-bot { transform-origin: 0 0; animation: gripBot 8s infinite; }
@keyframes gripTop {
    0%, 30% { transform: rotate(0); }
    35%, 75% { transform: rotate(15deg); }
    80%, 100% { transform: rotate(0); }
}
@keyframes gripBot {
    0%, 30% { transform: rotate(0); }
    35%, 75% { transform: rotate(-15deg); }
    80%, 100% { transform: rotate(0); }
}

/* Glowing Trails */
.arm-trail { animation: trailGlow 8s infinite; }
@keyframes trailGlow {
    0%, 20% { opacity: 0; }
    22%, 28% { opacity: 0.6; } /* moving out */
    30%, 35% { opacity: 0; }
    37%, 45% { opacity: 0.6; } /* lifting */
    48%, 65% { opacity: 0; }
    67%, 75% { opacity: 0.6; } /* placing */
    78%, 100% { opacity: 0; }
}

/* Data Transmission Particles */
.particle { animation: dataTransmit 8s infinite; }
.p1 { animation-delay: 4.0s; }
.p2 { animation-delay: 4.1s; }
.p3 { animation-delay: 4.2s; }
@keyframes dataTransmit {
    0%, 50% { opacity: 0; transform: translate(0, 0); }
    51% { opacity: 1; transform: translate(0, 0); }
    55% { opacity: 0; transform: translate(135px, -15px); } /* doc (65,115) to joint (200,100) */
    100% { opacity: 0; }
}

/* Flicker Text */
.flicker-text {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    font-family: var(--font-mono); font-size: 11px; color: var(--signal);
    text-align: center; white-space: nowrap; width: 100%;
    animation: textFlicker 8s infinite;
}
@keyframes textFlicker {
    0%, 48% { opacity: 0.3; }
    50% { opacity: 1; text-shadow: 0 0 8px var(--signal); }
    52% { opacity: 0.5; }
    54% { opacity: 1; text-shadow: 0 0 8px var(--signal); }
    65%, 100% { opacity: 0.3; }
}

/* Sections */
.section { margin-bottom: 100px; }
.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.sec-title { font-family: var(--font-mono); font-size: 18px; }
.sec-line { flex-grow: 1; height: 1px; background: var(--ink); }
.sec-id { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* Operations List */
.ops-list { display: flex; flex-direction: column; gap: 1px; background: var(--paper-line); border: 1px solid var(--paper-line); overflow: hidden; }
.op-item { display: grid; grid-template-columns: 60px 1fr 100px; background: var(--paper); padding: 32px 24px; transition: all 0.3s ease; border-left: 0px solid var(--signal); }
.op-item:hover { background: var(--paper-soft); transform: translateX(8px); border-left: 4px solid var(--signal); padding-left: 20px; }
.op-id { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--signal); }
.op-content h3 { font-family: var(--font-mono); font-size: 20px; margin-bottom: 12px; }
.op-content p { color: var(--text-muted); max-width: 600px; margin-bottom: 16px; }
.op-tags { display: flex; gap: 8px; }
.op-tags span { font-family: var(--font-mono); font-size: 10px; padding: 4px 8px; border: 1px solid var(--paper-line); }
.op-status { font-family: var(--font-mono); font-size: 11px; text-align: right; color: var(--text-muted); }

/* Allocation Grid */
.alloc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.alloc-card { border: 1px solid var(--paper-line); background: var(--paper-soft); display: flex; flex-direction: column; transition: all 0.3s cubic-bezier(0.1, 0.9, 0.2, 1); }
.alloc-card:hover { transform: translateY(-8px); box-shadow: 8px 8px 0 var(--ink); border-color: var(--ink); }
.alloc-card.highlighted { border-color: var(--ink); box-shadow: 8px 8px 0 var(--paper-line); transform: translateY(-4px); }
.alloc-card.highlighted:hover { transform: translateY(-12px); box-shadow: 12px 12px 0 var(--ink); }
.ac-header { background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 11px; padding: 12px; text-align: center; }
.ac-price { font-family: var(--font-mono); font-size: 32px; font-weight: 700; text-align: center; padding: 32px 0; border-bottom: 1px solid var(--paper-line); }
.ac-body { padding: 32px 24px; flex-grow: 1; display: flex; flex-direction: column; }
.ac-body ul { list-style: none; margin-bottom: 32px; flex-grow: 1; }
.ac-body li { font-family: var(--font-mono); font-size: 13px; margin-bottom: 12px; color: var(--text-muted); }

/* Comms Panel */
.comms-panel { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.comms-left { padding: 60px 40px; background: var(--ink); color: var(--paper); }
.comms-left h3 { font-family: var(--font-mono); font-size: 24px; margin-bottom: 16px; color: var(--signal); }
.comms-left p { color: var(--text-on-ink-muted); margin-bottom: 40px; font-size: 14px; }
.trust-badge { display: flex; gap: 16px; border: 1px solid #3d454a; padding: 16px; font-family: var(--font-mono); font-size: 11px; }
.tb-icon { width: 32px; height: 32px; background: var(--signal); color: var(--paper); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.tb-text strong { color: var(--paper); font-size: 12px; }

.comms-right { padding: 60px 40px; background: var(--paper-soft); }
.terminal-form { display: flex; flex-direction: column; gap: 24px; }
.tf-group { display: flex; flex-direction: column; gap: 8px; }
.tf-group label { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.tf-group input, .tf-group textarea { background: var(--paper); border: 1px solid var(--paper-line); padding: 12px; font-family: var(--font-mono); font-size: 14px; outline: none; }
.tf-group input:focus, .tf-group textarea:focus { border-color: var(--ink); }
.form-status { margin-top: 24px; font-family: var(--font-mono); font-size: 12px; color: var(--signal); }
.hidden { display: none; }

/* Footer */
.footer { border-top: 2px solid var(--ink); padding-top: 24px; padding-bottom: 40px; font-family: var(--font-mono); font-size: 11px; }
.foot-main { display: flex; justify-content: space-between; margin-bottom: 12px; font-weight: 700; }
.foot-sub { color: var(--text-muted); }

/* Animations */
.anim-slide { opacity: 0; transform: translateY(20px); transition: 0.6s ease; }
.anim-slide.in-view { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* Responsive */
@media (max-width: 900px) {
    .hero-body, .comms-panel { grid-template-columns: 1fr; }
    .hero-text-col { border-right: none; border-bottom: 1px solid var(--paper-line); }
    .alloc-grid { grid-template-columns: 1fr; }
    .op-item { grid-template-columns: 60px 1fr; }
    .op-status { display: none; }
    .nav-sys-info { display: none; }
}
@media (max-width: 600px) {
    .site-wrapper { padding: 20px; }
    .navbar { flex-direction: column; align-items: flex-start; gap: 16px; }
    .nav-links { display: flex; flex-wrap: wrap; gap: 16px; width: 100%; justify-content: space-between; }
    .hero-text-col, .comms-left, .comms-right { padding: 30px 20px; }
    .headline { font-size: 36px; line-height: 1.1; margin-bottom: 16px; }
    .hero-actions { flex-direction: column; }
    .btn-solid, .btn-outline { width: 100%; text-align: center; }
}

/* --- Legal Pages --- */
.legal-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}
.legal-content {
    background: var(--paper-soft);
    border: 1px solid var(--paper-line);
    padding: 40px;
    margin-top: 20px;
}
.legal-content h3 {
    color: var(--ink);
    margin-top: 30px;
    margin-bottom: 10px;
    font-family: var(--font-mono);
}
.legal-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}
.legal-content strong {
    color: var(--ink);
}
