/* ============================================
   domain — Frutiger Aero Revival
   ============================================ */

/* CSS Custom Properties for animated background */
@property --bg-angle {
    syntax: '<angle>';
    initial-value: 135deg;
    inherits: false;
}

@property --bg-stop {
    syntax: '<percentage>';
    initial-value: 40%;
    inherits: false;
}

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.65;
    letter-spacing: 0.005em;
    color: #2d4a6f;
    background: #f7fbfe;
    overflow-x: hidden;
}

/* ---- Animated Background ---- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(var(--bg-angle), #e8f4fd 0%, #7ec8e3 var(--bg-stop), #8bc6a8 100%);
    animation: bg-shift 30s ease-in-out infinite alternate;
}

@keyframes bg-shift {
    0% {
        --bg-angle: 135deg;
        --bg-stop: 40%;
    }
    50% {
        --bg-angle: 145deg;
        --bg-stop: 50%;
    }
    100% {
        --bg-angle: 155deg;
        --bg-stop: 55%;
    }
}

/* ---- Room (Viewport Sections) ---- */
.room {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.room-auto {
    min-height: 100vh;
    height: auto;
}

/* ============================================
   Room 1 — The Atrium
   ============================================ */
#atrium {
    background: radial-gradient(ellipse at 30% 20%, #e8f4fd 0%, #7ec8e3 50%, #1a365d 100%);
}

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

.hero-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: #1a365d;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #5a7da3;
}

/* Glossy Orbs */
.orb-cluster {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 50%;
    height: 60%;
    z-index: 1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.8) 0%, #7ec8e3 40%, #1a365d 100%);
    box-shadow: 0 20px 60px rgba(26,54,93,0.3), inset 0 -10px 30px rgba(26,54,93,0.2);
}

.orb::after {
    content: '';
    position: absolute;
    top: 8%;
    left: 18%;
    width: 40%;
    height: 35%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 20%, rgba(255,255,255,0.9) 0%, transparent 50%);
}

.orb-1 { width: 280px; height: 280px; top: 5%; right: 10%; animation: float 6s ease-in-out infinite; animation-delay: 0s; }
.orb-2 { width: 180px; height: 180px; top: 25%; right: 45%; animation: float 6s ease-in-out infinite; animation-delay: 1s; }
.orb-3 { width: 120px; height: 120px; top: 55%; right: 15%; animation: float 6s ease-in-out infinite; animation-delay: 2s; }
.orb-4 { width: 200px; height: 200px; top: 10%; right: 55%; animation: float 6s ease-in-out infinite; animation-delay: 3.5s; }
.orb-5 { width: 100px; height: 100px; top: 50%; right: 50%; animation: float 6s ease-in-out infinite; animation-delay: 5s; }
.orb-6 { width: 150px; height: 150px; top: 65%; right: 35%; animation: float 6s ease-in-out infinite; animation-delay: 2.5s; }
.orb-7 { width: 80px; height: 80px; top: 35%; right: 70%; animation: float 6s ease-in-out infinite; animation-delay: 4s; }

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

/* Scroll Pill */
.scroll-pill {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 12px 24px;
    color: #1a365d;
    animation: pulse-pill 2s ease-in-out infinite;
    cursor: pointer;
    z-index: 3;
}

@keyframes pulse-pill {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(5px); }
}

/* ============================================
   Room 2 — The Gallery
   ============================================ */
#gallery {
    padding: 4rem 2rem;
    background: transparent;
}

.gallery-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    color: #1a365d;
    margin-bottom: 3rem;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.8s cubic-bezier(0.25,0.46,0.45,0.94), transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}

.gallery-title.visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1080px;
    width: 100%;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: scale(0.97) translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25,0.46,0.45,0.94),
                transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
    box-shadow: 0 8px 32px rgba(26,54,93,0.12);
    overflow: hidden;
}

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

/* Stagger vertical offset */
.card-2, .card-5 { margin-top: 40px; }
.card-3, .card-6 { margin-top: 80px; }

.glass-card:hover {
    transform: translateY(-8px) scale(1);
    box-shadow: 0 20px 60px rgba(26,54,93,0.25);
}

/* Border Animate Effect */
.glass-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: conic-gradient(from var(--border-angle), transparent 0%, #7ec8e3 10%, #f0c6d4 20%, transparent 30%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
    --border-angle: 0deg;
}

.glass-card:hover::before {
    opacity: 1;
    animation: border-rotate 2s linear infinite;
}

@keyframes border-rotate {
    to { --border-angle: 360deg; }
}

/* Card Art */
.card-art {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 8px;
    margin-bottom: 12px;
}

.art-1 {
    background:
        conic-gradient(from 45deg at 50% 50%, #7ec8e3, #4db8d1, #8bc6a8, #7ec8e3),
        radial-gradient(circle at 30% 70%, #f0c6d4 0%, transparent 60%);
    background-blend-mode: overlay;
}

.art-2 {
    background:
        radial-gradient(circle at 20% 30%, #e8f4fd 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, #f0c6d4 0%, transparent 40%),
        linear-gradient(135deg, #1a365d, #4a90c4);
    background-blend-mode: screen;
}

.art-3 {
    background:
        conic-gradient(from 180deg at 40% 60%, #7ec8e3, #162a4a, #8bc6a8, #7ec8e3),
        radial-gradient(ellipse at 60% 40%, rgba(255,255,255,0.5), transparent 70%);
    background-blend-mode: soft-light;
}

.art-4 {
    background:
        radial-gradient(circle at 50% 50%, #f0c6d4 0%, transparent 50%),
        conic-gradient(from 90deg at 50% 50%, #4db8d1, #7ec8e3, #e8f4fd, #4db8d1);
    background-blend-mode: multiply;
}

.art-5 {
    background:
        radial-gradient(circle at 30% 30%, #8bc6a8 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, #7ec8e3 0%, transparent 50%),
        linear-gradient(to bottom right, #162a4a, #4a90c4);
    background-blend-mode: screen;
}

.art-6 {
    background:
        conic-gradient(from 270deg at 60% 40%, #e8f4fd, #7ec8e3, #f0c6d4, #8bc6a8, #e8f4fd),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.6) 0%, transparent 60%);
    background-blend-mode: overlay;
}

.card-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(74, 144, 196, 0.8);
}

/* ============================================
   SVG Dividers
   ============================================ */
.svg-divider {
    width: 100%;
    padding: 0 2rem;
    overflow: hidden;
}

.svg-divider svg, .svg-divider-inline svg {
    width: 100%;
    height: auto;
    display: block;
}

.flow-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s cubic-bezier(0.25,0.46,0.45,0.94);
}

.flow-path.drawn {
    stroke-dashoffset: 0;
}

.svg-divider-inline {
    width: 100%;
    margin: 2rem 0;
}

/* ============================================
   Room 3 — The Reflection Pool
   ============================================ */
#reflection {
    padding: clamp(4rem, 10vw, 8rem) clamp(2rem, 8vw, 6rem);
    background: transparent;
}

.reflection-content {
    max-width: 52ch;
    margin: 0 auto;
}

.prose-paragraph {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.65;
    color: #2d4a6f;
    margin-bottom: 1rem;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.8s cubic-bezier(0.25,0.46,0.45,0.94), transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}

.prose-paragraph.visible {
    opacity: 1;
    transform: scale(1);
}

.prose-paragraph::first-letter {
    float: left;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 3.5em;
    line-height: 0.8;
    color: #7ec8e3;
    margin-right: 0.1em;
    margin-top: 0.05em;
}

/* ============================================
   Room 4 — The Horizon
   ============================================ */
#horizon {
    background: linear-gradient(to top, #f0c6d4 0%, #7ec8e3 40%, #1a365d 100%);
}

.orb-cluster-footer {
    top: 10%;
    right: 10%;
    width: 80%;
    height: 50%;
}

.orb-small {
    opacity: 0.4;
}

.orb-f1 { width: 120px; height: 120px; top: 10%; left: 15%; animation: float 10s ease-in-out infinite; animation-delay: 0s; }
.orb-f2 { width: 80px; height: 80px; top: 30%; left: 60%; animation: float 10s ease-in-out infinite; animation-delay: 2s; }
.orb-f3 { width: 100px; height: 100px; top: 55%; left: 35%; animation: float 10s ease-in-out infinite; animation-delay: 4s; }
.orb-f4 { width: 60px; height: 60px; top: 20%; left: 80%; animation: float 10s ease-in-out infinite; animation-delay: 6s; }

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

.pill-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.pill-link {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #e8f4fd;
    text-decoration: none;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    padding: 12px 28px;
    position: relative;
    overflow: hidden;
    transition: background 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
                transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}

.pill-link:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(26,54,93,0.3);
}

.pill-link::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: conic-gradient(from var(--border-angle), transparent 0%, #7ec8e3 10%, #f0c6d4 20%, transparent 30%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    --border-angle: 0deg;
}

.pill-link:hover::before {
    opacity: 1;
    animation: border-rotate 2s linear infinite;
}

.copyright {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    color: rgba(232, 244, 253, 0.6);
    letter-spacing: 0.08em;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .card-2, .card-5, .card-3, .card-6 {
        margin-top: 0;
    }
    .orb-cluster {
        width: 80%;
        height: 40%;
        top: 2%;
        right: 0;
    }
    .orb-1 { width: 140px; height: 140px; }
    .orb-2 { width: 100px; height: 100px; }
    .orb-4 { width: 110px; height: 110px; }
    .pill-links {
        flex-direction: column;
        align-items: center;
    }
}
