/* ── Custom Properties (TD Consultores brand book) ──────────── */
:root {
  --color-primary:     #F22D4F;
  --color-primary-dk:  #480A1B;
  --color-accent:      #8B2BF5;
  --color-bg:          #FFFFFF;
  --color-bg-alt:      #F3F3F3;
  --color-surface:     #FFFFFF;
  --color-border:      #DADADA;
  --color-text:        #333333;
  --color-text-muted:  #4D4D4D;
  --color-ink:         #1A1A1A;
  --color-success:     #93BB6B;
  --color-error:       #EE6002;
  --radius:            12px;
  --radius-pill:       999px;
  --shadow:            0 2px 16px rgba(0, 0, 0, 0.08);
  --transition:        0.2s ease;
  --max-w:             1280px;
  --header-h:          64px;
}

@media (min-width: 768px) {
  :root { --header-h: 80px; }
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Skip link ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0.5rem;
  z-index: 1000;
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus {
  top: 0.5rem;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; }
.logo img {
  height: 28px;
  width: auto;
}
.logo:hover { text-decoration: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Nav ─────────────────────────────────────────────────── */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition);
}
.main-nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* ── Hamburger ───────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background var(--transition);
}
.hamburger:hover { background: var(--color-bg-alt); }
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ── Buttons (pill — regla de marca no negociable) ──────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: filter var(--transition), transform var(--transition), background var(--transition), color var(--transition);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:disabled { cursor: not-allowed; opacity: 0.7; transform: none; }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dk); filter: none; }
.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-hero {
  background: #fff;
  color: var(--color-primary-dk);
}
.btn-hero:hover { background: var(--color-bg-alt); }
.btn-ghost-on-dark {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.btn-ghost-on-dark:hover { border-color: #fff; color: #fff; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-ink) 0%, var(--color-primary-dk) 60%, var(--color-primary) 100%);
  color: #fff;
  padding: 2.5rem 0;
}
.hero-content { max-width: 640px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  opacity: 0.85;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}
.hero-desc {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  opacity: 0.92;
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ── Sections ────────────────────────────────────────────── */
section[id] { scroll-margin-top: var(--header-h); }
.section { padding: 4rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--color-ink);
  margin-bottom: 0.75rem;
}
.section-desc {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ── Problema / Solución ─────────────────────────────────── */
.problem-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.problem-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.problem-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--color-ink);
}
.problem-card p { color: var(--color-text-muted); }
.problem-card--solution {
  border-color: var(--color-accent);
  border-width: 2px;
}

/* ── Features ────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--feature-accent, var(--color-primary));
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}
.feature-card:nth-child(1) { --feature-accent: var(--color-primary); }
.feature-card:nth-child(2) { --feature-accent: var(--color-accent); }
.feature-card:nth-child(3) { --feature-accent: var(--color-ink); }
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-ink);
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── Clientes ────────────────────────────────────────────── */
.clients-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2rem;
}
.client-logo {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.testimonial {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.75rem;
  max-width: 640px;
}
.testimonial p:first-child {
  font-size: 1.05rem;
  color: var(--color-ink);
  margin-bottom: 0.75rem;
}
.testimonial cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ── Contacto / Formulario ───────────────────────────────── */
.contact-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
.section-contact {
  background: linear-gradient(135deg, var(--color-ink) 0%, var(--color-primary-dk) 100%);
  color: #fff;
}
.contact-intro h2 { color: #fff; }
.contact-intro p { color: rgba(255, 255, 255, 0.85); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-ink);
}
.field input,
.field textarea {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus,
.field textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.field-error {
  color: var(--color-error);
  font-size: 0.85rem;
}
.field-error[hidden] { display: none; }

.form-status {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.form-status[hidden] { display: none; }
.form-status.is-success { background: rgba(147, 187, 107, 0.18); color: #3f5c26; }
.form-status.is-error { background: rgba(238, 96, 2, 0.12); color: #8a3900; }
.form-status.is-info { background: rgba(255, 255, 255, 0.12); color: #fff; }

.btn-submit { margin-top: 1.25rem; }

/* Honeypot: oculto visualmente pero accesible a bots */
.hp-field { position: absolute; left: -9999px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--color-ink);
  color: #DADADA;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
.footer-brand img { height: 24px; margin-bottom: 0.75rem; }
.footer-brand p { color: #ADADAD; font-size: 0.9rem; max-width: 320px; }
.footer-col h4 {
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a { color: #DADADA; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: #888;
  text-align: center;
}

/* ── Tablet / Desktop (≥768px) ───────────────────────────── */
@media (min-width: 768px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ── Mobile (≤767px) ─────────────────────────────────────── */
@media (max-width: 767px) {
  .hamburger { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 99;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .main-nav a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }
  .main-nav a:hover { background: var(--color-bg-alt); }

  .header-actions .btn-primary {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
  }
}
