/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --bg: #06080d;
    --bg-raised: #0c0f17;
    --bg-card: #0f1219;
    --bg-terminal: #0a0c12;
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(45, 212, 191, 0.15);

    --text: #e2e8f0;
    --text-dim: #8892a4;
    --text-muted: #4a5568;

    --teal: #2dd4bf;
    --teal-dim: rgba(45, 212, 191, 0.12);
    --teal-glow: rgba(45, 212, 191, 0.06);
    --cyan: #22d3ee;

    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Outfit', sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

body::after {
    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'%3ExternalLink %3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: #5eead4; }

::selection { background: var(--teal); color: var(--bg); }

/* ============================================
   PARTICLE CANVAS
   ============================================ */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(6, 8, 13, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.nav__logo-ghost {
    display: flex;
    gap: 3px;
}

.ghost-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    animation: pulse 2s ease-in-out infinite;
}
.ghost-dot:nth-child(2) { animation-delay: 0.3s; opacity: 0.7; }
.ghost-dot:nth-child(3) { animation-delay: 0.6s; opacity: 0.4; }

@keyframes pulse {
    0%, 100% { opacity: var(--start-op, 1); transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

.ghost-dot:nth-child(1) { --start-op: 1; }
.ghost-dot:nth-child(2) { --start-op: 0.7; }
.ghost-dot:nth-child(3) { --start-op: 0.4; }

.teal { color: var(--teal); }

.nav__right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav__link {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav__link:hover { color: var(--text); }

.lang-btn {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--teal);
    background: var(--teal-dim);
    border: 1px solid var(--border-accent);
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}
.lang-btn:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: var(--teal);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
}

.hero__inner {
    max-width: 720px;
    width: 100%;
}

.hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--teal);
    margin-bottom: 2rem;
    animation: fadeIn 0.8s var(--ease) both;
}

.hero__tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 12px var(--teal);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.hero__h1 {
    display: flex;
    flex-direction: column;
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
    margin-bottom: 1.5rem;
}

.hero__line {
    animation: slideUp 0.7s var(--ease) both;
}
.hero__line:nth-child(1) { animation-delay: 0.1s; }
.hero__line:nth-child(2) { animation-delay: 0.2s; }
.hero__line:nth-child(3) { animation-delay: 0.3s; }

.hero__line--glow {
    background: linear-gradient(90deg, var(--teal), var(--cyan), var(--teal));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUp 0.7s var(--ease) 0.2s both, shimmer 6s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

.hero__desc {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 3rem;
    animation: fadeIn 0.8s var(--ease) 0.4s both;
}
.hero__desc strong { color: var(--text); font-weight: 600; }

/* ============================================
   TERMINAL
   ============================================ */
.terminal {
    background: rgba(10, 12, 18, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: fadeIn 0.8s var(--ease) 0.5s both;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 20px 60px rgba(0,0,0,0.5),
        0 0 80px var(--teal-glow);
}

.terminal__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.01);
}

.terminal__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal__dot--r { background: #ff5f57; }
.terminal__dot--y { background: #ffbd2e; }
.terminal__dot--g { background: #28c840; }

.terminal__title {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.terminal__body {
    padding: 1.25rem 1.25rem 1rem;
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.8;
}

.terminal__line {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.terminal__line--out {
    padding-left: 1.2rem;
}

.terminal__prompt {
    color: var(--teal);
    font-weight: 500;
}

.terminal__cmd { color: var(--text); }

.terminal__comment { color: var(--text-muted); }

.terminal__cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--teal);
    animation: cursorBlink 1s step-end infinite;
}

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

/* ============================================
   FEATURES
   ============================================ */
.features {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.75rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.3s var(--ease);
}

.feature:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
}
.feature:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
}
.feature:not(:last-child) {
    border-bottom: none;
}

.feature:hover {
    background: var(--bg-raised);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}
.feature:hover + .feature {
    border-top-color: var(--border-accent);
}

.feature__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--teal-dim);
    color: var(--teal);
}

.feature__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.feature__text {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 2rem 5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.contact a {
    font-weight: 500;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.footer__brand {
    font-weight: 700;
    font-size: 0.9rem;
}

.footer__copy {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.footer__links {
    display: flex;
    gap: 1.25rem;
}
.footer__links a {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.footer__links a:hover { color: var(--teal); }

/* ============================================
   LEGAL PAGE STYLES
   ============================================ */
.legal-page {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 7rem 2rem 5rem;
}

.legal-page__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
    transition: color 0.2s;
}
.legal-page__back:hover { color: var(--teal); }

.legal-page__title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.legal-page__sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-style: italic;
}

.legal-page h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.legal-page h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    color: var(--teal);
}

.legal-page p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.legal-page ul {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.8;
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.legal-page li { margin-bottom: 0.15rem; }

.legal-page a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(45, 212, 191, 0.3);
}
.legal-page a:hover { text-decoration-color: var(--teal); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .nav { padding: 0 1.25rem; }
    .nav__link { display: none; }
    .hero { padding: 5rem 1.25rem 3rem; }
    .hero__h1 { font-size: 2rem; }
    .features { padding: 0 1.25rem 4rem; }
    .feature { flex-direction: column; gap: 0.75rem; }
    .terminal__body { font-size: 0.72rem; }
    .footer { flex-direction: column; text-align: center; }
    .legal-page { padding: 6rem 1.25rem 3rem; }
    .legal-page__title { font-size: 1.6rem; }
}
