/* ============================================================
   TerraMilk — Design System do site institucional
   Camada única: tokens, base, componentes, páginas, breakpoints.
   Breakpoints: 560 / 760 / 980 / 1160 (mobile-first).
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
    /* Paleta institucional */
    --green-950: #061f16;
    --green-900: #083826;
    --green-800: #0b5a38;
    --green-700: #10864d;
    --green-500: #27c768;
    --green-100: #e3f8e9;
    --gold-500: #f4b43e;
    --gold-300: #ffe18e;
    --copper-500: #b9652a;
    --ink-900: #102219;
    --ink-700: #34483d;
    --ink-500: #6a7a70;
    --line: #d5e7d4;
    --line-strong: rgba(8, 56, 38, 0.14);
    --paper: #fffefa;
    --soft: #f4faf0;
    --soft-2: #eaf7e5;
    --danger: #9d2f2f;
    --danger-soft: #f8eded;
    --success: var(--green-800);

    /* Tipografia */
    --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
    --font-display: "Fraunces", Georgia, serif;

    /* Geometria */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    /* Sombras */
    --shadow-sm: 0 8px 24px rgba(6, 31, 22, 0.07);
    --shadow: 0 16px 42px rgba(6, 31, 22, 0.09);
    --shadow-strong: 0 26px 64px rgba(6, 31, 22, 0.18);

    /* Layout */
    --header-height: 78px;
    --container-max: 1120px;

    /* Superfícies escuras (heros, CTA, footer) */
    --surface-dark: linear-gradient(118deg, rgba(6, 31, 22, 0.98), rgba(8, 56, 38, 0.96) 42%, rgba(16, 134, 77, 0.92));
    --texture-lines: repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 28px);
}

/* ---------- 2. Base ---------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink-900);
    background:
        linear-gradient(180deg, rgba(255, 254, 250, 0.98) 0%, rgba(244, 250, 240, 0.92) 46%, rgba(255, 254, 250, 1) 100%),
        repeating-linear-gradient(115deg, rgba(16, 134, 77, 0.045) 0 1px, transparent 1px 18px);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

body.is-menu-open {
    overflow: hidden;
}

::selection {
    color: var(--green-950);
    background: var(--gold-300);
}

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

img {
    display: block;
    height: auto;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgba(39, 199, 104, 0.55);
    outline-offset: 2px;
    border-radius: 4px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--green-950);
    font-family: var(--font-display);
    font-weight: 850;
    line-height: 1.08;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.45rem, 5.4vw, 4.05rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.45rem);
    margin-bottom: 0.85rem;
}

h3 {
    font-size: 1.12rem;
    margin-bottom: 0.45rem;
}

p {
    color: var(--ink-700);
}

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

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 0.65rem 0.9rem;
    color: var(--paper);
    background: var(--green-900);
    border-radius: var(--radius-sm);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

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

/* ---------- 3. Cabeçalho e navegação ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--header-height);
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.96), rgba(255, 254, 250, 0.88));
    border-bottom: 1px solid rgba(8, 56, 38, 0.1);
    box-shadow: 0 1px 0 rgba(244, 180, 62, 0.24);
    backdrop-filter: saturate(140%) blur(12px);
}

.site-header.is-scrolled {
    box-shadow: 0 16px 42px rgba(6, 31, 22, 0.12);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.brand img {
    width: 170px;
    height: auto;
    filter: drop-shadow(0 10px 18px rgba(6, 31, 22, 0.16));
}

.brand--footer img {
    width: 190px;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--green-900);
    background: linear-gradient(180deg, #ffffff, #f4faf0);
    box-shadow: var(--shadow-sm);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 99px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.is-menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.is-menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.is-menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Painel mobile: sólido, sobre um overlay escurecido */
.site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.is-menu-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(6, 31, 22, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.is-menu-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

.site-nav ul {
    display: grid;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-nav a:not(.btn) {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    color: var(--ink-700);
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn).is-active {
    color: var(--green-950);
    background: linear-gradient(180deg, rgba(227, 248, 233, 0.96), rgba(217, 242, 223, 0.96));
    box-shadow: inset 0 0 0 1px rgba(39, 199, 104, 0.14);
}

.nav-client {
    width: 100%;
}

/* ---------- 4. Botões e links ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    color: #fffefa;
    background:
        linear-gradient(135deg, rgba(255, 225, 142, 0.18), transparent 42%),
        linear-gradient(135deg, var(--green-900), var(--green-700));
    border-color: rgba(244, 180, 62, 0.34);
    box-shadow: 0 16px 34px rgba(8, 56, 38, 0.22);
}

.btn-primary:hover {
    background:
        linear-gradient(135deg, rgba(255, 225, 142, 0.22), transparent 42%),
        linear-gradient(135deg, var(--green-800), #11a75a);
    box-shadow: 0 20px 42px rgba(8, 56, 38, 0.28);
}

.btn-secondary {
    color: var(--green-950);
    background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
    border-color: rgba(185, 101, 42, 0.18);
    box-shadow: 0 14px 30px rgba(185, 101, 42, 0.18);
}

.btn-secondary:hover,
.btn-light:hover {
    background: linear-gradient(135deg, #ffc94f, #fff0ad);
    box-shadow: 0 18px 38px rgba(185, 101, 42, 0.24);
}

.btn-outline,
.btn-light {
    color: var(--green-950);
    background: rgba(255, 254, 250, 0.9);
    border-color: var(--line-strong);
    box-shadow: 0 10px 26px rgba(6, 31, 22, 0.08);
}

.btn-outline:hover {
    border-color: rgba(39, 199, 104, 0.45);
    background: var(--green-100);
}

.btn-large {
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1.2rem;
}

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.65;
    pointer-events: none;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    color: var(--green-800);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(244, 180, 62, 0.42);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.text-link:hover {
    color: var(--copper-500);
}

.icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
}

/* ---------- 5. Seções e cabeçalhos de seção ---------- */
.section {
    position: relative;
    padding: clamp(4rem, 7vw, 5rem) 0;
}

.section-soft,
.quick-contact,
.legal-content,
.costelao-signature {
    background:
        linear-gradient(180deg, rgba(244, 250, 240, 0.98), rgba(255, 254, 250, 0.96)),
        repeating-linear-gradient(115deg, rgba(8, 56, 38, 0.05) 0 1px, transparent 1px 22px);
}

.section-header {
    max-width: 760px;
    margin: 0 auto 2.35rem;
    text-align: center;
}

.section-header--left {
    margin-right: 0;
    margin-left: 0;
    text-align: left;
}

.section-header p {
    margin-bottom: 0;
    font-size: 1.02rem;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.65rem;
    color: var(--green-700);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.eyebrow::before,
.section-kicker::before {
    width: 28px;
    height: 4px;
    content: "";
    background: linear-gradient(90deg, var(--gold-500), var(--green-500));
    border-radius: var(--radius-pill);
}

.eyebrow--light {
    color: var(--gold-300);
}

/* ---------- 6. Superfícies escuras compartilhadas ---------- */
.hero,
.page-hero,
.costelao-hero,
.cta-band,
.site-footer {
    position: relative;
    overflow: hidden;
    color: var(--paper);
}

.hero,
.page-hero {
    background: var(--surface-dark), var(--texture-lines), var(--green-950);
}

.hero::before,
.page-hero::before,
.costelao-hero::before,
.cta-band::before,
.site-footer::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(112deg, transparent 0 56%, rgba(244, 180, 62, 0.12) 56% 57%, transparent 57%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 42px);
}

.hero .container,
.page-hero .container,
.costelao-hero .container,
.cta-band .container,
.site-footer .container {
    position: relative;
    z-index: 1;
}

.hero h1,
.hero p,
.page-hero h1,
.page-hero p,
.cta-band h2,
.cta-band p,
.costelao-hero h1,
.costelao-hero p {
    color: #fffefa;
}

.hero-copy p,
.page-hero p,
.costelao-hero__copy p {
    color: rgba(255, 254, 250, 0.86);
}

.hero .eyebrow,
.page-hero .eyebrow,
.costelao-hero .eyebrow {
    color: var(--gold-300);
}

/* ---------- 7. Hero da home ---------- */
.hero {
    padding: clamp(3.75rem, 7vw, 5rem) 0 clamp(4.5rem, 8vw, 5.5rem);
}

.hero::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7px;
    content: "";
    background: linear-gradient(90deg, var(--green-500), var(--gold-500), var(--copper-500), var(--green-700));
}

.hero-grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-copy p {
    max-width: 610px;
    margin-bottom: 1.4rem;
    font-size: 1.05rem;
}

.hero-actions,
.section-actions {
    display: grid;
    gap: 0.75rem;
}

.hero-visual {
    position: relative;
    min-height: 365px;
    overflow: hidden;
    border: 1px solid rgba(255, 225, 142, 0.32);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 254, 250, 0.95), rgba(227, 248, 233, 0.9) 40%, rgba(16, 134, 77, 0.92) 41%, rgba(6, 31, 22, 0.98)),
        var(--green-900);
    box-shadow: var(--shadow-strong);
}

.hero-visual__logo {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.94), rgba(255, 255, 255, 0.78));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(6, 31, 22, 0.12);
}

.hero-visual__logo img {
    width: min(260px, 100%);
}

.field-lines {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58%;
    overflow: hidden;
}

.field-lines span {
    position: absolute;
    bottom: -38px;
    width: 55%;
    height: 190px;
    border-top: 3px solid rgba(255, 225, 142, 0.82);
    border-radius: 50%;
    transform: skewX(-18deg);
}

.field-lines span:nth-child(1) { left: -20%; }
.field-lines span:nth-child(2) { left: 3%; }
.field-lines span:nth-child(3) { left: 26%; }
.field-lines span:nth-child(4) { left: 48%; }

.hero-metrics {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
}

.hero-metrics div {
    min-width: 0;
    padding: 0.75rem 0.5rem;
    color: var(--paper);
    background: rgba(6, 31, 22, 0.78);
    border: 1px solid rgba(255, 225, 142, 0.2);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-metrics strong {
    display: block;
    color: var(--gold-300);
    font-family: var(--font-display);
    font-weight: 850;
    font-size: 1.25rem;
    line-height: 1;
}

.hero-metrics span {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.25;
}

/* ---------- 8. Hero interno de páginas ---------- */
.page-hero {
    padding: clamp(3.4rem, 6vw, 4.35rem) 0;
}

.page-hero--compact {
    padding: 2.5rem 0;
}

.page-hero__inner {
    max-width: 780px;
}

.page-hero p {
    margin-bottom: 0;
    opacity: 0.94;
}

/* ---------- 9. Cards ---------- */
.feature-grid,
.sector-grid,
.benefit-grid,
.value-grid,
.contact-grid {
    display: grid;
    gap: 1rem;
}

.feature-card,
.sector-card,
.benefit-card,
.contact-card {
    min-width: 0;
    padding: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.feature-card,
.sector-card,
.benefit-card,
.contact-card,
.sector-detail,
.costelao-benefit-card,
.faq-list details {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.feature-card:hover,
.sector-card:hover,
.benefit-card:hover,
.contact-card:hover,
.sector-detail:hover,
.costelao-benefit-card:hover {
    border-color: rgba(39, 199, 104, 0.3);
    box-shadow: 0 24px 58px rgba(6, 31, 22, 0.13);
    transform: translateY(-3px);
}

.feature-card p,
.sector-card p,
.benefit-card p,
.contact-card p {
    margin-bottom: 0;
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 0.85rem;
    color: var(--green-950);
    background:
        linear-gradient(135deg, rgba(255, 225, 142, 0.82), rgba(39, 199, 104, 0.18)),
        var(--green-100);
    border: 1px solid rgba(39, 199, 104, 0.2);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 -2px 0 rgba(6, 31, 22, 0.06);
}

.card-icon--large {
    width: 52px;
    height: 52px;
}

.card-icon .icon,
.sector-detail__icon .icon {
    width: 22px;
    height: 22px;
}

.benefit-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.benefit-card .card-icon {
    margin-bottom: 0;
    flex: 0 0 auto;
}

/* Setores */
.sector-card {
    position: relative;
    overflow: hidden;
}

.sector-card::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 78px;
    height: 7px;
    content: "";
    background: linear-gradient(90deg, var(--green-500), var(--gold-500), var(--copper-500));
}

.sector-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.sector-card__tag,
.sector-detail__note {
    display: inline-flex;
    padding: 0.28rem 0.6rem;
    color: #76501b;
    background: linear-gradient(180deg, rgba(255, 225, 142, 0.28), rgba(255, 254, 250, 0.88));
    border: 1px solid rgba(244, 180, 62, 0.36);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
}

.sector-card__future {
    margin: 1rem 0;
    padding: 0.8rem;
    color: var(--ink-700);
    background: linear-gradient(180deg, rgba(227, 248, 233, 0.78), rgba(255, 254, 250, 0.92));
    border: 1px solid rgba(39, 199, 104, 0.16);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}

.sector-detail-grid {
    display: grid;
    gap: 1rem;
}

.sector-detail {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.sector-detail__media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 132px;
    padding: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(227, 248, 233, 0.7)),
        repeating-linear-gradient(120deg, rgba(16, 134, 77, 0.08) 0 1px, transparent 1px 18px);
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius);
    box-shadow: inset 0 0 0 1px rgba(255, 254, 250, 0.7);
}

.sector-detail__media img {
    width: min(100%, 320px);
    max-height: 150px;
    object-fit: contain;
}

.sector-detail__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    color: var(--paper);
    background: var(--green-800);
    border-radius: var(--radius-sm);
}

.sector-detail__note {
    margin-bottom: 1rem;
}

/* Painéis auxiliares */
.about-layout,
.contact-layout {
    display: grid;
    gap: 2rem;
}

.about-story p:last-child {
    margin-bottom: 0;
}

.about-panel {
    display: grid;
    gap: 0.8rem;
    align-content: start;
    padding: 1.2rem;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.about-panel div {
    padding: 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.about-panel strong {
    display: block;
    color: var(--green-800);
    font-family: var(--font-display);
    font-weight: 850;
    font-size: 2rem;
    line-height: 1;
}

.about-panel span {
    display: block;
    margin-top: 0.35rem;
    color: var(--ink-500);
}

.split-panel {
    display: grid;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.split-panel p {
    margin-bottom: 0;
}

/* ---------- 10. Faixa CTA ---------- */
.cta-band {
    padding: 3rem 0;
    background:
        linear-gradient(122deg, rgba(6, 31, 22, 0.98), rgba(8, 56, 38, 0.95) 54%, rgba(16, 134, 77, 0.94)),
        var(--green-950);
}

.cta-band__inner {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 0;
}

.cta-band p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* ---------- 11. Promoções B2C e estados vazios ---------- */
.cms-b2c-promo-grid {
    display: grid;
    gap: 18px;
}

.cms-b2c-promo-card {
    overflow: hidden;
    border: 1px solid rgba(18, 60, 40, 0.12);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 16px 38px -32px rgba(10, 61, 31, 0.34);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.cms-b2c-promo-card:hover {
    border-color: rgba(39, 199, 104, 0.3);
    box-shadow: 0 24px 58px rgba(6, 31, 22, 0.13);
    transform: translateY(-3px);
}

.cms-b2c-promo-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--soft);
}

.cms-b2c-promo-card > div {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.cms-b2c-promo-card span {
    color: var(--green-800);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cms-b2c-promo-card h3 {
    margin: 0;
    color: var(--green-950);
}

.cms-b2c-promo-card p {
    color: var(--ink-700);
    margin-bottom: 0;
}

.cms-b2c-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.cms-b2c-badges strong,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    color: var(--green-950);
    background: var(--green-100);
    font-size: 0.82rem;
    font-weight: 700;
}

.badge--gold {
    color: #76501b;
    background: rgba(255, 225, 142, 0.4);
}

.cms-empty {
    padding: 28px;
    border: 1px dashed rgba(18, 60, 40, 0.2);
    border-radius: var(--radius-lg);
    background: #fff;
    text-align: center;
}

.cms-empty h1,
.cms-empty h3 {
    margin-bottom: 0.5rem;
}

.cms-empty p {
    margin-bottom: 1rem;
}

.cms-empty .section-actions {
    justify-content: center;
    margin-top: 1.25rem;
}

.fixed-empty-wide {
    grid-column: 1 / -1;
}

.gallery-empty {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    padding: 2rem 1rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px dashed rgba(18, 60, 40, 0.2);
    border-radius: var(--radius-lg);
}

.gallery-empty span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--green-950);
    background:
        linear-gradient(135deg, rgba(255, 225, 142, 0.82), rgba(39, 199, 104, 0.18)),
        var(--green-100);
    border-radius: var(--radius-sm);
}

.gallery-empty p {
    margin-bottom: 0;
}

/* Skeleton de carregamento (uso opcional em conteúdos dinâmicos) */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--soft-2);
    border-radius: var(--radius-sm);
    color: transparent !important;
    user-select: none;
}

.skeleton::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: translateX(-100%);
    animation: skeleton-sweep 1.4s ease infinite;
}

@keyframes skeleton-sweep {
    to { transform: translateX(100%); }
}

/* ---------- 12. Contato ---------- */
.quick-contact .contact-card {
    display: flex;
    flex-direction: column;
}

.contact-card {
    display: flex;
    flex-direction: column;
}

.contact-card .text-link {
    margin-top: auto;
    padding-top: 1rem;
}

.contact-info {
    min-width: 0;
}

.contact-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.contact-list > div {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0 0.8rem;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(244, 250, 240, 0.96));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.contact-list .card-icon {
    grid-row: span 2;
    margin-bottom: 0;
}

.contact-list strong {
    color: var(--green-950);
}

.contact-list a,
.contact-list span {
    color: var(--ink-700);
}

.contact-list a:hover {
    color: var(--green-800);
}

/* ---------- 13. Formulários ---------- */
.contact-form {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(244, 250, 240, 0.96));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.contact-form::before {
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    content: "";
    background: linear-gradient(90deg, var(--green-500), var(--gold-500), var(--copper-500));
}

.contact-form h2 {
    margin-bottom: 0;
}

.contact-form > p {
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.35rem;
    color: var(--green-950);
    font-weight: 800;
}

.required-marker {
    color: var(--copper-500);
    font-weight: 900;
    margin-left: 0.25rem;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.78rem 0.85rem;
    color: var(--ink-900);
    background: #fffefa;
    border: 1px solid rgba(8, 56, 38, 0.16);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
    resize: vertical;
    min-height: 140px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(39, 199, 104, 0.72);
    box-shadow: 0 0 0 4px rgba(39, 199, 104, 0.14);
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
    border-color: rgba(157, 47, 47, 0.55);
}

.checkbox-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6rem;
    align-items: start;
    font-weight: 600;
    color: var(--ink-700);
}

.checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: 0;
    margin-top: 0.2rem;
    accent-color: var(--green-700);
}

.form-hp {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.form-consent,
.form-feedback {
    color: var(--ink-500);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.form-consent a {
    color: var(--green-800);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-status {
    display: none;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.form-status.is-visible {
    display: block;
}

.form-status.is-success {
    color: var(--green-900);
    background: var(--green-100);
    border: 1px solid rgba(31, 107, 69, 0.24);
}

.form-status.is-error {
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid rgba(157, 47, 47, 0.24);
}

/* ---------- 14. Tabelas (conteúdo institucional) ---------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--paper);
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table-wrap th,
.table-wrap td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.table-wrap th {
    color: var(--green-950);
    background: var(--soft);
    font-weight: 800;
}

.table-wrap tr:last-child td {
    border-bottom: 0;
}

/* ---------- 15. Páginas legais e texto longo ---------- */
.legal-box {
    max-width: 900px;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.legal-box h2 {
    margin-top: 1.6rem;
    font-size: 1.2rem;
}

.legal-box h2:first-child {
    margin-top: 0;
}

.legal-box p:last-child {
    margin-bottom: 0;
}

.cms-section {
    padding: clamp(48px, 7vw, 86px) 0;
}

.cms-text {
    max-width: 900px;
}

.cms-text h2 {
    margin: 8px 0 14px;
}

.cms-lead {
    color: var(--ink-500);
    font-size: 1.08rem;
}

.cms-prose {
    color: var(--ink-700);
    font-size: 1.02rem;
    line-height: 1.78;
}

.cms-prose h2 {
    margin-top: 1.8rem;
    font-size: 1.25rem;
}

.cms-prose ul {
    padding-left: 1.2rem;
    color: var(--ink-700);
}

.cms-prose li {
    margin-bottom: 0.4rem;
}

.cms-prose a {
    color: var(--green-800);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- 16. Costelão de Negócios ---------- */
.costelao-hero {
    padding: 3rem 0 3.5rem;
    background:
        linear-gradient(122deg, rgba(6, 31, 22, 0.98), rgba(75, 36, 12, 0.82) 46%, rgba(16, 134, 77, 0.95)),
        var(--green-950);
}

.costelao-hero__grid {
    display: grid;
    gap: 1.6rem;
    align-items: center;
}

.costelao-hero__logo {
    width: min(360px, 100%);
    margin-bottom: 1rem;
}

.costelao-hero h1 {
    font-size: clamp(2.45rem, 4.5vw, 3.4rem);
}

.costelao-hero__copy p {
    max-width: 650px;
    font-size: 1.06rem;
    opacity: 0.94;
}

.costelao-date-pill,
.costelao-hero__card {
    padding: 1rem;
    background: rgba(255, 254, 250, 0.12);
    border: 1px solid rgba(255, 225, 142, 0.26);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 22px 52px rgba(6, 31, 22, 0.18);
}

.costelao-date-pill {
    display: grid;
    gap: 0.2rem;
    width: fit-content;
    max-width: 100%;
    margin: 1.2rem 0;
}

.costelao-date-pill span,
.costelao-hero__card span,
.costelao-date-card span {
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.costelao-date-pill strong,
.costelao-hero__card strong,
.costelao-date-card strong {
    display: block;
    color: var(--gold-300);
    font-family: var(--font-display);
    font-weight: 850;
    font-size: 1.35rem;
    line-height: 1.1;
}

.costelao-hero__card {
    backdrop-filter: blur(12px);
}

.costelao-hero__card p {
    color: #fffefa;
}

.costelao-hero__card strong {
    margin: 0.5rem 0;
    font-size: 2rem;
}

.costelao-intro,
.costelao-signature__inner,
.costelao-form-layout {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

.costelao-date-card {
    padding: 1rem;
    color: var(--green-950);
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.costelao-date-card strong {
    color: var(--green-800);
}

.costelao-date-card p {
    margin-bottom: 0;
}

.costelao-benefit-grid {
    display: grid;
    gap: 1rem;
}

.costelao-benefit-card {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.costelao-benefit-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    color: var(--green-950);
    background:
        linear-gradient(135deg, rgba(255, 225, 142, 0.82), rgba(39, 199, 104, 0.18)),
        var(--green-100);
    border-radius: var(--radius-sm);
}

.costelao-benefit-card p {
    margin-bottom: 0;
    font-weight: 800;
}

.costelao-signature img {
    width: min(420px, 100%);
    justify-self: center;
}

.costelao-gallery-grid {
    display: grid;
    gap: 1rem;
}

.costelao-gallery-grid figure {
    margin: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.costelao-gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.costelao-gallery-grid figcaption {
    padding: 0.8rem;
    font-weight: 800;
}

/* ---------- 17. FAQ ---------- */
.faq-list {
    display: grid;
    gap: 0.8rem;
    max-width: 860px;
    margin: 0 auto;
}

.faq-list details {
    padding: 1rem 1.15rem;
    background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(249, 253, 246, 0.94));
    border: 1px solid rgba(8, 56, 38, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.faq-list details[open] {
    border-color: rgba(39, 199, 104, 0.3);
}

.faq-list summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    color: var(--green-950);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

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

.faq-list summary::after {
    content: "+";
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--green-800);
    background: var(--green-100);
    border-radius: 50%;
    font-family: var(--font-body);
    font-weight: 800;
    transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
    content: "−";
    transform: rotate(180deg);
}

.faq-list p {
    margin: 0.8rem 0 0;
}

/* ---------- 18. Rodapé ---------- */
.site-footer {
    background:
        linear-gradient(125deg, rgba(6, 31, 22, 1), rgba(8, 56, 38, 0.98)),
        var(--green-950);
}

.site-footer::before {
    opacity: 0.9;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-brand p,
.footer-small,
.site-footer li,
.site-footer a,
.footer-bottom p {
    color: rgba(255, 255, 255, 0.78);
}

.footer-brand p {
    margin-bottom: 0.8rem;
}

.footer-signature {
    width: min(260px, 100%);
    margin: 1rem 0;
}

.footer-zapagro {
    width: min(190px, 100%);
    margin-bottom: 0.85rem;
}

.footer-small {
    font-size: 0.9rem;
}

.site-footer h2 {
    color: #fffefa;
    font-family: var(--font-body);
    font-weight: 900;
    font-size: 1rem;
    margin-bottom: 0.9rem;
}

.footer-links {
    display: grid;
    gap: 0.55rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-links a:hover {
    color: var(--gold-300);
}

.footer-contact li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
}

.footer-contact .icon {
    margin-top: 0.2rem;
    color: var(--gold-300);
}

.footer-bottom {
    display: grid;
    gap: 0.9rem;
    padding: 1.1rem 0;
    border-top: 1px solid rgba(255, 225, 142, 0.16);
}

.footer-bottom p {
    margin-bottom: 0;
}

.footer-bottom div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.1rem;
}

/* ---------- 19. Botão flutuante ZapAgro ---------- */
.floating-zapagro {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    max-width: calc(100% - 32px);
    min-height: 58px;
    padding: 0.48rem 0.6rem 0.48rem 0.74rem;
    color: var(--paper);
    background:
        linear-gradient(135deg, rgba(255, 225, 142, 0.18), transparent 44%),
        linear-gradient(135deg, rgba(6, 31, 22, 0.98), rgba(16, 134, 77, 0.98));
    border: 1px solid rgba(255, 225, 142, 0.72);
    border-radius: var(--radius-pill);
    box-shadow:
        0 20px 46px rgba(6, 31, 22, 0.34),
        0 0 0 5px rgba(244, 180, 62, 0.1);
    isolation: isolate;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

/* Sai da frente enquanto o aviso de cookies está aberto */
body.has-consent-banner .floating-zapagro {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.floating-zapagro::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    background: linear-gradient(110deg, transparent 0 42%, rgba(255, 255, 255, 0.2) 49%, transparent 57%);
    transform: translateX(-125%);
    transition: transform 520ms ease;
}

.floating-zapagro::after {
    display: grid;
    position: relative;
    z-index: 1;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    color: var(--green-950);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    content: ">";
    background: linear-gradient(135deg, #f5b240, #ffe19a);
    border-radius: 50%;
    box-shadow: inset 0 -2px 0 rgba(123, 83, 8, 0.2), 0 8px 18px rgba(0, 0, 0, 0.2);
    place-items: center;
}

.floating-zapagro:hover,
.floating-zapagro:focus-visible {
    border-color: rgba(255, 225, 154, 0.9);
    box-shadow:
        0 22px 48px rgba(12, 43, 29, 0.34),
        0 0 0 5px rgba(217, 164, 54, 0.12);
    transform: translateY(-3px);
}

.floating-zapagro:hover::before,
.floating-zapagro:focus-visible::before {
    transform: translateX(125%);
}

.floating-zapagro img {
    position: relative;
    z-index: 1;
    width: 118px;
    max-height: 38px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.24));
    object-fit: contain;
}

.floating-zapagro span {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 900;
    white-space: nowrap;
}

.floating-zapagro:focus-visible {
    outline: 3px solid rgba(245, 178, 64, 0.38);
    outline-offset: 4px;
}

/* ---------- 20. Animações de revelação (progressivas) ---------- */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-revealed {
    opacity: 1;
    transform: none;
}

/* Sem JS ou com preferência por menos movimento: conteúdo sempre visível */
html:not(.js) .reveal {
    opacity: 1;
    transform: none;
}

/* ---------- 21. Breakpoints ---------- */
@media (max-width: 420px) {
    .floating-zapagro {
        right: 12px;
        bottom: 12px;
        gap: 0.5rem;
        min-height: 54px;
        max-width: calc(100% - 24px);
        padding: 0.46rem 0.52rem 0.46rem 0.62rem;
    }

    .floating-zapagro img {
        width: 108px;
        max-height: 34px;
    }

    .floating-zapagro::after {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }
}

@media (min-width: 560px) {
    .btn-large {
        width: auto;
    }

    .hero-actions,
    .section-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .feature-grid,
    .benefit-grid,
    .contact-grid,
    .form-grid,
    .costelao-benefit-grid,
    .costelao-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 760px) {
    .hero-grid,
    .about-layout,
    .contact-layout {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
    }

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

    .sector-detail {
        grid-template-columns: minmax(230px, 0.34fr) minmax(0, 1fr);
        padding: 1.6rem;
        align-items: center;
    }

    .split-panel,
    .cta-band__inner {
        grid-template-columns: 1fr auto;
    }

    .costelao-hero__grid,
    .costelao-intro,
    .costelao-signature__inner,
    .costelao-form-layout {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    }

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

@media (min-width: 980px) {
    .brand img {
        width: 202px;
    }

    .menu-toggle,
    .nav-overlay {
        display: none;
    }

    .site-nav {
        position: static;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .site-nav ul {
        display: flex;
        align-items: center;
        gap: 0.2rem;
    }

    .site-nav a:not(.btn) {
        padding: 0.55rem 0.75rem;
    }

    .nav-client {
        width: auto;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr) 440px;
    }

    .hero-visual {
        min-height: 440px;
    }

    .hero-copy p {
        font-size: 1.15rem;
    }

    /* 4 cards = 2x2 em telas médias, evitando card órfão */
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .costelao-benefit-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .costelao-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1.5fr 0.8fr 0.8fr 1.1fr;
    }

    .footer-bottom {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

@media (min-width: 1160px) {
    .feature-grid,
    .benefit-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .fixed-promo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- 22. Acessibilidade: menos movimento ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn,
    .feature-card,
    .sector-card,
    .benefit-card,
    .contact-card,
    .sector-detail,
    .costelao-benefit-card,
    .cms-b2c-promo-card,
    .faq-list details,
    .floating-zapagro,
    .floating-zapagro::before,
    .site-nav,
    .menu-toggle span {
        transition: none;
    }

    .skeleton::after {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
