/* ============================================================================
   rational.monster - Dark Academia + Bubble Playful Design System
   ============================================================================ */

/* Root Variables */
:root {
    /* Ocean Palette */
    --ocean-deep: #0C1B2E;
    --ocean-mid: #122840;
    --ocean-light: #1A3A5C;

    /* Text Colors */
    --text-primary: #E8DDE0;
    --text-secondary: #9A919A;
    --text-tertiary: #C8BEC2;

    /* Bubble Colors */
    --bubble-pink: #FF8FA3;
    --bubble-teal: #4ECDC4;
    --bubble-lavender: #B8A9C9;
    --bubble-gold: #C9A84C;

    /* Supporting */
    --foam-white: #F0E8EC;

    /* Typography Sizes */
    --h1-size: clamp(2.5rem, 6vw, 4rem);
    --h2-size: clamp(1.75rem, 4vw, 2.5rem);
    --body-size: 18px;
    --accent-size: 16px;
}

/* ============================================================================
   Global Styles
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--ocean-deep);
    color: var(--text-primary);
    font-family: "Newsreader", Georgia, serif;
    font-size: var(--body-size);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ============================================================================
   Hero Section: The Grotto Opening
   ============================================================================ */

.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ocean-deep);
    overflow: hidden;
}

.hero h1 {
    position: relative;
    z-index: 10;
    font-family: "Crimson Pro", Georgia, serif;
    font-size: var(--h1-size);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    text-align: center;
    padding: 2rem;
}

/* Bubble Container for Hero */
.bubble-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero .bubble {
    position: absolute;
    bottom: -50px;
    border-radius: 50%;
    opacity: 0;
    animation: bubble-float linear infinite;
}

@keyframes bubble-float {
    from {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(-120vh) scale(1);
        opacity: 0.3;
    }
}

/* ============================================================================
   Reading Column
   ============================================================================ */

.reading-column {
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background-color: var(--ocean-mid);
    position: relative;
    z-index: 5;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(232, 221, 224, 0.02) 0px,
            rgba(232, 221, 224, 0.02) 1px,
            transparent 1px,
            transparent 2px
        );
}

/* Content Sections */
.content-section {
    margin-bottom: 4rem;
    opacity: 0;
    animation: slide-reveal 0.5s ease-out forwards;
}

@keyframes slide-reveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section h2 {
    font-family: "Crimson Pro", Georgia, serif;
    font-size: var(--h2-size);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
    position: relative;
    padding-left: 2rem;
}

.content-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bubble-gold);
    box-shadow: 0 0 0 3px var(--text-tertiary);
}

.content-section p {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.emphasis {
    font-style: italic;
    color: var(--bubble-gold);
    font-weight: 600;
}

.playful {
    font-family: "Baloo 2", sans-serif;
    color: var(--bubble-pink);
    font-weight: 600;
}

.closing-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bubble-pink);
    text-align: center;
    margin-top: 2rem;
}

/* ============================================================================
   Collage Bands
   ============================================================================ */

.collage-band {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 300px;
    padding: 3rem 2rem;
    background-color: var(--foam-white);
    margin-bottom: 4rem;
    overflow: visible;
}

.collage-item {
    position: absolute;
}

/* Pull Quote Cards */
.pull-quote {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    max-width: 280px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: "Newsreader", Georgia, serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--ocean-deep);
    line-height: 1.6;
}

.pull-quote p {
    margin: 0;
    color: var(--ocean-deep);
}

.quote-1 {
    top: 20px;
    left: 3%;
    transform: rotate(-3deg);
    animation: float-drift 4s ease-in-out infinite;
}

.quote-2 {
    top: 50px;
    right: 5%;
    transform: rotate(4deg);
    animation: float-drift 4.5s ease-in-out infinite 0.5s;
}

.quote-3 {
    bottom: 30px;
    left: 8%;
    transform: rotate(-2deg);
    animation: float-drift 4.2s ease-in-out infinite 0.3s;
}

.quote-4 {
    top: 40px;
    right: 8%;
    transform: rotate(3deg);
    animation: float-drift 4.8s ease-in-out infinite 0.7s;
}

@keyframes float-drift {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotation, 0deg));
    }
    50% {
        transform: translateY(-15px) rotate(var(--rotation, 0deg));
    }
}

/* Bubble Clusters */
.bubble-cluster {
    position: relative;
    width: 120px;
    height: 120px;
}

.cluster-1 {
    top: 10%;
    right: 15%;
}

.cluster-2 {
    bottom: 15%;
    left: 10%;
}

.cluster-3 {
    top: 30%;
    left: 12%;
}

.cluster-4 {
    bottom: 20%;
    right: 12%;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    border: none;
}

.bubble-sm {
    width: 18px;
    height: 18px;
    background-color: var(--bubble-pink);
}

.bubble-md {
    width: 36px;
    height: 36px;
    background-color: var(--bubble-teal);
}

.bubble-lg {
    width: 60px;
    height: 60px;
    background-color: var(--bubble-lavender);
}

.cluster-1 .bubble:nth-child(1) {
    top: 0;
    left: 5px;
}

.cluster-1 .bubble:nth-child(2) {
    top: 20px;
    right: 0;
}

.cluster-1 .bubble:nth-child(3) {
    bottom: 5px;
    left: 20px;
}

.cluster-1 .bubble:nth-child(4) {
    top: 40px;
    left: 50px;
}

.cluster-2 .bubble:nth-child(1) {
    top: 0;
    right: 10px;
}

.cluster-2 .bubble:nth-child(2) {
    top: 35px;
    left: 5px;
}

.cluster-2 .bubble:nth-child(3) {
    bottom: 0;
    right: 20px;
}

.cluster-3 .bubble:nth-child(1) {
    top: 10px;
    left: 0;
}

.cluster-3 .bubble:nth-child(2) {
    top: 50px;
    right: 5px;
}

.cluster-3 .bubble:nth-child(3) {
    bottom: 10px;
    left: 40px;
}

.cluster-3 .bubble:nth-child(4) {
    top: 30px;
    left: 60px;
}

.cluster-4 .bubble:nth-child(1) {
    top: 5px;
    left: 10px;
}

.cluster-4 .bubble:nth-child(2) {
    top: 40px;
    right: 0;
}

.cluster-4 .bubble:nth-child(3) {
    bottom: 15px;
    left: 35px;
}

/* Decorative Shapes */
.decorative-shape {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--bubble-gold);
    opacity: 0.15;
}

.shape-1 {
    bottom: 40px;
    right: 8%;
    width: 140px;
    height: 140px;
    border-radius: 30%;
}

.shape-2 {
    top: 40px;
    left: 5%;
    width: 120px;
    height: 120px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.shape-3 {
    bottom: 60px;
    right: 10%;
    width: 110px;
    height: 110px;
    border-radius: 50% 50% 30% 70% / 50% 30% 70% 50%;
    background-color: var(--bubble-teal);
}

.shape-4 {
    top: 80px;
    left: 3%;
    width: 130px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--bubble-lavender);
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
    .reading-column {
        padding: 2.5rem 1rem;
    }

    .content-section {
        margin-bottom: 3rem;
    }

    .collage-band {
        min-height: 400px;
        padding: 2rem 1rem;
        margin-bottom: 3rem;
    }

    .pull-quote {
        max-width: 200px;
        padding: 1rem;
        font-size: 0.85rem;
    }

    .quote-1, .quote-2, .quote-3, .quote-4 {
        transform: rotate(0deg) !important;
    }

    .decorative-shape {
        opacity: 0.1;
    }

    .hero h1 {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --body-size: 16px;
    }

    .reading-column {
        padding: 1.5rem 1rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .collage-band {
        min-height: 350px;
        padding: 1.5rem 0.75rem;
    }

    .bubble-cluster {
        width: 100px;
        height: 100px;
    }

    .pull-quote {
        max-width: 160px;
        padding: 0.75rem;
        font-size: 0.75rem;
    }
}

/* ============================================================================
   Scroll-triggered Animations
   ============================================================================ */

.content-section {
    animation-duration: 0.5s;
}

.collage-band {
    opacity: 0;
    animation: collage-appear 0.6s ease-out forwards;
}

@keyframes collage-appear {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================================
   Interaction States
   ============================================================================ */

.pull-quote {
    transition: all 0.3s ease-out;
    cursor: pointer;
}

.pull-quote:hover {
    transform: scale(1.06);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
    .hero {
        page-break-after: always;
    }

    .collage-band {
        page-break-inside: avoid;
    }
}
