/* ============================================
   BBOTTL.com - Frutiger Aero / Bottle World
   ============================================ */

/* CSS Custom Properties */
:root {
    --sky-base: #5BA4CF;
    --deep-anchor: #1B6B7D;
    --nature-accent: #4CA882;
    --warm-glow: #E8B44D;
    --glass-surface: #F0F5F8;
    --text-primary: #1A2F36;
    --text-secondary: #5A7A84;
    --bg-gradient-start: #E8F4F8;
    --bg-gradient-end: #C4D7E8;
    --star-highlight: #FFF8E7;

    --font-main: 'Commissioner', sans-serif;
    --content-max: 1100px;
    --section-padding: 80px;
    --glass-radius: 20px;
    --glass-blur: 12px;

    /* Scroll-driven dynamic properties */
    --scroll-hue-shift: 0deg;
    --scroll-saturation: 1;
    --scroll-darkness: 0;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    font-weight: 300;
    color: var(--text-primary);
    background: var(--bg-gradient-start);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================
   Sections - Base
   ============================================ */
.section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.section--hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 40%, #5BA4CF 0%, #C4D7E8 40%, #E8F4F8 70%, #F0F5F8 100%);
}

.section--story,
.section--cards {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: var(--section-padding) 0;
}

.section--footer {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #1B6B7D 0%, #1A2F36 100%);
    padding: 60px 0;
}

/* ============================================
   Section Backgrounds
   ============================================ */
.section-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.section-bg--sky {
    background: linear-gradient(180deg, #E8F4F8 0%, #C4D7E8 50%, #5BA4CF 100%);
    opacity: 0.6;
}

.section-bg--meadow {
    background: linear-gradient(180deg, #C4D7E8 0%, #E8F4F8 30%, #4CA882 100%);
    opacity: 0.3;
}

.section-bg--water {
    background: linear-gradient(180deg, #5BA4CF 0%, #1B6B7D 60%, #C4D7E8 100%);
    opacity: 0.4;
}

.section-bg--twilight {
    background: linear-gradient(180deg, #1B6B7D 0%, #5A7A84 50%, #1A2F36 100%);
    opacity: 0.35;
}

.section-bg--night {
    background: linear-gradient(180deg, #1A2F36 0%, #0d1b20 100%);
    opacity: 0.9;
}

.section--night {
    background: #1A2F36;
}

/* ============================================
   Starfield (Hero)
   ============================================ */
.starfield {
    position: absolute;
    inset: 0;
    z-index: 1;
    animation: starfieldRotate 120s linear infinite;
    transform-origin: center center;
}

@keyframes starfieldRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   Floating Orbs
   ============================================ */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #FFF8E7 0%, rgba(255, 248, 231, 0) 70%);
    box-shadow: 0 0 12px 4px rgba(255, 248, 231, 0.3);
    pointer-events: none;
    z-index: 2;
    animation: floatOrb linear infinite;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translate(var(--orb-dx), var(--orb-dy)); opacity: 0; }
}

/* ============================================
   Hero Content
   ============================================ */
.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--content-max);
    padding: 0 40px;
    display: flex;
    justify-content: flex-start;
}

.glass-card--hero {
    max-width: 520px;
    padding: 48px 56px;
}

.hero-title {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 72px;
    letter-spacing: 2px;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letterReveal 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-tagline {
    font-weight: 300;
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Glass Cards
   ============================================ */
.glass-card {
    background: rgba(240, 245, 248, 0.6);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--glass-radius);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 8px 32px rgba(26, 47, 54, 0.1);
    padding: 40px;
    transition: backdrop-filter 0.4s ease, background 0.4s ease, transform 0.3s ease;
    will-change: transform;
}

.glass-card:hover {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(240, 245, 248, 0.7);
}

/* Fallback for no backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
    .glass-card {
        background: rgba(240, 245, 248, 0.85);
    }
}

/* ============================================
   Glass Strips (panoramic overlays)
   ============================================ */
.glass-strip {
    position: relative;
    z-index: 1;
    max-width: 700px;
    background: rgba(240, 245, 248, 0.6);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--glass-radius);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 8px 32px rgba(26, 47, 54, 0.1);
    padding: 48px 56px;
}

.glass-strip--right {
    margin-left: auto;
}

.glass-strip--dark {
    background: rgba(26, 47, 54, 0.6);
    border: 1px solid rgba(255, 248, 231, 0.15);
    box-shadow:
        inset 0 1px 0 rgba(255, 248, 231, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

@supports not (backdrop-filter: blur(12px)) {
    .glass-strip {
        background: rgba(240, 245, 248, 0.85);
    }
    .glass-strip--dark {
        background: rgba(26, 47, 54, 0.85);
    }
}

/* ============================================
   Section Content
   ============================================ */
.section-content {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.section-content--wide {
    max-width: var(--content-max);
    margin: 0 auto;
}

.section-content--contained {
    max-width: var(--content-max);
    margin: 0 auto;
}

/* ============================================
   Card Layouts (2-col asymmetric)
   ============================================ */
.card-layout {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 32px;
    align-items: start;
}

.card-layout--reverse {
    grid-template-columns: 40fr 60fr;
}

.glass-card--large {
    padding: 48px;
}

.glass-card--small {
    padding: 32px;
    margin-top: 60px;
}

.card-label {
    display: inline-block;
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--deep-anchor);
    margin-bottom: 16px;
    font-variant: small-caps;
}

/* ============================================
   Typography
   ============================================ */
.section-heading {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 42px;
    letter-spacing: 2px;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 24px;
}

.section-heading--light {
    color: var(--star-highlight);
}

.section-text {
    font-family: var(--font-main);
    font-weight: 300;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.section-text--light {
    color: rgba(255, 248, 231, 0.8);
}

/* ============================================
   Constellation Dividers
   ============================================ */
.constellation-divider {
    position: relative;
    height: 120px;
    overflow: hidden;
    background: transparent;
}

.constellation-svg {
    width: 100%;
    height: 100%;
}

.star-dot {
    fill: #FFF8E7;
    filter: drop-shadow(0 0 4px rgba(255, 248, 231, 0.6));
}

.constellation-line {
    stroke: #FFF8E7;
    stroke-width: 1;
    fill: none;
    opacity: 0.6;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.5s ease;
}

.constellation-divider.visible .constellation-line {
    stroke-dashoffset: 0;
}

/* ============================================
   Aurora Bands
   ============================================ */
.aurora-band {
    height: 4px;
    background: linear-gradient(90deg,
        #5BA4CF 0%,
        #4CA882 25%,
        #1B6B7D 50%,
        #E8B44D 75%,
        #5BA4CF 100%
    );
    background-size: 200% 100%;
    animation: auroraPulse 8s ease-in-out infinite;
}

.aurora-band--deep {
    height: 3px;
    background: linear-gradient(90deg,
        #1B6B7D 0%,
        #5BA4CF 25%,
        #E8B44D 50%,
        #4CA882 75%,
        #1B6B7D 100%
    );
    background-size: 200% 100%;
    animation: auroraPulse 10s ease-in-out infinite reverse;
}

@keyframes auroraPulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   Shooting Stars
   ============================================ */
.shooting-star-container {
    position: relative;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 10;
}

.shooting-star {
    position: absolute;
    top: -20px;
    left: -10%;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 248, 231, 0) 0%, #FFF8E7 60%, #E8B44D 100%);
    border-radius: 2px;
    opacity: 0;
    transform: rotate(-15deg);
    filter: drop-shadow(0 0 6px rgba(255, 248, 231, 0.5));
}

.shooting-star.animate {
    animation: shootingStar 1.2s ease-out forwards;
}

@keyframes shootingStar {
    0% {
        left: -10%;
        opacity: 0;
        transform: rotate(-15deg) translateX(0);
    }
    10% {
        opacity: 1;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        left: 110%;
        opacity: 0;
        transform: rotate(-15deg) translateX(400px);
    }
}

/* ============================================
   Fade Reveal Animations
   ============================================ */
.fade-reveal {
    opacity: 0;
    transform: translateY(30px);
    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);
}

.fade-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-card.fade-reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
}

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

/* Stagger children */
.fade-reveal.visible .section-heading {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.12s both;
}

.fade-reveal.visible .section-text {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.24s both;
}

.fade-reveal.visible .card-label {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Footer
   ============================================ */
.footer-stars {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.footer-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.footer-nav {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-link {
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 14px;
    color: rgba(255, 248, 231, 0.7);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #FFF8E7;
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: #FFF8E7;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-tagline {
    font-family: var(--font-main);
    font-weight: 300;
    font-size: 16px;
    color: rgba(255, 248, 231, 0.5);
    margin-bottom: 12px;
}

.footer-domain {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 248, 231, 0.3);
}

/* ============================================
   Water Ripple Effect on Glass Cards
   ============================================ */
.glass-card .ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    animation: rippleExpand 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 48px;
    }

    .glass-card--hero {
        padding: 32px 36px;
        max-width: 100%;
    }

    .hero-content {
        padding: 0 20px;
    }

    .section-content {
        padding: 0 20px;
    }

    .card-layout,
    .card-layout--reverse {
        grid-template-columns: 1fr;
    }

    .glass-card--small {
        margin-top: 0;
    }

    .section-heading {
        font-size: 32px;
    }

    .glass-strip {
        padding: 32px;
    }

    .glass-card--large {
        padding: 32px;
    }

    .footer-nav {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 36px;
    }

    .section-heading {
        font-size: 26px;
    }

    .section-text {
        font-size: 15px;
    }

    .glass-strip {
        padding: 24px;
    }
}
