/* Janus Platform — Design System v2 */
/* Space Grotesk (headings) + Outfit (body) */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ========== Design Tokens ========== */
:root {
    --bg:           222 47% 5%;
    --bg-card:      222 40% 8%;
    --fg:           210 40% 92%;
    --primary:      190 95% 55%;
    --secondary:    260 60% 55%;
    --muted-bg:     222 30% 12%;
    --muted-fg:     215 20% 55%;
    --border:       222 30% 16%;
    --radius:       0.75rem;
}

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

/* ========== Base ========== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: hsl(var(--bg));
    color: hsl(var(--fg));
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
}

a {
    color: hsl(var(--primary));
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: hsl(var(--fg));
}

/* ========== Starfield Canvas ========== */
#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ========== Navigation ========== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: hsl(var(--bg) / 0.6);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--primary));
    text-shadow: 0 0 20px hsl(var(--primary) / 0.3);
    letter-spacing: -0.03em;
    text-decoration: none;
}

.logo:hover {
    color: hsl(var(--primary));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-fg));
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: hsl(var(--fg));
}

.lang-sep {
    color: hsl(var(--border));
    font-size: 0.875rem;
}

.lang-switch {
    font-size: 0.75rem !important;
    font-weight: 500;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    padding: 0.125rem 0.5rem;
    color: hsl(var(--muted-fg)) !important;
    transition: border-color 0.3s, color 0.3s !important;
}

.lang-switch:hover {
    border-color: hsl(var(--primary) / 0.5);
    color: hsl(var(--fg)) !important;
}

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

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 50% at 50% 40%, hsl(var(--primary) / 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, hsl(var(--fg)), hsl(var(--primary)), hsl(var(--fg)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: hsl(var(--primary));
    text-shadow: 0 0 20px hsl(var(--primary) / 0.3);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.tagline {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    color: hsl(var(--muted-fg));
    max-width: 40rem;
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.hero-divider .line {
    height: 1px;
    width: 4rem;
    background: linear-gradient(to right, transparent, hsl(var(--primary) / 0.5));
}

.hero-divider .line.right {
    background: linear-gradient(to left, transparent, hsl(var(--primary) / 0.5));
}

.hero-divider .dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: hsl(var(--primary));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 0 0 4px hsl(var(--primary) / 0.4);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 12px hsl(var(--primary) / 0.8), 0 0 24px hsl(var(--primary) / 0.3);
    }
}

/* ========== Features Section ========== */
main {
    position: relative;
    z-index: 1;
    flex: 1;
}

/* ========== Page images ========== */
.page-image {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
    display: block;
}

.page-image img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border) / 0.4);
    box-shadow: 0 0 60px hsl(var(--primary) / 0.08), 0 4px 32px rgba(0,0,0,0.4);
    display: block;
}

.hero-image {
    width: 100%;
    max-width: 1000px;
    margin: 2.5rem auto 0;
    padding: 0 1.5rem;
    display: block;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--primary) / 0.2);
    box-shadow: 0 0 80px hsl(var(--primary) / 0.12), 0 8px 48px rgba(0,0,0,0.5);
    display: block;
}

.features {
    padding: 5rem 1.5rem 6rem;
}

.features h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    text-align: center;
    color: hsl(var(--fg));
    margin-bottom: 3.5rem;
}

.feature-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border) / 0.5);
    background-color: hsl(var(--bg-card) / 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 0 20px hsl(var(--primary) / 0.04), inset 0 1px hsl(var(--fg) / 0.04);
    padding: 2rem;
    transition: border-color 0.4s, box-shadow 0.4s, opacity 0.6s, transform 0.6s;
}

.feature-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    box-shadow:
        0 0 30px hsl(var(--primary) / 0.1),
        0 0 60px hsl(var(--primary) / 0.04),
        inset 0 1px hsl(var(--fg) / 0.07);
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background-color: hsl(var(--primary) / 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: background-color 0.3s;
}

.feature-card:hover .feature-icon {
    background-color: hsl(var(--primary) / 0.2);
}

.feature-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: hsl(var(--primary));
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: hsl(var(--fg));
    margin-bottom: 0.65rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: hsl(var(--muted-fg));
    line-height: 1.65;
}

/* ========== Content Pages (About / Contact) ========== */
.content-page {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 7rem 1.5rem 4rem;
}

.content-page section,
.content-page > h1,
.content-page > h2,
.content-page > p {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.content-page h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: hsl(var(--fg));
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.content-page section {
    margin-bottom: 2.5rem;
}

.content-page h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: hsl(var(--primary));
    margin-bottom: 0.75rem;
}

.content-page p {
    color: hsl(var(--muted-fg));
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.content-page ul {
    padding-left: 1.5rem;
    color: hsl(var(--muted-fg));
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.content-page li {
    margin-bottom: 0.5rem;
}

.content-page strong {
    color: hsl(var(--fg));
    font-weight: 600;
}

.content-page a {
    color: hsl(var(--primary));
}

.content-page a:hover {
    text-decoration: underline;
}

/* ========== Footer ========== */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid hsl(var(--border) / 0.3);
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: auto;
}

footer p {
    font-size: 0.875rem;
    color: hsl(var(--muted-fg));
}

footer a {
    color: hsl(var(--muted-fg));
    transition: color 0.2s;
}

footer a:hover {
    color: hsl(var(--primary));
}

/* ========== Scroll Reveal ========== */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:nth-child(2).reveal { transition-delay: 80ms; }
.feature-card:nth-child(3).reveal { transition-delay: 160ms; }
.feature-card:nth-child(4).reveal { transition-delay: 240ms; }
.feature-card:nth-child(5).reveal { transition-delay: 320ms; }
.feature-card:nth-child(6).reveal { transition-delay: 400ms; }

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

@media (max-width: 600px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1rem;
    }

    .lang-sep {
        display: none;
    }
}
