/* =========================================================================
   VECTOR ENGINEERING — BASE
   Reset, typography, layout primitives, utilities.
   ========================================================================= */

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

html{
  scroll-behavior: auto; /* Lenis governs smooth scroll; native stays auto */
  -webkit-text-size-adjust: 100%;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  overflow-x: hidden;
}

img, picture, video, canvas, svg{ display: block; max-width: 100%; height: auto; }
input, button, textarea, select{ font: inherit; color: inherit; }
button{ cursor: pointer; }
a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
p{ margin: 0 0 1em; }
h1,h2,h3,h4,h5,h6{ margin: 0; font-family: var(--font-display); color: var(--heading); font-weight: 700; line-height: var(--lh-tight); letter-spacing: -0.01em; }

h1{ font-size: var(--fs-h1); font-weight: 800; }
h2{ font-size: var(--fs-h2); font-weight: 700; }
h3{ font-size: var(--fs-h3); font-weight: 700; }
h4{ font-size: var(--fs-h4); font-weight: 600; }

::selection{ background: var(--c-sky); color: var(--c-ink); }

/* Visible keyboard focus, always — independent of theme */
:focus-visible{
  outline: 2.5px solid var(--c-sky);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible){ outline: none; }

/* Skip link */
.skip-link{
  position: absolute;
  left: var(--sp-4);
  top: -60px;
  background: var(--c-indigo);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top var(--dur-fast) var(--ease-out);
  font-weight: 600;
}
.skip-link:focus{ top: var(--sp-4); }

/* ---- Layout primitives ---- */
.container{
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section{
  position: relative;
  padding-block: var(--sp-11);
}
.section--tight{ padding-block: var(--sp-9); }
.section--alt{ background: var(--bg-alt); }

.grid{ display: grid; gap: var(--sp-6); }
.flex{ display: flex; }
.flex-center{ display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }

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

/* ---- Typographic utility components ---- */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.eyebrow::before{
  content: '';
  width: 22px; height: 12px;
  background: var(--gradient-brand);
  clip-path: polygon(0% 0%, 18% 0%, 50% 62%, 82% 0%, 100% 0%, 58% 100%, 42% 100%);
  flex-shrink: 0;
}

.lead{
  font-size: var(--fs-lead);
  color: var(--text-muted);
  line-height: var(--lh-snug);
  max-width: 58ch;
}

.text-gradient{
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head{
  max-width: 720px;
  margin-bottom: var(--sp-9);
}
.section-head--center{ margin-inline: auto; text-align: center; }

/* ---- Buttons ---- */
.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.7rem;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn svg{ width: 1.05em; height: 1.05em; flex-shrink: 0; }
.btn:active{ transform: translateY(1px) scale(0.99); }

.btn--primary{
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover{ box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.btn--ghost{
  background: transparent;
  color: var(--heading);
  border-color: var(--border);
}
.btn--ghost:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn--whatsapp{
  background: var(--c-whatsapp);
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(var(--c-whatsapp-rgb),0.55);
}
.btn--whatsapp:hover{ background: var(--c-whatsapp-hover); transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(var(--c-whatsapp-rgb),0.65); }

.btn--sm{ padding: 0.7rem 1.3rem; font-size: 0.85rem; }
.btn--block{ width: 100%; }

/* ---- Cards ---- */
.card{
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}

/* ---- Forms ---- */
.field{ margin-bottom: var(--sp-5); }
.field label{
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--heading);
}
.field input,
.field textarea,
.field select{
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.97rem;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.field input:focus,
.field textarea:focus,
.field select:focus{
  border-color: var(--accent);
  outline: none;
  background: var(--bg);
}
.field textarea{ resize: vertical; min-height: 130px; }
.field-hint{ font-size: var(--fs-small); color: var(--text-muted); margin-top: var(--sp-1); }
.field-error{ font-size: var(--fs-small); color: #D14343; margin-top: var(--sp-1); display: none; }
.field.has-error input,
.field.has-error textarea{ border-color: #D14343; }
.field.has-error .field-error{ display: block; }

/* honeypot — visually hidden, kept in tab order out, but present for bots */
.hp-field{
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}

/* ---- Responsive helpers ---- */
@media (max-width: 900px){
  .section{ padding-block: var(--sp-9); }
}
@media (max-width: 600px){
  .section{ padding-block: var(--sp-8); }
}
