/* =============================================================
   LEETSHIELD — Theme (Hacker / Terminal Aesthetic)
   Extracted & extended from base index design
   Mobile-first, scales to 65"+ TVs via responsive root font-size
   ============================================================= */

:root {
    --hack-black: #050505;
    --hack-void: #0a0a0a;
    --hack-surface: #111111;
    --hack-panel: #141414;
    --hack-border: #1a1a1a;
    --hack-borderLight: #222222;
    --hack-red: #e63946;
    --hack-redDim: #c1121f;
    --hack-redGlow: rgba(230, 57, 70, 0.15);
    --hack-cyan: #00d4ff;
    --hack-cyanDim: #0891b2;
    --hack-green: #00ff41;
    --hack-greenDim: #059669;
    --hack-amber: #f59e0b;
    --hack-text: #e5e5e5;
    --hack-muted: #737373;
    --hack-dim: #404040;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--hack-black);
    color: var(--hack-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--hack-black); }
::-webkit-scrollbar-thumb { background: var(--hack-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--hack-red); }

::selection { background: var(--hack-red); color: white; }

img, svg, canvas { display: block; max-width: 100%; }

/* ============== OVERLAYS ============== */
.scanlines {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
    opacity: 0.4;
}
.grid-overlay {
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hex-pattern {
    background-color: var(--hack-void);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-7.5L27.99 34H28v2.31h-.01L17 42.65V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============== PANELS ============== */
.hack-panel {
    background: var(--hack-panel);
    border: 1px solid var(--hack-border);
    transition: all 0.25s ease;
}
.hack-panel:hover { border-color: var(--hack-borderLight); }
.hack-panel-accent { border-left: 2px solid var(--hack-red); }
.hack-panel-cyan { border-left: 2px solid var(--hack-cyan); }
.hack-panel-green { border-left: 2px solid var(--hack-green); }
.hack-panel-amber { border-left: 2px solid var(--hack-amber); }

/* ============== TYPOGRAPHY ============== */
.terminal { font-family: 'JetBrains Mono', monospace; }
.terminal-cursor::after { content: '_'; animation: blink 1s step-end infinite; color: var(--hack-red); }
@keyframes blink { 50% { opacity: 0; } }

.text-hack { color: var(--hack-red); }
.text-hack-cyan { color: var(--hack-cyan); }
.text-hack-green { color: var(--hack-green); }
.text-hack-amber { color: var(--hack-amber); }
.text-hack-muted { color: var(--hack-muted); }
.text-hack-dim { color: var(--hack-dim); }

.bracket::before { content: '['; color: var(--hack-red); margin-right: 0.25em; }
.bracket::after { content: ']'; color: var(--hack-red); margin-left: 0.25em; }

/* ============== BUTTONS ============== */
.btn-hack {
    background: var(--hack-red);
    color: white;
    padding: 12px 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-hack:hover { background: var(--hack-redDim); box-shadow: 0 0 20px var(--hack-redGlow); color: white; }

.btn-hack-outline {
    background: transparent;
    color: var(--hack-text);
    padding: 12px 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--hack-borderLight);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-hack-outline:hover { border-color: var(--hack-red); color: var(--hack-red); }

/* ============== SECTION LABEL ============== */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--hack-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}
.section-label::before { content: '> '; color: var(--hack-red); }

/* ============== DIVIDERS ============== */
.hack-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--hack-borderLight), transparent); }
.hack-divider-red { height: 1px; background: linear-gradient(90deg, transparent, var(--hack-red), transparent); }

/* ============== NAV ============== */
.nav-hack {
    background: rgba(5,5,5,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hack-border);
}
.nav-link-hack {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--hack-muted);
    transition: color 0.2s ease;
    position: relative;
    text-decoration: none;
}
.nav-link-hack:hover { color: var(--hack-text); }
.nav-link-hack.active { color: var(--hack-red); }
.nav-link-hack.active::after {
    content: ''; position: absolute;
    left: 0; right: 0; bottom: -6px; height: 1px;
    background: var(--hack-red);
}

/* ============== REVEAL ANIMATIONS ============== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-right.active { opacity: 1; transform: translateX(0); }
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* ============== MATRIX CANVAS ============== */
#matrix-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.12;
    pointer-events: none;
}

/* ============== COUNTER ============== */
.counter-hack { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

/* ============== TAG ============== */
.hack-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 3px 10px;
    border: 1px solid var(--hack-borderLight);
    color: var(--hack-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
}
.hack-tag-red { border-color: rgba(230, 57, 70, 0.3); color: var(--hack-red); }
.hack-tag-cyan { border-color: rgba(0, 212, 255, 0.3); color: var(--hack-cyan); }
.hack-tag-green { border-color: rgba(0, 255, 65, 0.3); color: var(--hack-green); }
.hack-tag-amber { border-color: rgba(245, 158, 11, 0.3); color: var(--hack-amber); }

/* ============== CODE BLOCK ============== */
.code-block {
    font-family: 'JetBrains Mono', monospace;
    background: var(--hack-surface);
    border: 1px solid var(--hack-border);
    padding: 1.5rem;
    position: relative;
}
.code-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--hack-red), transparent);
}

/* ============== PROGRESS BAR ============== */
.hack-progress { height: 2px; background: var(--hack-border); position: relative; overflow: hidden; }
.hack-progress-fill { height: 100%; background: var(--hack-red); transition: width 1s ease; }

/* ============== MOBILE MENU ============== */
.mobile-menu-hack {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-hack.active { transform: translateX(0); }

.mobile-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--hack-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 8px 0;
    display: block;
}
.mobile-link:hover, .mobile-link.active { color: var(--hack-red); }

/* ============== HOVER LINE ============== */
.hover-line { position: relative; text-decoration: none; }
.hover-line::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--hack-red);
    transition: width 0.3s ease;
}
.hover-line:hover::after { width: 100%; }

/* ============== STATUS DOT ============== */
.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--hack-green);
    box-shadow: 0 0 8px var(--hack-green);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============== INPUTS ============== */
.input-hack {
    width: 100%;
    padding: 12px 16px;
    background: var(--hack-surface);
    border: 1px solid var(--hack-border);
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
    outline: none;
}
.input-hack::placeholder { color: var(--hack-dim); }
.input-hack:focus { border-color: var(--hack-red); }

/* ============== PAGE HEADER ============== */
.page-header-hack {
    padding-top: 8rem;
    padding-bottom: 3rem;
    position: relative;
    border-bottom: 1px solid var(--hack-border);
    background-color: var(--hack-void);
}
.page-header-hack::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 100%, var(--hack-redGlow), transparent 60%);
    pointer-events: none;
}

/* ============== RESPONSIVE TV SCALING ============== */
@media (min-width: 1920px) { html { font-size: 17px; } }
@media (min-width: 2560px) { html { font-size: 19px; } }
@media (min-width: 3200px) { html { font-size: 21px; } }
@media (min-width: 3840px) { html { font-size: 23px; } }

/* Container fluid that respects ultra-wide */
.container-fluid-hack {
    width: 100%;
    margin-inline: auto;
    padding-inline: 1.25rem;
}
@media (min-width: 640px)  { .container-fluid-hack { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container-fluid-hack { padding-inline: 4rem; } }
@media (min-width: 1280px) { .container-fluid-hack { padding-inline: 6rem; } }
@media (min-width: 1536px) { .container-fluid-hack { padding-inline: 10rem; } }
@media (min-width: 2560px) { .container-fluid-hack { padding-inline: 14rem; } }

.max-7xl { max-width: 80rem; margin-inline: auto; }
@media (min-width: 2560px) { .max-7xl { max-width: 110rem; } }
@media (min-width: 3840px) { .max-7xl { max-width: 140rem; } }

/* ============== LOADER ============== */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--hack-black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#page-loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-frame {
    width: 200px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--hack-muted);
    font-size: 0.75rem;
    text-align: center;
}
.loader-bar {
    margin-top: 12px;
    width: 100%;
    height: 2px;
    background: var(--hack-border);
    overflow: hidden;
    position: relative;
}
.loader-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--hack-red), transparent);
    animation: loader-slide 1.2s linear infinite;
}
@keyframes loader-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============== FORM FEEDBACK ============== */
.form-feedback {
    display: block;
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--hack-muted);
}

/* ============== TIMELINE / PROCESS ============== */
.process-step {
    position: relative;
    padding: 2rem;
    background: var(--hack-panel);
    border: 1px solid var(--hack-border);
    counter-increment: step;
}
.process-step::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: 1rem; right: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    color: var(--hack-red);
    opacity: 0.15;
    font-weight: 700;
}
.process { counter-reset: step; }

/* ============== FAQ ============== */
.faq-item { border: 1px solid var(--hack-border); background: var(--hack-panel); }
.faq-item + .faq-item { border-top: none; }
.faq-q {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    gap: 1rem;
    transition: color 0.2s ease;
}
.faq-q:hover { color: var(--hack-red); }
.faq-q::after { content: '+'; font-family: 'JetBrains Mono', monospace; color: var(--hack-red); transition: transform 0.3s ease; font-size: 1.25rem; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a-inner { padding: 0 1.5rem 1.25rem; color: var(--hack-muted); font-size: 0.875rem; line-height: 1.65; }
.faq-item.open .faq-a { max-height: 500px; }

/* ============== JOB CARD ============== */
.job-card {
    padding: 1.5rem 2rem;
    background: var(--hack-panel);
    border: 1px solid var(--hack-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    transition: border-color 0.2s ease;
}
.job-card:hover { border-color: var(--hack-borderLight); border-left-color: var(--hack-red); border-left-width: 2px; }

/* ============== LEGAL PROSE ============== */
.prose-hack { max-width: 70ch; margin-inline: auto; }
.prose-hack h2 { font-family: 'Inter', sans-serif; font-weight: 800; color: white; font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.prose-hack h3 { font-family: 'Inter', sans-serif; font-weight: 700; color: white; font-size: 1.15rem; margin: 1.75rem 0 0.75rem; }
.prose-hack p { color: var(--hack-muted); line-height: 1.75; margin-bottom: 1rem; }
.prose-hack ul { color: var(--hack-muted); padding-left: 1.5rem; margin-bottom: 1rem; line-height: 1.75; }
.prose-hack a { color: var(--hack-red); text-decoration: underline; text-underline-offset: 3px; }
.prose-hack strong { color: white; }
.prose-hack code { font-family: 'JetBrains Mono', monospace; font-size: 0.875em; color: var(--hack-cyan); background: var(--hack-surface); padding: 2px 6px; border: 1px solid var(--hack-border); }

/* ============== 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;
    }
}

/* ============== UTILITY HELPERS ============== */
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-sans { font-family: 'Inter', system-ui, sans-serif; }

/* ============== BRAND LOGO ============== */
/* The source artwork is very dark (avg luma ~41), so on the near-black shell it
   needs a lift to read. logo-mark.png is pre-brightened; the glow below adds the
   separation that a flat mark loses at navbar/sidebar sizes. */
.brand-logo {
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.28));
    transition: filter 0.25s ease, transform 0.25s ease;
}
a:hover > .brand-logo,
.brand-logo-link:hover .brand-logo {
    filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.55));
    transform: scale(1.04);
}

/* Loader mark — pulses while the page boots */
.loader-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    animation: loader-pulse 1.6s ease-in-out infinite;
}
@keyframes loader-pulse {
    0%, 100% { opacity: 0.55; filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.25)); }
    50%      { opacity: 1;    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6)); }
}

/* ============== LANGUAGE SWITCHER ============== */
.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: transparent;
    border: 1px solid var(--hack-border);
    color: var(--hack-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.lang-trigger:hover,
.lang-switcher:focus-within .lang-trigger { color: #fff; border-color: var(--hack-cyan); }
.lang-trigger-code { font-weight: 700; }

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 13rem;
    background: var(--hack-panel);
    border: 1px solid var(--hack-border);
    padding: 0.4rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 60;
}
.lang-menu-left { right: auto; left: 0; }
.lang-switcher:hover .lang-menu,
.lang-switcher:focus-within .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.lang-menu-label {
    padding: 0.35rem 0.9rem 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hack-dim);
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
    color: var(--hack-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: background 0.15s, color 0.15s;
}
.lang-option:hover { background: var(--hack-surface); color: #fff; }
.lang-option.is-active { color: var(--hack-cyan); }
.lang-option-native { flex: 1; }
.lang-option-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    color: var(--hack-dim);
}
.lang-option-check { font-size: 0.65rem; }

/* The currency switcher's "use my location again" row. Set apart from the
   currency list above it, because it is an action rather than a choice. */
.lang-option-reset {
    border-top: 1px solid var(--hack-border);
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: var(--hack-dim);
}
.lang-option-reset:hover { color: var(--hack-cyan); }

/* Inline variant — footer and mobile drawer */
.lang-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--hack-border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--hack-muted);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.lang-chip:hover { color: #fff; border-color: var(--hack-cyan); }
.lang-chip.is-active { color: var(--hack-cyan); border-color: var(--hack-cyan); }

/* ============== RTL SUPPORT ============== */
/* Logical-property overrides for languages added with direction = rtl. */
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .lang-menu-left { left: auto; right: 0; }
[dir="rtl"] .mobile-menu-hack { left: 0; right: auto; border-left: 0; border-right: 1px solid var(--hack-border); }
[dir="rtl"] .prose-hack ul { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .hover-line::after { left: auto; right: 0; }

/* ============== TRANSLATABLE HEADLINES ============== */
/* Display headings are single translation strings containing markup, so each
   language controls its own word order and punctuation. These two classes are
   the only tags a translator ever needs to preserve. */
.hl-accent { color: var(--hack-red); }
.hl-mono {
    font-family: 'JetBrains Mono', monospace;
    color: var(--hack-cyan);
    display: inline-block;
}
h1 .hl-mono { font-size: 0.62em; }
h2 .hl-mono { font-size: 0.72em; }
