/* =========================================================================
   Mondicap Cabides — folha de estilo unica
   Design system: ui-ux-pro-max "Enterprise Gateway" / estilo "Trust & Authority"
   Paleta derivada do verde da marca (#00A859) extraido do logotipo.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Marca. ATENCAO: --brand-500 tem apenas 3,11:1 sobre branco.
     Use-o somente em areas grandes, icones e bordas — nunca em texto pequeno
     nem como fundo de botao com texto branco. Para isso existe --brand-700. */
  --brand-50:  #E8F7EF;
  --brand-100: #C9EEDC;
  --brand-500: #00A859;
  --brand-700: #00733D;  /* 5,97:1 sobre branco — texto, botoes, links */
  --brand-800: #005C31;  /* hover */
  --brand-900: #062B1B;  /* superficies escuras */

  /* Neutros */
  --ink-900: #0F172A;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;   /* 4,76:1 sobre branco — placeholders e texto auxiliar */
  --surface: #FFFFFF;
  --bg:      #F8FAFC;
  --border:  #E2E8F0;   /* divisores decorativos (isentos de contraste) */
  /* Borda de controle de formulario: 3,44:1 sobre branco, atende WCAG 1.4.11
     (limite de componente de interface precisa de 3:1). */
  --border-input: #7A8CA3;

  /* Tipografia */
  --font-head: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-xs:   0.75rem;   /* 12 */
  --fs-sm:   0.875rem;  /* 14 */
  --fs-base: 1rem;      /* 16 */
  --fs-md:   1.125rem;  /* 18 */
  --fs-lg:   1.25rem;   /* 20 */
  --fs-xl:   1.5rem;    /* 24 */
  --fs-2xl:  2rem;      /* 32 */
  --fs-3xl:  2.75rem;   /* 44 */

  /* Espacamento — multiplos de 4 */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 5.5rem;

  /* Raio e sombra — 3 niveis consistentes */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgb(15 23 42 / 0.06), 0 1px 3px rgb(15 23 42 / 0.05);
  --shadow-2: 0 4px 12px rgb(15 23 42 / 0.07), 0 2px 4px rgb(15 23 42 / 0.04);
  --shadow-3: 0 12px 32px rgb(15 23 42 / 0.10), 0 4px 8px rgb(15 23 42 / 0.04);

  /* Movimento */
  --t-fast: 150ms;
  --t-base: 220ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Camadas */
  --z-header: 100;
  --z-fab: 90;

  --wrap: 75rem;   /* 1200px */
  --header-h: 4.5rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink-700);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink-900);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, var(--fs-3xl)); font-weight: 700; }
h2 { font-size: clamp(1.625rem, 3.6vw, var(--fs-2xl)); font-weight: 600; }
h3 { font-size: var(--fs-lg); font-weight: 600; }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-700); }

img, svg { max-width: 100%; }
img { height: auto; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

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

/* Foco visivel e consistente em tudo que e interativo */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-700);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--brand-700); color: #fff;
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.section { padding-block: var(--sp-8); }
.section-alt { background: var(--bg); }

.section-head {
  max-width: 44rem;
  margin-bottom: var(--sp-7);
}
.section-head h2 { margin-bottom: var(--sp-3); }

.eyebrow {
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: var(--sp-2);
}

.section-sub {
  font-size: var(--fs-md);
  color: var(--ink-600);
  max-width: 60ch;
}

/* ---------- Icones ---------- */
.icon {
  width: 1.25rem; height: 1.25rem;
  flex: none;
  fill: none;
}
.icon-lg { width: 1.5rem; height: 1.5rem; }

/* ---------- Botoes ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 2.875rem;              /* >= 44px */
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-head);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}

.btn-primary {
  background: var(--brand-700);
  color: #fff;
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { background: var(--brand-800); box-shadow: var(--shadow-2); }
.btn-primary:active { background: var(--brand-900); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink-900);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--brand-500); color: var(--brand-700); }
.btn-ghost:active { background: var(--brand-50); }

/* Compacto na aparencia, mas mantendo os 44px de area tocavel. */
.btn-sm { min-height: 2.75rem; padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.brand { display: inline-flex; flex: none; }
.brand img { width: 9.25rem; height: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem; height: 2.75rem;      /* 44x44 */
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--ink-900);
  cursor: pointer;
  touch-action: manipulation;
}
.nav-toggle:hover { border-color: var(--brand-500); color: var(--brand-700); }

.nav-list a {
  display: block;
  padding: var(--sp-3) var(--sp-2);
  color: var(--ink-700);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color var(--t-fast) var(--ease);
}
.nav-list a:hover { color: var(--brand-700); }
.nav-list a[aria-current="true"] { color: var(--brand-700); font-weight: 600; }

/* Mobile: menu em painel abaixo do header */
@media (max-width: 63.99em) {
  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: grid;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-5) var(--sp-6);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav[hidden] { display: none; }
  .nav-list { display: grid; gap: var(--sp-1); }
  .nav-list a { padding: var(--sp-3); min-height: 2.75rem; }
  .nav-cta { justify-content: center; margin-top: var(--sp-2); }
}

@media (min-width: 64em) {
  .nav-toggle { display: none; }
  .nav {
    display: flex !important;
    align-items: center;
    gap: var(--sp-5);
  }
  .nav-list { display: flex; align-items: center; gap: var(--sp-2); }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--sp-7) var(--sp-8);
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--brand-50), transparent 65%),
    var(--surface);
}

.hero-inner { display: grid; gap: var(--sp-7); }

.hero-copy h1 { margin-bottom: var(--sp-4); }

.lede {
  font-size: var(--fs-md);
  color: var(--ink-600);
  max-width: 52ch;
  margin-bottom: var(--sp-6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: var(--sp-4);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}
.trust-strip strong {
  display: block;
  font-family: var(--font-head);
  /* Menor no mobile para caber em uma linha: com duas colunas em 375px,
     um item quebrando desalinha as linhas de base dos vizinhos. */
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--ink-900);
}
.trust-strip span { font-size: var(--fs-sm); color: var(--ink-600); }

@media (min-width: 30em) {
  .trust-strip strong { font-size: var(--fs-lg); }
}

.hero-media img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (min-width: 64em) {
  .hero { padding-block: var(--sp-9) var(--sp-9); }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: var(--sp-8);
  }
}

/* ---------- Cards de linha ---------- */
.cards {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  /* transicao apenas de propriedades que nao causam reflow */
  transition: box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-3);
  border-color: var(--brand-100);
  transform: translateY(-2px);
}

.card-media { background: var(--bg); border-bottom: 1px solid var(--border); }
.card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--sp-5);
}
.card-body h3 { margin-bottom: var(--sp-2); }
.card-body > p { font-size: var(--fs-sm); color: var(--ink-600); }

.specs {
  display: grid;
  gap: var(--sp-2);
  margin: var(--sp-4) 0 var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px dashed var(--border);
}
.specs > div { display: flex; justify-content: space-between; gap: var(--sp-3); }
.specs dt { font-size: var(--fs-sm); color: var(--ink-600); }
.specs dd {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-900);
  text-align: right;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  min-height: 2.75rem;
  color: var(--brand-700);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  touch-action: manipulation;
}
.card-link .icon { transition: transform var(--t-base) var(--ease); }
.card-link:hover { color: var(--brand-800); }
.card-link:hover .icon { transform: translateX(4px); }

/* ---------- Diferenciais ---------- */
.features {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.features li {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.features h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.features p { font-size: var(--fs-sm); color: var(--ink-600); }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem; height: 3rem;
  margin-bottom: var(--sp-4);
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: var(--r-md);
}

/* ---------- Aplicacoes ---------- */
.apl-inner { display: grid; gap: var(--sp-7); align-items: center; }

.checklist { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  color: var(--ink-700);
}
.checklist .icon { color: var(--brand-700); margin-top: 0.3rem; }

.apl-media { margin: 0; }
.apl-media img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.apl-media figcaption {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--ink-600);
}

@media (min-width: 56.25em) {
  .apl-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-8); }
}

/* ---------- Sobre ---------- */
.sobre-inner { display: grid; gap: var(--sp-7); align-items: center; }
.sobre-media { margin: 0; }
.sobre-media img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.sobre-copy .btn { margin-top: var(--sp-4); }

@media (min-width: 56.25em) {
  .sobre-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-8); }
}

/* ---------- Contato ---------- */
.contato-inner { display: grid; gap: var(--sp-7); align-items: start; }

.contato-list { display: grid; gap: var(--sp-4); margin-top: var(--sp-6); }
.contato-list li { display: flex; gap: var(--sp-3); }
.contato-list .icon { color: var(--brand-700); margin-top: 0.35rem; }
.contato-list p { margin: 0; }
.contato-list a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;              /* >= 44px de area tocavel */
  color: var(--ink-900);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}
.contato-list a:hover { color: var(--brand-700); text-decoration: underline; }

.contato-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-600);
}

/* ---------- Formulario ---------- */
.form {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}

.field { display: grid; gap: var(--sp-2); }

.field label {
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-900);
}
.req { color: var(--brand-700); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.875rem;            /* >= 44px */
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  font-size: var(--fs-base);       /* 16px evita zoom automatico no iOS */
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.field textarea { min-height: 6rem; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-500); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--ink-600); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.field [aria-invalid="true"] { border-color: #B42318; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #FEE4E2; }

.erro {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #B42318;              /* 6,4:1 sobre branco */
}
.erro[hidden] { display: none; }

.hint { margin: 0; font-size: var(--fs-sm); color: var(--ink-600); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.form-actions .btn { flex: 1 1 12rem; }

.form-note {
  margin: 0;
  min-height: 1.25rem;
  font-size: var(--fs-sm);
  color: var(--ink-600);
}

@media (min-width: 56.25em) {
  .contato-inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--sp-8); }
}

/* ---------- Rodape ---------- */
.site-footer {
  background: var(--brand-900);
  color: #CBD5E1;
  padding-block: var(--sp-8) var(--sp-5);
}

.footer-inner {
  display: grid;
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
}

.footer-brand img { width: 10rem; height: auto; margin-bottom: var(--sp-4); }
.footer-brand p { font-size: var(--fs-sm); max-width: 34ch; color: #CBD5E1; }

.site-footer h2 {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--sp-4);
}

.site-footer ul { display: grid; gap: var(--sp-1); }
.site-footer li { font-size: var(--fs-sm); }
.site-footer a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;              /* >= 44px de area tocavel */
  color: #CBD5E1;
  text-decoration: none;
  overflow-wrap: anywhere;
  touch-action: manipulation;
  transition: color var(--t-fast) var(--ease);
}
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer a:focus-visible { outline-color: #fff; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2);
  padding-top: var(--sp-5);
  border-top: 1px solid rgb(255 255 255 / 0.14);
}
.footer-legal p { margin: 0; font-size: var(--fs-xs); color: #94A3B8; }

@media (min-width: 56.25em) {
  .footer-inner { grid-template-columns: 2fr 1fr 1.4fr; gap: var(--sp-7); }
}

/* ---------- Botao flutuante WhatsApp ---------- */
.fab-whatsapp {
  position: fixed;
  right: max(var(--sp-4), env(safe-area-inset-right));
  bottom: max(var(--sp-4), env(safe-area-inset-bottom));
  z-index: var(--z-fab);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem; height: 3.25rem;      /* > 44px */
  background: var(--brand-700);
  color: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-3);
  touch-action: manipulation;
  transition: background-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.fab-whatsapp:hover { background: var(--brand-800); transform: scale(1.05); }
.fab-whatsapp:active { transform: scale(0.97); }

/* ---------- Preferencia de movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
  .card-link:hover .icon { transform: none; }
  .fab-whatsapp:hover { transform: none; }
}
