/* 
   AESTHETIC: Editorial Organic
   DFII SCORE FOCUS: High Visual Memorability, Distinctive Typography, Purposeful Motion
*/

:root {
    /* Color Story: Earthy & Refined */
    --clr-bg: #ece9e3;          /* Warm oatmeal background */
    --clr-surface: #e4e0d9;     /* Slightly darker surface for contrast */
    --clr-text-main: #111513;   /* Deep olive/black (Higher contrast) */
    --clr-text-muted: #4a544f;  /* Muted forest (Higher contrast) */
    
    --clr-accent: #c66f44;      /* Terracotta // High contrast action */
    --clr-dark: #16241b;        /* Very dark pine */
    
    /* Typography: Structural Contrast */
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    
    /* Rhythm */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 10rem;
    --space-3xl: 14rem;
    
    /* Animation timings */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
    --duration-slow: 1.2s;
    --duration-med: 0.6s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html.smooth-scroll {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: clamp(5.75rem, 9vw, 8rem);
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-x: clip;
    text-size-adjust: 100%;
}

/* Loading Screen */
.loader {
    position: fixed;
    inset: 0;
    background-color: var(--clr-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform var(--duration-slow) var(--ease-in-out-circ);
    transform-origin: top;
}

.loader-brand {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    color: var(--clr-bg);
    text-align: center;
    animation: loaderBrandReveal 1s var(--ease-out-expo) both;
}

.loader-text {
    font-family: var(--font-heading);
    color: var(--clr-bg);
    font-size: clamp(3.25rem, 7vw, 6.5rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    line-height: 0.95;
    text-indent: 0.12em;
    animation: pulse 1.15s ease-in-out infinite alternate;
}

.loader-subtitle {
    color: rgba(236, 233, 227, 0.72);
    font-size: clamp(0.64rem, 1.2vw, 0.78rem);
    font-weight: 600;
    letter-spacing: 0.18em;
    line-height: 1;
    text-transform: uppercase;
}

.is-loaded .loader {
    transform: translateY(-100%);
}

@keyframes pulse {
    0% { opacity: 0.62; }
    100% { opacity: 1; }
}

@keyframes loaderBrandReveal {
    from { opacity: 0; transform: translateY(14px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Analog Grain Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

/* Base Typography */
h1, h2, h3, .logo-text, .editorial-title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

em {
    font-style: italic;
    font-weight: 400;
    color: var(--clr-accent);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 4.5rem); /* Fluid padding */
}

main section,
.footer {
    scroll-margin-top: clamp(5.75rem, 9vw, 8rem);
}

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

img {
    height: auto;
}

a,
button,
summary {
    -webkit-tap-highlight-color: rgba(198, 111, 68, 0.18);
}

:focus-visible {
    outline: 2px solid var(--clr-accent);
    outline-offset: 4px;
}

/* Nav */
.header {
    padding: clamp(0.85rem, 1.5vw, 1.5rem) 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 500;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid transparent;
}

/* Header Scrolled State */
.header-scrolled {
    padding-block: 0.8rem;
    background-color: rgba(236, 233, 227, 0.85); /* Fundo tipo vidro fosco baseado no bg */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(22, 36, 27, 0.1);
    padding-bottom: var(--space-xs); /* Menos espaço para caber tudo bem */
    flex-wrap: nowrap;
    gap: clamp(0.75rem, 1.8vw, 1.75rem);
}

.logo-link {
    display: inline-flex;
    padding: 0;
    background: transparent;
    border-radius: 0;
    isolation: isolate;
    transition: transform var(--duration-med) var(--ease-out-expo);
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    width: clamp(8.25rem, 12vw, 11.25rem);
    height: auto;
    display: block;
    object-fit: contain;
    filter:
        drop-shadow(0 1px 1px rgba(236, 233, 227, 0.65))
        drop-shadow(0 10px 24px rgba(0, 0, 0, 0.34));
    transform-origin: left center;
}

.main-nav {
    min-width: 0;
    margin-left: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: clamp(0.75rem, 1.6vw, 1.5rem);
    flex-wrap: nowrap;
    justify-content: center;
}

.label-link {
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-text-muted);
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.label-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--clr-text-main);
    transition: width 0.3s var(--ease-out-expo);
}

.label-link:hover::after {
    width: 100%;
}

.cta-nav {
    text-decoration: none;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--clr-dark);
    transition: color 0.3s ease;
}

.cta-nav:hover {
    color: var(--clr-accent);
}

/* Emergency Header Nav Button */
.emergency-nav {
    background-color: #d9381e; /* Red/terracotta */
    color: #ffffff;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(217, 56, 30, 0.4);
    animation: emergencyPulse 2s infinite;
    transition: transform 0.3s ease;
}

.emergency-nav::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1s infinite alternate;
}

.emergency-nav:hover {
    transform: scale(1.05);
    color: #ffffff;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    max-width: 100%;
    text-decoration: none;
    padding: 1rem 2rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    border-radius: 2px;
    transition: all 0.4s var(--ease-out-expo);
}

.button-primary {
    background-color: var(--clr-dark);
    color: var(--clr-bg);
}

.button-primary:hover {
    background-color: var(--clr-accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(198, 111, 68, 0.2);
}

.button-outline {
    border: 1px solid var(--clr-bg);
    color: var(--clr-bg);
}

.hero-actions .button-outline {
    border-color: rgba(255, 255, 255, 0.72);
    color: #ffffff;
}

.button-whatsapp {
    background-color: #25D366;
    color: #ffffff;
}

.whatsapp-icon {
    display: block;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
}

.whatsapp-icon-inline {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.button-whatsapp:hover {
    background-color: #20BA56;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.button-outline:hover {
    background-color: var(--clr-bg);
    color: var(--clr-dark);
}

/* Hero Section */
.hero {
    min-height: 100svh;
    padding-top: clamp(7rem, 10vw, var(--space-2xl));
    padding-bottom: clamp(3rem, 6vw, var(--space-xl));
    display: flex;
    align-items: center;
    position: relative;
    background:
        radial-gradient(circle at 75% 20%, rgba(198, 111, 68, 0.18), transparent 32rem),
        linear-gradient(135deg, rgba(22, 36, 27, 0.98), rgba(22, 36, 27, 0.72));
    color: #ffffff;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 901px) {
    .hero-container {
        grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
        gap: clamp(1.5rem, 3vw, var(--space-lg));
    }

    .header:not(.header-scrolled) .label-link {
        color: rgba(255, 255, 255, 0.7);
    }

    .header:not(.header-scrolled) .label-link::after {
        background: rgba(255, 255, 255, 0.9);
    }
}

@media (min-width: 901px) and (max-width: 1120px) {
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions .button {
        width: min(100%, 21rem);
    }
}

@media (min-width: 768px) and (max-width: 900px) {
    .hero {
        padding-top: 8rem;
    }

    .hero-container {
        gap: 2.5rem;
    }

    .hero-image-frame {
        max-width: min(58vw, 420px);
    }
}

.badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
    display: inline-block;
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--clr-accent);
    padding-bottom: 4px;
}

.services .badge,
.clients .badge {
    color: var(--clr-text-muted);
}

.hero-heading {
    font-size: clamp(2.85rem, 7.2vw, 5.5rem);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
    color: #ffffff;
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 460px;
    margin-bottom: var(--space-lg);
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero-right {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center; /* Modificado de flex-end centralizar verticalmente em relação ao bloco texto */
    justify-content: center;
}

.hero-image-frame {
    width: 100%;
    max-width: clamp(320px, 32vw, 400px);
    aspect-ratio: 4/5;
    background-color: var(--clr-surface);
    /* Apple squircle type radius */
    border-radius: 32px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(236, 233, 227, 0.18);
    box-shadow:
        0 46px 90px -28px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.image-overlay {
    position: absolute;
    inset: 0;
    /* Noise texture + Glassmorphism base */
    background-image: radial-gradient(rgba(0,0,0,0.03) 1px, transparent 0);
    background-size: 3px 3px;
    z-index: 1;
    /* Apple Aesthetic: borda circular limpa */
    border-radius: 32px;
}

/* Team Marquee Loop */
.team-marquee {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit; /* Vai aderir exatamente às bordas perfeitas do hero-frame */
    z-index: 2;
}

.team-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.team-track::-webkit-scrollbar {
    display: none;
}

.team-card {
    position: relative;
    width: 100%; /* Cada card agora rouba 100% da tela do slider */
    min-width: 100%; /* Trava para ocupar toda vitrine */
    height: 100%;
    background-color: var(--clr-dark);
    flex-shrink: 0;
    scroll-snap-align: center;
    overflow: hidden;
}

.team-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background:
        linear-gradient(180deg, transparent 0%, rgba(8, 13, 10, 0.18) 32%, rgba(8, 13, 10, 0.82) 100%);
    pointer-events: none;
    z-index: 2;
}

.team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transform: scale(1.015);
    transition:
        transform 1.2s var(--ease-out-expo),
        opacity 0.8s ease,
        filter 0.8s ease;
}

.team-card.is-active .team-photo {
    opacity: 1;
    filter: saturate(1.03) contrast(1.02);
    transform: scale(1.045);
}

.team-caption {
    position: absolute;
    left: clamp(1rem, 4vw, 1.35rem);
    right: clamp(1rem, 4vw, 1.35rem);
    bottom: 3rem;
    display: grid;
    gap: 0.3rem;
    color: #ffffff;
    z-index: 3;
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 0.55s ease,
        transform 0.55s var(--ease-out-expo);
}

.team-card.is-active .team-caption {
    opacity: 1;
    transform: translateY(0);
}

.team-caption span {
    width: fit-content;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.team-caption strong {
    max-width: 15rem;
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 400;
    line-height: 1.15;
    text-wrap: balance;
}

.team-dots {
    position: absolute;
    left: clamp(1rem, 4vw, 1.35rem);
    right: clamp(1rem, 4vw, 1.35rem);
    bottom: 1.1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    z-index: 6;
}

.team-dot {
    position: relative;
    min-width: 0;
    height: 18px;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: transparent;
}

.team-dot::before,
.team-dot::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    border-radius: 999px;
    transform: translateY(-50%);
}

.team-dot::after {
    background-color: rgba(255, 255, 255, 0.28);
}

.team-dot::before {
    z-index: 1;
    background-color: #ffffff;
    transform: translateY(-50%) scaleX(0);
    transform-origin: left;
}

.team-dot.is-active::before {
    transform: translateY(-50%) scaleX(1);
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition:
        background-color 0.3s var(--ease-out-expo),
        border-color 0.3s var(--ease-out-expo),
        transform 0.3s var(--ease-out-expo);
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 16px;
}

.slider-next {
    right: 16px;
}

.hero-seal {
    width: 60%;
    z-index: 2;
    /* Cortando perfeitamente a imagem em círculo para ignorar o fundo quadriculado falso */
    clip-path: circle(49% at 50% 50%);
    border-radius: 50%;
    /* Sofisticação Apple: Sombra ultra-suave descolada do objeto */
    filter: drop-shadow(0 25px 35px rgba(22, 36, 27, 0.08)) drop-shadow(0 5px 10px rgba(22, 36, 27, 0.03));
    transition: transform 0.1s linear, filter 0.4s var(--ease-out-expo);
}

.hero-seal:hover {
    filter: drop-shadow(0 35px 45px rgba(22, 36, 27, 0.12)) drop-shadow(0 8px 15px rgba(22, 36, 27, 0.04));
}

.hero-caption {
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7); /* Atualizado da paleta para dar destaque no fundo verde */
    align-self: center; /* Alterado de flex-start para center (centralizar sob a logo3D) */
    text-align: center;
}

/* Services */
.services {
    padding: var(--space-xl) 0;
    background-color: var(--clr-surface);
}

.services-header {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-xs);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--clr-text-muted);
    max-width: 500px;
    margin-inline: auto; /* Garante que o bloco fique matematicamente centralizado no container */
}

.services-list {
    border-top: 1px solid rgba(22, 36, 27, 0.1);
}

/* Service row como <details> accordion */
.service-row {
    border-bottom: 1px solid rgba(22, 36, 27, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.service-row summary {
    list-style: none;
}

.service-row summary::-webkit-details-marker {
    display: none;
}

.service-summary {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    align-items: center;
    padding: var(--space-md) 0;
    column-gap: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

@media (min-width: 768px) {
    .service-summary {
        grid-template-columns: 80px 1fr 50px;
        gap: var(--space-md);
    }
}

.service-row:hover .service-summary,
.service-row[open] .service-summary {
    background-color: var(--clr-bg);
}

/* Left accent bar when open */
.service-row[open] {
    box-shadow: inset 3px 0 0 var(--clr-accent);
    padding-left: var(--space-sm);
    transition: box-shadow 0.35s var(--ease-out-expo), padding-left 0.35s var(--ease-out-expo);
}

.service-number {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--clr-text-muted);
    padding-left: 0;
    transition: color 0.3s ease;
}

.service-row[open] .service-number {
    color: var(--clr-accent);
}

/* Title group: tag + name stacked */
.service-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.service-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--clr-text-muted);
    opacity: 0.7;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.service-row:hover .service-tag,
.service-row[open] .service-tag {
    color: var(--clr-accent);
    opacity: 1;
}

.service-name {
    font-size: clamp(1.1rem, 2.3vw, 2rem);
    transition: color 0.3s ease;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-wrap: anywhere;
}

/* Inline SVG icon within service name */
.service-icon {
    flex-shrink: 0;
    color: var(--clr-text-muted);
    transition: color 0.3s ease, transform 0.4s var(--ease-out-expo);
}

.service-row:hover .service-icon,
.service-row[open] .service-icon {
    color: var(--clr-accent);
    transform: scale(1.15);
}

/* Corpo expandido */
.service-body {
    padding: 0 0 var(--space-md) 0;
    overflow: hidden;
    animation: service-open 0.35s ease forwards;
}

@media (min-width: 768px) {
    .service-body {
        padding-left: calc(80px + var(--space-md));
        padding-right: calc(50px + var(--space-md));
    }
}

.service-body .service-lead {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2.3vw, 1.8rem);
    line-height: 1.25;
    color: var(--clr-text-main);
    max-width: 820px;
    margin-bottom: var(--space-sm);
}

/* Keyword chips */
.service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--space-md);
}

.service-chip {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--clr-accent);
    background-color: rgba(198, 111, 68, 0.08);
    border: 1px solid rgba(198, 111, 68, 0.2);
    border-radius: 100px;
    padding: 0.25rem 0.75rem;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.service-chip:hover {
    background-color: rgba(198, 111, 68, 0.15);
}

.service-dossier {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: var(--space-md);
    background-color: rgba(22, 36, 27, 0.12);
    border: 1px solid rgba(22, 36, 27, 0.12);
    border-radius: 6px;
    overflow: hidden;
}

.service-dossier-item {
    min-width: 0;
    padding: 1rem;
    background:
        linear-gradient(180deg, rgba(236, 233, 227, 0.86), rgba(228, 224, 217, 0.96));
}

.service-label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--clr-accent);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.service-body .service-dossier-item p {
    margin: 0;
    color: var(--clr-text-main);
    font-size: 0.92rem;
    line-height: 1.55;
}

.service-copy {
    max-width: 920px;
}

.service-body p {
    color: var(--clr-text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: var(--space-xs);
}

.service-copy p:last-child,
.service-body > p:last-child {
    margin-bottom: 0;
}

@keyframes service-open {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mounting Plan */
.mounting-plan {
    padding: var(--space-xl) 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(198, 111, 68, 0.18), transparent 30rem),
        linear-gradient(135deg, rgba(22, 36, 27, 0.97), rgba(22, 36, 27, 0.88)),
        var(--clr-dark);
    color: var(--clr-bg);
    overflow: hidden;
}

.mounting-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 1024px) {
    .mounting-container {
        grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
    }
}

.mounting-copy {
    max-width: 760px;
}

.mounting-copy .section-title {
    color: var(--clr-bg);
    max-width: 840px;
    text-transform: uppercase;
}

.mounting-lead {
    margin-top: var(--space-sm);
    color: rgba(236, 233, 227, 0.86);
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.35;
}

.mounting-text {
    display: grid;
    gap: 1rem;
    margin-top: var(--space-md);
    padding-left: var(--space-md);
    border-left: 2px solid var(--clr-accent);
}

.mounting-text p {
    color: rgba(236, 233, 227, 0.76);
    font-size: 1rem;
    line-height: 1.75;
}

.mounting-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background-color: rgba(236, 233, 227, 0.16);
    border: 1px solid rgba(236, 233, 227, 0.16);
    border-radius: 8px;
    box-shadow: 0 32px 80px -36px rgba(0, 0, 0, 0.65);
    overflow: hidden;
}

.mounting-stats::before {
    content: "";
    position: absolute;
    inset: -18% -16% auto auto;
    width: 55%;
    height: 60%;
    background:
        repeating-linear-gradient(
            112deg,
            rgba(198, 111, 68, 0.14) 0 1px,
            transparent 1px 18px
        );
    transform: rotate(-8deg);
    pointer-events: none;
}

.mounting-stat {
    position: relative;
    min-width: 0;
    min-height: 184px;
    padding: clamp(1rem, 3vw, 1.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(236, 233, 227, 0.1), rgba(236, 233, 227, 0.045));
    overflow: hidden;
    transition: background-color 0.35s ease, transform 0.45s var(--ease-out-expo);
}

.mounting-stat::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    height: 2px;
    background-color: var(--clr-accent);
    transform: scaleX(0.28);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out-expo);
}

.mounting-stat:hover {
    background-color: rgba(236, 233, 227, 0.12);
    transform: translateY(-4px);
}

.mounting-stat:hover::after {
    transform: scaleX(1);
}

.mounting-stat strong {
    color: var(--clr-bg);
    font-family: var(--font-heading);
    font-size: clamp(2.1rem, 5.2vw, 4.35rem);
    font-weight: 400;
    line-height: 0.9;
    overflow-wrap: anywhere;
}

.mounting-stat span:not(.mounting-stat-kicker) {
    max-width: 10rem;
    color: rgba(236, 233, 227, 0.72);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.35;
    text-transform: uppercase;
}

.mounting-stat-kicker {
    width: fit-content;
    color: var(--clr-accent);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.service-row:hover .service-name,
.service-row[open] .service-name {
    color: var(--clr-accent);
}

/* Garante que o .service-row[open] não quebre o padding-left do summary */
.service-row[open] .service-summary {
    padding-left: 0;
}

.service-arrow {
    font-size: 1.5rem;
    text-align: right;
    transition: transform 0.4s var(--ease-out-expo), color 0.3s ease;
    display: inline-block;
}

.service-row:hover .service-arrow {
    transform: translate(5px, -5px);
    color: var(--clr-accent);
}

.service-row[open] .service-arrow {
    transform: rotate(45deg);
    color: var(--clr-accent);
}

/* --- CLIENTS SECTION --- */
.clients {
    padding: var(--space-xl) 0;
    background-color: var(--clr-bg);
}

.clients-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.clients-header .badge {
    margin-bottom: var(--space-xs);
    display: inline-block;
}

.clients-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.clients-stat {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
}

.clients-stat strong {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--clr-text-main);
    font-weight: 400;
    margin-right: 0.2rem;
}

.clients-stat-sep {
    color: var(--clr-text-muted);
    opacity: 0.4;
    font-size: 1.2rem;
}

/* Grid: 1px dividers via background trick */
.clients-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background-color: rgba(22, 36, 27, 0.08);
    border: 1px solid rgba(22, 36, 27, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

@media (min-width: 600px) {
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.client-card {
    background-color: var(--clr-bg);
    padding: 1.5rem 1.25rem;
    transition: background-color 0.25s ease;
    position: relative;
    min-width: 0;
}

.client-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background-color: var(--clr-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease-out-expo);
}

.client-card:hover {
    background-color: var(--clr-surface);
}

.client-card:hover::after {
    transform: scaleX(1);
}

.client-farm {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.6rem;
    color: var(--clr-text-main);
    transition: color 0.25s ease;
    overflow-wrap: anywhere;
}

.client-card:hover .client-farm {
    color: var(--clr-accent);
}

.client-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.client-location {
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.client-location svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.client-owner {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    font-family: var(--font-heading);
    font-style: italic;
    opacity: 0.8;
    overflow-wrap: anywhere;
}

/* --- FAQ SECTION --- */
.faq {
    padding-block: var(--space-3xl);
    background-color: var(--clr-surface);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-header {
    text-align: center;
    margin-bottom: 4rem;
}

.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-block: 1.5rem;
}
.faq-item:first-of-type {
    border-top: 1px solid rgba(0,0,0,0.08);
}

.faq-question {
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none; /* remove default arrow */
    position: relative;
    padding-right: 2rem;
    color: var(--clr-dark);
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--clr-accent);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

details[open] .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    margin-top: 1.25rem;
    color: rgba(22, 36, 27, 0.65);
    line-height: 1.6;
    font-size: 1.05rem;
    padding-bottom: 0.5rem;
    animation: fadeInDown 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Editorial About Section */
.editorial-about {
    padding: var(--space-2xl) 0;
    background-color: var(--clr-dark);
    color: var(--clr-bg);
}

.editorial-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.editorial-left {
    position: relative;
}

@media (min-width: 1024px) {
    .editorial-container {
        grid-template-columns: 1fr 1.5fr;
        align-items: start;
    }
    .editorial-left {
        position: sticky;
        top: 120px;
    }
}

.editorial-title {
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--clr-bg);
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.editorial-title em {
    color: var(--clr-accent);
}

.editorial-line {
    width: 60px;
    height: 2px;
    background-color: var(--clr-accent);
}

.editorial-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-top: var(--space-xs);
}

.editorial-lead {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.3;
    font-weight: 300;
}

.editorial-lead strong {
    color: var(--clr-accent);
    font-weight: 400;
    font-style: italic;
}

.editorial-text {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: rgba(236, 233, 227, 0.95);
    max-width: 600px;
    line-height: 1.7;
}

.editorial-highlight {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clr-bg);
    margin-bottom: var(--space-sm);
    padding-left: var(--space-md);
    border-left: 2px solid var(--clr-accent);
}

.editorial-footer {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
}

/* --- FINAL CTA --- */
.final-cta {
    padding-block: var(--space-3xl);
    background-color: var(--clr-dark);
    color: var(--clr-bg);
    overflow: hidden;
    position: relative;
}

.cta-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 1024px) {
    .cta-container {
        grid-template-columns: 1.5fr 1fr;
    }
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.cta-title em {
    color: var(--clr-accent);
}

.cta-desc {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(236, 233, 227, 0.8);
    max-width: 540px;
    margin-bottom: var(--space-lg);
}

.cta-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.cta-tel {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--clr-bg);
    text-decoration: none;
    transition: color 0.3s ease;
}

.cta-tel:hover {
    color: var(--clr-accent);
}

.cta-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-bg-logo {
    width: 100%;
    max-width: 500px;
    height: auto;
    opacity: 0.15;
    filter: brightness(0) invert(1);
    transform: rotate(-15deg) scale(1.2);
}

/* --- CONTACT BASE FOOTER --- */
.footer {
    position: relative;
    overflow: hidden;
    content-visibility: visible;
    padding-block: clamp(4rem, 9vw, 8rem) var(--space-lg);
    background:
        linear-gradient(145deg, rgba(17, 21, 19, 0.98), rgba(22, 36, 27, 0.96)),
        var(--clr-dark);
    color: var(--clr-bg);
    border-top: 1px solid rgba(236, 233, 227, 0.1);
}

.footer::before {
    content: "RURAL VET";
    position: absolute;
    top: 1rem;
    right: -0.2em;
    color: rgba(236, 233, 227, 0.035);
    font-family: var(--font-heading);
    font-size: clamp(5rem, 18vw, 16rem);
    line-height: 0.8;
    letter-spacing: 0;
    white-space: nowrap;
    pointer-events: none;
}

.footer-rail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    overflow: hidden;
    background-color: rgba(236, 233, 227, 0.12);
}

.footer-rail::after {
    content: "";
    display: block;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--clr-accent), transparent);
    animation: footerRail 5s var(--ease-in-out-circ) infinite;
}

@keyframes footerRail {
    0% { transform: translateX(-110%); }
    55%, 100% { transform: translateX(230%); }
}

.footer-shell {
    position: relative;
    z-index: 1;
}

.footer-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: stretch;
    margin-bottom: clamp(2rem, 5vw, 4.5rem);
}

.footer-brand-panel,
.footer-action-panel,
.footer-card {
    border: 1px solid rgba(236, 233, 227, 0.14);
    background:
        linear-gradient(180deg, rgba(236, 233, 227, 0.08), rgba(236, 233, 227, 0.035));
    box-shadow: inset 0 1px 0 rgba(236, 233, 227, 0.08);
}

.footer-brand-panel {
    position: relative;
    min-height: 360px;
    padding: clamp(1.25rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.footer-brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -10% -22% 28%;
    height: 55%;
    background:
        repeating-linear-gradient(
            112deg,
            rgba(198, 111, 68, 0.12) 0 1px,
            transparent 1px 18px
        );
    transform: rotate(-6deg);
    opacity: 0.85;
    pointer-events: none;
}

.footer-logo-link {
    position: relative;
    display: inline-flex;
    width: fit-content;
    padding: 0;
    background: transparent;
    border: 0;
    overflow: visible;
    transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s var(--ease-out-expo);
}

.footer-logo-link::after {
    content: none;
}

@keyframes footerLogoSweep {
    0%, 36% { transform: translateX(-120%); }
    62%, 100% { transform: translateX(120%); }
}

.footer-logo-link:hover {
    transform: translateY(-4px) rotate(-1deg);
}

.footer-logo {
    position: relative;
    z-index: 1;
    width: clamp(150px, 24vw, 240px);
    height: auto;
    display: block;
    object-fit: contain;
    filter:
        drop-shadow(0 1px 1px rgba(236, 233, 227, 0.55))
        drop-shadow(0 14px 28px rgba(0, 0, 0, 0.36));
}

.footer-motto {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin-top: clamp(2rem, 8vw, 5rem);
    color: var(--clr-bg);
    font-family: var(--font-heading);
    font-size: clamp(2.55rem, 7vw, 6rem);
    line-height: 0.95;
}

.footer-motto em {
    color: var(--clr-accent);
}

.footer-note {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin-top: var(--space-md);
    color: rgba(236, 233, 227, 0.78);
    font-size: 1rem;
    line-height: 1.7;
}

.footer-action-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: var(--space-md);
}

.footer-kicker,
.footer-label {
    display: block;
    color: rgba(236, 233, 227, 0.62);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.footer-primary-action {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 82px;
    padding: 1rem;
    color: #ffffff;
    text-decoration: none;
    background-color: #25D366;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s var(--ease-out-expo);
}

.footer-primary-action::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.22) 50%, transparent 58% 100%);
    transform: translateX(-110%);
    transition: transform 0.7s var(--ease-out-expo);
}

.footer-primary-action:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(37, 211, 102, 0.22);
}

.footer-primary-action:hover::after {
    transform: translateX(110%);
}

.footer-action-icon {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    overflow: hidden;
}

.whatsapp-icon-footer {
    width: 100%;
    height: 100%;
}

.footer-primary-action span:last-child {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.15rem;
}

.footer-primary-action strong {
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-primary-action small {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    line-height: 1;
}

.opening-hours {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--clr-bg);
    font-size: 0.95rem;
    font-weight: 600;
}

.opening-hours::before {
    content: "";
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    background-color: var(--clr-accent);
    border-radius: 50%;
    animation: blink 1.1s infinite alternate;
}

.footer-directory {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.05fr) minmax(260px, 1fr);
    gap: 1px;
    margin-bottom: var(--space-lg);
    background-color: rgba(236, 233, 227, 0.14);
    border: 1px solid rgba(236, 233, 227, 0.14);
}

.footer-card {
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    transition: background-color 0.35s ease, transform 0.45s var(--ease-out-expo);
}

.footer-card:hover {
    background-color: rgba(236, 233, 227, 0.075);
}

.footer-label {
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.footer-links a,
.contact-value,
.footer-map-link,
.legal-link {
    color: var(--clr-bg);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
}

.footer-links a::before {
    content: "";
    width: 0.45rem;
    height: 1px;
    background-color: var(--clr-accent);
    transform-origin: left;
    transition: width 0.3s var(--ease-out-expo);
}

.footer-links a:hover,
.contact-value:hover,
.footer-map-link:hover,
.legal-link:hover {
    color: var(--clr-accent);
}

.footer-links a:hover {
    transform: translateX(4px);
}

.footer-links a:hover::before {
    width: 1rem;
}

.contact-item {
    padding-block: 0.9rem;
    border-bottom: 1px solid rgba(236, 233, 227, 0.1);
}

.contact-item:first-of-type {
    padding-top: 0;
}

.contact-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.contact-info {
    display: block;
    margin-bottom: 0.35rem;
    color: rgba(236, 233, 227, 0.55);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-value {
    display: inline-block;
    max-width: 100%;
    font-size: clamp(1rem, 2vw, 1.18rem);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.footer-address {
    margin-bottom: 1rem;
    color: rgba(236, 233, 227, 0.9);
    font-style: normal;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.footer-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--clr-accent);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-map-link::after {
    content: "↗";
    font-size: 1rem;
    transition: transform 0.3s var(--ease-out-expo);
}

.footer-map-link:hover::after {
    transform: translate(4px, -4px);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(236, 233, 227, 0.12);
}

.copyright {
    color: rgba(236, 233, 227, 0.55);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.legal-link {
    color: rgba(236, 233, 227, 0.6);
    font-size: 0.85rem;
}

/* Legal pages */
.legal-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 0%, rgba(198, 111, 68, 0.14), transparent 30rem),
        var(--clr-bg);
}

.legal-header,
.legal-footer {
    background-color: var(--clr-dark);
}

.legal-header-content,
.legal-footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.legal-header-content {
    min-height: 6.5rem;
}

.legal-header .logo {
    width: 9rem;
}

.legal-back,
.legal-footer a,
.legal-document a {
    color: var(--clr-accent);
    font-weight: 600;
}

.legal-back {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
}

.legal-main {
    padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.legal-document {
    max-width: 860px;
}

.legal-kicker,
.legal-updated {
    color: var(--clr-text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legal-document h1 {
    margin: var(--space-xs) 0 var(--space-sm);
    color: var(--clr-dark);
    font-size: clamp(2.6rem, 7vw, 5rem);
}

.legal-document h2 {
    margin: var(--space-md) 0 var(--space-xs);
    color: var(--clr-dark);
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.legal-document p,
.legal-document li {
    color: var(--clr-text-muted);
}

.legal-document ul {
    display: grid;
    gap: 0.4rem;
    margin: var(--space-xs) 0 0 1.25rem;
}

.legal-footer-content {
    min-height: 5rem;
    color: rgba(236, 233, 227, 0.7);
    font-size: 0.85rem;
}

/* --- REVEAL & PARALLAX --- */
.parallax {
    transition: transform 0.15s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
}

.js-reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}

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

.js-reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}

.js-reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

.js-reveal-clip {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

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

.js-reveal-row {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.js-reveal-row.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.js-reveal-side {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 1.2s var(--ease-out-expo),
                transform 1.2s var(--ease-out-expo);
}

.js-reveal-side.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--clr-accent);
    width: 0%;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Emergency animations */
@keyframes emergencyPulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 56, 30, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(217, 56, 30, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 56, 30, 0); }
}

@keyframes blink {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* --- HEADER CONTROLS & HAMBURGER (global) --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

/* Emergency inside mobile nav — hidden on desktop */
.emergency-mobile { display: none; }

/* Hamburger — hidden on desktop */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 38px;
    height: 30px;
    gap: 5px;
    flex-shrink: 0;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.9); /* visible on dark hero */
    border-radius: 2px;
    transition: transform 0.35s var(--ease-out-expo), opacity 0.25s ease;
    transform-origin: center;
}

.header-scrolled .nav-hamburger span {
    background-color: var(--clr-dark); /* visible on light scrolled header */
}

/* Open state → X */
.nav-hamburger.is-open span:first-child  { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:last-child   { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    html.smooth-scroll {
        scroll-padding-top: 5.25rem;
    }

    main section,
    .footer {
        scroll-margin-top: 5.25rem;
    }

    .header {
        padding: 0.75rem 0;
    }

    .header-content {
        padding-bottom: 0;
        border-bottom: none;
        flex-wrap: nowrap;
        position: relative;
    }

    .logo {
        width: 8.5rem;
        height: auto;
    }

    .emergency-desktop {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        margin-left: 0;
        display: none;
        z-index: 400;
        padding: 0.75rem 1.25rem 1.25rem;
        background-color: rgba(236, 233, 227, 0.97);
        border: 1px solid rgba(22, 36, 27, 0.08);
        border-radius: 12px;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .main-nav.is-open {
        display: block;
        animation: navSlideDown 0.3s var(--ease-out-expo) forwards;
    }

    @keyframes navSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-list li {
        border-bottom: 1px solid rgba(22, 36, 27, 0.06);
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-link,
    .label-link {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.875rem 0;
        color: var(--clr-text-main);
        font-size: 0.95rem;
        letter-spacing: 0.04em;
    }

    .emergency-mobile {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        padding: 0.625rem 1.25rem;
        font-size: 0.75rem;
    }
}

/* --- MOBILE FLOATS --- */
.social-floats {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 500;
}

.whatsapp-float, .instagram-float {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.4s var(--ease-out-expo);
    text-decoration: none;
}

.whatsapp-float {
    background-color: #25D366;
    color: white;
    overflow: hidden;
}

.whatsapp-icon-float {
    width: 100%;
    height: 100%;
}

.instagram-float {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.whatsapp-float:hover, .instagram-float:hover {
    transform: scale(1.1) translateY(-5px);
}

@media (max-width: 1120px) {
    .social-floats {
        right: 1rem;
        bottom: 1rem;
    }

    .instagram-float {
        display: none;
    }

    .whatsapp-float {
        width: 54px;
        height: 54px;
    }
}

/* --- PERFORMANCE OPTIMIZATIONS --- */
.services, 
.mounting-plan, 
.faq, 
.final-cta, 
.footer {
    content-visibility: auto;
    contain-intrinsic-size: 500px; /* Placeholder size for layout stability */
}

/* Optimize Grain for mobile */
.grain-overlay {
    pointer-events: none;
    opacity: 0.03;
    z-index: 9999;
    /* Disable animation on small devices to save CPU */
}

@media (max-width: 768px) {
    .grain-overlay {
        display: none; /* Often too heavy for low-end mobile CPUs */
    }

    body::after {
        display: none;
    }
}

/* Hardware acceleration for smooth animations */
.hero-image-frame,
.team-track,
.parallax {
    will-change: transform;
}

/* Optimize touch targets for mobile */
@media (max-width: 768px) {
    .slider-arrow {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ============================================================
   MOBILE REDESIGN — max-width: 767px
   Mobile-first: espaçamento, header, hero, serviços, clientes,
   CTA, footer. Design editorial mantido, proporcional ao ecrã.
   ============================================================ */
@media (max-width: 767px) {

    /* 1. Tighten spacing tokens — cascata automática */
    :root {
        --space-xl:  3rem;
        --space-2xl: 4.5rem;
        --space-3xl: 4.5rem;
        --space-lg:  2rem;
        --space-md:  1.25rem;
    }

    /* ── HEADER ───────────────────────────────── */
    .header { padding: 0.75rem 0; }

    .header-content {
        padding-bottom: 0;
        border-bottom: none;
        flex-wrap: nowrap; /* logo | controls numa linha */
        position: relative;
    }

    .logo {
        width: 8rem;
        height: auto;
    }

    /* Desktop emergency oculto, hamburger visível */
    .emergency-desktop { display: none; }
    .nav-hamburger      { display: flex; }

    /* Mobile nav — dropdown absoluto abaixo do header fixo */
    .main-nav {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        background-color: rgba(236, 233, 227, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(22, 36, 27, 0.08);
        border-radius: 12px;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
        padding: 0.75rem 1.25rem 1.25rem;
        display: none;
        z-index: 400;
    }

    .main-nav.is-open {
        display: block;
        animation: navSlideDown 0.3s var(--ease-out-expo) forwards;
    }

    @keyframes navSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-list li {
        border-bottom: 1px solid rgba(22, 36, 27, 0.06);
    }

    .nav-list li:last-child { border-bottom: none; }

    .nav-link, .label-link {
        display: block;
        padding: 0.875rem 0;
        font-size: 0.95rem;
        letter-spacing: 0.04em;
        color: var(--clr-text-main);
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Emergency dentro do menu mobile */
    .emergency-mobile {
        display: inline-flex;
        margin-top: 1rem;
        font-size: 0.75rem;
        padding: 0.625rem 1.25rem;
        width: 100%;
        justify-content: center;
    }

    /* ── HERO ─────────────────────────────────── */
    .hero {
        padding-top: 6rem;
        padding-bottom: 2.5rem;
        min-height: auto;
    }

    .hero-heading {
        font-size: clamp(2.6rem, 11vw, 3.5rem);
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero-actions .button {
        justify-content: center;
        text-align: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.8rem;
    }

    .hero-image-frame {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 20px;
    }

    .team-caption {
        bottom: 2.65rem;
    }

    .team-caption strong {
        max-width: 13rem;
        font-size: 1rem;
    }

    .team-dots {
        bottom: 0.75rem;
        gap: 0.35rem;
    }

    .badge {
        font-size: 0.68rem;
        margin-bottom: 1rem;
    }

    /* ── EDITORIAL ABOUT ──────────────────────── */
    .editorial-about { padding: 3.5rem 0; }

    .editorial-title {
        font-size: clamp(2.4rem, 10vw, 3.5rem);
    }

    .editorial-lead {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    .editorial-text { font-size: 1rem; }

    .editorial-highlight {
        font-size: 0.9rem;
        padding-left: 1rem;
    }

    /* ── MOUNTING PLAN ───────────────────────── */
    .mounting-plan { padding: 3.5rem 0; }

    .mounting-container {
        gap: 2rem;
    }

    .mounting-text {
        padding-left: 1rem;
    }

    .mounting-stats {
        grid-template-columns: 1fr 1fr;
    }

    .mounting-stat {
        min-height: 138px;
    }

    /* ── SERVICES ─────────────────────────────── */
    .services-header {
        text-align: center;
        margin-bottom: 2rem;
    }

    .services-header .section-subtitle {
        text-align: center;
        margin-inline: auto;
    }

    /* Summary: align-items start — número não flutua quando título quebra linha */
    .service-summary {
        padding: 1.1rem 0;
        align-items: start;
        column-gap: 0.75rem;
    }

    .service-number {
        font-size: 1.1rem;
        padding-top: 0.3rem; /* alinha com primeira linha do título */
    }

    .service-tag { font-size: 0.62rem; }

    .service-name {
        font-size: 1rem;
        line-height: 1.3;
        gap: 0.4rem;
    }

    .service-icon {
        width: 16px;
        height: 16px;
        margin-top: 0.15rem;
    }

    .service-body { padding: 0 0 1.25rem; }

    .service-body .service-lead {
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .service-chip {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .service-dossier {
        grid-template-columns: 1fr;
        margin-bottom: 1rem;
    }

    .service-dossier-item {
        padding: 0.9rem;
    }

    .service-body p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .service-body .service-dossier-item p {
        font-size: 0.86rem;
        line-height: 1.55;
    }

    /* ── CLIENTS ──────────────────────────────── */
    .clients-header { margin-bottom: 1.75rem; }

    .clients-stat strong { font-size: 1.1rem; }

    .clients-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-card { padding: 0.875rem 0.75rem; }

    .client-farm {
        font-size: 0.88rem;
        margin-bottom: 0.35rem;
    }

    .client-location,
    .client-owner { font-size: 0.7rem; }

    /* ── FAQ ──────────────────────────────────── */
    .faq-question {
        font-size: 1rem;
        padding-right: 1.75rem;
    }

    .faq-answer { font-size: 0.95rem; }

    /* ── CTA ──────────────────────────────────── */
    .cta-title {
        font-size: clamp(1.9rem, 10vw, 3rem);
    }

    .cta-desc {
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
    }

    .cta-actions .button {
        justify-content: center;
        text-align: center;
    }

    .cta-tel {
        text-align: center;
        font-size: 1.2rem;
    }

    .cta-image-wrapper { display: none; } /* logo decorativo oculto */

    /* ── FOOTER ───────────────────────────────── */
    .footer {
        padding-top: 3rem;
        padding-bottom: 2rem;
    }

    .footer::before {
        top: 1.25rem;
        right: -1.2em;
        font-size: 5.5rem;
    }

    .footer-hero {
        grid-template-columns: 1fr;
        gap: 1px;
        margin-bottom: 1px;
        background-color: rgba(236, 233, 227, 0.14);
        border: 1px solid rgba(236, 233, 227, 0.14);
    }

    .footer-brand-panel,
    .footer-action-panel {
        border: none;
    }

    .footer-brand-panel {
        min-height: 0;
        padding: 1.25rem;
    }

    .footer-brand-panel::after {
        inset: auto -20% -16% 18%;
        height: 44%;
    }

    .footer-logo {
        width: 150px;
    }

    .footer-motto {
        margin-top: 2rem;
        font-size: clamp(2.35rem, 12vw, 3.7rem);
    }

    .footer-note {
        font-size: 0.92rem;
    }

    .footer-action-panel {
        padding: 1.25rem;
    }

    .footer-primary-action {
        min-height: 72px;
    }

    .footer-directory {
        grid-template-columns: 1fr;
        margin-bottom: 1.5rem;
    }

    .footer-card {
        padding: 1.25rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.875rem;
    }

    .footer-legal { gap: 1rem; }

    /* ── FLOATS ───────────────────────────────── */
    .social-floats {
        display: none;
    }

    /* ── SECTION TITLE ────────────────────────── */
    .section-title {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .section-subtitle { font-size: 1rem; }

    /* ── TOUCH TARGETS ────────────────────────── */
    .button, .social-icon, .slider-arrow {
        min-height: 44px;
        min-width: 44px;
    }

    .js-reveal-row,
    .js-reveal-side {
        transform: translateY(18px);
    }

    .js-reveal-row.is-visible,
    .js-reveal-side.is-visible {
        transform: translateY(0);
    }
}

@media (max-width: 380px) {
    .clients-grid {
        grid-template-columns: 1fr;
    }

    .hero-heading {
        font-size: clamp(2.35rem, 11vw, 2.85rem);
    }

    .service-summary {
        grid-template-columns: 2rem minmax(0, 1fr) 1.25rem;
        column-gap: 0.6rem;
    }

    .social-floats {
        right: 0.6rem;
        bottom: calc(0.6rem + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
