:root {
    --bg: #f4f1ec;
    --surface: #ece7df;
    --surface-strong: #ddd6cc;
    --text: #262421;
    --muted: #6c6761;
    --line: rgba(38, 36, 33, 0.14);
    --header-bg: rgba(244, 241, 236, 0.94);
    --white: #ffffff;
    --black: #111111;
    --max-width: 1440px;
    --header-height: 78px;
    --ease: cubic-bezier(.2,.7,.2,1);
    --font-body: "Helvetica Neue", Arial, sans-serif;
    --font-subtitle: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

header.site-header,
body > header {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.header-content {
    width: min(calc(100% - 48px), var(--max-width));
    min-height: var(--header-height);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    flex: 0 0 auto;
    min-width: 52px;
}

.logo img {
    width: clamp(64px, 5.5vw, 82px);
    height: auto;
    max-height: 40px;
    object-fit: contain;
    object-position: left center;
}

.brand-fallback {
    display: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.18em;
}

.logo.is-fallback .brand-fallback {
    display: inline-block;
}

.header-content nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(16px, 2.5vw, 36px);
    margin: 0;
    padding: 0;
}

.header-content nav a {
    text-decoration: none;
    font-family: var(--font-subtitle);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    transition: opacity .25s ease;
}

.header-content nav a:hover,
.header-content nav a:focus-visible {
    opacity: .56;
}

/* HERO */
.hero {
    position: relative;
    min-height: clamp(560px, 80vh, 900px);
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    background: #252525;
}

.hero-slideshow,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slideshow {
    z-index: -3;
}

.hero-slideshow .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity 1.4s ease, transform 7s linear;
}

.hero-slideshow .slide.is-active {
    opacity: .52;
    transform: scale(1.06);
}

.hero-overlay {
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(7, 7, 7, .48), rgba(7, 7, 7, .58)),
        linear-gradient(90deg, rgba(7, 7, 7, .20), rgba(7, 7, 7, .05));
}

.hero-content {
    width: min(calc(100% - 48px), 1180px);
    padding: 110px 0 120px;
    color: var(--white);
    text-align: center;
}

.hero-content h1 {
    margin: 0;
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.7rem, 9vw, 8.5rem);
    font-weight: 400;
    line-height: .92;
    letter-spacing: -.045em;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.hero-logo {
    width: clamp(300px, 48vw, 620px);
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.hero-content p {
    max-width: 700px;
    margin: 24px auto 0;
    color: var(--white);
    font-family: var(--font-subtitle);
    font-size: clamp(.9rem, 1.65vw, 1.08rem);
    font-weight: 300;
    letter-spacing: .025em;
}

/* GENERAL */
.section-title {
    margin: 0;
    font-family: var(--font-subtitle);
    font-size: clamp(1.9rem, 4.1vw, 3.6rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.025em;
}

.section-kicker {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--muted);
    font-family: var(--font-subtitle);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .16em;
}

/* O QUE FAZEMOS / CAIS */
.services {
    background: var(--bg);
}

.cais-services {
    padding: clamp(80px, 10vw, 160px) 0 clamp(90px, 12vw, 180px);
    overflow: hidden;
}

.cais-services-heading {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto clamp(55px, 8vw, 110px);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.cais-services-heading p {
    max-width: 390px;
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

.cais-flow {
    position: relative;
    width: min(calc(100% - 48px), 1180px);
    margin: 0 auto;
}

.cais-flow::before {
    content: "";
    position: absolute;
    left: clamp(56px, 9vw, 125px);
    top: 7%;
    bottom: 7%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--line) 8%, var(--line) 92%, transparent);
}

.cais-service {
    position: relative;
    min-height: clamp(170px, 21vw, 270px);
    display: grid;
    grid-template-columns: clamp(120px, 20vw, 260px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 4vw, 66px);
    border-top: 1px solid var(--line);
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity .8s var(--ease), transform .9s var(--ease);
}

.cais-service.cais-animate {
    opacity: 0;
    transform: translate3d(0, 70px, 0);
}

.cais-service:first-child {
    border-top: 0;
}

.cais-service.cais-animate.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.cais-letter {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1em;
    color: #6a6661;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(7.8rem, 18vw, 15rem);
    font-weight: 400;
    line-height: .72;
    letter-spacing: -.08em;
    background: var(--bg);
    transform: translateY(0) scale(1);
    transition: transform 1s var(--ease);
}

.cais-service.cais-animate .cais-letter {
    transform: translateY(26px) scale(.96);
}

.cais-service.cais-animate.is-visible .cais-letter {
    transform: translateY(0) scale(1);
}

.cais-service-name {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}

.cais-service-name h3 {
    margin: 0;
    font-family: var(--font-subtitle);
    font-size: clamp(1.55rem, 3.4vw, 3.35rem);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -.03em;
}

.cais-service-name p {
    width: 100%;
    max-width: 580px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: .88rem;
}

/* SOBRE */
.about {
    padding: clamp(90px, 10vw, 150px) 0;
    background: #262421;
    color: #f3efe8;
}

.about-content {
    width: min(calc(100% - 48px), 980px);
    margin: 0 auto;
}

.about .section-title {
    margin-bottom: 42px;
}

.about p {
    max-width: 820px;
    margin: 0 0 20px;
    color: rgba(243, 239, 232, .78);
    font-size: clamp(.98rem, 1.5vw, 1.12rem);
    font-weight: 300;
}

/* PORTFÓLIO HOME */
.portfolio-home {
    padding: clamp(90px, 10vw, 150px) 0 0;
    background: var(--bg);
}

.portfolio-home-head {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto clamp(50px, 7vw, 90px);
}

.portfolio-home-head p {
    max-width: 560px;
    margin: 24px 0 0;
    color: var(--muted);
}

.portfolio-bands {
    border-top: 1px solid var(--line);
}

.portfolio-band {
    min-height: clamp(430px, 48vw, 670px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    overflow: hidden;
}

.portfolio-band.reverse .band-copy {
    order: 2;
}

.portfolio-band.reverse .band-media {
    order: 1;
}

.band-copy {
    padding: clamp(42px, 7vw, 100px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    transition: background-color .35s ease;
}

.portfolio-band:hover .band-copy,
.portfolio-band:focus-visible .band-copy {
    background: var(--surface);
}

.band-index {
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .14em;
}

.band-copy h3 {
    max-width: 620px;
    margin: 0;
    font-family: var(--font-subtitle);
    font-size: clamp(1.9rem, 4vw, 4.2rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.band-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.band-link::after {
    content: "→";
    font-size: 1.2rem;
    transition: transform .25s ease;
}

.portfolio-band:hover .band-link::after {
    transform: translateX(7px);
}

.band-media,
.project-media {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: var(--surface-strong);
}

.slideshow {
    position: absolute;
    inset: 0;
}

.slideshow .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.05s ease;
}

.slideshow .slide.is-active {
    opacity: 1;
}

.band-media::after,
.project-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}

/* PAGE HERO */
.page-hero {
    padding: clamp(90px, 10vw, 150px) 0 clamp(70px, 9vw, 120px);
    border-bottom: 1px solid var(--line);
}

.page-hero-inner {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
}

.page-hero h1 {
    max-width: 1100px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 6.8vw, 6.4rem);
    font-weight: 400;
    line-height: .9;
    letter-spacing: -.055em;
}

.page-hero p {
    max-width: 720px;
    margin: 32px 0 0;
    color: var(--muted);
    font-size: .98rem;
}

/* PROJECT BANDS */
.projects-list {
    background: var(--bg);
}

.project-band {
    min-height: clamp(610px, 60vw, 830px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--line);
}

.project-band.reverse .project-info {
    order: 2;
}

.project-band.reverse .project-media {
    order: 1;
}

.project-info {
    padding: clamp(46px, 6vw, 92px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-number {
    margin-bottom: 34px;
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .15em;
}

.project-info h2 {
    max-width: 650px;
    margin: 0;
    font-family: var(--font-subtitle);
    font-size: clamp(2rem, 4vw, 4.15rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.project-description {
    max-width: 650px;
    margin: 30px 0 0;
    color: #4f4b46;
    font-size: .92rem;
}

.project-meta {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.meta-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: .67rem;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.project-location {
    margin: 0;
    font-size: .94rem;
}

.tech-list {
    columns: 2;
    column-gap: 32px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.tech-list li {
    break-inside: avoid;
    padding: 7px 0 7px 14px;
    position: relative;
    color: #4f4b46;
    font-size: .88rem;
}

.tech-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted);
}

.slide-count {
    position: absolute;
    right: 24px;
    bottom: 22px;
    z-index: 5;
    padding: 7px 10px;
    color: #fff;
    background: rgba(0,0,0,.42);
    backdrop-filter: blur(8px);
    font-size: .72rem;
    letter-spacing: .08em;
}

/* PLACEHOLDER CATEGORY PAGES */
.category-placeholder {
    min-height: 56vh;
    padding: clamp(80px, 10vw, 150px) 24px;
    display: grid;
    place-items: center;
    text-align: center;
}

.category-placeholder-inner {
    max-width: 760px;
}

.category-placeholder h2 {
    margin: 0;
    font-family: var(--font-subtitle);
    font-size: clamp(1.9rem, 4vw, 3.7rem);
    font-weight: 400;
    line-height: 1.08;
}

.category-placeholder p {
    margin: 24px auto 0;
    max-width: 620px;
    color: var(--muted);
}

.text-link {
    display: inline-block;
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

/* CONTATO + FOOTER */
.contact {
    padding: clamp(85px, 10vw, 140px) 0;
    background: #ddd6cc;
}

.contact-content {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
}

.contact h2 {
    margin: 0 0 44px;
    font-family: var(--font-subtitle);
    font-size: clamp(2rem, 4.2vw, 3.65rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.025em;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.contact-item {
    padding-top: 20px;
    border-top: 1px solid rgba(38,36,33,.24);
}

.contact-item h3 {
    margin: 0 0 12px;
    font-family: var(--font-subtitle);
    font-size: .78rem;
    font-weight: 500;
}

.contact-item a {
    font-size: .9rem;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 900;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    text-decoration: none;
}

.whatsapp-float img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wa-fallback {
    display: none;
    color: white;
    font-size: .72rem;
    letter-spacing: .06em;
}

.whatsapp-float.is-fallback .wa-fallback {
    display: inline;
}

footer {
    padding: 24px;
    background: #1f1e1c;
    color: rgba(255,255,255,.68);
    text-align: center;
    font-size: .76rem;
}

footer p {
    margin: 0;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    :root {
        --header-height: 96px;
    }

    .header-content {
        width: min(calc(100% - 30px), var(--max-width));
        align-items: flex-start;
        padding: 15px 0 13px;
        gap: 16px;
    }

    .logo img {
        width: 64px;
        height: auto;
        max-height: 32px;
    }

    .header-content nav ul {
        max-width: 560px;
        gap: 10px 18px;
        flex-wrap: wrap;
    }

    .header-content nav a {
        font-size: .72rem;
    }

    .hero {
        min-height: 650px;
    }

    .cais-services-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .portfolio-band,
    .project-band {
        grid-template-columns: 1fr;
    }

    .portfolio-band {
        min-height: 0;
    }

    .band-copy,
    .portfolio-band.reverse .band-copy,
    .portfolio-band.reverse .band-media {
        order: initial;
    }

    .band-copy {
        min-height: 350px;
    }

    .band-media {
        min-height: 460px;
    }

    .project-band,
    .project-band.reverse {
        min-height: 0;
    }

    .project-band .project-info,
    .project-band.reverse .project-info {
        order: 2;
    }

    .project-band .project-media,
    .project-band.reverse .project-media {
        order: 1;
        min-height: min(75vw, 650px);
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    :root {
        --header-height: 118px;
    }

    .header-content {
        width: calc(100% - 28px);
    }

    .header-content nav ul {
        justify-content: flex-start;
        gap: 7px 14px;
    }

    .header-content nav a {
        font-size: .72rem;
    }

    .hero {
        min-height: 610px;
    }

    .hero-content {
        width: calc(100% - 34px);
        text-align: left;
    }

    .hero-logo {
        width: min(78vw, 430px);
        margin-left: 0;
    }

    .hero-content p {
        margin-left: 0;
        max-width: 520px;
    }

    .cais-services-heading,
    .cais-flow,
    .about-content,
    .portfolio-home-head,
    .page-hero-inner,
    .contact-content {
        width: calc(100% - 34px);
    }

    .cais-flow::before {
        left: 41px;
    }

    .cais-service {
        min-height: 180px;
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 18px;
    }

    .cais-letter {
        font-size: clamp(6.4rem, 31vw, 8rem);
    }

    .cais-service-name h3 {
        font-size: clamp(1.35rem, 6.5vw, 2.05rem);
    }

    .cais-service-name p {
        margin-top: 8px;
        font-size: .82rem;
    }

    .band-copy {
        min-height: 320px;
        padding: 38px 24px;
    }

    .band-copy h3 {
        font-size: clamp(1.85rem, 9vw, 2.9rem);
    }

    .band-media {
        min-height: 340px;
    }

    .project-info {
        padding: 48px 22px 56px;
    }

    .project-media,
    .project-band .project-media,
    .project-band.reverse .project-media {
        min-height: 420px;
    }

    .tech-list {
        columns: 1;
    }

    .contact {
        padding-bottom: 110px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

    .hero-slideshow .slide.is-active {
        transform: none;
    }

    .cais-service {
        opacity: 1;
        transform: none;
    }
}
