/* ============================================
   CHERRY PEAR MOODY — Design System
   Premium Neon / Dark Intelligence Aesthetic
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Brand Colors — from logo */
    --cherry: #FF0040;
    --cherry-light: #FF4070;
    --cherry-glow: rgba(255, 0, 64, 0.15);
    --cherry-glow-strong: rgba(255, 0, 64, 0.3);

    --pear: #00FF80;
    --pear-light: #80FF80;
    --pear-glow: rgba(0, 255, 128, 0.12);
    --pear-glow-strong: rgba(0, 255, 128, 0.25);

    /* Neutral Palette */
    --bg-primary: #0A0A0F;
    --bg-secondary: #101018;
    --bg-tertiary: #16161F;
    --bg-card: #12121A;
    --bg-card-hover: #1A1A25;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.15);

    --text-primary: #FFFFFF;
    --text-secondary: #A0A0B0;
    --text-tertiary: #787888;
    --text-muted: #606070;

    /* Accent — logo gray used for secondary text */
    --gray-mid: #A0A0A0;
    --gray-dark: rgb(85, 85, 85);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 800px;
    --navbar-height: 140px;
}

/* --- CSS Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* Subtle noise texture on body for depth */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.012;
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

/* --- Utility Classes --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

.text-cherry {
    color: var(--cherry);
}

.text-pear {
    color: var(--pear);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.font-mono {
    font-family: var(--font-mono);
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Typography Scale --- */
.heading-1 {
    font-family: 'Outfit', var(--font-primary);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.heading-2 {
    font-family: 'Outfit', var(--font-primary);
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.heading-3 {
    font-family: 'Outfit', var(--font-primary);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.3;
}

.body-large {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.body-small {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-tertiary);
}

.label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-tertiary);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn--primary {
    background: var(--cherry);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.25), 0 0 60px rgba(255, 0, 64, 0.08);
}

.btn--primary:hover {
    background: var(--cherry-light);
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.4), 0 0 80px rgba(255, 0, 64, 0.15);
    transform: translateY(-1px) scale(1.02);
}

.btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

.btn--secondary:hover {
    border-color: var(--pear);
    color: var(--pear);
    box-shadow: 0 0 20px var(--pear-glow);
    transform: translateY(-1px);
}

/* Focus visible for accessibility */
.btn:focus-visible {
    outline: 2px solid var(--cherry);
    outline-offset: 3px;
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn--ghost:hover {
    color: var(--text-primary);
}

.btn--cta {
    background: var(--cherry);
    color: var(--text-primary);
    padding: 0.625rem 1.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.2);
}

.btn--cta:hover {
    background: var(--cherry-light);
    box-shadow: 0 0 25px rgba(255, 0, 64, 0.35);
    transform: translateY(-1px);
}

/* --- Card Components --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.card--glow-cherry:hover {
    border-color: rgba(255, 0, 64, 0.2);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 0 0 30px var(--cherry-glow);
}

.card--glow-pear:hover {
    border-color: rgba(0, 255, 128, 0.2);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 0 0 30px var(--pear-glow);
}

/* --- Section Spacing --- */
.section {
    padding: var(--space-5xl) 0;
}

.section--tight {
    padding: var(--space-3xl) 0;
}

/* --- Divider --- */
.divider {
    width: 100%;
    height: 1px;
    background: var(--border-subtle);
}

.divider--glow {
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 0, 64, 0.3),
            rgba(0, 255, 128, 0.3),
            transparent);
}

/* --- Badge / Tag --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-radius: var(--radius-full);
    border: 1px solid;
}

.badge--cherry {
    color: var(--cherry);
    border-color: rgba(255, 0, 64, 0.25);
    background: rgba(255, 0, 64, 0.08);
}

.badge--pear {
    color: var(--pear);
    border-color: rgba(0, 255, 128, 0.25);
    background: rgba(0, 255, 128, 0.08);
}

/* --- Glow Effects --- */
.glow-text-cherry {
    text-shadow: 0 0 20px rgba(255, 0, 64, 0.5), 0 0 40px rgba(255, 0, 64, 0.2);
}

.glow-text-pear {
    text-shadow: 0 0 20px rgba(0, 255, 128, 0.5), 0 0 40px rgba(0, 255, 128, 0.2);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes radarSweep {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes nodeGlow {

    0%,
    100% {
        opacity: 0.3;
        r: 3;
    }

    50% {
        opacity: 0.9;
        r: 5;
    }
}

@keyframes connectionPulse {
    0% {
        stroke-dashoffset: 20;
        opacity: 0.15;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0.15;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.7s ease forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

/* Staggered delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- Selection Color --- */
::selection {
    background: rgba(255, 0, 64, 0.3);
    color: var(--text-primary);
}

/* ============================================
   NAVBAR STYLES
   ============================================ */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: none;
    transition: all var(--transition-base);
}

.navbar--scrolled {
    background: transparent;
    box-shadow: none;
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.navbar__logo {
    display: flex;
    align-items: center;
    height: 120px;
    flex-shrink: 0;
}

.navbar__logo img {
    height: 120px;
    width: auto;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.navbar__link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    transition: color var(--transition-fast);
    position: relative;
}

.navbar__link:hover {
    color: var(--text-primary);
}

.navbar__link--active {
    color: var(--text-primary);
}

.navbar__link--active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--cherry);
    box-shadow: 0 0 8px rgba(255, 0, 64, 0.4);
}

/* Dropdown */
.navbar__dropdown {
    position: relative;
}

.navbar__dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    transition: color var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.navbar__dropdown-trigger:hover {
    color: var(--text-primary);
}

.navbar__dropdown-icon {
    width: 10px;
    height: 10px;
    transition: transform var(--transition-fast);
}

.navbar__dropdown:hover .navbar__dropdown-icon {
    transform: rotate(180deg);
}

.navbar__dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.navbar__dropdown:hover .navbar__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.navbar__dropdown-item {
    display: block;
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.navbar__dropdown-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Mobile Menu Toggle */
.navbar__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.navbar__toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text-secondary);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

/* Mobile Nav */
.navbar__mobile-menu {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: var(--space-xl);
    z-index: 999;
    overflow-y: auto;
}

.navbar__mobile-menu.is-open {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.navbar__mobile-link {
    display: block;
    padding: var(--space-md) 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    transition: color var(--transition-fast);
}

.navbar__mobile-link:hover {
    color: var(--text-primary);
}

/* ============================================
   FOOTER STYLES
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(0, 255, 128, 0.3), rgba(255, 0, 64, 0.25), rgba(0, 255, 128, 0.3), transparent) 1;
    padding: var(--space-4xl) 0 var(--space-xl);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer__logo {
    height: 100px;
    width: auto;
    align-self: flex-start;
}

.footer__tagline {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    line-height: 1.7;
    max-width: 320px;
}

.footer__col-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.footer__link {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    padding: 0.375rem 0;
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--text-primary);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-subtle);
}

.footer__copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer__legal-links {
    display: flex;
    gap: var(--space-lg);
}

.footer__legal-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer__legal-link:hover {
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 92px;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    /* Navbar mobile */
    .navbar__logo {
        height: 80px;
    }

    .navbar__logo img {
        height: 80px;
    }

    .navbar__links,
    .navbar__actions .btn--cta {
        display: none;
    }

    .navbar__toggle {
        display: flex;
    }

    /* Mobile menu enhancements */
    .navbar__mobile-menu {
        top: var(--navbar-height);
        background: var(--bg-primary);
        border-top: 1px solid var(--border-subtle);
        padding: var(--space-sm) var(--space-lg);
    }

    .navbar__mobile-menu.is-open {
        gap: 0;
        background: #0a0a0f;
    }

    .navbar__mobile-link {
        padding: var(--space-md) var(--space-sm);
        font-size: 0.9375rem;
        font-weight: 500;
        color: var(--text-secondary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        transition: color var(--transition-fast), background var(--transition-fast);
        border-radius: var(--radius-sm);
    }

    .navbar__mobile-link:hover,
    .navbar__mobile-link:active {
        color: var(--text-primary);
        background: rgba(255, 255, 255, 0.03);
    }

    .navbar__mobile-link:last-of-type {
        border-bottom: none;
    }

    /* Footer mobile */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .footer__brand {
        align-items: center;
    }

    .footer__logo {
        align-self: center;
    }

    .footer__tagline {
        max-width: 100%;
    }

    .footer__col-title {
        text-align: center;
    }

    .footer__link {
        text-align: center;
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer__legal-links {
        justify-content: center;
    }
}