/* Seção de Distração - Dopamine Trap & iPhone Animation */

.dopamine-section {
    position: relative;
    background: #ffffff !important;
    overflow: hidden;
    z-index: 100;
    /* Higher than timeline to prevent leaks */
}

:root {
    --iphone-height: min(500px, 70vh);
    --iphone-mask-h: calc(var(--iphone-height) * 0.96);
}

/* Base "animation" section from reference */
.animation-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    background: #ffffff !important;
    z-index: 101;
}

/* iPhone Masked Container */
.iphone-mask-container {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: var(--iphone-mask-h);
    /* Visible window */
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: visible;
    /* Prevent clipping the top during animation */
    z-index: 50;
}

/* iPhone Wrapper (Mask + Canvas) - User's Perfect Scale */
.iphone-wrapper {
    position: relative;
    height: var(--iphone-height);
    /* User's sweet spot */
    aspect-ratio: 1170 / 2532;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    :root {
        --iphone-height: 55vh;
    }
}

.iphone-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    object-fit: contain;
}

.iphone-canvas-container {
    position: absolute;
    top: 5%;
    /* User's Sweet Spot */
    left: 5%;
    /* User's Sweet Spot */
    right: 5%;
    /* User's Sweet Spot */
    bottom: 4%;
    /* User's Sweet Spot */
    z-index: 10;
    border-radius: 30px;
    /* Perfect match for iPhone mask */
    overflow: hidden;
    background: #ffffff;
}

#iphone-frame-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Widgets Styling from reference */
.widgets {
    position: absolute;
    z-index: 40;
    scale: 0;
    width: 80px;
    height: auto;
}


/* Text Overlay */
.dopamine-text-overlay {
    position: absolute;
    top: 8%;
    text-align: center;
    z-index: 30;
    width: 100%;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* Wrapper to be blurred */
.animation-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: filter;
}

/* Final Heading Container - Fixed in center of pinned section */
.dopamina-final-container {
    position: absolute;
    /* Relative to .animation-container which is pinned */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 100;
    /* Above everything */
    opacity: 0;
    pointer-events: none;
    text-align: center;
    width: 100%;
}

.dopamina-final-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    position: relative;
    overflow: hidden;
    background: #000;
    margin: 0;
    color: #fff;
    line-height: 0.95;
    mix-blend-mode: screen;
}

@media (max-width: 768px) {
    .dopamina-final-title {
        line-height: 0.9;
        /* Even tighter on mobile for wrapped lines */
    }
}

/* Aurora Effect Implementation */
.aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Sit ABOVE the white text */
    mix-blend-mode: darken;
    /* Only shows colors where the background (text) is white */
    pointer-events: none;
}

.aurora__item {
    overflow: hidden;
    position: absolute;
    width: 60vw;
    height: 60vw;
    background-color: #f9c836;
    /* Brand Gold */
    border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    filter: blur(2rem);
    mix-blend-mode: overlay;
}

.aurora__item:nth-of-type(1) {
    top: -50%;
    background-color: #ffffff;
    /* White brilliance */
    animation: aurora-border 6s ease-in-out infinite,
        aurora-1 12s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(2) {
    background-color: #f9c836;
    /* Primary Gold */
    right: 0;
    top: 0;
    animation: aurora-border 6s ease-in-out infinite,
        aurora-2 12s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(3) {
    background-color: #ffdb58;
    /* Light Gold */
    bottom: -50%;
    left: 0;
    animation: aurora-border 6s ease-in-out infinite,
        aurora-3 8s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(4) {
    background-color: #ffb000;
    /* Deep Amber Gold */
    right: 0;
    bottom: -50%;
    animation: aurora-border 6s ease-in-out infinite,
        aurora-4 24s ease-in-out infinite alternate;
}

@keyframes aurora-1 {
    0% {
        top: 0;
        right: 0;
    }

    50% {
        top: 100%;
        right: 75%;
    }

    75% {
        top: 100%;
        right: 25%;
    }

    100% {
        top: 0;
        right: 0;
    }
}

@keyframes aurora-2 {
    0% {
        top: -50%;
        left: 0%;
    }

    60% {
        top: 100%;
        left: 75%;
    }

    85% {
        top: 100%;
        left: 25%;
    }

    100% {
        top: -50%;
        left: 0%;
    }
}

@keyframes aurora-3 {
    0% {
        bottom: 0;
        left: 0;
    }

    40% {
        bottom: 100%;
        left: 75%;
    }

    65% {
        bottom: 40%;
        left: 50%;
    }

    100% {
        bottom: 0;
        left: 0;
    }
}

@keyframes aurora-4 {
    0% {
        bottom: -50%;
        right: 0;
    }

    50% {
        bottom: 0%;
        right: 40%;
    }

    90% {
        bottom: 50%;
        right: 25%;
    }

    100% {
        bottom: -50%;
        right: 0;
    }
}

@keyframes aurora-border {
    0% {
        border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    }

    25% {
        border-radius: 47% 29% 39% 49% / 61% 19% 66% 26%;
    }

    50% {
        border-radius: 57% 23% 47% 72% / 63% 17% 66% 33%;
    }

    75% {
        border-radius: 28% 49% 29% 100% / 93% 20% 64% 25%;
    }

    100% {
        border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    }
}

/* Blur Target for the finale */
.blur-target {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: filter;
}

/* Final Heading Container */
.dopamina-final-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    width: 100%;
}

.dopamina-final-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    position: relative;
    overflow: visible;
    background: linear-gradient(135deg,
            #f9c836 0%,
            #ffb000 33%,
            #ffdb58 66%,
            #f9c836 100%);
    background-size: 400% 400%;
    animation: aurora-text-move 8s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
    margin: 0;
    text-align: center;
}

.gold-gradient-text {
    background: linear-gradient(135deg,
            #f9c836 0%,
            #ffb000 33%,
            #ffdb58 66%,
            #f9c836 100%);
    background-size: 400% 400%;
    animation: aurora-text-move 8s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Aurora Effect Implementation */
.aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    mix-blend-mode: darken;
    pointer-events: none;
}

.aurora__item {
    overflow: hidden;
    position: absolute;
    width: 60vw;
    height: 60vw;
    background-color: #f9c836;
    border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    filter: blur(2rem);
    mix-blend-mode: overlay;
}

.aurora__item:nth-of-type(1) {
    top: -50%;
    background-color: #ffffff;
    animation: aurora-border 6s ease-in-out infinite,
        aurora-1 12s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(2) {
    background-color: #f9c836;
    right: 0;
    top: 0;
    animation: aurora-border 6s ease-in-out infinite,
        aurora-2 12s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(3) {
    background-color: #ffdb58;
    left: 0;
    bottom: 0;
    animation: aurora-border 6s ease-in-out infinite,
        aurora-3 8s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(4) {
    background-color: #ffb000;
    right: 0;
    bottom: -50%;
    animation: aurora-border 6s ease-in-out infinite,
        aurora-4 24s ease-in-out infinite alternate;
}

@keyframes aurora-1 {
    0% {
        top: 0;
        right: 0;
    }

    50% {
        top: 100%;
        right: 75%;
    }

    75% {
        top: 100%;
        right: 25%;
    }

    100% {
        top: 0;
        right: 0;
    }
}

@keyframes aurora-2 {
    0% {
        top: -50%;
        left: 0%;
    }

    60% {
        top: 100%;
        left: 75%;
    }

    85% {
        top: 100%;
        left: 25%;
    }

    100% {
        top: -50%;
        left: 0%;
    }
}

@keyframes aurora-3 {
    0% {
        bottom: 0;
        left: 0;
    }

    40% {
        bottom: 100%;
        left: 75%;
    }

    65% {
        bottom: 40%;
        left: 50%;
    }

    100% {
        bottom: 0;
        left: 0;
    }
}

@keyframes aurora-4 {
    0% {
        bottom: -50%;
        right: 0;
    }

    50% {
        bottom: 0%;
        right: 40%;
    }

    90% {
        bottom: 50%;
        right: 25%;
    }

    100% {
        bottom: -50%;
        right: 0;
    }
}

@keyframes aurora-border {
    0% {
        border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    }

    25% {
        border-radius: 47% 29% 39% 49% / 61% 19% 66% 26%;
    }

    50% {
        border-radius: 57% 23% 47% 72% / 63% 17% 66% 33%;
    }

    75% {
        border-radius: 28% 49% 29% 100% / 93% 20% 64% 25%;
    }

    100% {
        border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    }
}

.dopamine-title {
    font-size: clamp(3.5rem, 12vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
    background: linear-gradient(135deg,
            #f9c836 0%,
            #ffb000 33%,
            #ffdb58 66%,
            #f9c836 100%);
    background-size: 400% 400%;
    animation: aurora-text-move 8s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 1;
    transform: translateY(0);
    text-align: center;
    width: 100%;
    line-height: 1.1;
    padding-bottom: 0.5rem;
}

.dopamine-title[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.dopamine-title[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

.dopamine-subtitle {
    font-size: 1.1rem;
    color: hsl(var(--muted-foreground));
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
}

/* Cortex Consequence Swapper */
.swapper-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    height: 120px;
    margin-top: 1rem;
    padding: 0 1.5rem;
    /* Padding for mobile */
}

/* Static Consequences Layout */
.static-consequences {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
}

.consequences-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.consequence-line {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 700;
    color: #fff;
    opacity: 0.9;
}

.consequences-unified-container {
    opacity: 0.1;
    transform: scale(0.95);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    padding-left: 8%;
    /* Align with SVG startX */
    text-align: left;
}

.consequences-unified-container.active {
    opacity: 1;
    transform: scale(1);
}

.consequence-line i {
    color: var(--current-path-color, hsl(var(--primary)));
    width: 1.5rem;
    height: 1.5rem;
    transition: color 0.4s ease;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

.swapper-fixed {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 2rem;
    color: #fff;
    max-width: 900px;
    background: linear-gradient(to bottom, #fff, #f9c836);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .swapper-container {
        flex-direction: column;
        height: auto;
        gap: 0.5rem;
    }

    .swapper-dynamic-wrapper {
        width: 100%;
        height: 80px;
        justify-content: center;
    }

    .swapper-item {
        left: 50%;
        transform: translate(-50%, 60px);
        text-align: center;
    }

    .pain-item {
        gap: 0;
        padding-bottom: 0;
    }

    .pain-item p small {
        width: 100%;
        max-width: 100%;
        font-size: 0.7em;
    }

    .consequences-list {
        font-size: 1.2rem;
    }
}

/* Pain Timeline (Touching the Pain) */
.pain-timeline {
    --pain-color: #ff3300;
    --current-path-color: #ff3300;
    position: relative;
    width: 100%;
    background: transparent;
    padding: 0 0 0;
    /* Removed top padding to align title with start */
    overflow: hidden;
}

.pain-timeline .timeline-path-backer {
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 7;
    /* Reduced from 15 */
    fill: none;
}

.pain-timeline .timeline-path-filler {
    stroke: var(--current-path-color, hsl(var(--primary)));
    stroke-width: 7;
    /* Reduced from 15 */
    fill: none;
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px var(--current-path-color, hsla(var(--primary), 0.8)));
    transition: stroke 0.4s ease, filter 0.4s ease;
}

.pain-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    text-align: center;
    padding-top: 2rem;
    margin-bottom: 8rem;
    color: #fff;
}

.pain-item {
    width: 100%;
    display: flex;
    align-items: center;
    /* Vertical centering */
    gap: 1.5rem;
    padding: 0 10%;
    margin-bottom: 20vh;
    /* Controlled gap */
    padding-bottom: 100px;
    /* Space for the path tip */
    opacity: 0.4;
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
    z-index: 10;
}

.pain-item.active {
    opacity: 1;
    transform: scale(1.05);
}

.pain-item.left {
    justify-content: flex-start;
    text-align: left;
    flex-direction: row;
}

.pain-item.right {
    justify-content: flex-end;
    text-align: right;
    flex-direction: row-reverse;
}

.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    color: var(--current-path-color, #ffb300);
    transition: color 0.4s ease;
    flex-shrink: 0;
}

.item-icon i {
    width: 100%;
    height: 100%;
    stroke-width: 1.25;
}

.pain-item p {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #fff;
    max-width: 800px;
    line-height: 1.3;
}

.pain-item p small {
    display: block;
    font-size: 0.65em;
    font-weight: 500;
    color: #fff;
    opacity: 0.5;
    margin-top: 0.8rem;
    line-height: 1.4;
    max-width: 60%;
    /* Force line breaks */
}

.pain-item.active p {
    color: #fff;
}

.pain-item.right p small {
    margin-left: auto;
    /* Align to right for right-side items */
}

/* Cortex Section */
.cortex-title {
    font-size: clamp(3rem, 12vw, 8.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    position: relative;
    overflow: visible;
    /* Changed from hidden to avoid clipping shadows */
    background: linear-gradient(135deg,
            #ffffff 0%,
            #f9c836 25%,
            #ffb000 50%,
            #ffdb58 75%,
            #ffffff 100%);
    background-size: 400% 400%;
    animation: aurora-text-move 8s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    padding: 0.2rem 0;
    margin: 0;
    line-height: 1.1;
    z-index: 5;
    display: inline-block;
    width: 100%;
}

@keyframes aurora-text-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Unificação da Seção de Dor/Hábitos */
.pain-timeline {
    position: relative;
    padding-top: 5rem;
    padding-bottom: 0;
    overflow: hidden;
}

/* Os estilos individuais das linhas legadas (.manifesto-line-container) foram removidos 
   em favor do unificado .timeline-svg-container da .pain-timeline */

.manifesto-cards-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 15vh;
}

.manifesto-card-item {
    display: flex;
    width: 100%;
}

.manifesto-card-item.left {
    justify-content: flex-start;
    padding-right: 52%;
}

.manifesto-card-item.right {
    justify-content: flex-end;
    padding-left: 52%;
}

.manifesto-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    position: relative;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.1;
    transform: translateY(30px) scale(0.95);
}

.manifesto-card-item.active .manifesto-card {
    opacity: 1;
    transform: translateY(0) scale(1.05);
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.swapper-container {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swapper-img,
.swapper-icon {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.5) rotate(-20deg);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.swapper-img.active,
.swapper-icon.active {
    opacity: 1;
    transform: scale(1.1) rotate(0deg);
}

.swapper-icon {
    color: hsl(var(--primary));
}

.manifesto-card h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.manifesto-card p {
    font-size: 1.15rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.62;
    margin: 0;
}

.manifesto-card.no-icon {
    padding-top: 3.5rem;
}

@media (max-width: 992px) {

    .manifesto-card-item.left,
    .manifesto-card-item.right {
        padding: 0;
        justify-content: center;
    }

    .manifesto-line-container {
        display: none;
    }
}

.feature-card-item {
    opacity: 0.2;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card-item.active {
    opacity: 1;
    transform: scale(1);
}

/* Golden Border Activation for Community Cards */
.feature-card-item.active .feature-card {
    border-color: hsl(var(--primary));
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 30px hsl(var(--primary) / 0.2);
}

.feature-card-item.active .card-border-glow {
    opacity: 1;
}

.feature-card-item.active .pilar-icon {
    background: hsl(var(--primary) / 0.2);
    border-color: hsl(var(--primary) / 0.4);
    transform: scale(1.1);
}