:root {
    --paper: #f3eadb;
    --paper-soft: #fff8ec;
    --ink: #11110f;
    --muted: #71695d;
    --line: rgba(17, 17, 15, 0.14);
    --blue: #073cff;
    --blue-dark: #061756;
    --green: #d7ff46;
    --rail: 232px;
    --radius: 34px;
    --title: 'Archivo Black', sans-serif;
    --body: 'Manrope', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--paper);
    overflow-x: clip;
}

body {
    margin: 0;
    overflow-x: clip;
    background:
        radial-gradient(circle at 8% 10%, rgba(7, 60, 255, 0.16), transparent 28rem),
        radial-gradient(circle at 86% 0%, rgba(215, 255, 70, 0.22), transparent 20rem),
        linear-gradient(180deg, var(--paper-soft), var(--paper) 44%, #ede1d1);
    color: var(--ink);
    font-family: var(--body);
}

body.is-loading {
    overflow: hidden;
}

img,
video {
    max-width: 100%;
}

a {
    color: inherit;
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: var(--blue);
    color: #fff;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader__mark {
    font-family: var(--title);
    font-size: clamp(2.5rem, 10vw, 9rem);
    letter-spacing: -0.08em;
    animation: loaderPulse 1.6s ease-in-out infinite;
}

.loader__mark em {
    color: #fff;
    font-style: normal;
    font-weight: 900;
    margin-right: 0.2rem;
    display: inline-block;
}

.rail-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: var(--rail);
    height: 100vh;
    background: #2f78ff; /* Cor da última coluna para evitar vácuo */
}

.rail-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 1.2rem;
    padding-bottom: 2rem;
    overflow: visible; /* Permitir que o pseudo-elemento apareça */
    color: #fff;
    text-decoration: none;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1), filter 0.3s ease;
    width: 100%;
}

.rail-nav a:nth-child(1) { background: #061756; }
.rail-nav a:nth-child(2) { background: #0528a8; }
.rail-nav a:nth-child(3) { background: var(--blue); }
.rail-nav a:nth-child(4) { background: #2f78ff; }

/* Adiciona um "sangramento" apenas na última barra para cobrir o vácuo ao mover */
.rail-nav a:nth-child(4)::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: 40px;
    background: #2f78ff;
}

.rail-nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 38%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.rail-nav a:hover,
.rail-nav a.is-active {
    transform: translateX(-24px);
    filter: saturate(1.2);
    z-index: 5;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.35);
}

.rail-nav a:hover::before,
.rail-nav a.is-active::before {
    opacity: 1;
}

.rail-nav .rail-text {
    position: relative;
    z-index: 1;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--title);
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: -0.07em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.35;
    white-space: nowrap;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.4s ease;
}

.rail-nav a:hover .rail-text,
.rail-nav a.is-active .rail-text {
    opacity: 1;
    transform: rotate(180deg) translateY(5px);
}

.rail-logo-container {
    position: absolute;
    top: 4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 72px;
    background: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    z-index: 10;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rail-nav:hover .rail-logo-container {
    transform: translateX(-50%) scale(1.08);
}

.rail-logo-container img {
    width: 68%;
    height: auto;
    object-fit: contain;
}

.menu-button,
.mobile-menu {
    display: none;
}

/* Garante que nenhum elemento ultrapasse a largura da tela */

img, video, iframe {
    max-width: 100%;
    height: auto;
}

main,
.footer {
    padding-right: var(--rail);
}

/* Garante que o conteúdo nunca ultrapasse a tela */
body,
main {
    min-width: 0;
    width: 100%;
}

.section {
    position: relative;
    width: 100%;
    max-width: 1440px; /* Aumentado para dar mais ar em telas grandes */
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 5rem); /* Padding dinâmico nas laterais */
}

.hero {
    min-height: 100vh;
    padding-top: clamp(4rem, 8vw, 7rem);
    position: relative;
}

.hero__eyebrow,
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero__eyebrow::before,
.kicker::before {
    content: '';
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    background: currentColor;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.4rem;
}

.hero__title {
    font-family: var(--title);
    max-width: 980px;
    font-size: clamp(2.6rem, 9.4vw, 10.8rem);
    line-height: 0.76;
    letter-spacing: -0.09em;
    text-transform: uppercase;
}

.title-line {
    display: block;
    transform-origin: left bottom;
}

.title-line em {
    color: var(--blue);
    font-style: normal;
}

.hero__side {
    display: grid;
    gap: 1.1rem;
    width: min(560px, 100%);
    margin-left: auto;
    margin-top: -7.5rem;
    padding: 1rem 0 1rem 1rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.hero__side img {
    width: 92px;
}

.hero__side p,
.section-head p,
.split-copy p,
.contact__copy p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 700;
    line-height: 1.42;
    letter-spacing: -0.03em;
}

.pill-link,
.contact-form button,
.footer a[data-whatsapp] {
    display: inline-flex;
    width: fit-content;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}

.pill-link:hover,
.contact-form button:hover,
.footer a[data-whatsapp]:hover {
    transform: translateY(-3px);
    background: var(--blue);
}

.pill-link--blue {
    background: var(--blue);
}

.pill-link--blue:hover {
    background: var(--ink) !important;
}

.hero__media {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.72fr);
    gap: 1rem;
    margin-top: clamp(2rem, 5vw, 4.5rem);
    align-items: end;
}

.hero__media > video,
.hero__photo {
    overflow: hidden;
    border-radius: var(--radius);
    background: #d7cdbc;
    box-shadow: 0 30px 90px rgba(54, 45, 34, 0.2);
}

.hero__media > video,
.hero__media > .media-fill {
    width: 100%;
    aspect-ratio: 16 / 7; /* Mais horizontal para ficar "pequena" */
    object-fit: cover;
    max-height: 50vh;
}

.hero__photo {
    margin-bottom: -3rem;
}

.hero__photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.ticker {
    width: 110%;
    left: -5%;
    margin-right: calc(var(--rail) * -1);
    overflow: hidden;
    background: var(--blue);
    color: #fff;
    transform: rotate(-1.15deg) scale(1.02);
    transform-origin: center;
    position: relative;
    z-index: 2;
}

.ticker__track {
    display: flex;
    width: max-content;
    gap: 1rem;
    padding: 1.05rem 0;
    font-family: var(--title);
    font-size: clamp(2rem, 5vw, 5rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
    text-transform: uppercase;
    animation: tickerMove 28s linear infinite;
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.5fr);
    gap: 3rem;
    align-items: end;
    margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.head-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.small-logo-about {
    width: clamp(240px, 25vw, 400px);
    height: auto;
    display: block;
    border-radius: 48px;
    box-shadow: 0 30px 90px rgba(0,0,0,0.1);
}

.contact-side {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
}

.contact-logo-small {
    width: 220px;
    height: auto;
}

.section-head .kicker {
    grid-column: 1 / -1;
}

.section-head h2,
.split-copy h2,
.contact__copy h2,
.footer h2 {
    margin: 0;
    font-family: var(--title);
    font-size: clamp(3rem, 7.4vw, 7.8rem);
    line-height: 0.84;
    letter-spacing: -0.078em;
    text-transform: uppercase;
}

.section-head h2 em,
.split-copy h2 em {
    color: var(--blue);
    font-style: normal;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.project-card {
    position: relative;
    grid-column: span 5;
    min-height: 420px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #d8cebf;
    box-shadow: 0 24px 70px rgba(54, 45, 34, 0.16);
    cursor: pointer;
    isolation: isolate;
}

.project-card--wide {
    grid-column: span 7;
}

.project-card--tall {
    min-height: 620px;
}

.project-card video {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1), filter 0.35s ease;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.68));
    z-index: 1;
}

.project-card:hover video {
    transform: scale(1.06);
    filter: saturate(1.1) contrast(1.06);
}

.project-card > div {
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.1rem;
    z-index: 2;
    color: #fff;
}

.project-card h3 {
    margin: 0;
    font-family: var(--title);
    font-size: clamp(2rem, 4vw, 4.6rem);
    line-height: 0.85;
    letter-spacing: -0.08em;
    text-transform: uppercase;
}

.project-card p {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.view-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    display: grid;
    width: 4.7rem;
    height: 4.7rem;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    opacity: 0;
    transform: scale(0.55) rotate(-12deg);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-card:hover .view-badge {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.about {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(3rem, 8vw, 10rem);
    align-items: start;
}

.about h2 {
    font-size: clamp(2.5rem, 6vw, 6rem);
    z-index: 3;
}

.split-copy {
    position: sticky;
    top: 6rem;
    z-index: 5;
    display: grid;
    gap: 1.5rem;
    padding-right: 2rem; /* Espaço extra para não encostar na foto */
}

.photo-collage {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(10, minmax(0, 60px));
    gap: 0; /* Gap zero para facilitar o overlap via grid-column/row */
    align-items: start;
    padding-top: 4rem;
    padding-left: 4rem;
}

.collage-item {
    margin: 0;
    overflow: hidden;
    border-radius: 24px;
    background: #d7cdbc;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
    position: relative;
    opacity: 0;
    transform: scale(0);
}

.collage-item.is-visible {
    animation: popcornLoop 8s ease-in-out infinite;
}

@keyframes popcornLoop {
    0%, 100% { transform: scale(0); opacity: 0; }
    10% { transform: scale(1.05); opacity: 1; }
    45% { transform: scale(1); opacity: 1; }
    55% { transform: scale(0); opacity: 0; }
}

.collage-item:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
    animation-play-state: paused;
}

.collage-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collage-item--a {
    grid-column: 1 / span 8;
    grid-row: 1 / span 7;
    z-index: 1;
}
.collage-item--a.is-visible { 
    animation-delay: 0.2s;
    --rot: -2deg;
}

.collage-item--b {
    grid-column: 7 / span 6;
    grid-row: 2 / span 5;
    z-index: 2;
}
.collage-item--b.is-visible { 
    animation-delay: 1.5s;
    --rot: 3deg;
}

.collage-item--c {
    grid-column: 2 / span 5;
    grid-row: 6 / span 5;
    z-index: 3;
}
.collage-item--c.is-visible { 
    animation-delay: 3s;
    --rot: -3deg;
}

.collage-item--d {
    grid-column: 6 / span 6;
    grid-row: 6 / span 4;
    z-index: 4;
}
.collage-item--d.is-visible { 
    animation-delay: 4.5s;
    --rot: 2deg;
}

/* Ajuste no keyframes para incluir a rotação variável */
@keyframes popcornLoop {
    0%, 100% { transform: scale(0) rotate(var(--rot, 0deg)); opacity: 0; }
    10% { transform: scale(1.1) rotate(var(--rot, 0deg)); opacity: 1; }
    15%, 45% { transform: scale(1) rotate(var(--rot, 0deg)); opacity: 1; }
    55% { transform: scale(0) rotate(var(--rot, 0deg)); opacity: 0; }
}

/* --- TEAM 3D SNAKE SECTION --- */
.team-3d {
    position: relative;
    height: 400vh; /* Revertido para fotos da equipe */
    background: var(--paper);
}

.team-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    perspective: 1200px;
    padding-left: clamp(2rem, 6vw, 6rem);
}

.team-copy {
    position: relative;
    z-index: 10;
    max-width: 480px;
    padding-right: 2rem;
}

.team-copy h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
    margin: 1rem 0 2rem;
    text-transform: uppercase;
    font-family: var(--title);
}

.team-copy h2 em {
    color: var(--blue);
    font-style: normal;
}

.team-scene {
    position: absolute;
    right: 0;
    top: 0;
    width: 60vw;
    height: 100vh;
    transform-style: preserve-3d;
    pointer-events: none;
}

.team-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(260px, 24vw, 400px);
    aspect-ratio: 3 / 4; 
    margin: 0;
    margin-top: calc(clamp(260px, 24vw, 400px) * -0.66);
    margin-left: calc(clamp(260px, 24vw, 400px) * -0.5);
    will-change: transform, opacity;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translate3d(0, 0, -2000px);
    overflow: hidden;
    border-radius: 12px;
}

.team-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-river {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    width: min(1240px, calc(100% - 4rem));
    height: 760px;
    margin: 0 auto;
    overflow: hidden;
    mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
}

.river-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.river-column img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 16px 45px rgba(54, 45, 34, 0.13);
}

.river-column--up {
    animation: riverUp 30s linear infinite;
}

.river-column--down {
    animation: riverDown 30s linear infinite;
}

.image-river:hover .river-column {
    animation-play-state: paused;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 1rem;
}

.service-card,
.process-list article,
.contact-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 248, 236, 0.74);
    box-shadow: 0 24px 70px rgba(54, 45, 34, 0.12);
    backdrop-filter: blur(14px);
}

.service-card {
    display: flex;
    min-height: 520px;
    flex-direction: column;
    padding: 1.4rem;
    transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.service-card:hover,
.process-list article:hover {
    transform: translateY(-9px);
}

.service-card span,
.process-list span {
    color: var(--blue);
    font-family: var(--title);
    font-size: 0.95rem;
}

.service-card h3,
.process-list h3 {
    margin: 1.2rem 0 0.7rem;
    font-size: clamp(1.3rem, 1.6vw, 1.8rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.service-card p,
.process-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.service-card ul {
    margin: auto 0 0;
    padding: 0;
    list-style: none;
}

.service-card li {
    padding: 0.72rem 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.process-list {
    display: grid;
    gap: 0.8rem;
}

.process-list article {
    display: grid;
    grid-template-columns: 70px minmax(180px, 0.28fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1.2rem;
    transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.process-list h3 {
    margin: 0;
}

.process {
    padding-bottom: 2rem;
}

.proof {
    display: grid;
    gap: 3rem;
    padding-top: 2rem;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.metrics div {
    padding-left: 1rem;
    border-left: 1px solid var(--line);
}

.metrics strong {
    display: block;
    color: var(--blue);
    font-family: var(--title);
    font-size: clamp(3rem, 6vw, 7rem);
    line-height: 0.85;
    letter-spacing: -0.08em;
}

.metrics span {
    display: block;
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.feedback-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.feedback-strip img {
    width: 100%;
    aspect-ratio: 3 / 4.5;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(54, 45, 34, 0.14);
}

.contact {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(380px, 0.58fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
    position: relative;
}

.contact__copy {
    display: grid;
    align-content: center;
    gap: 1.2rem;
}

.contact__copy h2 {
    max-width: 760px;
    font-size: clamp(3.2rem, 6.4vw, 7rem);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: min-content;
    gap: 1rem;
    align-content: start;
    align-items: start;
    padding: 1.2rem;
}

.contact-form label {
    display: grid;
    align-content: start;
    align-self: start;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.contact-form .full,
.contact-form button {
    grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: 20px;
    outline: 0;
    background: rgba(255, 255, 255, 0.68);
    color: var(--ink);
    font: 700 1rem var(--body);
    padding: 1rem;
    display: block;
}

.contact-form textarea {
    min-height: 190px;
    resize: vertical;
}

.contact-form button {
    width: fit-content;
    min-width: 180px;
    height: 58px;
    align-self: start;
}

.contact-cta {
    position: absolute;
    right: 3rem;
    bottom: 5rem; /* Movido para a parte inferior direita */
    z-index: 5;
    transform: rotate(-5deg);
}

@media (max-width: 1100px) {
    .contact-cta {
        position: static;
        margin-top: 2.5rem;
        transform: none;
    }
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--blue);
    color: #fff;
    padding: 1.2rem 2rem;
    border-radius: 24px;
    border: 3px solid #fff; /* Estilo Sticker */
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.cta-badge:hover {
    transform: scale(1.05) translateY(-5px);
    background: var(--blue-dark);
}

.cta-badge__icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: grid;
    place-items: center;
}

.cta-badge__icon svg {
    width: 24px;
    height: 24px;
}

.cta-badge__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.cta-badge__text span {
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    opacity: 0.8;
}

.cta-badge__text strong {
    font-family: var(--title);
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.footer {
    display: grid;
    grid-template-columns: 1fr repeat(3, auto);
    align-items: end;
    gap: clamp(1.5rem, 4vw, 4rem);
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 4rem clamp(1.5rem, 5vw, 5rem);
    padding-right: calc(var(--rail) + 2rem);
    border-top: 1px solid var(--line);
}

.footer > div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: right;
    white-space: nowrap;
}

.footer > div:first-child {
    margin-right: auto; /* Empurra os outros para a direita */
    text-align: left;
}

.footer h2 {
    font-size: clamp(3.2rem, 7vw, 8rem);
}

.footer span {
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.footer p,
.footer a:not([data-whatsapp]) {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
}



.media-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.media-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.media-modal__content {
    width: min(1200px, 100%);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.media-modal video,
.media-modal img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 30px 90px rgba(0,0,0,0.5);
}

.media-modal__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 9001;
    transition: transform 0.2s ease;
}

.media-modal__close:hover {
    transform: scale(1.1) rotate(90deg);
}


.reveal {
    opacity: 0;
    transform: translateY(42px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.partners {
    width: calc(100% + var(--rail));
    margin-right: calc(var(--rail) * -1);
    padding: 6rem 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.partners .section-head {
    max-width: 1440px;
    margin: 0 auto 4rem auto;
    padding: 0 clamp(1.5rem, 5vw, 5rem);
}

.partners__track {
    display: flex;
    width: max-content;
    gap: 5rem;
    align-items: center;
    animation: partnersScroll 120s linear infinite; 
}

.partner-logo {
    height: 140px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.partner-logo:hover {
    transform: scale(1.15);
}

.partner-logo img {
    height: 100%;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    border-radius: 24px; 
}

@keyframes partnersScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes tickerMove {
    to { transform: translateX(-50%); }
}

@keyframes riverUp {
    to { transform: translateY(-50%); }
}

@keyframes riverDown {
    from { transform: translateY(-50%); }
    to { transform: translateY(0); }
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.96); opacity: 0.72; }
}

@media (max-width: 1100px) {
    :root {
        --rail: 0px;
    }

    .rail-nav {
        display: none;
    }

    main,
    .footer {
        padding-right: 0;
    }

    /* Botão Menu: fixo no TOPO DA PÁGINA (scroll junto), não flutuante na tela */
    .menu-button {
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 1200;
        display: inline-flex;
        min-height: 48px;
        align-items: center;
        border: 0;
        border-radius: 999px;
        background: var(--ink);
        color: #fff;
        font-weight: 900;
        letter-spacing: 0.12em;
        padding: 0 1.2rem;
        text-transform: uppercase;
        font-size: 0.8rem;
    }

    .mobile-menu {
        position: fixed;
        inset: 0;
        z-index: 1100;
        display: grid;
        place-content: center;
        gap: 1rem;
        background: var(--blue);
        color: #fff;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu a {
        font-family: var(--title);
        font-size: clamp(2.5rem, 10vw, 6rem);
        letter-spacing: -0.08em;
        text-align: center;
        text-decoration: none;
        text-transform: uppercase;
    }

    .ticker,
    .partners {
        width: 100vw;
    }

    .image-river {
        width: min(1240px, calc(100% - 4rem));
    }

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

    .hero__side {
        max-width: 560px;
        margin-top: 0;
        margin-left: 0;
        padding-left: 0;
    }

    .hero__media {
        grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.62fr);
    }

    .service-grid,
    .metrics,
    .feedback-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .section-head,
    .about,
    .contact {
        grid-template-columns: 1fr;
    }

    /* Ajustes Mobile para Team 3D */
    .team-sticky {
        padding-left: clamp(1rem, 5vw, 2rem);
        align-items: flex-start;
        padding-top: 6rem;
    }

    .team-copy {
        max-width: 90%;
        padding-right: 0;
    }

    .team-scene {
        width: 100vw;
        right: auto;
        left: 0;
    }

    .split-copy {
        position: relative;
        top: auto;
    }

    .photo-collage {
        padding-top: 0;
    }

    /* CORREÇÃO: remove padding-right residual do main no mobile */
    main,
    .footer {
        padding-right: 0 !important;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
}

.head-side {
    display: grid;
    gap: clamp(2.5rem, 6vw, 5rem);
    align-content: end;
}

.clock-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.clock {
    width: clamp(200px, 25vw, 300px);
    aspect-ratio: 1;
    border: 5px solid var(--ink);
    border-radius: 50%;
    position: relative;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.clock__marks {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-conic-gradient(
        from -0.5deg,
        var(--ink) 0deg 0.7deg,
        transparent 0.7deg 30deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent 93%, white 93.1%);
    mask: radial-gradient(farthest-side, transparent 93%, white 93.1%);
    border-radius: 50%;
}

.clock__hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    background: var(--blue);
    transform-origin: bottom center;
    border-radius: 20px;
    z-index: 2;
}

.clock__hand--hour {
    width: 8px;
    height: 30%;
    animation: rotateHand 12s linear infinite;
}

.clock__hand--minute {
    width: 5px;
    height: 42%;
    background: var(--ink);
    animation: rotateHand 2s linear infinite;
}

.clock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    background: var(--blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    border: 3px solid #fff;
}

@keyframes rotateHand {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

.clock-cta__text {
    font-family: var(--title) !important;
    font-size: 2rem !important;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1 !important;
    color: var(--blue) !important;
    margin: 0 !important;
    max-width: 400px;
}

@media (max-width: 1000px) {
    .clock {
        width: 180px;
    }
    .clock-cta__text {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 820px) {
    :root {
        --radius: 22px;
    }

    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    body {
        background:
            radial-gradient(circle at 16% 2%, rgba(7, 60, 255, 0.14), transparent 18rem),
            linear-gradient(180deg, var(--paper-soft), var(--paper) 48%, #ede1d1);
    }

    .menu-button {
        top: 0.75rem;
        right: 0.75rem;
        min-height: 44px;
        padding: 0 0.9rem;
        font-size: 0.72rem;
    }

    .section {
        width: 100%;
        max-width: 100%;
        padding: clamp(3rem, 12vw, 4.8rem) 1.1rem;
        box-sizing: border-box;
    }

    /* Footer e image-river também com largura total */
    .footer,
    .image-river {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .image-river {
        width: calc(100% - 2.2rem);
        margin-left: 1.1rem;
        margin-right: 1.1rem;
    }

    .hero {
        min-height: auto;
        padding-top: 5.25rem;
    }

    .hero__eyebrow,
    .kicker {
        font-size: 0.66rem;
        letter-spacing: 0.12em;
    }

    .hero__title {
        max-width: 100%;
        font-size: clamp(3rem, 17vw, 5.4rem);
        line-height: 0.82;
        letter-spacing: -0.06em;
        overflow-wrap: anywhere;
    }

    .hero__side {
        width: 100%;
        gap: 1rem;
    }

    .hero__side p,
    .section-head p,
    .split-copy p,
    .contact__copy p {
        font-size: 1rem;
        line-height: 1.48;
        letter-spacing: -0.015em;
    }

    .hero__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .pill-link,
    .contact-form button,
    .footer a[data-whatsapp] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: 48px;
        padding: 0.85rem 1rem;
        text-align: center;
        letter-spacing: 0.1em;
    }

    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .project-card,
    .project-card--wide,
    .project-card--tall {
        grid-column: auto !important;
        grid-row: auto !important;
        min-height: 240px !important;
    }

    .project-card > div {
        left: 0.7rem !important;
        right: 0.7rem !important;
        bottom: 0.8rem !important;
    }

    .project-card h3 {
        font-size: clamp(0.9rem, 4.5vw, 1.2rem) !important;
        letter-spacing: 0 !important;
        line-height: 1 !important;
    }

    .project-card p {
        font-size: 0.6rem !important;
        margin-top: 0.2rem !important;
    }

    .view-badge {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 0.65rem;
    }

    .head-side,
    .contact-side {
        align-items: center !important;
        text-align: center !important;
    }

    .small-logo-about,
    .contact-logo-small {
        margin: 0 auto !important;
    }

    .hero__media {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin-top: 2rem;
    }

    .hero__media > video {
        aspect-ratio: 4 / 5;
    }

    .hero__photo img {
        aspect-ratio: 4 / 3;
    }

    .ticker {
        left: 0;
        width: 100%;
        margin-right: 0;
        transform: none;
        margin-top: 4rem;
    }

    .ticker__track {
        font-size: clamp(1.8rem, 12vw, 3.5rem);
        padding: 0.8rem 0;
    }

    .section-head {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .section-head h2,
    .split-copy h2,
    .contact__copy h2,
    .footer h2 {
        font-size: clamp(2.2rem, 9vw, 3.8rem);
        line-height: 0.95;
        letter-spacing: -0.05em;
        word-break: break-word;
    }

    .work-grid,
    .service-grid,
    .metrics,
    .feedback-strip {
        gap: 0.85rem;
    }

    .project-card,
    .project-card--wide,
    .project-card--tall {
        min-height: auto;
        aspect-ratio: 4 / 5;
    }

    .project-card h3 {
        font-size: clamp(1.9rem, 10vw, 3.1rem);
        line-height: 0.92;
    }

    .view-badge {
        width: 3.8rem;
        height: 3.8rem;
        opacity: 1;
        transform: none;
    }

    .about {
        gap: 2rem;
    }

    .split-copy {
        padding-right: 0;
    }

    .photo-collage {
        display: none;
    }



    .team-3d {
        height: auto;
        padding: 3rem 1rem;
    }

    .team-sticky {
        position: relative;
        top: auto;
        height: auto;
        display: grid;
        gap: 1.2rem;
        overflow: visible;
        padding: 0;
        perspective: none;
    }

    .team-copy {
        max-width: none;
        padding: 0;
    }

    .team-copy h2 {
        font-size: clamp(2.4rem, 12vw, 4rem);
        margin: 0.8rem 0 1.2rem;
    }

    .team-scene {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        transform-style: flat;
        pointer-events: auto;
    }

    .team-card {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        margin: 0;
        opacity: 1;
        transform: none;
        border-radius: var(--radius);
    }

    .image-river {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        height: 700px;
        gap: 0.8rem;
        margin: 2.5rem 0;
        padding: 0 0.8rem;
        overflow: hidden;
        mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    }

    .river-column {
        gap: 0.8rem;
        display: flex;
        flex-direction: column;
    }

    .river-column--up {
        animation: riverUp 20s linear infinite;
    }

    .river-column--down {
        animation: riverDown 20s linear infinite;
    }

    .river-column:nth-child(n + 3) {
        display: none;
    }

    .river-column img {
        border-radius: 18px;
        width: 100%;
        height: auto;
    }

    .service-card {
        min-height: auto;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .service-card h3 {
        margin-top: 0.5rem;
    }

    .service-card ul {
        margin-top: 1rem;
    }

    .head-side,
    .clock-cta {
        gap: 1rem;
    }

    .clock-cta {
        margin-bottom: 0;
        align-items: center;
    }

    .clock {
        width: min(58vw, 180px);
    }

    .clock-cta__text {
        max-width: 260px;
        text-align: center;
    }

    .process-list article {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        padding: 1.5rem;
        align-items: flex-start;
    }

    .process-list h3 {
        margin-top: 0.2rem;
    }

    .process-list p {
        font-size: 0.95rem;
    }

    .metrics div {
        padding: 1rem 0 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .feedback-strip img {
        border-radius: var(--radius);
    }

    .contact {
        gap: 1.5rem;
    }

    .contact-form {
        padding: 1rem;
        border-radius: var(--radius);
    }

    .contact-form input,
    .contact-form textarea {
        min-height: 54px;
        border-radius: 16px;
    }

    .partners {
        width: 100%;
        margin-right: 0;
        padding: 3rem 0;
    }

    .partners .section-head {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .partners__track {
        gap: 2.2rem;
    }

    .partner-logo {
        height: 90px;
    }

    .partner-logo img {
        max-width: 180px;
        border-radius: 14px;
    }

    .footer {
        width: 100%;
        gap: 2.5rem;
        padding: 4rem 1.1rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .footer > div,
    .footer > div:first-child {
        margin: 0;
        text-align: left;
        white-space: normal;
    }

    .footer h2 {
        margin-bottom: 1rem;
    }

    .media-modal {
        padding: 1rem;
    }

    .media-modal__close {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        padding: 1rem;
    }

    .mobile-menu a {
        font-size: clamp(2rem, 12vw, 3.5rem);
        line-height: 0.9;
    }

    .hero__title {
        font-size: clamp(2.4rem, 14vw, 4rem);
    }

    .section-head h2,
    .split-copy h2,
    .contact__copy h2,
    .footer h2 {
        font-size: clamp(1.8rem, 10vw, 2.8rem);
    }

    .hero__media > video,
    .project-card,
    .project-card--wide,
    .project-card--tall {
        aspect-ratio: 3 / 4;
    }

    .team-scene {
        grid-template-columns: 1fr;
    }

    .image-river {
        height: 480px;
    }

    .metrics strong {
        font-size: clamp(2.2rem, 14vw, 3.5rem);
    }
}
