/* ============================================================
   reiwa.boo — Vaporwave Ghost Theme
   Colors: #1a0a2e #2d1b69 #ff71ce #01cdfe #05ffa1 #b967ff #fffb96
   Fonts: Orbitron (display), Quicksand (body), Noto Sans JP (jp)
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    background: #1a0a2e;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    overflow-x: hidden;
}

/* ---------- Scan Lines Overlay ---------- */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 3px,
        rgba(255, 113, 206, 0.02) 3px,
        rgba(255, 113, 206, 0.02) 6px
    );
}

/* ---------- Typography ---------- */
.noto {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

/* ---------- Accent Colors ---------- */
.accent--pink    { color: #ff71ce; }
.accent--cyan    { color: #01cdfe; }
.accent--green   { color: #05ffa1; }
.accent--lavender { color: #b967ff; }
.accent--yellow  { color: #fffb96; }

.accent-separator {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 0.5em;
}

.accent-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff71ce;
    box-shadow: 0 0 8px #ff71ce;
    margin: 0 0.6em;
    vertical-align: middle;
}

/* ---------- Flicker Animation ---------- */
@keyframes flicker {
    0%, 95%, 100% { opacity: 1; }
    96%  { opacity: 0.4; }
    97%  { opacity: 0.9; }
    98%  { opacity: 0.3; }
    99%  { opacity: 0.8; }
}

.flicker {
    animation: flicker 6s infinite;
}

/* ---------- Ghost Float Animation ---------- */
@keyframes haunt {
    0%   { transform: translateY(0) translateX(0); }
    25%  { transform: translateY(-10px) translateX(4px); }
    50%  { transform: translateY(-15px) translateX(0); }
    75%  { transform: translateY(-8px) translateX(-4px); }
    100% { transform: translateY(0) translateX(0); }
}

@keyframes ghostShadow {
    0%, 100% { transform: scaleX(1); opacity: 0.3; }
    50%       { transform: scaleX(0.7); opacity: 0.15; }
}

@keyframes ghostDrift {
    0%   { transform: translateY(0) translateX(0) rotate(-2deg); }
    33%  { transform: translateY(-8px) translateX(6px) rotate(2deg); }
    66%  { transform: translateY(-14px) translateX(-4px) rotate(-1deg); }
    100% { transform: translateY(0) translateX(0) rotate(-2deg); }
}

/* ---------- CSS Ghost ---------- */
.ghost {
    position: relative;
    width: 44px;
    height: 54px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 50% 50% 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.ghost--large {
    width: 70px;
    height: 85px;
}

.ghost--mini {
    width: 28px;
    height: 36px;
}

.ghost__eyes {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.ghost--mini .ghost__eyes {
    gap: 5px;
    margin-top: 9px;
}

.ghost--large .ghost__eyes {
    gap: 12px;
    margin-top: 22px;
}

.ghost__eye {
    width: 8px;
    height: 8px;
    background: #1a0a2e;
    border-radius: 50%;
}

.ghost--mini .ghost__eye {
    width: 5px;
    height: 5px;
}

.ghost--large .ghost__eye {
    width: 12px;
    height: 12px;
}

.ghost__bottom {
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 16px;
    display: flex;
}

.ghost--large .ghost__bottom {
    bottom: -12px;
    height: 24px;
}

.ghost--mini .ghost__bottom {
    bottom: -6px;
    height: 12px;
}

.ghost__ripple {
    flex: 1;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 0 0 50% 50%;
}

.ghost__ripple:nth-child(2) {
    margin-top: 4px;
}

.ghost--large .ghost__ripple:nth-child(2) {
    margin-top: 6px;
}

.ghost__shadow {
    width: 44px;
    height: 12px;
    background: rgba(185, 103, 255, 0.25);
    border-radius: 50%;
    margin-top: 10px;
    animation: ghostShadow 4s ease-in-out infinite;
}

.ghost__shadow--large {
    width: 70px;
    height: 16px;
    margin-top: 14px;
}

/* ---------- Ghost Containers ---------- */
.ghost-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: haunt 4s ease-in-out infinite;
    position: absolute;
    z-index: 10;
    top: 18%;
    right: 12%;
}

.ghost-container--outro {
    top: auto;
    right: auto;
    bottom: 18%;
    left: 10%;
    animation: ghostDrift 5s ease-in-out infinite;
}

.ghost-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: haunt 3.5s ease-in-out infinite;
}

.ghost-mini--right {
    margin-bottom: 0;
    margin-top: 1.5rem;
    align-self: flex-end;
}

/* ---------- Sections ---------- */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
}

/* Hero */
.section--hero {
    background: linear-gradient(135deg, #1a0a2e 0%, #2d1b69 50%, #1a0a2e 100%);
    flex-direction: column;
    text-align: center;
}

/* Mall — Cyan accent */
.section--mall {
    background: linear-gradient(180deg, #2d1b69 0%, #0a1628 100%);
}

/* Vending — Green accent */
.section--vending {
    background: linear-gradient(225deg, #0a1628 0%, #0d2b1a 50%, #1a0a2e 100%);
}

/* City — Lavender accent */
.section--city {
    background: linear-gradient(270deg, #1a0a2e 0%, #2d1b69 40%, #1a0a2e 100%);
}

/* Outro — Pink accent */
.section--outro {
    background: linear-gradient(315deg, #2d1b69 0%, #1a0a2e 60%, #2d1b69 100%);
    flex-direction: column;
}

/* ---------- Section Blends (gradient fade at boundaries) ---------- */
.section__blend {
    position: absolute;
    left: 0;
    right: 0;
    height: 15vh;
    pointer-events: none;
    z-index: 2;
}

/* Hero bottom fade to mall top (#2d1b69) */
.section__blend--hero {
    bottom: 0;
    background: linear-gradient(to bottom, transparent, #2d1b69);
}

.section__blend--mall-top {
    top: 0;
    background: linear-gradient(to bottom, #2d1b69, transparent);
}

.section__blend--mall-bot {
    bottom: 0;
    background: linear-gradient(to bottom, transparent, #0a1628);
}

.section__blend--vending-top {
    top: 0;
    background: linear-gradient(to bottom, #0a1628, transparent);
}

.section__blend--vending-bot {
    bottom: 0;
    background: linear-gradient(to bottom, transparent, #1a0a2e);
}

.section__blend--city-top {
    top: 0;
    background: linear-gradient(to bottom, #1a0a2e, transparent);
}

.section__blend--city-bot {
    bottom: 0;
    background: linear-gradient(to bottom, transparent, #2d1b69);
}

.section__blend--outro-top {
    top: 0;
    background: linear-gradient(to bottom, #2d1b69, transparent);
}

/* ---------- Section Inner ---------- */
.section__inner {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Ghost Panel Cards ---------- */
.panel {
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    transition: box-shadow 0.4s ease;
}

.panel:hover {
    box-shadow: 0 0 40px rgba(255, 113, 206, 0.1);
}

.panel--cyan:hover   { box-shadow: 0 0 40px rgba(1, 205, 254, 0.1); }
.panel--green:hover  { box-shadow: 0 0 40px rgba(5, 255, 161, 0.1); }
.panel--lavender:hover { box-shadow: 0 0 40px rgba(185, 103, 255, 0.1); }
.panel--pink:hover   { box-shadow: 0 0 40px rgba(255, 113, 206, 0.15); }

/* Panel inner glow orb */
.panel__glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    pointer-events: none;
    bottom: -80px;
    right: -60px;
    filter: blur(60px);
    opacity: 0.12;
}

.panel__glow--cyan     { background: #01cdfe; }
.panel__glow--green    { background: #05ffa1; }
.panel__glow--lavender { background: #b967ff; }
.panel__glow--pink     { background: #ff71ce; }

/* ---------- Section Titles ---------- */
.section__title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.section__title--cyan     { color: #01cdfe; text-shadow: 0 0 20px rgba(1, 205, 254, 0.5); }
.section__title--green    { color: #05ffa1; text-shadow: 0 0 20px rgba(5, 255, 161, 0.5); }
.section__title--lavender { color: #b967ff; text-shadow: 0 0 20px rgba(185, 103, 255, 0.5); }
.section__title--pink     { color: #ff71ce; text-shadow: 0 0 20px rgba(255, 113, 206, 0.5); }

.section__body {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.section__body:last-child {
    margin-bottom: 0;
}

/* ---------- Hero Content ---------- */
.hero__content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 2rem 1.5rem;
}

.hero__pretitle {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.5rem;
    color: #fffb96;
    letter-spacing: 0.5em;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.hero__title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    color: #ff71ce;
    text-shadow:
        0 0 20px rgba(255, 113, 206, 0.8),
        0 0 60px rgba(255, 113, 206, 0.4),
        0 0 120px rgba(255, 113, 206, 0.2);
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.hero__subtitle {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

.hero__jp {
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 2rem;
}

.hero__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    margin-top: 2rem;
}

.hero__scroll-hint {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

/* ---------- Vending Grid ---------- */
.vending-grid {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.vending-item {
    flex: 1;
    min-width: 80px;
    background: rgba(5, 255, 161, 0.07);
    border: 1px solid rgba(5, 255, 161, 0.2);
    border-radius: 8px;
    padding: 0.8rem 0.6rem;
    text-align: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.vending-item:hover {
    background: rgba(5, 255, 161, 0.12);
    border-color: rgba(5, 255, 161, 0.4);
}

.vending-item--ghost {
    border-color: rgba(255, 251, 150, 0.3);
    background: rgba(255, 251, 150, 0.05);
}

.vending-item--ghost:hover {
    background: rgba(255, 251, 150, 0.1);
    border-color: rgba(255, 251, 150, 0.5);
}

.vending-item__label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.3rem;
}

.vending-item__price {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* ---------- City Lights ---------- */
.city-lights {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.city-light {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.city-light--1 {
    background: #b967ff;
    box-shadow: 0 0 12px #b967ff;
    animation: cityBlink 2.1s ease-in-out infinite;
}

.city-light--2 {
    background: #01cdfe;
    box-shadow: 0 0 12px #01cdfe;
    animation: cityBlink 3.3s ease-in-out infinite 0.5s;
}

.city-light--3 {
    background: #ff71ce;
    box-shadow: 0 0 12px #ff71ce;
    animation: cityBlink 2.7s ease-in-out infinite 1s;
}

.city-light--4 {
    background: #fffb96;
    box-shadow: 0 0 12px #fffb96;
    animation: cityBlink 1.9s ease-in-out infinite 0.3s;
}

.city-light--5 {
    background: #05ffa1;
    box-shadow: 0 0 12px #05ffa1;
    animation: cityBlink 4s ease-in-out infinite 1.2s;
}

@keyframes cityBlink {
    0%, 100% { opacity: 1; }
    45%, 55%  { opacity: 0.15; }
}

/* ---------- Outro Signature ---------- */
.outro__signature {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.2em;
    margin-top: 2rem;
    text-align: center;
}

/* ---------- Reveal Animation (JS-triggered) ---------- */
@keyframes materialize {
    from {
        opacity: 0;
        transform: translateY(2rem);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(2rem);
    filter: blur(3px);
}

.reveal.visible {
    animation: materialize 1s ease-out forwards;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .ghost-container {
        top: 10%;
        right: 5%;
    }

    .panel {
        padding: 1.5rem;
    }

    .hero__title {
        letter-spacing: 0.15em;
    }

    .section__title {
        letter-spacing: 0.15em;
    }

    .vending-grid {
        gap: 0.6rem;
    }
}
