/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    --primary-red: #CC1D24;
    --primary-red-hover: #b0181e;
    --bg-dark: #090909;
    --bg-darker: #050505;
    --bg-card: #151515;
    --text-main: #E5E5E5;
    --text-muted: #888888;
    --border-color: #2a2a2a;

    --font-sans: 'IBM Plex Sans', sans-serif;
    --font-condensed: 'IBM Plex Sans Condensed', sans-serif;

    --container-width: 1280px;
    --spacing-xl: 120px;
    --spacing-lg: 80px;
    --spacing-md: 40px;
    --spacing-sm: 20px;

    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Typography (Font Faces)
   ========================================================================== */
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/IBMPlexSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/IBMPlexSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Condensed';
    src: url('../fonts/IBMPlexSansCondensed-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Condensed';
    src: url('../fonts/IBMPlexSansCondensed-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Condensed';
    src: url('../fonts/IBMPlexSansCondensed-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: initial;
    /* Managed by Lenis */
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    will-change: transform;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 520px;
    padding: 80px 0 60px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0px 20px;
    background-color: var(--primary-red);
    border: none;
    color: #fff;
    font-family: var(--font-condensed);
    font-size: 2.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 25px;
    border-radius: 0;
    line-height: 1.5;
}

.hero-title {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #fff;
}

.hero-title strong {
    font-weight: 700;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin-bottom: 25px;
    line-height: 1.45;
}

.hero-subtitle strong {
    color: #fff;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 0;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary-red);
    color: #fff;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
}

.btn-primary:hover::before {
    left: 100%;
}

/* ==========================================================================
   Main Content Wrapper (Sections 2 and 3)
   ========================================================================== */
.main-content-wrapper {
    position: relative;
    background-color: #f6f6f6;
    /* Shared background color */
    overflow: hidden;
    /* Contains the absolute background */
}

.decor-bg {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background-image: url('../imgs/rodape@150x.png');
    background-size: cover;
    background-position: left center;
    z-index: 1;
}

.shared-decor {
    width: 31%;
    /* Extended further left to leave a small white stripe next to the grey form box */
}

/* ==========================================================================
   Access Section (New Section 2)
   ========================================================================== */
.access-section {
    position: relative;
    padding: var(--spacing-xl) 0 102px 0;
    z-index: 2;
    background-image: url('../imgs/bg_second.jpg');
    background-size: cover;
    background-position: center;
}

.access-container {
    position: relative;
    /* Removed flex properties so left column takes full width */
}

.access-content {
    max-width: 100%;
    padding-right: 350px;
    /* Space for the floating reactor */
    position: relative;
    z-index: 5;
}

.access-title-wrapper {
    background-color: var(--primary-red);
    display: inline-block;
    padding: 0 20px;
    margin-bottom: 40px;
}

.access-title {
    color: #fff;
    font-family: var(--font-condensed);
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
}

.access-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    width: calc(100% + 180px);
    /* Extend list lines right up to the tower */
}

.access-list li {
    display: flex;
    align-items: center;
    padding: 22px 0;
    border-bottom: 2px solid #d4d4d4;
    /* Thicker lines as requested */
    color: #222;
    /* Darker text */
    font-size: 1.55rem;
    /* Larger font */
    font-weight: 500;
}

.access-icon {
    width: 55px;
    height: 55px;
    margin-right: 22px;
    flex-shrink: 0;
}

.access-warning {
    background-color: var(--primary-red);
    color: #fff;
    padding: 30px 45px 30px 30px;
    display: flex;
    align-items: flex-start;
    clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
    position: relative;
    width: calc(100% + 100px);
    /* Adjusted so the diagonal cut is fully visible in front of the tower */
    z-index: 5;
}

.warning-icon {
    width: 55px;
    height: 55px;
    margin-right: 20px;
    flex-shrink: 0;
}

.warning-text-content p {
    margin: 0 0 12px 0;
    font-size: 1.35rem;
    line-height: 1.45;
}

.warning-text-content p:last-child {
    margin-bottom: 0;
    max-width: 680px;
    /* Limits width to match paragraph 1's boundary */
}

.access-reactor {
    position: absolute;
    right: -20px;
    /* Shifted left so tower overlaps the red box horizontally */
    top: -40px;
    /* Maintains clean white space at top */
    z-index: 10;
    /* Make sure tower is above the warning box */
    pointer-events: none;
    /* Let clicks pass through if needed */
}

.reactor-image {
    max-height: 880px;
    /* Large tower size, extending down past red box */
    width: auto;
    object-fit: contain;
}



/* ==========================================================================
   Form Section (New Section 3)
   ========================================================================== */
.form-section {
    position: relative;
    background-color: transparent;
    padding: 0;
    z-index: 2;
}

.form-decor {
    width: 35%;
    z-index: 1;
}

.form-logo-wrapper {
    position: absolute;
    right: 0;
    bottom: 0px;
    z-index: 5;
}

.form-logo {
    width: 300px;
    height: auto;
}

.form-container {
    position: relative;
    z-index: 2;
    display: flex;
    padding-top: 0;
    /* Flush against section 2 */
    padding-bottom: var(--spacing-xl);
}

.teee-form-wrapper {
    width: 100%;
}

.form-box {
    background-color: #888888;
    color: #fff;
    width: calc(92% + (100vw - 100%) / 2);
    margin-left: calc((100% - 100vw) / 2);
    padding: 50px 50px 30px calc(50px + (100vw - 100%) / 2);
    clip-path: polygon(0 0, 100% 0, 81.5% 100%, 0 100%);
}

.form-box h2 {
    font-family: var(--font-condensed);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
}

.form-desc {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
    max-width: 690px;
    margin-left: auto;
    margin-right: auto;
}

.form-desc:last-of-type {
    margin-bottom: 40px;
}

.teee-form {
    max-width: 940px;
    margin: 0;
}

.form-group-flat {
    margin-bottom: 15px;
}

/* Cascaded widths to align inputs right up close to the right slanted border */
.input-step-1 {
    width: 100%;
}

.input-step-2 {
    width: 97.2%;
}

.input-step-3 {
    width: 94.4%;
}

.input-step-4 {
    width: 91.6%;
}

.input-step-5 {
    width: 88.8%;
}

.input-step-6 {
    width: 86%;
}

.form-group-flat input {
    width: 100%;
    background-color: #fff;
    border: none;
    padding: 15px 20px;
    font-family: var(--font-condensed);
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-red);
    text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
}

.form-group-flat input::placeholder {
    color: var(--primary-red);
    opacity: 1;
}

.form-group-flat input:focus {
    outline: 2px solid var(--primary-red);
}

.form-submit-wrapper {
    text-align: center;
    margin-top: 40px;
}

.btn-flat {
    background-color: var(--primary-red);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-family: var(--font-condensed);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.btn-flat:hover {
    background-color: #b3161c;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
    .access-content {
        padding-right: 0;
    }

    .access-list {
        width: 100%;
    }

    .access-list li {
        font-size: 1.25rem;
    }

    .access-warning {
        width: 100%;
        clip-path: none;
        padding: 20px;
    }

    .form-box {
        width: 100%;
        margin-left: 0;
        padding: 40px 20px;
        clip-path: none;
    }

    .form-group-flat {
        width: 100% !important;
    }

    .form-group-flat input {
        clip-path: none !important;
    }

    .form-logo {
        width: 90px;
    }

    .warning-text-content p {
        font-size: 1.1rem;
    }

    .warning-text-content p:last-child {
        max-width: 100%;
    }

    .warning-text-content br {
        display: none;
    }

    .access-section {
        position: relative;
        overflow: hidden;
    }

    .access-content {
        position: relative;
        z-index: 5;
        padding-right: 0;
    }

    .access-reactor {
        position: absolute;
        top: 20px;
        right: 0;
        transform: translateX(80%);
        /* 80% hides off-screen right, only 20% left edge visible */
        width: 380px;
        height: 100%;
        max-height: none;
        z-index: 1;
        opacity: 0.85;
        pointer-events: none;
    }

    .reactor-image {
        height: 100%;
        max-height: 700px;
        width: auto;
        object-fit: contain;
        object-position: top left;
    }

    .reactor-content,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-bg-decor {
        width: 100%;
        opacity: 0.3;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xl: 80px;
        --spacing-lg: 60px;
    }

    .access-list {
        width: 100%;
        padding-right: 80px;
        /* Keeps list text clear of the tower on the right */
    }

    .access-list li {
        font-size: 1.05rem;
        padding: 14px 0;
    }

    .access-icon {
        width: 40px;
        height: 40px;
        margin-right: 14px;
    }

    .access-section {
        position: relative;
        overflow: hidden;
    }

    .access-reactor {
        position: absolute;
        top: auto;
        bottom: 0;
        right: 0;
        width: 580px;
        /* Larger scale for taller tower */
        transform: translateX(80%);
        /* 80% hides off-screen right, only 20% left edge visible */
        height: auto;
        z-index: 1;
        opacity: 0.85;
        pointer-events: none;
    }

    .reactor-image {
        width: 100%;
        height: auto;
        max-height: 850px;
        /* Taller tower height */
        object-fit: contain;
        object-position: bottom left;
    }

    .form-logo {
        width: 90px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .warning-box {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        padding: 60px 20px 40px;
    }
}

/* GSAP Initial States (to prevent FOUC) */
.hero-anim {
    opacity: 0;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* ==========================================================================
   Form Validation, Loading & Success Message Styles
   ========================================================================== */
.form-group-flat.has-error input {
    box-shadow: inset 0 0 0 2px var(--primary-red) !important;
    background-color: #fff0f0 !important;
}

.btn-flat.is-loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}

.form-success-msg {
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-red);
    border-radius: 4px;
    padding: 35px 25px;
    text-align: center;
    margin: 30px 0 10px;
    animation: successFadeIn 0.5s ease-out forwards;
}

.form-success-msg .success-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.form-success-msg h3 {
    font-family: var(--font-condensed);
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.form-success-msg p {
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.6;
    max-width: 620px;
    margin: 0 auto;
}

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}