/* undo.cafe - Ocean Deep Calming Spa */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-ocean: #0F2E3D;
    --aqua-glow: #4ECDC4;
    --soft-foam: #E8F5F5;
    --deep-indigo: #1A3A4D;
    --bioluminescent: #7FE5E0;
    --warm-cream: #F5EAE0;
    --dark-slate: #0A1620;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    color: var(--soft-foam);
    background: var(--deep-ocean);
    overflow-x: hidden;
    line-height: 1.8;
    letter-spacing: 0.02em;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

/* === BUBBLE CANVAS === */
#bubble-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* === RIPPLE LAYER === */
#ripple-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.ripple-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--aqua-glow);
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    animation: rippleExpand 1.2s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        opacity: 0.5;
        transform: scale(0);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* === SECTIONS === */
.section {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

/* === WAVE DIVIDERS === */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 4;
}

/* === REVEAL ANIMATION === */
.reveal-item {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* === HERO SECTION === */
#hero {
    min-height: 100vh;
    background: linear-gradient(
        170deg,
        var(--dark-slate) 0%,
        var(--deep-ocean) 40%,
        var(--deep-indigo) 100%
    );
    text-align: center;
    padding-bottom: 6rem;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    letter-spacing: 0.04em;
    color: var(--soft-foam);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 40px rgba(78, 205, 196, 0.15);
}

.hero-subtitle {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--bioluminescent);
    opacity: 0.8;
    margin-bottom: 3rem;
    letter-spacing: 0.06em;
}

/* === CTA BUTTONS === */
.cta-button {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: 1.5px solid var(--aqua-glow);
    background: rgba(78, 205, 196, 0.08);
    color: var(--aqua-glow);
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.1);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(127, 229, 224, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover {
    color: var(--bioluminescent);
    border-color: var(--bioluminescent);
    box-shadow: 0 0 30px rgba(127, 229, 224, 0.2);
    transform: scale(1.05);
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:active {
    transform: scale(0.98);
}

/* === FEATURES SECTION === */
#features {
    background: linear-gradient(
        180deg,
        var(--deep-indigo) 0%,
        var(--deep-ocean) 50%,
        var(--deep-indigo) 100%
    );
    padding: 8rem 2rem 10rem;
}

.features-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 900px;
    width: 100%;
}

.feature-card {
    background: rgba(15, 46, 61, 0.5);
    border: 1px solid rgba(78, 205, 196, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(78, 205, 196, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.feature-card:hover {
    border-color: rgba(78, 205, 196, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(78, 205, 196, 0.08);
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    filter: drop-shadow(0 0 8px rgba(78, 205, 196, 0.3));
}

.feature-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    letter-spacing: 0.08em;
    color: var(--soft-foam);
    margin-bottom: 0.8rem;
}

.feature-text {
    font-weight: 300;
    line-height: 1.8;
    color: rgba(232, 245, 245, 0.7);
}

/* === INTERACTIVE SECTION === */
#interactive {
    background: linear-gradient(
        180deg,
        var(--deep-indigo) 0%,
        var(--dark-slate) 50%,
        var(--deep-ocean) 100%
    );
    padding: 8rem 2rem 10rem;
}

.interactive-container {
    max-width: 800px;
    text-align: center;
}

.section-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.04em;
    color: var(--soft-foam);
    margin-bottom: 1rem;
}

.interactive-instructions {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--aqua-glow);
    opacity: 0.6;
    letter-spacing: 0.06em;
    margin-bottom: 3rem;
}

.word-field {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 2rem;
}

.undo-word {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    letter-spacing: 0.04em;
    color: var(--soft-foam);
    padding: 0.6rem 1.4rem;
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    user-select: none;
    background: rgba(15, 46, 61, 0.3);
}

.undo-word:hover {
    border-color: rgba(127, 229, 224, 0.4);
    color: var(--bioluminescent);
    box-shadow: 0 0 20px rgba(127, 229, 224, 0.15);
    transform: scale(1.05);
}

.undo-word.undone {
    color: var(--aqua-glow);
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.35);
    box-shadow: 0 0 25px rgba(78, 205, 196, 0.12);
}

.undo-word.pulse {
    animation: wordPulse 0.3s ease-out;
}

@keyframes wordPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

.undo-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.counter-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    color: rgba(232, 245, 245, 0.4);
    letter-spacing: 0.06em;
}

.counter-value {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--bioluminescent);
    text-shadow: 0 0 15px rgba(127, 229, 224, 0.4);
}

/* === DEEP DIVE SECTION === */
#deep-dive {
    background: linear-gradient(
        180deg,
        var(--deep-ocean) 0%,
        var(--dark-slate) 40%,
        var(--deep-indigo) 100%
    );
    padding: 8rem 2rem 10rem;
}

.deep-dive-container {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.deep-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: 0.04em;
    color: var(--soft-foam);
    margin-bottom: 1.5rem;
}

.deep-text-block p {
    font-weight: 300;
    line-height: 2;
    color: rgba(232, 245, 245, 0.75);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.deep-text-block em {
    color: var(--bioluminescent);
    font-style: italic;
}

.deep-quote {
    padding: 2.5rem;
    border-left: 2px solid rgba(78, 205, 196, 0.3);
    position: relative;
}

.deep-quote blockquote {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    letter-spacing: 0.03em;
    line-height: 1.7;
    color: rgba(232, 245, 245, 0.85);
}

.quote-mark {
    color: var(--aqua-glow);
    opacity: 0.4;
    font-size: 1.5em;
}

.quote-attribution {
    display: block;
    margin-top: 1rem;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    color: rgba(78, 205, 196, 0.5);
    letter-spacing: 0.06em;
    font-style: normal;
}

/* === CTA SECTION === */
#cta-section {
    background: linear-gradient(
        180deg,
        var(--deep-indigo) 0%,
        var(--deep-ocean) 60%,
        #0D2833 100%
    );
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.cta-container {
    text-align: center;
    max-width: 700px;
    position: relative;
    z-index: 5;
}

.cta-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.04em;
    color: var(--soft-foam);
    margin-bottom: 1.2rem;
}

.cta-text {
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(232, 245, 245, 0.7);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-secondary {
    background: transparent;
    border-color: rgba(78, 205, 196, 0.3);
    color: rgba(78, 205, 196, 0.7);
}

.cta-secondary:hover {
    border-color: var(--aqua-glow);
    color: var(--aqua-glow);
}

/* === LIGHT RAYS === */
.light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.light-ray {
    position: absolute;
    width: 2px;
    height: 120%;
    top: -10%;
    opacity: 0.06;
}

.ray-1 {
    left: 15%;
    transform: rotate(12deg);
    background: linear-gradient(180deg, var(--bioluminescent), transparent 70%);
    animation: rayFloat 12s ease-in-out infinite;
}

.ray-2 {
    left: 40%;
    transform: rotate(-5deg);
    background: linear-gradient(180deg, transparent 20%, var(--bioluminescent), transparent 80%);
    animation: rayFloat 16s ease-in-out infinite reverse;
}

.ray-3 {
    right: 25%;
    transform: rotate(8deg);
    background: linear-gradient(180deg, var(--bioluminescent), transparent 60%);
    animation: rayFloat 14s ease-in-out infinite;
    animation-delay: -4s;
}

.ray-4 {
    right: 10%;
    transform: rotate(-10deg);
    background: linear-gradient(180deg, transparent 30%, var(--bioluminescent), transparent 90%);
    animation: rayFloat 18s ease-in-out infinite reverse;
    animation-delay: -7s;
}

@keyframes rayFloat {
    0%, 100% {
        opacity: 0.04;
        transform: rotate(var(--ray-rotate, 0deg)) translateX(0);
    }
    50% {
        opacity: 0.08;
        transform: rotate(var(--ray-rotate, 0deg)) translateX(10px);
    }
}

/* === FOOTER === */
.site-footer {
    padding: 3rem 2rem;
    text-align: center;
    width: 100%;
}

.footer-text {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: rgba(232, 245, 245, 0.3);
    letter-spacing: 0.04em;
}

.mono-accent {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: var(--aqua-glow);
    opacity: 0.6;
}

/* === LINK UNDERLINE DRAW === */
a {
    color: var(--aqua-glow);
    text-decoration: none;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--bioluminescent);
    transition: width 0.4s ease;
}

a:hover::after {
    width: 100%;
}

/* === BUBBLE CONFETTI === */
.bubble-confetti {
    position: fixed;
    border-radius: 50%;
    border: 1px solid var(--aqua-glow);
    pointer-events: none;
    z-index: 10;
    animation: bubbleRise 1.5s ease-out forwards;
}

@keyframes bubbleRise {
    0% {
        opacity: 0.6;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.3);
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .features-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .feature-card {
        padding: 2rem;
    }

    .word-field {
        gap: 0.7rem;
        padding: 1rem;
    }

    .undo-word {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .deep-quote {
        padding: 1.5rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }
}

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

    .section-headline,
    .deep-headline,
    .cta-headline {
        font-size: 1.8rem;
    }

    .feature-title {
        font-size: 1.2rem;
    }
}
