/* ==========================================================================
   AdStryke — brand system (styles.css)
   Light / green / minimalist. Built ONLY from the tokens below (D6).
   Mobile-first: base styles target 375px; min-width queries scale up.
   ========================================================================== */

/* --- Inter (self-hosted variable, latin subset) — no CDN (eng D6) --------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-var.woff2") format("woff2");
}

/* --- Design tokens -------------------------------------------------------- */
:root {
  /* color (client-locked) */
  --green: #2F6B4F;
  --green-dark: #245740;
  --green-soft: #EAF1ED;      /* tint of --green for panels/accents (derived) */
  --navy: #17212B;
  --off-white: #F8FAF9;
  --white: #FFFFFF;
  --border: #E5E7EB;
  --muted: #5B6670;           /* navy at reduced emphasis — AA on white/off-white */
  --danger: #B42318;          /* error text/border — AA on white */
  --danger-soft: #FEF3F2;

  /* type — Inter, modular ~1.25 */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;
  --fs-hero: clamp(2.5rem, 6vw, 4rem);
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --lh-tight: 1.15;
  --lh-body: 1.6;

  /* space — 4px base */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* radius / container */
  --radius: 8px;
  --radius-lg: 14px;
  --maxw: 1200px;

  /* elevation — restrained, single soft shadow family */
  --shadow-sm: 0 1px 2px rgba(23, 33, 43, 0.06);
  --shadow-md: 0 6px 20px rgba(23, 33, 43, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }

p { margin: 0; }

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

/* Visible keyboard focus everywhere (a11y — D5) */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* --- Layout helpers ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.section {
  padding-block: var(--sp-16);
}

.section-alt {
  background: var(--off-white);
}

/* Section eyebrow + heading — left-aligned (D4, anti-slop #4) */
.eyebrow {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--sp-2);
}

.section-head {
  margin-bottom: var(--sp-12);
  max-width: 44ch;
}

.section-head p {
  margin-top: var(--sp-3);
  color: var(--muted);
  font-size: var(--fs-lg);
}

/* Skip link (a11y — D5) */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -3rem;
  z-index: 200;
  background: var(--navy);
  color: var(--white);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: var(--sp-4);
  text-decoration: none;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  min-height: 44px;                    /* touch target (D5) */
  border-radius: var(--radius);
  font-weight: var(--fw-medium);
  font-size: var(--fs-base);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-dark); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--off-white); }

.btn-block { width: 100%; justify-content: center; }

/* --- Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  color: var(--navy);
}
.brand:hover { text-decoration: none; }
.brand img { height: 28px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.nav-links a:not(.btn) {
  color: var(--navy);
  font-weight: var(--fw-medium);
}

.nav-toggle {
  display: none;                       /* shown < 640px */
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  padding-block: var(--sp-16) var(--sp-24);
}
.hero-grid {
  display: grid;
  gap: var(--sp-12);
  align-items: center;
}
.hero-copy h1 {
  margin-bottom: var(--sp-6);
}
.hero-copy .lead {
  font-size: var(--fs-lg);
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: var(--sp-8);
}

/* Hero visual: geometric green panel with platform logos */
.hero-panel {
  position: relative;
  background: var(--green-soft);
  border-radius: var(--radius-lg);
  padding: var(--sp-12) var(--sp-8);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
}
.hero-panel::after {                   /* diagonal green accent (brand-forward, not a blob) */
  content: "";
  position: absolute;
  right: -20%;
  bottom: -30%;
  width: 60%;
  height: 80%;
  background: var(--green);
  opacity: 0.14;
  transform: rotate(18deg);
  border-radius: 40px;
}
.platform {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
}
.platform-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}
.platform-logo img,
.platform-logo svg { width: 100%; height: auto; }
.platform-name {
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  color: var(--navy);
}
.platform-plus {
  position: relative;
  z-index: 1;
  font-size: var(--fs-xl);
  color: var(--green);
  font-weight: var(--fw-bold);
}

/* --- Services ------------------------------------------------------------- */
.services-grid {
  display: grid;
  gap: var(--sp-6);
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
}
.service-card .service-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;                 /* brand SVGs vary in aspect ratio — fit, don't stretch */
  object-position: left center;
  margin-bottom: var(--sp-4);
}
.service-card .process-icon {          /* partner-benefit cards reuse the outline icon */
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-4);
}
.service-card h3 { margin-bottom: var(--sp-3); }
.service-card p { color: var(--muted); }

/* --- Split row (Process ‖ Cotizador  and  FAQ ‖ Form) --------------------- */
.split {
  display: grid;
  gap: var(--sp-12);
}

/* --- Process -------------------------------------------------------------- */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  align-items: start;
}
.process-icon {                        /* thin outline icon, NO colored circle (D4) */
  display: inline-flex;                 /* box context so width/height apply even
                                           outside a grid (partners.html cards) */
  width: 32px;
  height: 32px;
  color: var(--green);
  flex-shrink: 0;
}
.process-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; }
.process-step h3 { font-size: var(--fs-base); margin-bottom: var(--sp-1); }
.process-step p { color: var(--muted); font-size: var(--fs-sm); }
.process-num {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--green);
  letter-spacing: 0.05em;
}

/* --- Cotizador ------------------------------------------------------------ */
.quote {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
}
.quote label {
  display: block;
  font-weight: var(--fw-medium);
  margin-bottom: var(--sp-3);
}
/* Interactive budget slider ------------------------------------------------ */
.budget-slider { margin-top: var(--sp-2); }
.budget-range {                        /* live range label above the track */
  display: block;
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--green);
  line-height: 1.1;
  margin-bottom: var(--sp-6);
  font-variant-numeric: tabular-nums;
}
.budget-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  /* green fill up to the thumb, neutral track after it (--pct set in JS) */
  background: linear-gradient(90deg,
    var(--green) 0 var(--pct, 0%), var(--border) var(--pct, 0%) 100%);
  cursor: pointer;
  outline: none;
}
.budget-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--green);
  box-shadow: var(--shadow-md);
  cursor: grab;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.budget-input::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.12); }
.budget-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--green-soft); }
.budget-input::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--green);
  box-shadow: var(--shadow-md);
  cursor: grab;
}
.budget-input::-moz-range-track { height: 8px; border-radius: 999px; background: transparent; }
.budget-input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--green-soft); }
.budget-scale {
  display: flex;
  justify-content: space-between;
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.quote-fee {                           /* hidden until a tier is chosen (D2) */
  margin-top: var(--sp-6);
  padding: var(--sp-6);
  border-radius: var(--radius);
  background: var(--green-soft);
  display: none;
}
.quote-fee.is-visible { display: block; }
.quote-fee .fee-label {
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: var(--fw-medium);
}
.quote-fee .fee-amount {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--green);
  line-height: 1.1;
  margin-block: var(--sp-1);
}
.quote-fee .fee-amount {
  transform-origin: left center;       /* pop grows from the left, no layout shift */
}
.quote-fee .fee-amount.is-bump {
  animation: fee-pop 0.28s ease;
}
@keyframes fee-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.quote-fee .fee-amount span {
  font-size: var(--fs-lg);
  color: var(--muted);
  font-weight: var(--fw-regular);
}
.quote-fee .fee-note {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: var(--sp-2);
}
.quote-fee .fee-cta { margin-top: var(--sp-4); }

/* --- FAQ ------------------------------------------------------------------ */
.faq-list {
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  min-height: 44px;
  background: none;
  border: none;
  text-align: left;
  font-weight: var(--fw-medium);
  font-size: var(--fs-base);
  cursor: pointer;
  color: var(--navy);
}
.faq-question .chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--muted);
}
.faq-question[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}
.faq-answer > p {
  color: var(--muted);
  padding-bottom: var(--sp-4);
}

/* --- Contact form --------------------------------------------------------- */
.form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field.col-2 { grid-column: 1 / -1; }
.field label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.field .req { color: var(--green); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #9AA3AB; }

/* Invalid field state (D3) */
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-soft);
}
.field-error {
  font-size: var(--fs-xs);
  color: var(--danger);
  min-height: 1em;
}

/* Honeypot — visually hidden but not display:none (bots skip display:none) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Form-level banners (D3) */
.form-banner {
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-6);
  margin-bottom: var(--sp-6);
  font-weight: var(--fw-medium);
}
.form-banner.error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #F5C6C2;
}
.form-success {
  background: var(--green-soft);
  border: 1px solid #BFD8CB;
  border-radius: var(--radius-lg);
  padding: var(--sp-12) var(--sp-8);
  text-align: center;
}
.form-success h3 { color: var(--green); margin-bottom: var(--sp-2); }
.form-success p { color: var(--muted); }

button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: var(--off-white);
  padding-block: var(--sp-16) var(--sp-8);
}
.footer-grid {
  display: grid;
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}
.footer-brand .brand { color: var(--white); }
.footer-brand p { color: rgba(248, 250, 249, 0.6); margin-top: var(--sp-3); max-width: 32ch; }
.footer-col h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 249, 0.5);
  margin: 0 0 var(--sp-3);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.footer-col a { color: var(--off-white); }
.footer-col a:hover { color: var(--white); }
.footer-socials { display: flex; gap: var(--sp-4); }
.footer-socials a { color: var(--off-white); }
.footer-bottom {
  border-top: 1px solid rgba(248, 250, 249, 0.12);
  padding-top: var(--sp-6);
  font-size: var(--fs-sm);
  color: rgba(248, 250, 249, 0.5);
}

/* ==========================================================================
   Responsive — mobile-first; scale up at breakpoints (D5)
   ========================================================================== */

/* ≥ 640px — restore inline nav */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  /* Footer: brand spans the top, the three link columns sit in a row below. */
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* < 640px — collapse nav behind hamburger */
@media (max-width: 639px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-4) var(--sp-6);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links .btn { justify-content: center; }
}

/* ≥ 768px — two-up splits + hero side-by-side */
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field.col-1 { grid-column: auto; }
  /* Footer: brand + three link columns, all in one horizontal row. */
  .footer-grid { grid-template-columns: 1.8fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

/* ≥ 1024px — a touch more hero breathing room */
@media (min-width: 1024px) {
  .hero { padding-block: var(--sp-24) var(--sp-24); }
}
