/* PARAWOW | NY AGENCY PROTOCOL | v2.0 */

:root {
    /* The Palette */
    --void: #050505;
    --signal: #F2F2F2;
    --concrete: #1a1a1a;
    --grid-line: rgba(255, 255, 255, 0.08);
    --accent-sys: #32D74B;
    /* System Online Green */
    --accent-err: #FF453A;
    /* Error Red */
    --accent-blue: #0A84FF;
    /* Structure Blue */

    /* Typography */
    --font-display: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    /* Dimensions */
    --grid-unit: 80px;
    --container-max: 1400px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: default;
    /* Custom cursor handling later */
}

body {
    background-color: var(--void);
    color: var(--signal);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* The Grid (Background) */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container-max);
    height: 100vh;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    background-image: linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 100% var(--grid-unit);
    /* Horizontal lines */
    pointer-events: none;
    z-index: 0;
    /* Was -1, moved up to be visible */
    display: flex;
    justify-content: space-between;

    /* Static Grid State */
    opacity: 0.08;
    /* Always faintly visible */
}

/* The Spotlight (Light Layer) */
.holographic-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    /* Same layer as grid */

    /* The Flashlight Beam */
    background: radial-gradient(circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.08) 0%,
            transparent 100%);

    /* Mix Blend Mode to 'Add' Light */
    mix-blend-mode: screen;
    will-change: background;
}

.status-beacon {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--accent-sys);
    display: flex;
    align-items: center;
    gap: 8px;
}

.beacon-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-sys);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-sys);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.grid-col {
    height: 100%;
    width: 1px;
    background: var(--grid-line);
}

/* Typography System */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--signal);
}

.display-xl {
    font-size: clamp(4rem, 12vw, 9rem);
    line-height: 0.85;
    margin-left: -5px;
    /* Optical alignment */
}

.display-l {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 0.95;
}

.label {
    font-family: var(--font-code);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
}

p.lead {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #ccc;
    max-width: 60ch;
    margin-top: 40px;
    font-weight: 300;
}

/* Layout Modules */
.section {
    min-height: 100vh;
    padding: 120px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--grid-line);
    z-index: 1;
    /* Ensure content sits above grid */
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    position: relative;
}

/* Calculator Toggles */
.calc-toggle {
    background: transparent;
    border: 1px solid #333;
    color: #999;
    padding: 10px 20px;
    font-family: var(--font-code);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.calc-toggle.active {
    background: var(--signal);
    color: var(--void);
    border-color: var(--signal);
}

.calc-toggle:hover {
    border-color: #666;
}

/* View Toggle */
.view-toggle {
    font-family: var(--font-code);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--grid-line);
    display: flex;
    gap: 10px;
}

.vt-opt {
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.vt-opt.active {
    color: var(--signal);
    font-weight: 700;
}

.vt-divider {
    color: #333;
}

/* Dev View Layer */
.dev-view {
    display: none;
    font-family: var(--font-code);
    color: var(--accent-sys);
    padding: 40px;
    border: 1px solid var(--grid-line);
    background: rgba(0, 0, 0, 0.5);
    position: relative;
}

.dev-view::before {
    content: '// SYSTEM CONFIGURATION';
    display: block;
    color: #666;
    margin-bottom: 20px;
}

/* Syntax Highlighting */
.code-block {
    font-size: 1.1rem;
    line-height: 1.6;
}

.c-key {
    color: var(--accent-blue);
}

.c-str {
    color: var(--accent-sys);
}

.c-num {
    color: #FFD700;
}

.c-bool {
    color: #FF00FF;
}

/* State Management */
body.dev-mode .business-view {
    display: none;
}

body.dev-mode .dev-view {
    display: block;
}

body.dev-mode .btn-primary {
    font-family: var(--font-code);
    border: 1px dashed var(--accent-sys);
    background: transparent;
    color: var(--accent-sys);
}

body.dev-mode .grid-overlay {
    opacity: 0.4;
}

/* UI Elements */
/* Calculator Grid */
.calc-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 80px;
    background: var(--signal);
    color: var(--void);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    margin-top: 60px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 300px;
}

.btn-primary:hover {
    background: var(--accent-blue);
    color: var(--signal);
    padding-right: 60px;
}

.btn-primary::after {
    content: '→';
    margin-left: 20px;
}

.btn-link {
    display: inline-block;
    margin-top: 40px;
    font-family: var(--font-code);
    text-transform: uppercase;
    color: var(--signal);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-blue);
    padding-bottom: 5px;
    transition: all 0.2s;
}

.btn-link:hover {
    color: var(--accent-blue);
}

/* Bento/Rack System */
.rack-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1px;
    /* Borders via gap */
    background: var(--grid-line);
    border: 1px solid var(--grid-line);
}

.rack-unit {
    background: var(--void);
    padding: 40px;
    grid-column: span 4;
    position: relative;
    transition: background 0.3s;
}

.rack-unit:hover {
    background: #0a0a0a;
}

.rack-unit.double {
    grid-column: span 6;
}

.rack-unit h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.rack-unit ul {
    list-style: none;
    font-family: var(--font-code);
    color: #aaa;
    font-size: 0.9rem;
}

.rack-unit li {
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
}

.rack-unit li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-sys);
}

/* Comparison Table (The Spec Sheet) */
.spec-sheet {
    width: 100%;
    border-collapse: collapse;
    margin-top: 60px;
    font-family: var(--font-code);
}

.spec-sheet th,
.spec-sheet td {
    border-bottom: 1px solid var(--grid-line);
    padding: 30px 0;
    text-align: left;
}

.spec-sheet th {
    color: #888;
    font-weight: 400;
    font-size: 0.8rem;
}

.spec-sheet td:first-child {
    color: var(--signal);
    font-size: 1.2rem;
}

.spec-sheet .check {
    color: var(--accent-sys);
}

.spec-sheet .cross {
    color: var(--accent-err);
    opacity: 0.5;
}

/* Mobile Rules */
/* Mobile Rules (Tablet & Down) */
@media (max-width: 768px) {

    /* Section Spacing */
    .section {
        padding: 80px 20px;
        min-height: auto;
        /* Allow content to dictate height on mobile */
    }

    /* Typography Scaling */
    .display-xl {
        font-size: 3.5rem;
        /* Smaller for mobile */
        word-break: break-word;
    }

    .display-l {
        font-size: 2.5rem !important;
    }

    .lead {
        font-size: 1.1rem !important;
    }

    /* Nav Optimization */
    .view-toggle {
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    .status-beacon {
        font-size: 0;
        /* Hide text */
    }

    .status-beacon .beacon-dot {
        margin: 0;
        width: 10px;
        height: 10px;
    }

    /* Stack Grid Units */
    .rack-unit,
    .rack-unit.double {
        grid-column: span 12;
        border-right: none !important;
        border-bottom: 1px solid var(--grid-line);
        padding-bottom: 40px;
        margin-bottom: 40px;
    }

    /* Primary Button Full Width */
    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* Code Block Overflow */
    .dev-view {
        padding: 20px;
        margin-top: 20px;
        overflow-x: scroll;
    }

    /* Ticker Optimization */
    .ticker-wrap {
        mask-image: none;
        /* Reduce load on mobile */
    }

    .ticker-item {
        padding: 0 20px;
        font-size: 0.6rem;
    }

    /* Calculator Optimization */
    .calc-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .calc-toggle-group {
        flex-direction: column;
        width: 100%;
    }

    .calc-toggle {
        width: 100%;
        text-align: center;
    }

    /* Protocol Optimization */
    .protocol-header {
        padding: 20px 0;
        gap: 15px;
    }

    .p-title {
        font-size: 1rem !important;
    }

    .p-id {
        font-size: 0.7rem;
    }
}

/* Ticker / Marquee (Premium) */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--void);
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    padding: 15px 0;
    white-space: nowrap;
    position: relative;
    z-index: 10;

    /* Fade Edges */
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.ticker {
    display: inline-block;
    animation: marquee 60s linear infinite;
    /* Slower = More Premium */
}

.ticker-item {
    display: inline-block;
    padding: 0 60px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    /* Smaller */
    font-weight: 500;
    color: #666;
    /* Darker, more subtle */
    letter-spacing: 2px;
    /* Wider tracking */
    text-transform: uppercase;
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.ticker-item {
    font-size: 0.7rem;
    padding: 0 30px;
}



/* Deployment Log (Snippet) */
.deployment-log {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #888;
    padding: 15px 20px;
    border-bottom: 1px solid var(--grid-line);
    background: rgba(255, 255, 255, 0.02);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.verified-badge {
    color: var(--accent-sys);
    opacity: 0.5;
    font-size: 0.7rem;
    margin-left: 10px;
}

/* --- Protocols (The "Silent Killers" FAQ) --- */
.protocol-list {
    border-top: 1px solid var(--grid-line);
}

.protocol-item {
    border-bottom: 1px solid var(--grid-line);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.protocol-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Header Layout */
.protocol-header {
    padding: 30px 0;
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 100px;
}

.p-id {
    font-family: var(--font-code);
    color: var(--accent-blue);
    font-size: 0.8rem;
    opacity: 0.6;
}

.p-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    /* Larger */
    font-weight: 700;
    flex-grow: 1;
    text-transform: uppercase;
    color: var(--signal);
    letter-spacing: -0.02em;
}

/* The "Tech" Icon */
.p-icon {
    font-family: var(--font-code);
    font-size: 1.2rem;
    color: #fff;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s;
    border: 1px solid #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Accordion Body */
.protocol-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.protocol-body p {
    padding-bottom: 40px;
    padding-left: 55px;
    /* Offset to align with title */
    padding-right: 40px;
    max-width: 70ch;
    color: #888;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
    transform: translateY(10px);
    transition: transform 0.4s;
}

/* Active State Design */
.protocol-item.active {
    background: rgba(255, 255, 255, 0.03);
}

.protocol-item.active .p-icon {
    transform: rotate(135deg);
    /* X shape */
    color: var(--accent-sys);
    border-color: var(--accent-sys);
}

.protocol-item.active .protocol-body {
    max-height: 300px;
    /* Safe max */
    opacity: 1;
}

.protocol-item.active .protocol-body p {
    transform: translateY(0);
}

/* --- Terminal Modal (Exit Intent) --- */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.terminal-overlay.visible {
    display: flex;
    opacity: 1;
}

.terminal-window {
    width: 90%;
    max-width: 600px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-overlay.visible .terminal-window {
    transform: translateY(0);
}

.terminal-header {
    background: #2a2a2a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.t-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.t-title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: #999;
    margin-left: 10px;
}

.terminal-content {
    padding: 30px;
    font-family: var(--font-code);
    color: var(--accent-sys);
    font-size: 1rem;
    line-height: 1.6;
}

.t-line {
    margin-bottom: 5px;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.t-actions {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.t-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent-sys);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
}

.t-btn:hover {
    background: #fff;
}

.t-close {
    background: transparent;
    border: none;
    color: #666;
    font-family: var(--font-code);
    text-decoration: underline;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.t-close:hover {
    color: #fff;
}