/* ============================================
   Custodian Consulting — Style Framework
   Dark theme cybersecurity consultancy
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a28;
    --accent-cyan: #00d4ff;
    --accent-cyan-dim: rgba(0, 212, 255, 0.15);
    --accent-yellow: #eeee22;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --text-muted: #555570;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 212, 255, 0.3);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --nav-height: 72px;
    --max-width: 1200px;
    --transition-fast: 0.2s ease;
    --transition-med: 0.4s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #66e5ff;
}

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

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
    color: var(--text-secondary);
    max-width: 680px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    padding: 4px 12px;
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    background: var(--accent-cyan-dim);
}

.section-heading {
    margin-bottom: 20px;
}

.section-intro {
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.highlight {
    color: var(--accent-cyan);
}

.highlight-yellow {
    color: var(--accent-yellow);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-cyan);
    color: #0a0a0f;
}

.btn-primary:hover {
    background: #33ddff;
    color: #0a0a0f;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--border-glow);
}

.btn-outline:hover {
    background: var(--accent-cyan-dim);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-arrow::after {
    content: '\2192';
    transition: transform var(--transition-fast);
}

.btn-arrow:hover::after {
    transform: translateX(4px);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-med);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--border-subtle);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1001;
}

.nav-logo svg {
    width: 38px;
    height: 38px;
}

.nav-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-logo-text span {
    color: var(--accent-cyan);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-cyan);
    transition: width var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 8px 20px !important;
    font-size: 0.85rem !important;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: var(--nav-height);
}

/* Matrix / cyber grid background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* Vertical grid lines */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 99px,
            rgba(0, 212, 255, 0.03) 99px,
            rgba(0, 212, 255, 0.03) 100px
        ),
        /* Horizontal grid lines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 99px,
            rgba(0, 212, 255, 0.03) 99px,
            rgba(0, 212, 255, 0.03) 100px
        );
    animation: gridPulse 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 70% 40%, rgba(0, 212, 255, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 20% 80%, rgba(0, 212, 255, 0.04) 0%, transparent 60%),
        linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
    pointer-events: none;
}

@keyframes gridPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Floating particles via CSS */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-particles span {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

.hero-particles span:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 25%; animation-duration: 16s; animation-delay: 2s; }
.hero-particles span:nth-child(3) { left: 40%; animation-duration: 10s; animation-delay: 4s; }
.hero-particles span:nth-child(4) { left: 55%; animation-duration: 14s; animation-delay: 1s; }
.hero-particles span:nth-child(5) { left: 70%; animation-duration: 18s; animation-delay: 3s; }
.hero-particles span:nth-child(6) { left: 85%; animation-duration: 11s; animation-delay: 5s; }
.hero-particles span:nth-child(7) { left: 15%; animation-duration: 13s; animation-delay: 6s; }
.hero-particles span:nth-child(8) { left: 60%; animation-duration: 15s; animation-delay: 7s; }
.hero-particles span:nth-child(9) { left: 35%; animation-duration: 17s; animation-delay: 2.5s; }
.hero-particles span:nth-child(10) { left: 90%; animation-duration: 9s; animation-delay: 4.5s; }
.hero-particles span:nth-child(11) { left: 5%; animation-duration: 19s; animation-delay: 1.5s; }
.hero-particles span:nth-child(12) { left: 78%; animation-duration: 12s; animation-delay: 8s; }

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-20vh) scale(1);
        opacity: 0;
    }
}

/* Scan line effect */
.hero-scanline {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-scanline::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15), transparent);
    animation: scanline 6s linear infinite;
}

@keyframes scanline {
    0% { top: -1px; }
    100% { top: 100%; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-cyan);
    margin-bottom: 28px;
    letter-spacing: 0.05em;
}

.hero-badge .pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(0, 212, 255, 0); }
}

.hero h1 {
    margin-bottom: 8px;
}

.hero-heading-typed {
    display: inline;
}

.hero-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent-cyan);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-tagline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-terminal {
    margin-top: 60px;
    background: rgba(18, 18, 26, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    max-width: 520px;
}

.hero-terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle);
}

.hero-terminal-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.hero-terminal-bar span:first-child { background: #ff5f57; }
.hero-terminal-bar span:nth-child(2) { background: #ffbd2e; }
.hero-terminal-bar span:nth-child(3) { background: #28ca41; }

.hero-terminal-body {
    padding: 16px 20px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.hero-terminal-body .prompt {
    color: var(--accent-cyan);
}

.hero-terminal-body .cmd {
    color: var(--text-primary);
}

.hero-terminal-body .output {
    color: #28ca41;
}

.hero-terminal-body .warn {
    color: var(--accent-yellow);
}

/* --- About Section --- */
.about {
    border-top: 1px solid var(--border-subtle);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-certs {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.cert-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cert-badge svg {
    width: 18px;
    height: 18px;
    fill: var(--accent-cyan);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 28px 24px;
    text-align: center;
    transition: all var(--transition-med);
}

.stat-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.08);
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent-cyan);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Services Section --- */
.services {
    border-top: 1px solid var(--border-subtle);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 36px 28px;
    transition: all var(--transition-med);
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0;
    transition: opacity var(--transition-med);
}

.service-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(0, 212, 255, 0.06);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-cyan-dim);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.service-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-cyan);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-card h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.service-card:hover h3 {
    color: var(--accent-cyan);
}

.service-card p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.service-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition-fast);
}

.service-card:hover .service-link {
    opacity: 1;
    transform: translateX(0);
}

/* --- Why Choose Us --- */
.why-us {
    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(0, 212, 255, 0.02) 50%, var(--bg-primary) 100%);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.why-card {
    display: flex;
    gap: 20px;
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    transition: all var(--transition-med);
}

.why-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.why-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-cyan-dim);
    border-radius: 8px;
    font-size: 1.2rem;
}

.why-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-cyan);
    fill: none;
    stroke-width: 1.5;
}

.why-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.why-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Contact CTA Banner --- */
.contact-cta {
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    background:
        radial-gradient(ellipse 70% 60% at 50% 100%, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
}

.contact-cta h2 {
    margin-bottom: 16px;
}

.contact-cta p {
    margin: 0 auto 36px;
    font-size: 1.1rem;
}

.contact-cta .btn {
    margin: 0 8px;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.contact-email svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-cyan);
    fill: none;
    stroke-width: 1.5;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 48px 0 32px;
    background: rgba(0, 0, 0, 0.3);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand p {
    font-size: 0.9rem;
    margin-top: 16px;
    max-width: 320px;
}

.footer h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
}

.footer-bottom a:hover {
    color: var(--accent-cyan);
}

/* --- Fade-in animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* --- Mobile Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: 72px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(12, 12, 18, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 28px;
        padding: 40px;
        transition: right var(--transition-med);
        border-left: 1px solid var(--border-subtle);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .hero-terminal {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .about-certs {
        flex-direction: column;
    }
}
