/* courts.studio — Inflated Digital Sculpture */

/* ============================
   CSS Variables & Reset
   ============================ */
:root {
    --color-primary: #FF4D8A;
    --color-secondary: #9B6BFF;
    --color-tertiary: #FF8A3D;
    --color-accent: #3DFFBA;
    --color-bg: #FFF8F5;
    --color-deep: #2D2640;
    --color-text: #2D2640;
    --color-text-secondary: #9B8FBB;
    --color-shadow-pink: rgba(255, 77, 138, 0.20);
    --color-shadow-lavender: rgba(155, 107, 255, 0.15);
    --gradient-primary: linear-gradient(135deg, #FF4D8A, #9B6BFF);
    --gradient-accent: linear-gradient(90deg, #FF8A3D, #FF4D8A);
    --gradient-bg: radial-gradient(ellipse at 30% 20%, #FFF8F5 0%, #F0E6FF 100%);
    --font-display: 'Libre Baskerville', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --radius-pill: 32px;
    --radius-pill-lg: 40px;
    --max-width: 1120px;
    --shadow-sm: 0 4px 20px rgba(155, 107, 255, 0.15);
    --shadow-md: 0 8px 40px rgba(255, 77, 138, 0.20);
    --shadow-lg: 0 16px 60px rgba(255, 77, 138, 0.25), 0 4px 20px rgba(155, 107, 255, 0.10);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--gradient-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================
   Cursor Follow Bubbles
   ============================ */
#cursor-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.cursor-bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    transition: none;
}

.cursor-bubble:nth-child(1) {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 35% 30%, #FFB8D0 0%, #FF4D8A 60%, #C4366D 100%);
    box-shadow: inset 0 -8px 16px rgba(0,0,0,0.08), 0 8px 24px rgba(255, 77, 138, 0.3);
    opacity: 0.85;
}

.cursor-bubble:nth-child(2) {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 35% 30%, #C4AFFF 0%, #9B6BFF 60%, #7044D4 100%);
    box-shadow: inset 0 -6px 12px rgba(0,0,0,0.08), 0 6px 20px rgba(155, 107, 255, 0.3);
    opacity: 0.75;
}

.cursor-bubble:nth-child(3) {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 35% 30%, #FFD0A8 0%, #FF8A3D 60%, #D46A1F 100%);
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.08), 0 5px 16px rgba(255, 138, 61, 0.3);
    opacity: 0.65;
}

.cursor-bubble::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, transparent 70%);
}

/* ============================
   Menu Button & Overlay
   ============================ */
#menu-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    background: var(--color-bg);
    border: none;
    border-radius: 100px;
    padding: 0.75rem 1.8rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
}

#menu-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

#menu-btn.active {
    background: var(--gradient-primary);
}

#menu-btn.active .menu-label {
    color: #FFF8F5;
}

.menu-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background: rgba(45, 38, 64, 0.92);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.menu-overlay-inner {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
}

.menu-link {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #FFF8F5;
    text-decoration: none;
    letter-spacing: -0.02em;
    line-height: 1.08;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-block;
}

.menu-link:hover {
    color: var(--color-primary);
    transform: scale(1.05);
}

/* ============================
   General Section Styles
   ============================ */
.act {
    position: relative;
    overflow: hidden;
}

/* ============================
   Inflated Sphere Base
   ============================ */
.inflated-sphere {
    border-radius: 50%;
    position: relative;
}

.sphere-highlight {
    position: absolute;
    top: 12%;
    left: 18%;
    width: 35%;
    height: 35%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.65) 0%, transparent 70%);
    pointer-events: none;
}

/* ============================
   ACT 1 — The Arrival
   ============================ */
.act-1 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 clamp(2rem, 5vw, 6rem);
    background: var(--gradient-bg);
}

.act-1-content {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.act-1-text {
    flex: 0 0 40%;
    max-width: 40%;
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: var(--color-text);
    text-shadow: 3px 3px 0px #FFB8D0;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-headline.visible {
    opacity: 1;
    transform: translateX(0);
}

.hero-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    color: var(--color-text);
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-body.visible {
    opacity: 1;
    transform: translateX(0);
}

.act-1-form {
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-sphere {
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.6s ease, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-sphere.visible {
    opacity: 1;
    transform: scale(1);
}

.sphere-hero {
    width: clamp(280px, 45vw, 500px);
    height: clamp(280px, 45vw, 500px);
    background: radial-gradient(circle at 35% 30%, #FFB8D0 0%, #FF4D8A 40%, #C4366D 100%);
    box-shadow: inset 0 -20px 40px rgba(0,0,0,0.1), 0 20px 60px rgba(255,77,138,0.3);
    will-change: transform;
}

.tech-lines {
    position: absolute;
    pointer-events: none;
}

.tech-lines-act1 {
    width: 60%;
    height: 60%;
    right: 0;
    bottom: 0;
    opacity: 0.25;
}

.tech-path {
    fill: none;
    stroke: #9B8FBB;
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease;
}

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

.tech-node {
    fill: #9B8FBB;
    opacity: 0.4;
}

/* ============================
   ACT 2 — The Showcase
   ============================ */
.act-2 {
    min-height: 80vh;
    padding: 12vh clamp(2rem, 5vw, 6rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

.pill-card {
    background: var(--color-bg);
    border-radius: var(--radius-pill-lg);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
}

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

.pill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pill-shape {
    margin-bottom: 1.5rem;
}

.sphere-small {
    width: 80px;
    height: 80px;
}

.sphere-pink {
    background: radial-gradient(circle at 35% 30%, #FFB8D0 0%, #FF4D8A 50%, #C4366D 100%);
    box-shadow: inset 0 -10px 20px rgba(0,0,0,0.08), 0 10px 30px rgba(255,77,138,0.25);
}

.sphere-lavender {
    background: radial-gradient(circle at 35% 30%, #C4AFFF 0%, #9B6BFF 50%, #7044D4 100%);
    box-shadow: inset 0 -10px 20px rgba(0,0,0,0.08), 0 10px 30px rgba(155,107,255,0.25);
}

.sphere-tangerine {
    background: radial-gradient(circle at 35% 30%, #FFD0A8 0%, #FF8A3D 50%, #D46A1F 100%);
    box-shadow: inset 0 -10px 20px rgba(0,0,0,0.08), 0 10px 30px rgba(255,138,61,0.25);
}

.pill-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.pill-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.72;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.pill-tech-svg {
    width: 100%;
    height: 60px;
    opacity: 0.3;
}

.pill-trace {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.5s ease;
}

.pill-card.visible .pill-trace {
    stroke-dashoffset: 0;
}

/* ============================
   ACT 3 — The Depth
   ============================ */
.act-3 {
    padding: 12vh clamp(2rem, 5vw, 6rem);
    position: relative;
}

.depth-section {
    max-width: var(--max-width);
    margin: 0 auto 12vh;
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.depth-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.depth-text {
    flex: 0 0 55%;
    max-width: 55%;
}

.depth-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: var(--color-text);
    text-shadow: 2px 2px 0px #FFB8D0;
    margin-bottom: 1.25rem;
}

.depth-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    color: var(--color-text);
}

.depth-decoration {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.sphere-float {
    width: clamp(150px, 18vw, 240px);
    height: clamp(150px, 18vw, 240px);
    will-change: transform;
}

.sphere-gradient-1 {
    background: radial-gradient(circle at 35% 30%, #FFB8D0 0%, #FF4D8A 40%, #9B6BFF 100%);
    box-shadow: inset 0 -16px 32px rgba(0,0,0,0.1), 0 16px 48px rgba(255,77,138,0.25);
}

.sphere-gradient-2 {
    background: radial-gradient(circle at 35% 30%, #C4AFFF 0%, #9B6BFF 40%, #FF4D8A 100%);
    box-shadow: inset 0 -16px 32px rgba(0,0,0,0.1), 0 16px 48px rgba(155,107,255,0.25);
}

.sphere-gradient-3 {
    background: radial-gradient(circle at 35% 30%, #FFD0A8 0%, #FF8A3D 40%, #FF4D8A 100%);
    box-shadow: inset 0 -16px 32px rgba(0,0,0,0.1), 0 16px 48px rgba(255,138,61,0.25);
}

.tech-lines-vertical {
    width: 100px;
    height: 200px;
    opacity: 0.25;
    margin-top: 1rem;
}

.depth-connector {
    position: absolute;
    left: 2rem;
    top: 0;
    width: 30px;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
}

.connector-line {
    stroke-dasharray: 8 8;
    stroke-dashoffset: 0;
    animation: dashScroll 20s linear infinite;
}

@keyframes dashScroll {
    to { stroke-dashoffset: -1000; }
}

/* ============================
   Bob Animation
   ============================ */
.bob-animation {
    animation: bob 4s ease-in-out infinite;
}

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

/* ============================
   ACT 4 — The Statement
   ============================ */
.act-4 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-deep);
    position: relative;
    padding: 4rem clamp(2rem, 5vw, 6rem);
    transition: background-color 0.8s ease;
}

.statement-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.statement-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.statement-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: #FFF8F5;
    text-shadow: 3px 3px 0px rgba(255, 77, 138, 0.4);
}

.tech-lines-act4 {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.2;
    z-index: 1;
}

.tech-lines-act4 .tech-path {
    stroke: #9B8FBB;
    stroke-width: 1.5;
}

.tech-lines-act4 .tech-node {
    fill: #9B8FBB;
    opacity: 0.5;
}

.statement-spheres {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.sphere-statement {
    position: absolute;
}

.sphere-mint {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 10%;
    background: radial-gradient(circle at 35% 30%, #A8FFE0 0%, #3DFFBA 50%, #1FD490 100%);
    box-shadow: inset 0 -12px 24px rgba(0,0,0,0.08), 0 12px 36px rgba(61, 255, 186, 0.3);
}

.sphere-pink-light {
    width: 90px;
    height: 90px;
    bottom: 20%;
    right: 12%;
    background: radial-gradient(circle at 35% 30%, #FFD4E4 0%, #FF85B2 50%, #FF4D8A 100%);
    box-shadow: inset 0 -10px 20px rgba(0,0,0,0.08), 0 10px 30px rgba(255, 77, 138, 0.3);
}

.sphere-lavender-light {
    width: 70px;
    height: 70px;
    top: 60%;
    left: 75%;
    background: radial-gradient(circle at 35% 30%, #DDD0FF 0%, #B89EFF 50%, #9B6BFF 100%);
    box-shadow: inset 0 -8px 16px rgba(0,0,0,0.08), 0 8px 24px rgba(155, 107, 255, 0.3);
}

/* ============================
   Dark mode cursor bubbles
   ============================ */
body.dark-cursor .cursor-bubble:nth-child(1) {
    background: radial-gradient(circle at 35% 30%, #FFD4E4 0%, #FF85B2 60%, #FF4D8A 100%);
}

body.dark-cursor .cursor-bubble:nth-child(2) {
    background: radial-gradient(circle at 35% 30%, #DDD0FF 0%, #B89EFF 60%, #9B6BFF 100%);
}

body.dark-cursor .cursor-bubble:nth-child(3) {
    background: radial-gradient(circle at 35% 30%, #A8FFE0 0%, #3DFFBA 60%, #1FD490 100%);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 900px) {
    .act-1-content {
        flex-direction: column;
        text-align: center;
    }
    .act-1-text, .act-1-form {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .act-1-form {
        order: -1;
    }
    .sphere-hero {
        width: clamp(200px, 60vw, 350px);
        height: clamp(200px, 60vw, 350px);
    }
    .showcase-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    .depth-section {
        flex-direction: column;
    }
    .depth-text, .depth-decoration {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .depth-decoration {
        align-items: flex-start;
    }
    .sphere-float {
        width: clamp(100px, 30vw, 180px);
        height: clamp(100px, 30vw, 180px);
    }
    #menu-btn {
        top: 1rem;
        left: 1rem;
    }
}

@media (max-width: 600px) {
    .pill-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-pill);
    }
    .hero-headline {
        text-shadow: 2px 2px 0px #FFB8D0;
    }
    .statement-headline {
        font-size: clamp(1.8rem, 6vw, 3rem);
    }
    .sphere-statement:nth-child(1) { width: 80px; height: 80px; }
    .sphere-statement:nth-child(2) { width: 60px; height: 60px; }
    .sphere-statement:nth-child(3) { width: 50px; height: 50px; }
}

/* ============================
   Animation base — hidden until activated
   ============================ */
.animate-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero-specific overrides */
.hero-headline.animate-in {
    transform: translateX(-40px);
}
.hero-headline.animate-in.visible {
    transform: translateX(0);
}

.hero-body.animate-in {
    transform: translateX(-30px);
}
.hero-body.animate-in.visible {
    transform: translateX(0);
}

.hero-sphere.animate-in {
    transform: scale(0.3);
}
.hero-sphere.animate-in.visible {
    transform: scale(1);
    transition: opacity 0.6s ease, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Pill card overrides */
.pill-card.animate-in {
    transform: translateY(60px);
}
.pill-card.animate-in.visible {
    transform: translateY(0);
}
.pill-card.animate-in.visible:hover {
    transform: translateY(-4px);
}
