:root {
    --color-primary: #f4b000;
    --color-primary-dark: #e39b00;
    --color-secondary: #111827;
    --color-secondary-light: #1f2933;
    --color-bg-light: #f5f7fb;
    --color-bg-dark: #020617;
    --color-text: #111827;
    --color-text-light: #e5e7eb;
    --color-danger: #dc2626;

    --radius-lg: 1.25rem;
    --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.28);

    --container-width: 1120px;

    /* Escala tipográfica fluida.
       Cada tamanho cresce com a largura da tela entre um mínimo legível
       no celular e um máximo controlado no desktop. */
    --fs-xs: clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
    --fs-sm: clamp(0.82rem, 0.79rem + 0.15vw, 0.90rem);
    --fs-base: clamp(0.94rem, 0.90rem + 0.18vw, 1.03rem);
    --fs-lead: clamp(1.02rem, 0.96rem + 0.28vw, 1.18rem);
    --fs-h3: clamp(1.08rem, 1.00rem + 0.38vw, 1.28rem);
    --fs-h2: clamp(1.45rem, 1.15rem + 1.45vw, 2.25rem);
    --fs-h1: clamp(1.95rem, 1.42rem + 2.45vw, 3.40rem);

    /* Escala de espaçamento em passos de 4px. */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;
    --sp-8: 4rem;

    /* Respiro lateral e espaço reservado ao botão flutuante. */
    --gutter: 1.5rem;
    --espaco-botao-flutuante: 5.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--color-text);
    background: #ffffff;
    overflow-x: hidden;
}

/* Foco visível em tudo que é operável pelo teclado. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Imagens responsivas em todo o site */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */

.container {
    width: 100%;
    max-width: var(--container-width);
    padding: 0 var(--gutter);
    margin: 0 auto;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

/* Logo maior */
.logo img {
    height: 52px;
}

/* Nav */

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.2s ease-out;
}

.main-nav a:hover::after {
    width: 100%;
}

.nav-phone a {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: background 0.2s, color 0.2s, transform 0.1s;
}

.nav-phone a:hover {
    background: var(--color-primary);
    color: #111827;
    transform: translateY(-1px);
}

/* Mobile nav button */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;   /* centraliza os traços no círculo */
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 18px;
    background: #e5e7eb;
    border-radius: 999px;
}

/* HERO – IMAGEM DE FUNDO */

.hero {
    position: relative;
    min-height: 88vh;
    /* svh evita o salto de altura quando a barra do navegador móvel some. */
    min-height: 88svh;
    color: #f9fafb;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(244, 176, 0, 0.24), transparent 55%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.96)),
        url("../img/hero-bg-desktop.jpg") center/cover no-repeat;
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: var(--sp-6);
    align-items: center;
    /* O atalho padding com 0 nas laterais anulava o respiro do .container
       e o texto do hero encostava na borda da tela. */
    padding: var(--sp-8) var(--gutter) var(--sp-7);
}

.hero-kicker {
    margin: 0;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #e5e7eb;
    opacity: 0.9;
}

.hero h1 {
    font-size: var(--fs-h1);
    line-height: 1.12;
    /* O balanceamento evita linha órfã com uma palavra só. */
    text-wrap: balance;
    margin: var(--sp-3) 0 var(--sp-4);
}

.hero h1 span {
    color: var(--color-primary);
}

.hero-subtitle {
    max-width: 34rem;
    font-size: var(--fs-lead);
    line-height: 1.55;
    color: #e5e7eb;
    opacity: 0.92;
    margin: 0;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin: var(--sp-6) 0 var(--sp-5);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
}

.hero-badges span {
    padding: 0.35rem 0.85rem;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-image img {
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

/* FAIXA CTA ABAIXO DO HERO */

.section-cta-bar {
    background: #020617;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.9rem 0;
}

.cta-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-bar-inner p {
    margin: 0;
    font-size: var(--fs-sm);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.1s ease-out, box-shadow 0.15s ease-out, background 0.15s;
}

.btn-primary {
    background: var(--color-primary);
    color: #1f2933;
    box-shadow: 0 10px 25px rgba(180, 83, 9, 0.5);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
    background: transparent;
}

.btn-outline:hover {
    background: rgba(15, 23, 42, 0.85);
}

.btn-outline-light {
    border: 1px solid rgba(249, 250, 251, 0.7);
    color: #f9fafb;
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(249, 250, 251, 0.1);
}

.btn-whatsapp {
    background: #22c55e;
    color: #022c22;
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.6);
}

.btn-whatsapp:hover {
    background: #16a34a;
}

.btn-full {
    width: 100%;
}

/* Sections */

.section {
    padding: clamp(2.75rem, 1.6rem + 4.2vw, 4.5rem) 0;
}

.section-light {
    background: var(--color-bg-light);
}

.section-dark {
    background: var(--color-bg-dark);
    color: #e5e7eb;
}

.section-highlight {
    background: linear-gradient(120deg, #020617, #111827);
    color: #f9fafb;
}

.section-header {
    text-align: center;
    margin-bottom: var(--sp-6);
}

.section-header h2 {
    font-size: var(--fs-h2);
    line-height: 1.2;
    text-wrap: balance;
    margin: 0 0 var(--sp-3);
}

.section-header p {
    margin: 0;
    font-size: var(--fs-base);
    color: #5b6472;
}

.section-dark .section-header p {
    color: #9ca3af;
}

/* Grid helpers */

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--sp-6);
    align-items: center;
}

/* Sobre */

.sobre-text h2 {
    font-size: var(--fs-h2);
    line-height: 1.2;
    margin: 0 0 var(--sp-4);
}

.sobre-text h2 span {
    color: var(--color-primary);
}

.sobre-text p {
    margin: 0 0 var(--sp-4);
}

.icon-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

.icon-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.section-dark .icon-list li {
    color: #d1d5db;
}

.icon-list i {
    color: var(--color-primary);
}

/* Serviços */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-5);
    margin-bottom: var(--sp-7); /* espaço antes dos botões */
}

.service-card {
    background: #020617;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
}

.service-card img {
    width: 100%;
}

.service-content {
    padding: var(--sp-5) var(--sp-5) var(--sp-6);
}

.service-content h3 {
    margin-top: 0;
    margin-bottom: var(--sp-3);
    font-size: var(--fs-h3);
    line-height: 1.3;
}

.service-content p {
    margin: 0;
    font-size: var(--fs-base);
    color: #a8b0bd;
}

/* Espaço adequado abaixo dos cards de serviços */
.section-cta {
    margin-top: var(--sp-4);
    padding-top: var(--sp-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

/* GALERIA / PORTFÓLIO FULL LARGURA */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--sp-3);
}

.gallery-grid {
    /* só semântica; usa o mesmo layout da portfolio-grid */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: zoom-in;
    border: 1px solid #e5e7eb;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease-out;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* LIGHTBOX */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2000;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 960px;
    width: 100%;
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
}

.lightbox-caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

/* Highlight section */

.highlight-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-6);
}

.highlight-inner h2 {
    font-size: var(--fs-h2);
    line-height: 1.22;
    text-wrap: balance;
    margin: 0 0 var(--sp-3);
}

.highlight-phone {
    font-size: clamp(1.45rem, 1.1rem + 1.5vw, 1.9rem);
    font-weight: 700;
    margin: var(--sp-2) 0 var(--sp-3);
}

.highlight-inner p {
    max-width: 28rem;
    margin: 0;
    color: #d1d5db;
}

.highlight-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    flex-shrink: 0;
}

/* Contato com textura */

.section-contato-bg {
    position: relative;
    overflow: hidden;
    /* Sem isolation o pseudo-elemento com z-index negativo escapava para o
       fundo da página e a textura nunca aparecia. */
    isolation: isolate;
}

.section-contato-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Textura montada em CSS. A imagem antiga referenciada aqui
       (contato-textura.jpg) não existe no servidor e devolvia 404. */
    background:
        radial-gradient(circle at 12% 18%, rgba(244, 176, 0, 0.16), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(59, 130, 246, 0.12), transparent 46%),
        repeating-linear-gradient(135deg, rgba(148, 163, 184, 0.05) 0 2px, transparent 2px 9px),
        linear-gradient(135deg, #020617, #0b1220);
    z-index: -1;
}

.contato-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--sp-6);
    align-items: flex-start;
}

.contato-info h2 {
    font-size: var(--fs-h2);
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: var(--sp-3);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 1.2rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
}

.contact-list a {
    color: inherit;
    text-decoration: none;
}

.contact-list i {
    width: 22px;
    text-align: center;
    color: var(--color-primary);
}

.contato-extra {
    color: #d1d5db;
}

.contato-form .card {
    background: rgba(2, 6, 23, 0.95);
    border-radius: var(--radius-lg);
    padding: var(--sp-6) var(--sp-5);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-soft);
}

.form-group {
    margin-bottom: var(--sp-4);
}

label {
    display: block;
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-1);
}

input,
select,
textarea {
    width: 100%;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 0.7rem 0.85rem;
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    /* Sem herdar a fonte, o textarea caía no monoespaçado padrão
       do navegador e destoava do resto do formulário. */
    font-family: inherit;
    font-size: var(--fs-base);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #8b94a3;
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(244, 180, 0, 0.35);
}

textarea {
    resize: vertical;
}

.form-note {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.form-feedback {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.6);
    color: #bbf7d0;
    font-size: 0.9rem;
}

/* Footer */

.site-footer {
    background: #020617;
    color: #9ca3af;
    padding: 2.5rem 0 1.5rem;
    border-top: 1px solid rgba(30, 64, 175, 0.6);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.footer-brand img {
    height: 38px;
    margin-bottom: 0.4rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-links a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-links a i {
    font-size: 1.1rem;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-copy {
    font-size: 0.8rem;
    text-align: right;
}

.dev-credit .dev-link {
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 500;
}

.dev-credit .dev-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}


/* WhatsApp floating */

.whatsapp-floating {
    position: fixed;
    right: 1.6rem;
    bottom: 1.6rem;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #22c55e;
    color: #022c22;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 30px rgba(5, 150, 105, 0.7);
    text-decoration: none;
    z-index: 999;
}

.whatsapp-floating i {
    font-size: 1.5rem;
}

/* Animations on scroll */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVO */

/* Tablet deitado e notebooks pequenos. */
@media (max-width: 1100px) {
    .hero-content {
        gap: var(--sp-5);
    }

    .hero-image img {
        max-width: 360px;
    }
}

@media (max-width: 960px) {
    .hero {
        min-height: 0;
    }

    .hero-content {
        grid-template-columns: minmax(0, 1fr);
        padding: var(--sp-7) var(--gutter) var(--sp-6);
    }

    /* A imagem do hero ficava escondida em tablet e celular, e o bloco
       inteiro virava só texto. Agora ela aparece abaixo do conteúdo. */
    .hero-image {
        display: block;
    }

    .hero-image img {
        max-width: 100%;
        max-height: 300px;
        object-fit: cover;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .grid-2,
    .contato-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .highlight-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .highlight-buttons {
        width: 100%;
    }
}

/* MOBILE: usa outra imagem no hero */
@media (max-width: 768px) {

    .hero {
        min-height: 80vh;
        background:
            radial-gradient(circle at top left, rgba(244, 176, 0, 0.24), transparent 55%),
            linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.96)),
            url("../img/hero-bg-mobile.jpg") center/cover no-repeat;
    }

    .logo img {
        height: 46px;
    }

    .main-nav {
        position: absolute;
        top: 72px;
        right: 0;
        left: 0;
        background: #020617;
        border-bottom: 1px solid rgba(15, 23, 42, 0.9);
        padding: 0 1.5rem 1rem;
        display: none;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
    }

    .nav-phone a {
        width: 100%;
        justify-content: center;
    }

    .nav-toggle {
        display: flex;
    }

    .section {
        padding: 3.2rem 0;
    }

    .services-grid {
        grid-template-columns: minmax(0, 1fr);
        margin-bottom: 2.5rem;
    }

    .portfolio-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-copy {
        text-align: left;
    }

    .highlight-inner p {
        max-width: 100%;
    }

    .cta-bar-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cta-bar-inner .btn {
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .hero-image img {
        max-height: 230px;
    }

    .contato-form .card {
        padding: var(--sp-5) var(--sp-4);
    }

    /* Reserva espaço para o botão flutuante do WhatsApp não cobrir
       o fim do rodapé. */
    .site-footer {
        padding-bottom: var(--espaco-botao-flutuante);
    }
}

/* Celulares estreitos. */
@media (max-width: 560px) {
    :root {
        --gutter: 1.15rem;
    }

    .hero-badges {
        gap: var(--sp-1);
    }

    .hero-badges span {
        font-size: var(--fs-xs);
        padding: 0.3rem 0.7rem;
    }

    .logo img {
        height: 40px;
    }

    .whatsapp-floating {
        right: 1.1rem;
        bottom: 1.1rem;
        width: 50px;
        height: 50px;
    }

    .section-cta,
    .section-cta .btn {
        width: 100%;
    }

    .lightbox-close {
        top: 8px;
        right: 8px;
    }
}

/* Telas muito largas: o conteúdo ganha um pouco mais de área. */
@media (min-width: 1440px) {
    :root {
        --container-width: 1220px;
    }
}

/* Respeita quem pediu menos movimento no sistema. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}
