:root {
    --void: #000000;
    --base: #050505;
    --surface: #0A0A0A;
    --surface-raised: #0F0F0F;
    --surface-overlay: #141414;

    --accent-primary: #6B2FCC;
    --accent-primary-muted: rgba(107, 47, 204, 0.5);
    --accent-primary-faint: rgba(107, 47, 204, 0.1);

    --text-primary: rgba(255, 255, 255, 0.70);
    --text-secondary: rgba(255, 255, 255, 0.60);
    --text-tertiary: rgba(255, 255, 255, 0.45);

    --border-default: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --duration-fast: 150ms;
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    min-height: 100%;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--base);
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Content fade. Initial opacity 0 lives in CSS so the first paint
   is already invisible — prevents the flash that happened when JS
   tried to snap opacity from 1 → 0 → 1 between paint and execution.
   landing.js adds the .faded-in class to trigger the fade. */
main,
footer {
    opacity: 0;
    transition: opacity 1s ease-out;
}

main.faded-in,
footer.faded-in {
    opacity: 1;
}

/* Accessibility — visible focus indicator for keyboard users.
   Universal white outline works on both dark backgrounds and the
   purple CTA buttons. :focus-visible only triggers on keyboard
   navigation, not mouse clicks, so it doesn't show on click. */
*:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.toggle-switch:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
    border-radius: 3px;
}

/* Skip-to-main-content link. Hidden via transform (not `top`) so
   browsers don't animate from the unstyled-default position to the
   hidden position on first paint — that caused a visible flash on
   page load. transform animates only between known values, so the
   initial translateY(-100%) is honored synchronously, then focus
   slides it into place. */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 12px 20px;
    background: var(--accent-primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    transform: translateY(-100%);
    transition: transform var(--duration-fast) var(--ease-smooth);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Screen-reader-only utility. Content stays in the accessibility
   tree and DOM but is not rendered visually. Off-screen positioning
   (left: -10000px) is more reliable across browsers than the
   clip-rect pattern, which can leak through in some rendering
   contexts and shows the element where you don't want it. */
.visually-hidden {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Particle canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Interior page header (logo top-left, links to /) */
.page-header {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 20px 0;
    position: relative;
    z-index: 1;
}

.page-header .home-link {
    display: inline-block;
    opacity: 0.85;
    transition: opacity var(--duration-fast) var(--ease-smooth);
}

.page-header .home-link:hover {
    opacity: 1;
}

.page-header img {
    display: block;
    height: 36px;
    width: auto;
}

/* CTA card pattern (homepage hero CTA + interior page CTA strips) */
.cta-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--accent-primary);
    border-radius: 16px;
    padding: 28px 28px 24px;
    overflow: hidden;
    isolation: isolate;
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 100% 0%, rgba(107, 47, 204, 0.10), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    margin-bottom: 18px;
}

.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(107, 47, 204, 0.18);
    animation: eyebrowDotPulse 2s var(--ease-smooth) infinite;
}

@keyframes eyebrowDotPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(107, 47, 204, 0.18); }
    50%      { box-shadow: 0 0 0 7px rgba(107, 47, 204, 0.05); }
}

.cta-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: white;
    margin-bottom: 12px;
}

.cta-sub {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 24px;
}

.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--accent-primary);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-primary);
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity var(--duration-fast) var(--ease-smooth),
                transform var(--duration-fast) var(--ease-smooth);
}

.cta-button .arrow {
    display: inline-block;
    transition: transform var(--duration-fast) var(--ease-smooth);
}

.cta-button:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.cta-button:hover .arrow {
    transform: translateX(3px);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-default);
    padding: 64px 20px 28px;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 56px;
}

.footer-brand .footer-logo {
    display: inline-block;
    height: 36px;
    width: auto;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 280px;
}

.footer-col h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-smooth);
}

.footer-col a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--border-default);
    font-size: 13px;
    color: var(--text-tertiary);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
