/* RESET AND BASE */
:root {
    --color-orange: #de6e27;
    --color-bg: #3c1e10;
    --color-text: #ebdcc9;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-wide: 'Syncopate', sans-serif;
    --font-serif: 'Playball', cursive;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    cursor: none;
}

/* BACKGROUND WEBGL */
.form-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(40px); /* Suavizar o fundo */
    transform: scale(1.1);
}

#form-fluid-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* PROGRESS BAR */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.05);
    z-index: 100;
}

.form-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-orange);
    transition: width 0.4s ease-out;
}

/* BACK BUTTON */
.form-back {
    position: fixed;
    top: 2rem;
    right: 2rem;
    color: var(--color-text);
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
}

.form-back:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* CONTAINER */
.form-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10vw;
}

.form-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

body.success-state .form-content {
    max-width: 1100px;
}

/* QUESTION WRAPPER */
.question-wrapper {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.question-wrapper.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* QUESTION TEXT */
.question-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-orange);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.question-text {
    font-family: var(--font-wide);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
    margin: 0 0 2.5rem 0;
    color: var(--color-text);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
}

/* INPUTS */
.input-container {
    margin-bottom: 3rem;
    width: 100%;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    font-size: 2rem;
    padding: 1rem 0;
    color: var(--color-orange);
    transition: border-color 0.3s;
    font-family: var(--font-sans);
    appearance: none; /* Remove seta padrão em alguns navegadores */
}

select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23D36A29' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    padding-right: 2.5rem;
}

select.form-input option {
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1.2rem;
}

.form-input:focus {
    outline: none;
    border-bottom: 2px solid var(--color-orange);
}

.form-input::placeholder {
    color: rgba(0,0,0,0.2);
}

/* FOOTER */
.form-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-next {
    background: var(--color-orange);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-next:hover {
    background: #b85a22;
    transform: translateY(-2px);
}

.press-enter {
    font-size: 0.9rem;
    color: rgba(0,0,0,0.4);
}

.press-enter strong {
    color: var(--color-text);
}

/* ====== SUCCESS PORTFOLIO GRID ====== */
.success-portfolio {
    margin: 6rem auto 0;
    padding-top: 2rem;
    padding-bottom: 8rem;
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thank-you-message {
    padding-top: 10vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.success-portfolio__title {
    font-family: var(--font-wide);
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-orange);
    margin-bottom: 4rem;
    text-align: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.05);
    width: 100%;
}

.portfolio-card {
    position: relative;
    aspect-ratio: 16/11;
    background-color: var(--color-bg);
    overflow: hidden;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: background-color 0.4s;
    cursor: pointer;
    text-align: left; /* Keep text left aligned inside centered cards */
}

.portfolio-card:hover {
    background-color: rgba(222, 110, 39, 0.05);
}

.portfolio-card__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.3;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}

.portfolio-card:hover .portfolio-card__bg {
    transform: scale(1.1);
    opacity: 0.6;
}

.portfolio-card:hover {
    border-color: var(--color-orange);
}

.portfolio-card__num {
    font-family: var(--font-wide);
    font-size: 1.2rem;
    color: var(--color-orange);
    margin-bottom: 1.5rem;
}

.portfolio-card__title {
    font-family: var(--font-wide);
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-card__desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

body.success-state {
    overflow-y: auto !important;
}

body.success-state .form-container {
    height: auto;
    min-height: 100vh;
    display: block;
    padding-top: 10vh;
    padding-bottom: 5vh;
}

/* ====== MOBILE OPTIMIZATION ====== */
@media (max-width: 768px) {
    .form-container {
        padding: 0 5vw;
    }

    .form-content {
        padding: 40px 0;
    }

    .question-wrapper {
        min-height: 400px;
        padding: 2.5rem 1.5rem;
    }

    #q-number {
        font-size: 0.8rem;
        margin-bottom: 2rem;
    }

    #q-text {
        font-size: 1.8rem !important; /* Force smaller size on mobile */
        line-height: 1.2;
    }

    .reveal-success {
        display: block;
        margin-bottom: 0.5rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 1rem;
        padding: 0.8rem 0;
    }

    .btn-next {
        width: 100%;
        text-align: center;
        padding: 1rem 0;
    }

    .success-portfolio {
        margin-top: 4rem;
    }

    .success-portfolio__title {
        font-size: 0.6rem;
        margin-bottom: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem; /* More space on mobile for clarity */
        background: transparent;
        border: none;
    }

    .portfolio-card {
        padding: 2.5rem 1.5rem;
        border: 1px solid rgba(255,255,255,0.05);
    }

    .portfolio-card__num {
        font-size: 1rem;
    }

    .portfolio-card__title {
        font-size: 0.8rem;
    }

    body.success-state .form-container {
        padding-top: 5vh;
    }
}

@media (max-height: 700px) {
    .form-content {
        padding-top: 2rem;
    }
}
/* ====== SUCCESS STATE ANIMATIONS ====== */
.shimmer-link {
    position: relative;
    overflow: hidden;
}

.shimmer-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

.pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
    text-shadow: 0 0 0px var(--color-orange);
}

@keyframes pulse-glow {
    0%, 100% { 
        text-shadow: 0 0 0px var(--color-orange);
        opacity: 0.9;
    }
    50% { 
        text-shadow: 0 0 15px var(--color-orange);
        opacity: 1;
    }
}

/* ====== CIRCLED EMPHASIS ====== */
.circled {
    position: relative;
    display: inline-block;
}

.circled::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 105%;
    height: 140%;
    transform: translate(-50%, -45%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 450 150'%3E%3Cpath d='M10,75c0,0,10-60,215-60c205,0,215,60,215,60s-10,60-215,60C10,135,10,75,10,75z' fill='none' stroke='%23de6e27' stroke-width='6' stroke-linecap='round' stroke-linejoin='round' stroke-dasharray='1200' stroke-dashoffset='1200'%3E%3Canimate attributeName='stroke-dashoffset' from='1200' to='0' dur='1.5s' fill='freeze' begin='1.2s'/%3E%3C/path%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

/* SUCCESS BUTTON */
.btn-success-main {
    background: var(--color-text);
    color: var(--color-bg);
    padding: 1.2rem 3rem;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-radius: 50px;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-success-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.success-hero-text br {
    display: block;
}

@media (max-width: 768px) {
    .success-hero-text br {
        display: none;
    }
}

.animated-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    width: 0;
    margin: 3rem auto 2rem;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.animated-divider.active {
    width: 100%;
}


/* FINAL MOBILE REFINEMENTS */
@media (max-width: 768px) {
    body, html {
        cursor: auto !important;
        overflow-y: auto !important;
    }
    .cursor {
        display: none !important;
    }
    .form-container {
        padding: 0 1.5rem !important;
        align-items: flex-start !important;
        padding-top: 15vh !important;
    }
    .question-text {
        font-size: 1.5rem !important;
        letter-spacing: 1px !important;
        margin-bottom: 2rem !important;
    }
    .form-input {
        font-size: 1.4rem !important;
    }
    .form-input::placeholder {
        color: rgba(235, 220, 201, 0.3) !important;
    }
    .press-enter {
        display: none !important;
    }
    .form-back {
        top: 1.5rem !important;
        right: 1.5rem !important;
    }
}
