/* || CYBERPUNK / GLITCH DESIGN SYSTEM */
/* High-Tech, Low-Life - Digital Dystopia Aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Share+Tech+Mono&display=swap');

/* || CSS CUSTOM PROPERTIES - CYBERPUNK PALETTE */
:root {
    /* Core Colors - Void System */
    --background: #0a0a0f;
    --foreground: #e0e0e0;
    --card: #12121a;
    --muted: #1c1c2e;
    --mutedForeground: #6b7280;

    /* Neon Accents */
    --accent: #00ff88;           /* PRIMARY - Electric green */
    --accentSecondary: #ff00ff;   /* SECONDARY - Hot magenta */
    --accentTertiary: #00d4ff;    /* TERTIARY - Cyan */

    /* UI Elements */
    --border: #2a2a3a;
    --input: #12121a;
    --ring: #00ff88;
    --destructive: #ff3366;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index layers */
    --z-scanline: 1000;
    --z-noise: 1;
    --z-content: 10;
    --z-marquee: 5;
}

/* || RESET & BASE */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* || BODY */
body {
    font-family: 'Share Tech Mono', 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* || SCANLINE OVERLAY */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-scanline);
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    opacity: 0.15;
}

/* || NOISE TEXTURE OVERLAY */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-noise);
    opacity: 0.04;
    mix-blend-mode: overlay;
}

.noise-overlay svg {
    width: 100%;
    height: 100%;
}

/* || CIRCUIT/GRID BACKGROUND */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* || KEYFRAME ANIMATIONS */
@keyframes blink {
    50% { opacity: 0; }
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-1px, -1px); }
    80% { transform: translate(1px, 1px); }
}

@keyframes rgbShift {
    0%, 100% {
        text-shadow: -2px 0 #ff00ff, 2px 0 #00d4ff;
    }
    50% {
        text-shadow: 2px 0 #ff00ff, -2px 0 #00d4ff;
    }
}

@keyframes scanlineScroll {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* || HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent);
    background-color: var(--background);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.header-logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.header-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent);
}

/* || HERO SECTION */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-2xl) var(--space-md);
    padding-top: 180px;
    position: relative;
    border-bottom: 1px solid var(--border);
}

/* Massive background number */
.hero-number {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(8rem, 35vw, 30rem);
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.05em;
    color: var(--muted);
    text-transform: uppercase;
    z-index: -1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: var(--z-content);
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 15vw, 14rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--foreground);
    margin-bottom: var(--space-md);
    position: relative;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Glitch effect on hero */
.hero h1::before,
.hero h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero h1::before {
    color: #ff00ff;
    animation: glitch 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    opacity: 0.8;
}

.hero h1::after {
    color: #00d4ff;
    animation: glitch 2s infinite reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    opacity: 0.8;
}

/* Accent highlight on hero */
.hero-accent {
    color: var(--accent);
    text-shadow:
        0 0 10px var(--accent),
        0 0 20px var(--accent),
        0 0 40px var(--accent);
    animation: rgbShift 4s infinite;
}

.hero p {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    color: var(--accent);
    max-width: 500px;
    margin: 0 auto;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
}

/* Typing cursor effect */
.hero p::after {
    content: '_';
    animation: blink 1s step-end infinite;
    margin-left: 4px;
}

/* || MARQUEE SECTION */
.marquee-section {
    border-top: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    background-color: var(--card);
    overflow: hidden;
    padding: var(--space-lg) 0;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.marquee-track {
    display: flex;
    animation: marquee 20s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding-right: var(--space-lg);
    white-space: nowrap;
}

.marquee-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--foreground);
    text-shadow: 0 0 8px var(--accent);
}

.marquee-divider {
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    transform: rotate(45deg);
    box-shadow: 0 0 8px var(--accent);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* || TOOLS SECTION */
.tools {
    padding: var(--space-2xl) var(--space-md);
    position: relative;
}

.tools-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.tools-label {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-sm);
    border: 1px solid var(--accent);
    padding: 0.25rem 0.75rem;
    text-shadow: 0 0 6px var(--accent);
}

.tools h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--foreground);
    text-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

/* Background decorative number */
.tools-number {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(6rem, 20vw, 15rem);
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.05em;
    color: var(--muted);
    text-transform: uppercase;
    z-index: -1;
    top: 20%;
    right: -5%;
    pointer-events: none;
    opacity: 0.2;
}

/* || CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

/* || CARD - CYBERPUNK STYLE */
.card {
    display: block;
    padding: var(--space-xl) var(--space-lg);
    background-color: var(--card);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--foreground);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    /* Chamfered corners via clip-path */
    clip-path: polygon(
        0 10px, 10px 0,
        calc(100% - 10px) 0, 100% 10px,
        100% calc(100% - 10px), calc(100% - 10px) 100%,
        10px 100%, 0 calc(100% - 10px)
    );
}

.card:hover {
    border-color: var(--accent);
    box-shadow:
        0 0 5px var(--accent),
        0 0 10px rgba(0, 255, 136, 0.4),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

/* Card corner accents */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card:hover::before,
.card:hover::after {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-number {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.05em;
    color: var(--mutedForeground);
    margin-bottom: var(--space-md);
    transition: all var(--transition-base);
}

.card:hover .card-number {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
    opacity: 0.5;
}

.card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    transition: all var(--transition-base);
}

.card:hover h3 {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent);
}

.card p {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.875rem, 1.25vw, 1rem);
    font-weight: 400;
    line-height: 1.5;
    color: var(--mutedForeground);
    transition: all var(--transition-base);
}

.card:hover p {
    color: var(--foreground);
}

/* Terminal-style arrow indicator */
.card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--space-md);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accentTertiary);
    transition: all var(--transition-base);
}

.card-arrow::before {
    content: '>';
    margin-right: 0.25rem;
}

.card-arrow::after {
    content: '→';
    transition: transform var(--transition-base);
}

.card:hover .card-arrow {
    color: var(--accent);
    text-shadow: 0 0 6px var(--accent);
}

.card:hover .card-arrow::after {
    transform: translateX(6px);
}

/* || FOOTER */
.footer {
    border-top: 1px solid var(--border);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    background-color: var(--card);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.footer-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--mutedForeground);
}

.footer p {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.75rem, 1.25vw, 0.875rem);
    font-weight: 400;
    color: var(--mutedForeground);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* || FOCUS STATES (WCAG 2.2 ACCESSIBILITY) */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    box-shadow: 0 0 8px var(--accent);
}

a:focus-visible,
.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(0, 255, 136, 0.4);
}

/* Remove outline for mouse users */
a:focus:not(:focus-visible),
.card:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* || REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .marquee-track {
        animation: none;
    }

    .marquee-content {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1::before,
    .hero h1::after {
        display: none;
    }

    body::after {
        display: none;
    }
}

/* || MOBILE ADJUSTMENTS */
@media (max-width: 640px) {
    .header {
        padding: var(--space-sm) var(--space-sm);
    }

    .header-logo {
        height: 36px;
    }

    .hero {
        padding-top: 140px;
        padding-left: var(--space-sm);
        padding-right: var(--space-sm);
    }

    .card {
        padding: var(--space-lg) var(--space-md);
    }

    .tools-label {
        font-size: 0.65rem;
    }
}

/* || ACCESSIBILITY - Colour Contrast (WCAG 2.2 AA) */
/*
 * Contrast ratios verified:
 * - Foreground (#E0E0E0) on Background (#0A0A0F): 13.8:1 (AAA)
 * - Accent Green (#00FF88) on Background (#0A0A0F): 7.5:1 (AAA)
 * - Accent Magenta (#FF00FF) on Background (#0A0A0F): 5.1:1 (AA)
 * - Accent Cyan (#00D4FF) on Background (#0A0A0F): 6.8:1 (AA)
 * - Muted Foreground (#6B7280) on Background (#0A0A0F): 4.5:1 (AA)
 * - Card (#12121A) on Background (#0A0A0F): 1.3:1 (UI chrome, not text)
 */
