/* yamato.quest - Dark Academia Naval Heritage */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Fonts: Playfair Display (headings), Inter (body) */

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

:root {
    --deep-base: #1a1a2e;
    --primary-blue: #4a90d9;
    --warm-white: #f5f0e8;
    --accent-gold: #e8b84b;
    --muted-gray: #6c757d;
    --deeper-dark: #0d0d1e;
    --neon-blue-glow: 0 0 10px rgba(74, 144, 217, 0.5), 0 0 20px rgba(74, 144, 217, 0.3), 0 0 40px rgba(74, 144, 217, 0.15);
    --neon-gold-glow: 0 0 10px rgba(232, 184, 75, 0.5), 0 0 20px rgba(232, 184, 75, 0.3), 0 0 40px rgba(232, 184, 75, 0.15);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--deep-base);
    color: var(--warm-white);
    overflow-x: hidden;
    line-height: 1.6;
}

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

/* ========= NAVIGATION ========= */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#main-nav.scrolled {
    background: rgba(26, 26, 46, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    font-size: 1.5rem;
    color: var(--accent-gold);
    text-shadow: var(--neon-gold-glow);
}

.nav-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.3em;
    color: var(--warm-white);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-gray);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(232, 184, 75, 0.4);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========= SECTIONS ========= */
.section-full {
    position: relative;
    min-height: 100vh;
    width: 100%;
    z-index: 1;
}

.section-dark {
    background-color: var(--deep-base);
}

.section-deeper {
    background-color: var(--deeper-dark);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 6rem;
}

/* ========= HERO ========= */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(74, 144, 217, 0.08) 0%, transparent 60%),
                linear-gradient(180deg, #0d0d1e 0%, #1a1a2e 50%, #0d0d1e 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(74, 144, 217, 0.03) 2px,
            rgba(74, 144, 217, 0.03) 4px
        );
    pointer-events: none;
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--accent-gold);
    border: 1px solid rgba(232, 184, 75, 0.3);
    padding: 0.5rem 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(232, 184, 75, 0.3);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.hero-line {
    display: block;
}

.hero-line-1 {
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: 0.15em;
    color: var(--warm-white);
    text-shadow: 0 0 40px rgba(245, 240, 232, 0.15);
}

.hero-line-2 {
    font-size: clamp(2rem, 6vw, 5rem);
    letter-spacing: 0.6em;
    color: var(--primary-blue);
    text-shadow: var(--neon-blue-glow);
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--muted-gray);
    letter-spacing: 0.1em;
    margin-bottom: 4rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-gray);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ========= WAVE DIVIDERS ========= */
.wave-divider {
    position: absolute;
    left: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.wave-divider-bottom {
    bottom: 0;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* ========= CHAPTER MARKERS ========= */
.chapter-marker {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.chapter-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--accent-gold);
    text-shadow: var(--neon-gold-glow);
}

.chapter-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(232, 184, 75, 0.4), transparent);
}

/* ========= SECTION HEADINGS ========= */
.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.neon-text {
    color: var(--primary-blue);
    text-shadow: var(--neon-blue-glow);
}

.section-description {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.05rem;
    color: var(--muted-gray);
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
}

/* ========= CHRONICLE ========= */
.chronicle-container {
    margin-bottom: 4rem;
}

.chronicle-paper {
    background: rgba(245, 240, 232, 0.03);
    border: 1px solid rgba(232, 184, 75, 0.15);
    border-radius: 4px;
    padding: 2.5rem;
    position: relative;
    max-width: 800px;
}

.chronicle-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    width: 1px;
    height: 100%;
    background: rgba(232, 184, 75, 0.1);
}

.chronicle-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(232, 184, 75, 0.1);
}

.chronicle-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-gold);
}

.typewriter-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--warm-white);
    min-height: 120px;
    padding-left: 1.5rem;
}

.typewriter-cursor {
    display: inline-block;
    color: var(--accent-gold);
    font-weight: 300;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

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

/* Chronicle entries */
.chronicle-entries {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.chronicle-entry {
    display: flex;
    gap: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.chronicle-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.entry-year {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: var(--neon-gold-glow);
    min-width: 100px;
    line-height: 1;
    padding-top: 0.25rem;
}

.entry-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--warm-white);
    margin-bottom: 0.5rem;
}

.entry-content p {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--muted-gray);
    line-height: 1.7;
}

/* ========= SHIP SYSTEMS ========= */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.system-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(74, 144, 217, 0.15);
    border-radius: 6px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.system-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.system-card:hover {
    border-color: rgba(74, 144, 217, 0.4);
    box-shadow: 0 0 30px rgba(74, 144, 217, 0.1), inset 0 0 30px rgba(74, 144, 217, 0.03);
    transform: translateY(-2px);
}

.system-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.system-icon svg {
    width: 100%;
    height: 100%;
}

.system-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--warm-white);
    margin-bottom: 0.75rem;
}

.system-stat {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.neon-gold {
    color: var(--accent-gold);
    text-shadow: var(--neon-gold-glow);
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.system-bar {
    width: 100%;
    height: 3px;
    background: rgba(74, 144, 217, 0.1);
    border-radius: 2px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(74, 144, 217, 0.4);
    transition: width 1.5s ease-out;
}

.system-detail {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--muted-gray);
    line-height: 1.6;
}

/* ========= JOURNEY MAP ========= */
.journey-map {
    position: relative;
    padding-left: 3rem;
}

.journey-line {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-gold), var(--primary-blue));
    opacity: 0.3;
}

.journey-node {
    position: relative;
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.journey-node.visible {
    opacity: 1;
    transform: translateX(0);
}

.node-marker {
    position: absolute;
    left: -3rem;
    top: 2.5rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-gold);
    box-shadow: var(--neon-gold-glow);
    position: relative;
    z-index: 2;
}

.node-pulse {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(232, 184, 75, 0.3);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.node-content {
    flex: 1;
    padding-left: 1rem;
}

.node-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 0.5rem;
}

.node-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warm-white);
    margin-bottom: 0.5rem;
}

.node-content p {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--muted-gray);
    line-height: 1.7;
    max-width: 600px;
}

/* ========= LEGACY ========= */
.legacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.legacy-card {
    background: rgba(26, 26, 46, 0.4);
    border: 1px solid rgba(74, 144, 217, 0.1);
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.legacy-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.legacy-card:hover {
    border-color: rgba(232, 184, 75, 0.3);
    box-shadow: 0 0 30px rgba(232, 184, 75, 0.08);
    transform: translateY(-4px);
}

.legacy-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
}

.legacy-icon-wrapper svg {
    width: 100%;
    height: 100%;
}

.legacy-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--warm-white);
    margin-bottom: 0.75rem;
}

.legacy-card p {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--muted-gray);
    line-height: 1.7;
}

.legacy-quote {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 0;
    border-top: 1px solid rgba(232, 184, 75, 0.1);
}

.legacy-quote blockquote p {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 400;
    color: var(--warm-white);
    line-height: 1.8;
    text-shadow: 0 0 20px rgba(245, 240, 232, 0.08);
}

/* ========= FOOTER ========= */
#footer {
    position: relative;
    z-index: 1;
    background: var(--deeper-dark);
    padding: 3rem 2rem;
    text-align: center;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-anchor {
    font-size: 1.25rem;
    color: var(--accent-gold);
    text-shadow: var(--neon-gold-glow);
}

.footer-brand span:last-child {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: var(--warm-white);
}

.footer-line {
    width: 60px;
    height: 1px;
    background: rgba(232, 184, 75, 0.3);
    margin: 0 auto 1.5rem;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.8rem;
    color: var(--muted-gray);
    letter-spacing: 0.1em;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 900px) {
    .systems-grid {
        grid-template-columns: 1fr;
    }
    .legacy-grid {
        grid-template-columns: 1fr;
    }
    #main-nav {
        padding: 1rem 1.5rem;
    }
    .nav-links {
        display: none;
    }
    .section-inner {
        padding: 6rem 1.5rem 4rem;
    }
    .entry-year {
        font-size: 1.8rem;
        min-width: 70px;
    }
    .system-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero-line-1 {
        font-size: 3.5rem;
    }
    .hero-line-2 {
        font-size: 1.8rem;
    }
    .chronicle-paper {
        padding: 1.5rem;
    }
    .chronicle-entry {
        flex-direction: column;
        gap: 0.5rem;
    }
}