/*
  Unifatecie Design System (lightweight)
  Objetivo: replicar a landing com tokens e componentes reutilizáveis.
*/

/* Fonts: usar Signika (já baixada) e exibir títulos com Encode Sans Condensed/Fjalla One */
@font-face {
  font-family: "Encode Sans Condensed";
  src: url("./EncodeSans_Condensed-Black-aBfa6DQN.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fjalla One";
  src: url("./FjallaOne-Regular-u6BDAHjN.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color tokens (ajustáveis conforme brand) */
  --color-primary-700: #c95a18;
  --color-primary-600: #e3671d;
  --color-primary-500: #f47620; /* laranja principal */
  --color-primary-400: #ff8a3a;
  --color-secondary-500: #ffce68; /* destaque */
  --color-brand-orange: #E3671D;

  --color-neutral-950: #0f0f10;
  --color-neutral-900: #17181a;
  --color-neutral-800: #1f2023;
  --color-neutral-700: #2b2d31;
  --color-neutral-600: #3a3d42;
  --color-neutral-500: #4c5158;
  --color-neutral-400: #6a7079;
  --color-neutral-300: #9aa1aa;
  --color-neutral-200: #cbd1d8;
  --color-neutral-100: #e8edf3;
  --color-neutral-050: #f6f8fb;
  --color-white: #ffffff;
  --color-black: #000000;

  /* Typography */
  --font-body: "Signika", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Encode Sans Condensed", "Fjalla One", "Signika", system-ui, sans-serif;

  /* Font sizes (fluid-ish scale) */
  --fs-1: clamp(0.75rem, 0.72rem + 0.15vw, 0.85rem);
  --fs-2: clamp(0.875rem, 0.85rem + 0.15vw, 0.95rem);
  --fs-3: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  --fs-4: clamp(1.125rem, 1.05rem + 0.3vw, 1.3rem);
  --fs-5: clamp(1.375rem, 1.25rem + 0.5vw, 1.75rem);
  --fs-6: clamp(1.75rem, 1.6rem + 0.8vw, 2.25rem);
  --fs-7: clamp(2.25rem, 2rem + 1.4vw, 3.25rem);
  --fs-8: clamp(3rem, 2.5rem + 2vw, 4.5rem);
  --fs-9: clamp(4rem, 3rem + 3vw, 6rem);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;

  /* Radius & Shadow */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, 0.16);

  /* Container widths */
  --container: 1200px;
}

/* Reset básico e utilitários */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-neutral-900);
  background: #f1f1f1;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-4 > * + * { margin-top: var(--space-4); }
.stack-5 > * + * { margin-top: var(--space-5); }

.grid {
  display: grid;
  gap: var(--space-6);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Header */
.site-header {
  background: #f1f1f1;
  border-bottom: none;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-5);
}
.header-banner { width: 100%; position: relative; }
.header-banner-img { width: 100%; display: block; border-radius: 0; box-shadow: none; }
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.brand img { height: 48px; }

/* Hero */
.hero { padding-block: var(--space-8); }
.hero--form-overlay { background: #f1f1f1; padding-block: var(--space-6); }
.form-overlay {
  width: min(100%, 960px);
  margin-inline: auto;
  /* sobreposição leve ao centro do banner */
  margin-top: -50px;
  padding-inline: var(--space-5);
  position: relative;
  z-index: 2;
}
@media (max-width: 720px) {
  /* No mobile, não sobrepor o banner: descer o card */
  .form-overlay { margin-top: 0; }
}
.hero .headline {
  font-family: var(--font-display);
  font-size: var(--fs-7);
  letter-spacing: 0.5px;
}
.hero .subhead {
  font-size: var(--fs-4);
  opacity: 0.9;
}
.hero .price {
  font-family: var(--font-display);
  font-size: var(--fs-9);
  line-height: 0.95;
}
.hero .kicker {
  background: color-mix(in srgb, var(--color-white) 15%, transparent);
  color: #ffffff;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
}

/* Card & Form */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-neutral-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.card .card-body { padding: var(--space-6); }
.card .card-title {
  font-weight: 700;
  font-size: var(--fs-4);
}

.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font: inherit;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--color-primary-500) 25%, transparent);
  border-color: var(--color-primary-500);
}

/* iOS Safari/WebKit: evitar centralização do texto em inputs do tipo date */
input[type="date"].input {
  text-align: left;
}
/* Alinhar o conteúdo interno do controle nativo à esquerda (WebKit) */
input[type="date"].input::-webkit-datetime-edit,
input[type="date"].input::-webkit-datetime-edit-fields-wrapper,
input[type="date"].input::-webkit-datetime-edit-year-field,
input[type="date"].input::-webkit-datetime-edit-month-field,
input[type="date"].input::-webkit-datetime-edit-day-field {
  text-align: left;
}

.form-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
  --bg: var(--color-neutral-900);
  --fg: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  background: var(--bg);
  color: var(--fg);
  font-weight: 700;
  cursor: pointer;
  transition: transform .06s ease, filter .2s ease, background .2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }

.btn-primary { --bg: var(--color-primary-600); }
.btn-outline {
  --bg: transparent; --fg: var(--color-primary-600);
  border: 2px solid var(--color-primary-600);
  background: transparent;
}
.btn-ghost {
  --bg: transparent; --fg: var(--color-neutral-900);
  background: transparent;
}

/* Larger button size for primary action */
.btn-lg { padding: 14px 22px; font-size: var(--fs-4); }

/* Form actions alignment and spacing */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
}
/* Mobile: ações estáticas, sem efeito sticky */
@media (max-width: 720px) {
  .form-actions {
    position: static;
    bottom: auto;
    padding-block: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: auto;
    box-shadow: none;
  }
}
/* Variante para dividir ações: Voltar à esquerda e Avançar à direita */
.form-actions--split {
  justify-content: space-between;
  align-items: center;
}
/* Garantir ação primária à direita quando dividido (SPA e páginas separadas) */
.form-actions--split .btn-primary { margin-left: auto; }

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--fs-2);
  font-weight: 600;
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
}
.badge-primary {
  background: var(--color-secondary-500);
  color: var(--color-neutral-950);
}

/* Sections */
.section { padding-block: var(--space-8); }
.section-title {
  font-size: var(--fs-6);
  font-weight: 700;
}
.section-sub {
  color: var(--color-neutral-600);
}

/* Section: Quem é a Unifatecie background */
.section.about {
  background: #F1F1F1;
}

/* Section: Quem é a Unifatecie (increase body text size) */
.section.about p {
  font-size: var(--fs-4);
  line-height: 1.7;
}

/* Testimonial */
.testimonial {
  background: var(--color-white);
  border: 1px solid var(--color-neutral-100);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.stars { color: #ffb400; }

/* Footer */
.site-footer {
  background: var(--color-neutral-900);
  color: var(--color-white);
  padding-block: var(--space-6);
}
.site-footer .brand img { filter: brightness(0) invert(1); height: 56px; width: auto; }

/* Conteúdo centralizado do footer (logo + urls) */
.site-footer .container { display: block; }
.site-footer .footer-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-5);
  min-height: 64px;
}
.site-footer .footer-content .brand { justify-self: start; }
.site-footer .footer-content .socials { justify-self: center; }
.site-footer .socials {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-4);
}
.site-footer .socials svg { width: 35px; height: 35px; }
.site-footer .socials a, .site-footer .socials span { color: var(--color-white); text-decoration: none; font-weight: 500; }

/* Legal bar (orange strip under dark footer) */
.legal-bar {
  background: #E3671D;
  color: #ffffff;
  text-align: center;
  padding: var(--space-3) 0;
  margin-top: 0;
  border: none; box-shadow: none; outline: none;
  /* barra não persistente: segue o fluxo do layout */
}
.legal-bar small { font-weight: 500; font-size: var(--fs-3); }

/* Utilities */
.center { display: grid; place-items: center; }
.muted { color: var(--color-neutral-600); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Validation feedback */
.field-error {
  color: #c62828;
  font-size: var(--fs-2);
  margin-top: var(--space-1);
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid {
  border-color: #c62828;
  outline: 2px solid rgba(198, 40, 40, 0.2);
}
.input.is-invalid:focus, .select.is-invalid:focus, .textarea.is-invalid:focus {
  outline-color: rgba(198, 40, 40, 0.35);
}

/* CTA bar */
.cta-bar {
  text-align: center;
  padding-block: var(--space-8);
  background: transparent;
  border-top: 1px solid var(--color-neutral-100);
}
/* escopo: efeito sutil apenas para o botão da CTA */
.cta-bar .btn {
  box-shadow: var(--shadow-md);
  /* Ajuste do padding vertical para centralizar melhor o conteúdo */
  padding-block: 20px; /* top e bottom */
  padding-inline: 26px; /* left e right */
  font-size: var(--fs-5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modern checkbox */
/* Alinha o texto com o topo do checkbox e evita encolhimento no mobile */
.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  /* Garantir proporção quadrada e evitar encolhimento em layouts flex */
  aspect-ratio: 1 / 1;
  flex: 0 0 20px;
  min-width: 20px; min-height: 20px;
  display: inline-grid; place-items: center;
  border: 2px solid var(--color-neutral-300);
  border-radius: 6px;
  background: var(--color-white);
  position: relative;
  cursor: pointer;
  /* Ajuste fino para alinhar com a primeira linha do texto */
  margin-top: 2px;
}
@media (max-width: 720px) {
  .checkbox-input { width: 24px; height: 24px; flex: 0 0 24px; min-width: 24px; min-height: 24px; }
  .checkbox { gap: 12px; }
}
.checkbox-input:focus {
  outline: 2px solid color-mix(in srgb, #E3671D 35%, transparent);
  border-color: #E3671D;
}
.checkbox-input:checked {
  border-color: #E3671D;
  background-color: #E3671D;
}
.checkbox-input:checked::after {
  content: "";
  position: absolute; inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center no-repeat;
  background-size: 16px 16px;
}

/* Price lockup */
.price-lockup { display: flex; align-items: baseline; gap: 8px; }
.price-lockup .currency { font-size: var(--fs-6); }
.price-lockup .amount { font-size: var(--fs-9); font-family: var(--font-display); }
.price-lockup .period { font-size: var(--fs-4); opacity: .85; }

/* Map placeholder */
.map-placeholder {
  background: radial-gradient(circle at 30% 20%, #ffffff66 0, #ffffff00 60%),
    linear-gradient(180deg, #fff, #fdf2e7);
  border: 1px dashed var(--color-neutral-200);
  border-radius: var(--radius-lg);
  height: 320px;
}

/* Tabs/steps (simplified) */
.steps { display: flex; gap: var(--space-9); flex-wrap: wrap; justify-content: center; }
.step {
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--fs-4);
}
/* Prefixo numérico automático: 1., 2., 3. */
.steps .step::before { font-weight: 700; margin-right: 6px; }
.steps .step:nth-child(1)::before { content: "1. "; }
.steps .step:nth-child(2)::before { content: "2. "; }
.steps .step:nth-child(3)::before { content: "3. "; }
.step.is-active { background: #E3671D; color: #ffffff; }
/* Espaçamento superior e inferior maior nos indicadores de passos */
.steps { margin-top: var(--space-3); margin-bottom: var(--space-8); }

/* Mobile: passos em uma única linha com menos padding */
@media (max-width: 720px) {
  .steps {
    flex-wrap: nowrap;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
    margin-bottom: var(--space-6); /* mais espaço abaixo para "subir" visualmente o indicador */
    padding: 0; /* remover padding extra do container */
  }
  /* Exibir apenas o passo ativo no mobile */
  .step { display: none; padding: 4px 12px; font-size: var(--fs-4); }
  .step.is-active { display: inline-flex; }

  /* Mais padding inferior no card para balancear a nova altura do indicador */
  .hero--form-overlay .card .card-body { padding-bottom: var(--space-5); }
}

/* Increase top padding slightly when form overlays banner to balance larger steps */
.hero--form-overlay .card .card-body { padding-top: calc(var(--space-6) + 8px); }

/* Small helpers for layout within hero */
.hero-grid { display: grid; gap: var(--space-6); grid-template-columns: 1.2fr 1fr; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* Banner image */
.banner-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.banner-full {
  width: 100%;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
  display: block;
}
.highlight {
  color: var(--color-brand-orange);
  font-weight: 700;
}

/* Sticky footer: encostar barra laranja no fim da página */
html { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-footer { margin-top: auto; }