:root {
    --bg: #0b0d12;
    --surface: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.12);
    --text: #eef1f6;
    --muted: #9aa3b2;
    --accent: #7c5cff;
    --accent-2: #00d4ff;
    --radius: 16px;
    --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent-2); }

.container { width: min(1100px, 100% - 32px); margin-inline: auto; }

/* Nav */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(16px, 4vw, 40px);
    transition: background .3s, backdrop-filter .3s, border-color .3s;
    border-bottom: 1px solid transparent;
}
.nav.is-scrolled, .page-login .nav, .page-world .nav {
    background: rgba(11, 13, 18, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: var(--border);
}
.nav__brand { color: var(--text); font-weight: 700; font-size: 1.4rem; text-decoration: none; letter-spacing: .02em; }
.nav__brand span, .hero__title span {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav__links { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); }
.nav__links > a:not(.btn) { color: var(--text); text-decoration: none; opacity: .8; }
.nav__links > a:not(.btn):hover, .nav__links > a[aria-current] { opacity: 1; }
.nav__logout { margin: 0; }

/* Buttons */
.btn {
    font: inherit;
    cursor: pointer;
    border-radius: 999px;
    padding: 8px 18px;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--text); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--accent-2); }
.btn--primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff;
    border: 0;
    padding: 12px 22px;
    font-weight: 500;
}

/* Hero carousel */
.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
    display: grid;
    place-items: center;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide picture, .hero__slide img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__slide img { object-fit: cover; transform: scale(1.08); transition: transform 7s ease-out; }
.hero__slide.is-active img { transform: scale(1); }
.hero__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,13,18,.35) 0%, rgba(11,13,18,.55) 60%, var(--bg) 100%);
}
.hero__text { position: relative; z-index: 1; text-align: center; padding: 0 16px; }
.hero__title {
    margin: 0;
    font-size: clamp(3.5rem, 12vw, 9rem);
    line-height: 1;
    letter-spacing: -.03em;
    text-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.hero__tagline {
    margin: 16px 0 0;
    font-size: clamp(1.05rem, 2.4vw, 1.5rem);
    color: var(--text);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .8s .4s, transform .8s .4s;
}
.hero__slide.is-active .hero__tagline { opacity: .85; transform: none; }
.hero__dots { position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 2; }
.hero__dot {
    width: 10px; height: 10px; padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.6);
    background: transparent;
    cursor: pointer;
    transition: width .3s, background .3s;
}
.hero__dot.is-active { width: 28px; background: #fff; }
.hero__scroll {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
    width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px;
}
.hero__scroll span {
    position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
    background: #fff; border-radius: 2px; animation: scroll 1.8s infinite;
}
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Sections */
.section { padding: clamp(64px, 10vw, 120px) 0; flex: 1; }
.section--top { padding-top: 120px; }
.section__title { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 12px; letter-spacing: -.02em; }
.section__lead { color: var(--muted); font-size: 1.15rem; max-width: 60ch; margin: 0 0 40px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }

.video {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px -20px rgba(124, 92, 255, .35);
    max-width: 900px;
}
.video video { display: block; width: 100%; height: auto; background: #000; }

/* Login */
.auth { flex: 1; display: grid; place-items: center; padding: 120px 16px 60px;
    background: radial-gradient(circle at 30% 20%, rgba(124,92,255,.25), transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(0,212,255,.18), transparent 50%); }
.auth__card {
    width: min(400px, 100%);
    display: grid;
    gap: 16px;
    padding: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
}
.auth__card h1 { margin: 0 0 4px; }
.auth__card label { display: grid; gap: 6px; color: var(--muted); font-size: .95rem; }
.auth__card input {
    font: inherit;
    color: var(--text);
    background: rgba(0,0,0,.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
}
.auth__card input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.alert { margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 80, 100, .15); border: 1px solid rgba(255, 80, 100, .4); }

.footer { text-align: center; color: var(--muted); padding: 32px 16px; border-top: 1px solid var(--border); font-size: .9rem; }
.footer p { margin: 0; }

/* Scroll reveal (only hidden once JS has marked the page) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
