/**
 * pages.css — Emotional, storytelling-driven styles for "For You" pages
 * Inspired by feature.fm, vampr.me, hangout.fm
 * Designed for music lovers, not SaaS buyers.
 */

/* ============================================
   COLOR PALETTES PER PAGE
   ============================================ */
.friends-palette { --page-accent: #8B5CF6; --page-glow: rgba(139, 92, 246, 0.15); --page-accent-alt: #C084FC; }
.dating-palette  { --page-accent: #F43F5E; --page-glow: rgba(244, 63, 94, 0.15); --page-accent-alt: #FB7185; }
.concerts-palette { --page-accent: #F97316; --page-glow: rgba(249, 115, 22, 0.15); --page-accent-alt: #FDBA74; }
.community-palette { --page-accent: #06B6D4; --page-glow: rgba(6, 182, 212, 0.15); --page-accent-alt: #67E8F9; }
.collab-palette { --page-accent: #A3E635; --page-glow: rgba(163, 230, 53, 0.15); --page-accent-alt: #D9F99D; }
.discover-palette { --page-accent: #EC4899; --page-glow: rgba(236, 72, 153, 0.15); --page-accent-alt: #F9A8D4; }

/* ============================================
   PAGE HERO — Full viewport, atmospheric
   ============================================ */
.page-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 50% 30%, var(--page-glow, rgba(124,58,237,0.15)) 0%, transparent 70%),
                var(--color-navy, #0F172A);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    will-change: transform;
    animation: glow-drift 15s ease-in-out infinite alternate;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--page-accent, #7C3AED);
    top: -15%;
    left: -15%;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: #EC4899;
    bottom: -15%;
    right: -15%;
    animation-delay: -7s;
    animation-duration: 18s;
}

/* Third glow for extra depth */
.glow-3 {
    width: 350px;
    height: 350px;
    background: var(--page-accent-alt, #C084FC);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    animation-delay: -3s;
    animation-duration: 20s;
}

@keyframes glow-drift {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-eyebrow {
    display: inline-block;
    color: var(--page-accent, #A3E635);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

.page-hero-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1.15;
    color: #F1F5F9;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s;
}

.highlight-text {
    background: linear-gradient(135deg, var(--page-accent, #7C3AED), #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #94A3B8;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.6s;
}

/* Hero CTA buttons — appear after title and subtitle */
.page-hero .btn-hero-primary,
.page-hero .btn-hero-secondary {
    opacity: 0;
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.85s;
}

.page-hero .btn-hero-secondary {
    animation-delay: 0.95s;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   INFINITE SCROLL MARQUEE (à la hangout.fm)
   ============================================ */
.marquee-section {
    overflow: hidden;
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-item {
    flex-shrink: 0;
    padding: 0 3rem;
    font-family: 'Righteous', cursive;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.marquee-item:hover {
    color: var(--page-accent, rgba(139, 92, 246, 0.4));
}

.marquee-divider {
    flex-shrink: 0;
    color: var(--page-accent, #7C3AED);
    opacity: 0.2;
    padding: 0 1rem;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   NARRATIVE SECTION — The emotional story
   ============================================ */
.narrative-section {
    padding: 6rem 24px;
    background: var(--color-navy, #0F172A);
}

.narrative-container {
    max-width: 700px;
    margin: 0 auto;
}

.narrative-block {
    margin-bottom: 3rem;
}

.narrative-large {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 300;
    color: #CBD5E1;
    line-height: 1.6;
}

.narrative-accent {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #F1F5F9;
    line-height: 1.3;
}

.narrative-accent em {
    font-style: normal;
    background: linear-gradient(135deg, var(--page-accent, #7C3AED), #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.narrative-body {
    font-size: 1.15rem;
    color: #94A3B8;
    line-height: 1.9;
}

.narrative-body strong {
    color: #E2E8F0;
}

.narrative-pullquote {
    margin: 4rem 0;
    padding: 2.5rem;
    border-left: none;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(236, 72, 153, 0.03));
    border-radius: 20px;
    border: 1px solid rgba(124, 58, 237, 0.12);
    position: relative;
}

.narrative-pullquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 24px;
    font-family: 'Righteous', cursive;
    font-size: 4rem;
    color: var(--page-accent, #7C3AED);
    opacity: 0.3;
    line-height: 1;
}

.narrative-pullquote blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: #CBD5E1;
    line-height: 1.8;
    margin: 0;
}

/* ============================================
   IMMERSIVE SECTION — Features reimagined
   ============================================ */
.immersive-section {
    padding: 6rem 24px;
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
}

.immersive-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 4rem;
}

.section-eyebrow {
    display: inline-block;
    color: var(--page-accent, #A3E635);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.immersive-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    color: #F1F5F9;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.immersive-sub {
    font-size: 1.1rem;
    color: #94A3B8;
    line-height: 1.7;
}

/* Feature flow — vertical timeline with hover depth */
.feature-flow {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
}

.feature-flow::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--page-accent, #7C3AED) 10%, var(--page-accent, #7C3AED) 90%, transparent);
    opacity: 0.3;
}

.flow-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    border-radius: 16px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(8px);
}

.flow-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--page-accent, #A3E635);
    position: relative;
    z-index: 1;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-item:hover .flow-icon {
    background: var(--page-glow, rgba(124, 58, 237, 0.15));
    border-color: var(--page-accent, #7C3AED);
    transform: scale(1.15);
    box-shadow: 0 0 20px var(--page-glow, rgba(124, 58, 237, 0.2));
}

.flow-content h3 {
    font-size: 1.15rem;
    color: #F1F5F9;
    margin-bottom: 0.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.flow-item:hover .flow-content h3 {
    color: var(--page-accent-alt, #C084FC);
}

.flow-content p {
    color: #94A3B8;
    line-height: 1.7;
    font-size: 1rem;
}

.flow-content em {
    color: #CBD5E1;
    font-style: italic;
}

/* ============================================
   RARITY SHOWCASE — Layered card (feature.fm style)
   ============================================ */
.rarity-showcase {
    max-width: 550px;
    margin: 0 auto;
    perspective: 1000px;
}

.rarity-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rarity-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(124, 58, 237, 0.15);
    border-color: rgba(139, 92, 246, 0.35);
}

.rarity-tag {
    display: inline-block;
    background: linear-gradient(135deg, #7C3AED, #EC4899);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
}

.rarity-text {
    font-size: 1.1rem;
    color: #E2E8F0;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.rarity-stat {
    font-size: 0.9rem;
    color: #64748B;
}

/* ============================================
   VOICES — Testimonials with hover lift (hangout.fm style)
   ============================================ */
.voices-section {
    padding: 6rem 24px;
    background: var(--color-navy, #0F172A);
}

.voices-header {
    text-align: center;
    margin-bottom: 3rem;
}

.voices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.voice-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.voice-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--page-glow, rgba(124,58,237,0.05)), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.voice-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.voice-card:hover::after {
    opacity: 1;
}

.voice-text {
    font-size: 1rem;
    color: #CBD5E1;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.voice-text strong {
    color: #F1F5F9;
    font-style: normal;
}

.voice-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.voice-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.voice-card:hover .voice-avatar {
    transform: scale(1.1);
}

.voice-name {
    display: block;
    color: #F1F5F9;
    font-weight: 600;
    font-size: 0.9rem;
}

.voice-detail {
    display: block;
    color: #64748B;
    font-size: 0.8rem;
}

/* ============================================
   FINAL CTA — Emotional close with glow pulse
   ============================================ */
.final-cta-section {
    padding: 8rem 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--color-navy, #0F172A);
}

.final-cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--page-glow, rgba(124, 58, 237, 0.12)) 0%, transparent 70%);
    animation: cta-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cta-pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.15); }
}

.final-cta-inner {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.final-cta-pre {
    font-size: 1.15rem;
    color: #94A3B8;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.final-cta-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #F1F5F9;
    margin-bottom: 2rem;
}

/* ============================================
   SCROLL REVEAL — Staggered (feature.fm style)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children in grids/flows */
.voices-grid .voice-card:nth-child(1) { transition-delay: 0s; }
.voices-grid .voice-card:nth-child(2) { transition-delay: 0.1s; }
.voices-grid .voice-card:nth-child(3) { transition-delay: 0.2s; }

.feature-flow .flow-item:nth-child(1) { transition-delay: 0s; }
.feature-flow .flow-item:nth-child(2) { transition-delay: 0.08s; }
.feature-flow .flow-item:nth-child(3) { transition-delay: 0.16s; }
.feature-flow .flow-item:nth-child(4) { transition-delay: 0.24s; }
.feature-flow .flow-item:nth-child(5) { transition-delay: 0.32s; }

/* Slide from left variant */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up variant */
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .page-hero {
        min-height: 85vh;
        padding: 100px 20px 60px;
    }

    .narrative-section {
        padding: 4rem 20px;
    }

    .narrative-block {
        margin-bottom: 2rem;
    }

    .narrative-pullquote {
        margin: 2.5rem 0;
        padding: 1.5rem;
    }

    .narrative-pullquote::before {
        font-size: 3rem;
        top: -5px;
        left: 12px;
    }

    .immersive-section {
        padding: 4rem 20px;
    }

    .feature-flow::before {
        display: none;
    }

    .flow-item {
        padding: 1rem;
    }

    .flow-item:hover {
        transform: translateX(4px);
    }

    .voices-grid {
        grid-template-columns: 1fr;
    }

    .final-cta-section {
        padding: 5rem 20px;
    }

    .final-cta-section::before {
        width: 350px;
        height: 350px;
    }

    .glow-1, .glow-2, .glow-3 {
        width: 250px;
        height: 250px;
    }

    .marquee-item {
        padding: 0 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-glow,
    .marquee-track,
    .final-cta-section::before {
        animation: none;
    }

    .reveal,
    .reveal-left,
    .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
   FAQ STYLES — Timeline dot design
   ============================================ */
.faq-chip {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #94A3B8;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-chip:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: #E2E8F0;
}

.faq-chip.active {
    background: var(--page-accent, #7C3AED);
    border-color: var(--page-accent, #7C3AED);
    color: white;
}

/* FAQ list with timeline line */
.faq-list-styled {
    position: relative;
    padding-left: 32px;
}

.faq-list-styled::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(124, 58, 237, 0.3) 5%, rgba(124, 58, 237, 0.3) 95%, transparent);
}

.faq-item {
    border: none;
    position: relative;
    margin-bottom: 0.25rem;
}

/* The dot on the timeline */
.faq-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 1.55rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #1E293B;
    border: 2px solid rgba(124, 58, 237, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.faq-item:hover::before {
    border-color: var(--page-accent, #7C3AED);
    background: var(--page-glow, rgba(124, 58, 237, 0.15));
    transform: scale(1.2);
}

.faq-item.open::before {
    background: var(--page-accent, #7C3AED);
    border-color: var(--page-accent, #7C3AED);
    box-shadow: 0 0 12px var(--page-glow, rgba(124, 58, 237, 0.4));
    transform: scale(1.2);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: #CBD5E1;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-question:hover {
    color: #F1F5F9;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.faq-item.open .faq-question {
    color: #F1F5F9;
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.15);
}

.faq-chevron {
    flex-shrink: 0;
    color: #475569;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--page-accent, #7C3AED);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
    padding: 0 1.25rem;
}

.faq-item.open .faq-answer {
    max-height: 400px;
    padding: 1rem 1.25rem 1.25rem;
}

.faq-answer p {
    color: #94A3B8;
    line-height: 1.8;
    font-size: 0.95rem;
}

.faq-answer a {
    color: var(--page-accent-alt, #C084FC);
    text-decoration: underline;
}
