/* xity.quest - Frutiger Aero glass city */

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

:root {
    --sky-top: #0B2A3C;
    --sky-mid: #006B7F;
    --sky-accent: #00A3E0;
    --leaf-green: #7FD43A;
    --sunset-orange: #FFB347;
    --bloom-pink: #FF7EB3;
    --cloud-white: #FFFFFF;
    --frost: #F0F7FA;
    --glass-bg: rgba(255,255,255,0.12);
    --glass-border: rgba(255,255,255,0.25);
    --glass-blur: 16px;
    --block-radius: 20px;
    --block-gap: clamp(16px, 3vw, 32px);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.7;
    color: var(--cloud-white);
    background: linear-gradient(180deg, #0B2A3C 0%, #006B7F 30%, #00A3E0 60%, #7FD43A 85%, #FFB347 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glass panel base */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--block-radius);
    padding: clamp(24px, 4vw, 48px);
    transition: transform 400ms cubic-bezier(0.23,1,0.32,1), box-shadow 400ms ease;
}

@media(hover:hover){
    .glass-panel:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 12px 40px rgba(0,163,224,0.15), 0 0 60px rgba(127,212,58,0.06);
    }
}

/* Bubbles */
.bubbles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--x);
    bottom: -100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.25), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.15);
    animation: floatUp var(--dur) ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(0.8); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.4; }
    100% { transform: translateY(-120vh) scale(1.1); opacity: 0; }
}

/* Layout */
.act {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--block-gap);
}

.act-horizon {
    padding-top: 10vh;
    min-height: 100vh;
}

.hero-beacon {
    text-align: center;
    padding: clamp(40px, 8vw, 80px) clamp(24px, 4vw, 48px);
    margin-bottom: var(--block-gap);
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(3.5rem, 10vw, 8rem);
    letter-spacing: -0.02em;
    color: var(--cloud-white);
    text-shadow:
        0 2px 4px rgba(0,0,0,0.2),
        0 4px 20px rgba(0,163,224,0.3),
        0 0 60px rgba(0,163,224,0.15);
    margin-bottom: 1rem;
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    animation: letterIn 600ms ease-out forwards;
    animation-delay: calc(var(--i) * 50ms);
}

.hero-dot {
    color: var(--sunset-orange);
}

@keyframes letterIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: rgba(255,255,255,0.7);
    opacity: 0;
    animation: fadeIn 800ms ease forwards;
    animation-delay: 700ms;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.skyline-svg {
    width: 100%;
    max-width: 700px;
    margin: 2rem auto 0;
    display: block;
    opacity: 0;
    animation: fadeIn 1200ms ease forwards;
    animation-delay: 1000ms;
}

/* Blocks */
.block-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--block-gap);
    margin-bottom: var(--block-gap);
}

.block-row-three {
    grid-template-columns: repeat(3, 1fr);
}

.block {
    margin-bottom: var(--block-gap);
}

.block-wide {
    margin-bottom: var(--block-gap);
}

.block h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.block h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    margin-bottom: 0.5rem;
    color: var(--sunset-orange);
}

.block p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.5rem;
}

.block-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.block-caption {
    display: block;
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    margin-top: 1rem;
}

/* Illustration blocks */
.district-map {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 0 auto;
}

/* Poem block */
.poem-text {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
    text-align: center;
}

/* Emblem block */
.block-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-emblem {
    width: 160px;
    height: 160px;
}

.core-emblem circle {
    animation: corePulse 4s ease-in-out infinite;
}

.core-emblem circle:nth-child(2) { animation-delay: 0.5s; }
.core-emblem circle:nth-child(3) { animation-delay: 1s; }
.core-emblem circle:nth-child(4) { animation-delay: 1.5s; }

@keyframes corePulse {
    0%,100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Final block */
.block-final {
    text-align: center;
    padding: clamp(40px, 6vw, 80px);
    margin-bottom: 10vh;
}

.final-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--cloud-white);
    text-shadow: 0 2px 20px rgba(0,163,224,0.4);
    margin-bottom: 0.5rem;
}

.final-caption {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: rgba(255,255,255,0.5);
}

/* Animation entrance */
.block[data-anim] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease, transform 600ms cubic-bezier(0.23,1,0.32,1);
}

.block[data-anim].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .block-row, .block-row-three {
        grid-template-columns: 1fr;
    }
    .hero-beacon {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .block-stat { text-align: center; }
}
