/* ============================================================================
   KSP.CITY Entrance Manifest — Stylesheet
   A-50: Black/Blue/White Theme with Plasma Effects
   ============================================================================ */

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --color-black: #000000;
    --color-dark-gray: #0a0a0a;
    --color-deep-blue: #0d1b2a;
    --color-electric-blue: #00d4ff;
    --color-sky-blue: #4da6ff;
    --color-white: #ffffff;
    --color-light-gray: #e0e0e0;
    --color-plasma-blue: rgba(0, 212, 255, 0.6);
    --color-plasma-cyan: rgba(77, 166, 255, 0.4);

    /* Typography */
    --font-primary: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'Noto Sans JP', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Animation */
    --duration-fast: 0.2s;
    --duration-normal: 0.4s;
    --duration-slow: 0.8s;
    --easing: cubic-bezier(0.4, 0, 0.2, 1);

    /* A-54: Pulse Variable */
    --pulse: 0.5;

    /* A-63: Pulse Sync Variables */
    --ksp-glow: 0.6;
    --ksp-hero-opacity: 0.6;
    --ksp-hero-blur: 3px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-black);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--color-electric-blue);
    text-decoration: none;
    transition: color var(--duration-normal) var(--easing);
}

a:hover {
    color: var(--color-sky-blue);
}

/* === Plasma Background === */
#plasma-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(
        ellipse at 20% 30%,
        var(--color-plasma-blue),
        transparent 50%
    ),
    radial-gradient(
        ellipse at 80% 70%,
        var(--color-plasma-cyan),
        transparent 50%
    ),
    radial-gradient(
        circle at 50% 50%,
        var(--color-deep-blue),
        var(--color-black) 70%
    );
    animation: plasmaFlow 15s infinite alternate;
}

@keyframes plasmaFlow {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.5;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
}

/* === Hero Section === */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--spacing-lg) var(--spacing-md);
}

.hero-section::before {
    opacity: var(--ksp-hero-opacity);
    filter: blur(var(--ksp-hero-blur)) saturate(120%);
    transition: filter 0.08s linear, opacity 0.08s linear;
}

.hero-container {
    text-align: center;
    max-width: 900px;
}

.hero-logo {
    width: 300px;
    height: 300px;
    margin: 0 auto var(--spacing-lg);
}

#ksp-logo-animated {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px var(--color-electric-blue));
}

.mandala-ring {
    fill: none;
    stroke: var(--color-electric-blue);
    stroke-width: 1.5;
    opacity: 0.6;
    animation: ringPulse 4s infinite ease-in-out;
    box-shadow:
        0 0 calc(20px * var(--ksp-glow)) rgba(0, 255, 255, 0.5),
        inset 0 0 calc(10px * var(--ksp-glow)) rgba(90, 220, 255, 0.35);
}

.ring-1 {
    animation-delay: 0s;
}

.ring-2 {
    animation-delay: 0.5s;
}

.ring-3 {
    animation-delay: 1s;
}

@keyframes ringPulse {
    0%, 100% {
        opacity: 0.4;
        stroke-width: 1.5;
    }
    50% {
        opacity: 1;
        stroke-width: 2;
    }
}

.ksp-text {
    fill: var(--color-white);
    font-family: var(--font-display);
    letter-spacing: 4px;
}

.city-text {
    fill: var(--color-electric-blue);
    font-family: var(--font-display);
}

.syntax-node {
    fill: var(--color-electric-blue);
    animation: nodeGlow 3s infinite ease-in-out;
}

.node-1 { animation-delay: 0s; }
.node-2 { animation-delay: 0.5s; }
.node-3 { animation-delay: 1s; }
.node-4 { animation-delay: 1.5s; }
.node-5 { animation-delay: 2s; }
.node-6 { animation-delay: 2.5s; }

@keyframes nodeGlow {
    0%, 100% {
        opacity: 0.5;
        r: 8;
    }
    50% {
        opacity: 1;
        r: 12;
    }
}

/* === City Pulse - 構文的血流 === */
.city-pulse {
    transform-origin: center;
    filter: drop-shadow(0 0 calc(20px * var(--ksp-glow)) #00f6ff);
    opacity: 0.8;
    animation: cityPulseBreath 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cityPulseBreath {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
        filter: drop-shadow(0 0 20px #00f6ff);
    }
    25% {
        transform: scale(1.03);
        opacity: 0.9;
        filter: drop-shadow(0 0 28px #00f6ff);
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
        filter: drop-shadow(0 0 36px #00f6ff) drop-shadow(0 0 48px rgba(0, 246, 255, 0.6));
    }
    75% {
        transform: scale(1.03);
        opacity: 0.9;
        filter: drop-shadow(0 0 28px #00f6ff);
    }
}

/* Pulse fade on scroll */
.hero-logo.scrolled .city-pulse {
    animation: cityPulseFadeOut 1s ease-out forwards;
}

@keyframes cityPulseFadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* === A-53: Manifest Gateway Typography === */
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, #0a0f15 0%, #000 100%);
    overflow: hidden;
    z-index: 0;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(0,255,255,0.03) 0, transparent 2px, transparent 4px);
    animation: scan 12s linear infinite;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-title {
    font-family: 'Shippori Mincho', 'Zen Antique Soft', serif;
    font-weight: 800;
    letter-spacing: 0.1em;
    font-size: clamp(48px, 7vw, 120px);
    color: transparent;
    background: linear-gradient(90deg, #0ff, #fff, #0ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 2px rgba(255,255,255,0.25);
    filter: drop-shadow(0 0 calc(10px + 20px * var(--pulse)) rgba(0,255,255,calc(0.2 + 0.3 * var(--pulse))));
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    position: relative;
    z-index: 2;
    transition: filter 0.2s ease;
}

.hero-title-sub {
    font-size: clamp(36px, 5vw, 80px);
    letter-spacing: 0.15em;
    display: inline-block;
}

.hero-sub {
    font-family: 'Zen Antique Soft', serif;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.15em;
    font-size: clamp(16px, 2vw, 26px);
    text-shadow: 0 0 10px rgba(0,255,255,0.2);
    animation: fadeInSub 2s ease-out 1s forwards;
    opacity: 0;
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

@keyframes fadeInSub {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* === A-53: Ritual Connection Button === */
.connect-btn {
    display: inline-block;
    padding: 16px 40px;
    margin-top: 2rem;
    border: 2px solid #0ff;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--easing);
    /* A-54: Plasma Flow Background */
    background: linear-gradient(90deg, #00f2ff, #00bcd4, #007fff, #00bcd4, #00f2ff);
    background-size: 200% 100%;
    animation: plasmaFlow 6s linear infinite;
    backdrop-filter: blur(10px);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.connect-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: btnPulse 3s infinite;
}

@keyframes btnPulse {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

/* A-54: Plasma Flow Animation */
@keyframes plasmaFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.connect-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    transform: translateY(-3px);
}

.cta-primary,
.cta-secondary {
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    transition: all var(--duration-normal) var(--easing);
    display: inline-block;
}

.cta-primary {
    background: var(--color-electric-blue);
    color: var(--color-black);
    box-shadow: 0 0 20px var(--color-plasma-blue);
}

.cta-primary:hover {
    background: var(--color-sky-blue);
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--color-electric-blue);
}

.cta-secondary {
    border: 2px solid var(--color-electric-blue);
    color: var(--color-electric-blue);
}

.cta-secondary:hover {
    background: var(--color-electric-blue);
    color: var(--color-black);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-light-gray);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    opacity: 0.6;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-electric-blue), transparent);
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

/* === Semantic Pulse Line === */
.semantic-line {
    width: 100%;
    height: 100px;
    display: block;
    margin: 0;
    padding: 0;
    opacity: 0.6;
}

/* === Section Common === */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.section-title {
    font-family: 'Shippori Mincho', 'Zen Antique Soft', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.1em;
    color: transparent;
    background: linear-gradient(90deg, #0ff, #fff, #0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.2);
    filter: drop-shadow(0 0 15px rgba(0,255,255,0.15));
}

.section-intro {
    text-align: center;
    color: var(--color-light-gray);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.05em;
}

/* === Concept Section === */
.concept-section {
    background: linear-gradient(180deg, transparent, var(--color-deep-blue) 50%, transparent);
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.concept-card {
    background: rgba(13, 27, 42, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: var(--spacing-md);
    transition: all var(--duration-normal) var(--easing);
}

.concept-card:hover {
    border-color: var(--color-electric-blue);
    box-shadow: 0 0 30px var(--color-plasma-blue);
    transform: translateY(-5px);
}

.card-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--spacing-md);
    color: var(--color-electric-blue);
}

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

.card-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.card-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-sky-blue);
    letter-spacing: 0.1em;
}

.card-description {
    color: var(--color-light-gray);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.card-link {
    color: var(--color-electric-blue);
    font-weight: 600;
    display: inline-block;
    transition: transform var(--duration-normal) var(--easing);
}

.card-link:hover {
    transform: translateX(5px);
}

/* === Layer Map Section === */
.layer-map-section {
    background: var(--color-dark-gray);
}

.layer-diagram {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.layer {
    background: rgba(13, 27, 42, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: var(--spacing-md);
    transition: all var(--duration-normal) var(--easing);
}

.layer:hover {
    border-color: var(--color-electric-blue);
    background: rgba(13, 27, 42, 0.6);
    transform: translateX(10px);
}

.layer-label {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.layer-number {
    font-size: 0.9rem;
    color: var(--color-sky-blue);
    font-weight: 600;
    letter-spacing: 0.1em;
}

.layer-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-electric-blue);
}

.layer-content p {
    color: var(--color-light-gray);
    line-height: 1.7;
}

/* === Manifesto Section === */
.manifesto-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mandala-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

#syntax-mandala-bg {
    width: 100%;
    height: 100%;
}

.mandala-pattern {
    animation: mandalaRotate 60s infinite linear;
}

@keyframes mandalaRotate {
    from {
        transform: translate(400px, 400px) rotate(0deg);
    }
    to {
        transform: translate(400px, 400px) rotate(360deg);
    }
}

.mandala-outer,
.mandala-mid,
.mandala-inner {
    fill: none;
    stroke: var(--color-electric-blue);
    stroke-width: 1;
    opacity: 0.4;
}

.syntax-point {
    fill: var(--color-electric-blue);
    opacity: 0.6;
    animation: syntaxPulse 3s infinite ease-in-out;
}

@keyframes syntaxPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.9;
    }
}

.manifesto-container {
    position: relative;
    z-index: 1;
}

.manifesto-title {
    font-family: 'Shippori Mincho', 'Zen Antique Soft', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.1em;
    color: transparent;
    background: linear-gradient(90deg, #0ff, #fff, #0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.2);
    filter: drop-shadow(0 0 15px rgba(0,255,255,0.15));
}

.manifesto-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

/* A-54: Manifest Icon Styling */
.manifest-icon {
    width: 48px;
    height: 48px;
    color: var(--color-electric-blue);
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 0 10px rgba(0,212,255,0.4));
    transition: all var(--duration-normal) var(--easing);
}

.manifesto-item:hover .manifest-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(0,212,255,0.6));
}

.manifesto-item h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-electric-blue);
    margin-bottom: var(--spacing-sm);
}

.manifesto-item p {
    color: var(--color-light-gray);
    line-height: 1.8;
}

/* === Connection Section === */
.connection-section {
    background: linear-gradient(180deg, transparent, var(--color-deep-blue) 50%, var(--color-black));
}

.connection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.connection-card {
    background: rgba(13, 27, 42, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: var(--spacing-md);
    text-align: center;
    transition: all var(--duration-normal) var(--easing);
    display: block;
}

.connection-card:hover {
    border-color: var(--color-electric-blue);
    background: rgba(13, 27, 42, 0.8);
    box-shadow: 0 0 25px var(--color-plasma-blue);
    transform: translateY(-5px);
}

.connection-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-electric-blue);
}

.connection-icon i {
    display: inline-block;
}

.connection-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-electric-blue);
    margin-bottom: var(--spacing-xs);
}

.connection-card p {
    color: var(--color-light-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === Footer Section === */
.footer-section {
    background: var(--color-black);
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.footer-ksp {
    font-family: 'Shippori Mincho', 'Zen Antique Soft', serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: transparent;
    background: linear-gradient(90deg, #0ff, #fff, #0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-text-stroke: 1px rgba(255,255,255,0.2);
    filter: drop-shadow(0 0 10px rgba(0,255,255,0.1));
}

.footer-tagline {
    font-family: 'Zen Antique Soft', serif;
    font-size: 0.9rem;
    color: var(--color-electric-blue);
    letter-spacing: 0.2em;
    text-shadow: 0 0 5px rgba(0,255,255,0.2);
}

.footer-meta {
    text-align: center;
    max-width: 800px;
}

.footer-description {
    color: var(--color-light-gray);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.footer-signature {
    margin: 2rem 0 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.syntax-quote {
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif JP', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: #00ffff;
    text-align: center;
    letter-spacing: 0.03em;
    line-height: 1.6;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    margin: 0;
}

.footer-info {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--color-sky-blue);
}

.footer-info span {
    border-right: 1px solid rgba(0, 212, 255, 0.3);
    padding-right: var(--spacing-md);
}

.footer-info span:last-child {
    border-right: none;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-electric-blue);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color var(--duration-normal) var(--easing);
}

.footer-links a:hover {
    color: var(--color-sky-blue);
    text-decoration: underline;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .hero-title {
        font-size: clamp(32px, 10vw, 60px);
        -webkit-text-stroke: 1.5px rgba(255,255,255,0.2);
    }

    .hero-title-sub {
        font-size: clamp(24px, 8vw, 48px);
    }

    .hero-sub {
        font-size: clamp(13px, 3.2vw, 20px);
        letter-spacing: 0.1em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 96vw;
    }

    .connect-btn {
        padding: 14px 32px;
        font-size: 1rem;
    }

    .hero-logo {
        width: 200px;
        height: 200px;
    }

    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: center;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .concept-grid,
    .connection-grid {
        grid-template-columns: 1fr;
    }

    .manifesto-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .footer-info {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .footer-info span {
        border-right: none;
        padding-right: 0;
    }

    .toast {
        padding: 14px 24px;
        font-size: 1rem;
        max-width: 90vw;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .section-container {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .hero-section {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .scroll-indicator {
        bottom: 1.5rem;
    }
}

/* === Intersection Observer Fade-In Effects === */
.layer-card,
.manifest-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--easing), transform 0.8s var(--easing);
}

.layer-card.active,
.manifest-card.active {
    opacity: 1;
    transform: translateY(0);
}

/* === Coming Soon Styles === */
a.coming-soon {
    cursor: not-allowed;
    opacity: 0.7;
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 255, 255, 0.15);
    border: 1px solid rgba(0, 255, 255, 0.4);
    padding: 16px 32px;
    border-radius: 12px;
    color: #0ff;
    font-weight: 600;
    letter-spacing: 0.05em;
    animation: fadeout 2s forwards;
    z-index: 9999;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    white-space: nowrap;
    font-size: 1.1rem;
}

@keyframes fadeout {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
}

/* === Timeline Section === */
.timeline-section {
    padding: 6rem 0;
    background: rgba(5, 10, 20, 0.3);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 4rem auto 0;
    padding-left: 3rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(0, 255, 255, 0.8) 0%,
        rgba(0, 255, 255, 0.4) 50%,
        rgba(0, 255, 255, 0.2) 100%);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateX(-30px);
    animation: timelineSlideIn 0.8s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes timelineSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    background: #00ffff;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6),
                inset 0 0 10px rgba(0, 255, 255, 0.4);
    animation: timelinePulse 2s ease-in-out infinite;
}

@keyframes timelinePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.9);
    }
}

.timeline-content {
    background: rgba(10, 20, 35, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: rgba(10, 20, 35, 0.8);
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 4px 24px rgba(0, 255, 255, 0.15);
    transform: translateY(-3px);
}

.timeline-date {
    font-size: 0.9rem;
    color: #00ffff;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.timeline-content h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.timeline-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Future Timeline Items */
.timeline-future .timeline-dot {
    background: rgba(0, 255, 255, 0.3);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.timeline-future .timeline-content {
    background: rgba(10, 20, 35, 0.4);
    border-color: rgba(0, 255, 255, 0.15);
    opacity: 0.85;
}

.timeline-future .timeline-date {
    color: rgba(0, 255, 255, 0.7);
}

.timeline-future .timeline-content h3 {
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 2rem;
    }

    .timeline-marker {
        left: -2rem;
    }

    .timeline-content {
        padding: 1rem 1.5rem;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
    }
}

/* === Breath Tone Toggle (A-62) === */
#breath-toggle {
    position: fixed;
    bottom: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: #00f6ff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9999;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#breath-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 246, 255, 0.4);
}

#breath-toggle i {
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    #breath-toggle {
        bottom: 24px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 22px;
        display: flex !important;
        z-index: 9999;
    }
}

/* === Print Styles === */
@media print {
    #plasma-bg,
    .scroll-indicator,
    #breath-toggle {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
