/* ===================================================
   MISide — Lore Page CSS
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&family=Share+Tech+Mono&display=swap');

:root {
    --pink: #ff6b9d;
    --pink-light: #ffb3d1;
    --pink-deep: #c0175c;
    --purple: #7c3aed;
    --purple-light: #a78bfa;
    --dark: #060410;
    --dark-2: #0d0820;
    --dark-3: #160e2e;
    --border: rgba(255, 107, 157, 0.15);
    --border-hi: rgba(255, 107, 157, 0.38);
    --text: #ede6ff;
    --muted: #8a7aaa;
    --mono: 'Share Tech Mono', monospace;
    --sans: 'Outfit', sans-serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: .045;
    pointer-events: none;
    z-index: 9000;
    animation: grainShift .18s steps(1) infinite;
}

@keyframes grainShift {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-2%, -2%);
    }

    40% {
        transform: translate(2%, 2%);
    }

    60% {
        transform: translate(-1%, 2%);
    }

    80% {
        transform: translate(1%, -1%);
    }
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--pink-deep), var(--purple));
    border-radius: 3px;
}

/* ── NAVBAR ── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 1rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all .4s var(--ease);
}

#navbar.scrolled {
    background: rgba(6, 4, 16, .9);
    backdrop-filter: blur(22px);
    box-shadow: 0 1px 0 var(--border);
    padding: .7rem 2.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.nav-logo img {
    height: 32px;
    filter: drop-shadow(0 0 8px var(--pink));
}

.nav-logo span {
    font-size: .95rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--pink), var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-back {
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .18em;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: color .25s;
}

.nav-back:hover {
    color: var(--pink-light);
}

.nav-back svg {
    width: 14px;
}

/* ── HERO ── */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: -5%;
    background: url('../assets/Cover/Hero.jpg') center/cover no-repeat;
    filter: brightness(.12) saturate(2.5) blur(3px);
    animation: heroBreath 14s ease-in-out infinite alternate;
}

@keyframes heroBreath {
    from {
        transform: scale(1.06);
    }

    to {
        transform: scale(1.12);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 70% at 50% 55%, rgba(192, 23, 92, .2) 0%, transparent 65%),
        linear-gradient(180deg, var(--dark) 0%, transparent 18%, transparent 72%, var(--dark) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .35em;
    color: var(--pink);
    opacity: .75;
    display: block;
    margin-bottom: 1.2rem;
}

.hero-title {
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -.04em;
    background: linear-gradient(135deg, #fff 30%, var(--pink-light) 65%, var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 60px rgba(255, 107, 157, .4));
    margin-bottom: 1.5rem;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.9;
    max-width: 560px;
    margin: 0 auto 3rem;
}

/* CTA scroll indicator */
.scroll-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .2em;
    color: rgba(255, 107, 157, .5);
    animation: bobFloat 2.5s ease-in-out infinite;
}

.scroll-cta::after {
    content: '';
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--pink), transparent);
    animation: lineGrow 2.5s ease-in-out infinite;
}

@keyframes bobFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes lineGrow {

    0%,
    100% {
        opacity: 0;
        transform: scaleY(.3);
    }

    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Floating cover image */
.hero-cover {
    position: absolute;
    right: 6%;
    top: 50%;
    transform: translateY(-50%);
    width: min(260px, 28vw);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border-hi), 0 30px 80px rgba(0, 0, 0, .9), 0 0 60px rgba(192, 23, 92, .15);
    opacity: .7;
    filter: saturate(1.2);
    animation: coverFloat 9s ease-in-out infinite;
}

@keyframes coverFloat {

    0%,
    100% {
        transform: translateY(-50%) translateY(0);
    }

    50% {
        transform: translateY(-50%) translateY(-16px);
    }
}

@media(max-width:768px) {
    .hero-cover {
        display: none;
    }
}

/* ── PROGRESS BAR (sticky) ── */
#reading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 9999;
    background: linear-gradient(90deg, var(--pink-deep), var(--pink), var(--purple));
    transform-origin: left;
    transform: scaleX(0);
    box-shadow: 0 0 8px var(--pink);
}

/* ── INTRO SECTION ── */
#intro {
    padding: 6rem 2rem;
}

.intro-inner {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media(max-width:680px) {
    .intro-inner {
        grid-template-columns: 1fr;
    }
}

.intro-img {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-hi);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .7), 0 0 40px rgba(192, 23, 92, .1);
}

.intro-img img {
    width: 100%;
    filter: saturate(1.1);
}

.intro-text .section-tag {
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .25em;
    color: var(--pink);
    margin-bottom: 1rem;
    display: block;
}

.intro-text h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.intro-text p {
    color: var(--muted);
    line-height: 1.9;
    font-size: .95rem;
    font-weight: 300;
}

.intro-text p+p {
    margin-top: 1rem;
}

/* ── TIMELINE ── */
#timeline {
    padding: 4rem 2rem 6rem;
    position: relative;
}

.timeline-inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* Central spine */
.timeline-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--pink-deep) 8%, var(--purple) 50%, var(--pink-deep) 92%, transparent);
    transform: translateX(-50%);
    z-index: 0;
}

@media(max-width:680px) {
    .timeline-spine {
        left: 20px;
    }
}

.timeline-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.timeline-header .section-tag {
    font-family: var(--mono);
    font-size: .65rem;
    letter-spacing: .28em;
    color: var(--pink);
    margin-bottom: .8rem;
    display: block;
}

.timeline-header h2 {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

/* Event */
.t-event {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: start;
    gap: 0 1rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

@media(max-width:680px) {
    .t-event {
        grid-template-columns: 40px 1fr;
        gap: 0 .8rem;
        padding-left: 0;
    }
}

/* Alternate sides */
.t-event:nth-child(odd) .t-content {
    grid-column: 1;
    text-align: right;
}

.t-event:nth-child(odd) .t-dot {
    grid-column: 2;
}

.t-event:nth-child(odd) .t-empty {
    grid-column: 3;
}

.t-event:nth-child(even) .t-empty {
    grid-column: 1;
}

.t-event:nth-child(even) .t-dot {
    grid-column: 2;
}

.t-event:nth-child(even) .t-content {
    grid-column: 3;
    text-align: left;
}

@media(max-width:680px) {

    .t-event:nth-child(odd) .t-content,
    .t-event:nth-child(even) .t-content {
        grid-column: 2;
        text-align: left;
    }

    .t-event:nth-child(odd) .t-dot,
    .t-event:nth-child(even) .t-dot {
        grid-column: 1;
    }

    .t-event .t-empty {
        display: none;
    }
}

/* Dot */
.t-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6px;
}

.t-dot-inner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink-deep), var(--purple));
    box-shadow: 0 0 14px rgba(192, 23, 92, .6), 0 0 0 3px rgba(192, 23, 92, .15);
    flex-shrink: 0;
    transition: transform .3s, box-shadow .3s;
}

.t-event:hover .t-dot-inner {
    transform: scale(1.5);
    box-shadow: 0 0 24px rgba(192, 23, 92, .9), 0 0 0 5px rgba(192, 23, 92, .2);
}

/* Content card */
.t-content {
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.3rem 1.5rem;
    transition: border-color .35s, background .35s, box-shadow .35s;
    position: relative;
    overflow: hidden;
}

.t-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s;
}

.t-event:hover .t-content {
    border-color: var(--border-hi);
    background: rgba(255, 107, 157, .05);
    box-shadow: 0 8px 40px rgba(192, 23, 92, .1);
}

.t-event:hover .t-content::before {
    transform: scaleX(1);
}

.t-tag {
    font-family: var(--mono);
    font-size: .58rem;
    letter-spacing: .18em;
    color: var(--pink-light);
    opacity: .7;
    display: block;
    margin-bottom: .4rem;
}

.t-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.3;
}

.t-body {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.85;
    font-weight: 300;
}

.t-img {
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.t-img img {
    width: 100%;
    filter: saturate(.9) brightness(.85);
    transition: filter .3s;
}

.t-event:hover .t-img img {
    filter: saturate(1.1) brightness(1);
}

/* ── WORLDS SECTION ── */
#worlds {
    padding: 4rem 2rem 6rem;
    background: var(--dark-2);
    position: relative;
    overflow: hidden;
}

#worlds::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(124, 58, 237, .08) 0%, transparent 70%);
}

.worlds-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header .section-tag {
    font-family: var(--mono);
    font-size: .65rem;
    letter-spacing: .28em;
    color: var(--pink);
    margin-bottom: .8rem;
    display: block;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.section-header p {
    color: var(--muted);
    margin-top: .7rem;
    font-size: .95rem;
    max-width: 520px;
    margin-inline: auto;
}

.worlds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.world-card {
    border-radius: 18px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    transition: all .35s var(--ease);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.world-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s;
}

.world-card:hover {
    border-color: var(--border-hi);
    background: rgba(255, 107, 157, .05);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(192, 23, 92, .1);
}

.world-card:hover::after {
    transform: scaleX(1);
}

.world-num {
    font-family: var(--mono);
    font-size: .6rem;
    letter-spacing: .2em;
    color: var(--pink);
    opacity: .6;
    margin-bottom: .7rem;
    display: block;
}

.world-icon {
    font-size: 2rem;
    margin-bottom: .9rem;
    display: block;
}

.world-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.world-desc {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.8;
    font-weight: 300;
}

.world-status {
    margin-top: 1rem;
    display: inline-block;
    font-family: var(--mono);
    font-size: .58rem;
    letter-spacing: .14em;
    padding: .22rem .7rem;
    border-radius: 50px;
    background: rgba(255, 107, 157, .08);
    border: 1px solid var(--border);
    color: var(--pink-light);
}

/* ── QUOTE SECTION ── */
#quote-section {
    padding: 7rem 2rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

#quote-section::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: url('../assets/Cover/Cover 2.jpg') center/cover no-repeat;
    filter: brightness(.08) saturate(2.5) blur(6px);
}

.quote-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--dark) 0%, transparent 15%, transparent 85%, var(--dark) 100%);
}

.quote-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.big-quote {
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.5;
    font-style: italic;
    letter-spacing: -.01em;
    background: linear-gradient(120deg, #fff, var(--pink-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(255, 107, 157, .25));
    margin-bottom: 1.5rem;
}

.big-quote::before {
    content: '"';
    font-size: 3rem;
    color: var(--pink);
    line-height: 0;
    vertical-align: -.4em;
    margin-right: .2rem;
}

.quote-author {
    font-family: var(--mono);
    font-size: .65rem;
    letter-spacing: .2em;
    color: var(--muted);
}

/* ── THEORY BOX ── */
#theories {
    padding: 5rem 2rem 7rem;
}

.theories-inner {
    max-width: 900px;
    margin: 0 auto;
}

.theory-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.8rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    transition: all .3s;
    align-items: flex-start;
}

.theory-item:hover {
    border-color: var(--border-hi);
    background: rgba(255, 107, 157, .05);
}

.theory-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: .2rem;
}

.theory-content .t-tag {
    margin-bottom: .3rem;
}

.theory-content .t-title {
    font-size: .95rem;
    margin-bottom: .4rem;
}

.theory-content .t-body {
    font-size: .85rem;
}

/* ── FOOTER ── */
#footer {
    background: var(--dark-2);
    padding: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-text {
    font-family: var(--mono);
    font-size: .65rem;
    letter-spacing: .15em;
    color: var(--muted);
}

.footer-text a {
    color: var(--pink-light);
    transition: color .2s;
}

.footer-text a:hover {
    color: var(--pink);
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger */
.reveal[data-delay="1"] {
    transition-delay: .1s;
}

.reveal[data-delay="2"] {
    transition-delay: .2s;
}

.reveal[data-delay="3"] {
    transition-delay: .3s;
}

.reveal[data-delay="4"] {
    transition-delay: .4s;
}

@media(max-width:600px) {
    .theory-item {
        flex-direction: column;
        gap: .8rem;
    }

    .world-card {
        padding: 1.2rem;
    }
}