/* Tygaria - 80s Retro RPG x AI */

:root {
    --bg: #06040a;
    --surface: #0a0812;
    --text: #e4e0ec;
    --text-dim: #6a6478;
    --accent: #4ade80;
    --accent-glow: rgba(74, 222, 128, 0.3);
}

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

body {
    font-family: 'Press Start 2P', monospace;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* CRT scanline overlay */
body::after {
    content: '';
    position: fixed; inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* ── Nav ─────────────────────────────────────── */
nav {
    position: fixed; top: 0; width: 100%; z-index: 100;
    background: rgba(6, 4, 10, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}
.nav-inner {
    max-width: 960px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 1.5rem;
}
.logo { text-decoration: none; }
.logo img { height: 22px; filter: brightness(0) invert(1); opacity: 0.8; }
.btn-play {
    background: var(--accent); color: var(--bg);
    padding: 0.4rem 1rem; border-radius: 4px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem; font-weight: 700;
    text-decoration: none; letter-spacing: 0.02em;
    transition: opacity 0.2s;
}
.btn-play:hover { opacity: 0.85; }

/* ── Hero ────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
}
.hero-poster, .hero-final, .hero-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity 1s ease;
}
.hero-poster { z-index: 1; opacity: 1; }
.hero-video { z-index: 2; opacity: 0; }
.hero-final { z-index: 1; opacity: 0; }
.hero-video.playing { opacity: 1; }
.hero-poster.fade-out { opacity: 0; }
.hero-final.visible { opacity: 1; z-index: 1; }
.hero-bg-overlay {
    position: absolute; inset: 0; z-index: 3;
    background: linear-gradient(
        to bottom,
        rgba(6,4,10,0.4) 0%,
        rgba(6,4,10,0.75) 60%,
        var(--bg) 100%
    );
}
.hero > *:not(.hero-bg) { position: relative; z-index: 2; }

.hero h1 {
    font-size: 4rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-shadow:
        0 0 80px var(--accent-glow),
        0 0 160px rgba(74, 222, 128, 0.1),
        4px 4px 0 rgba(0,0,0,0.6);
    margin-bottom: 1.5rem;
}

.tagline {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

/* Blinking cursor */
.cursor {
    display: inline-block;
    width: 0.6em; height: 1.1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

.micro-hooks {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}
.micro-hooks span {
    color: var(--accent);
    margin: 0 0.3rem;
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 2px solid var(--accent);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.hero-note {
    color: var(--text-dim);
    font-size: 0.5rem;
    margin-top: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Hook Section ────────────────────────────── */
.hook {
    background: var(--surface);
    border-top: 1px solid rgba(74, 222, 128, 0.08);
    padding: 4rem 1.5rem;
    text-align: center;
}
.hook-inner {
    max-width: 640px;
    margin: 0 auto;
}
/* Story fragments -- Dark Souls item description style */
.fragment {
    font-size: 0.6rem;
    color: var(--text-dim);
    font-style: italic;
    line-height: 2;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.fragment:hover {
    opacity: 1;
    color: var(--text);
}
.fragment.last {
    color: var(--text);
    opacity: 0.9;
    font-size: 0.65rem;
    margin-bottom: 2.5rem;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--accent);
    padding: 0.7rem 1.8rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg);
}

/* ── Footer ──────────────────────────────────── */
footer {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.45rem;
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(255,255,255,0.03);
}
footer a {
    color: var(--text-dim);
    text-decoration: none;
}
footer a:hover { color: var(--accent); }
footer .sep { margin: 0 0.5rem; opacity: 0.3; }
.footer-powered { margin-top: 0.5rem; }

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .tagline { font-size: 0.75rem; }
    .micro-hooks { font-size: 0.55rem; }
    .btn-primary { font-size: 0.65rem; padding: 0.7rem 1.5rem; }
    .hook h2 { font-size: 0.7rem; }
    .hook-list li { font-size: 0.55rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; letter-spacing: 0.05em; }
    .tagline { font-size: 0.65rem; }
    .micro-hooks { font-size: 0.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
}
