/* =========================================================
   H-Consulting · Asesoría Financiera & Gestión de Negocios
   Paleta y tipografía extraídas del logo
   ========================================================= */

:root {
  --navy:        #1B2A4E;
  --navy-soft:   #2A3A60;
  --warm-gray:   #6E7282;
  --text:        #2A2F3A;
  --white:       #FFFFFF;
  --cream:       #FAF8F4;
  --gold:        #B8915A;
  --gold-dark:   #9E7A47;
  --line:        #D8D5CE;

  --serif: "Fraunces", "Playfair Display", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(64px, 9vw, 120px);

  --shadow-card: 0 1px 2px rgba(27, 42, 78, 0.04), 0 8px 24px rgba(27, 42, 78, 0.05);
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin: 0 0 20px;
}

.eyebrow--gold { color: var(--gold); }

.h-display {
  font-size: clamp(2.6rem, 5.4vw, 4.5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.h-section {
  font-size: clamp(2rem, 3.8vw, 3rem);
  letter-spacing: -0.015em;
}

.h-card { font-size: 1.4rem; }

.lead {
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  color: var(--warm-gray);
  line-height: 1.6;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy); color: var(--cream); }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head .lead { margin-top: 18px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 14px 24px;
  border-radius: var(--radius);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-soft); }

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

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

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--navy);
  padding: 0;
  font-size: 0.95rem;
}
.btn-text .arrow { transition: transform 200ms ease; }
.btn-text:hover .arrow { transform: translateX(4px); }

/* ---------- NAV ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  gap: 32px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  transition: color 180ms ease;
}
.nav-links a:hover { color: var(--navy); }
.nav-cta { padding: 10px 18px; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: var(--navy);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ---------- LOGO ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  text-decoration: none;
}

/* ---------- LOGOS SVG (cabecera) ---------- */
.logo-svg {
  display: block;
  height: auto;
  width: auto;
}

/* Logo principal en cabecera (H + Consulting) */
.logo-header {
  height: 58px;       /* Desktop: prominente */
}

/* ---------- LOGO FOOTER (versión completa con descriptor) ---------- */
.logo-svg-footer {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
}

/* ---------- HERO ---------- */

.hero {
  padding-top: clamp(56px, 8vw, 100px);
  padding-bottom: clamp(56px, 8vw, 100px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero-content .h-display { margin-top: 8px; }
.hero-content .lead { margin-top: 24px; max-width: 580px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* Hero visual — minimalista, líneas finas */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.hero-visual svg { width: 85%; height: 85%; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(216,213,206,0.5) calc(50% - 0.5px), rgba(216,213,206,0.5) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(216,213,206,0.5) calc(50% - 0.5px), rgba(216,213,206,0.5) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  pointer-events: none;
}

/* ---------- 3 EJES (cards) ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(216, 213, 206, 0.5);
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(27,42,78,0.05), 0 16px 36px rgba(27,42,78,0.08);
}
.card-icon {
  width: 48px; height: 48px;
  color: var(--navy);
  margin-bottom: 24px;
}
.card-icon svg { width: 100%; height: 100%; }
.card h3 { margin-bottom: 14px; }
.card p {
  color: var(--warm-gray);
  font-size: 0.98rem;
  margin-bottom: 28px;
  flex: 1;
}
.card .badge {
  align-self: flex-start;
  margin: -6px 0 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(184, 145, 90, 0.12);
  color: var(--gold-dark);
  border-radius: 3px;
}

/* ---------- EJES EXPANDIDOS ---------- */

.axis {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.axis--reverse .axis-head { order: 2; }

.axis-head .h-section { margin-bottom: 18px; }
.axis-head .axis-badge { margin-top: 20px; }

.axis-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.axis-badge .dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.service-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 18px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.service-item:last-child { border-bottom: none; padding-bottom: 0; }
.service-item .icon-sm {
  width: 24px; height: 24px;
  color: var(--navy);
  margin-top: 4px;
}
.service-item h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0;
}
.service-item p {
  color: var(--warm-gray);
  font-size: 0.96rem;
}

/* Eje 3 — grid 2x2 */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}
.services-grid .service-item {
  border-bottom: none;
  padding-bottom: 0;
}

/* Pull-quote en eje 2 */
.pullquote {
  margin-top: 56px;
  padding: 28px 32px;
  background: var(--white);
  border-left: 3px solid var(--gold);
  border-radius: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.5;
  max-width: 760px;
}

/* ---------- SOBRE ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: start;
}
.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 1px 2px rgba(27, 42, 78, 0.06), 0 12px 32px rgba(27, 42, 78, 0.10);
}
.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.about-content h2 { margin-bottom: 24px; }
.about-content p {
  color: var(--text);
  margin-bottom: 18px;
  max-width: 620px;
}
.about-content p strong { color: var(--navy); font-weight: 600; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  background: var(--white);
  border: 1px solid var(--navy);
  color: var(--navy);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---------- METODOLOGÍA ---------- */

.method {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  margin-top: 56px;
}
.method::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.method-step {
  position: relative;
  z-index: 1;
}
.method-num {
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  background: var(--white);
  display: inline-block;
  padding-right: 16px;
  margin-bottom: 16px;
}
.method-step h3 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: 0;
}
.method-step p {
  font-size: 0.95rem;
  color: var(--warm-gray);
  line-height: 1.55;
}

/* ---------- CONTACTO ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact-info .eyebrow { color: var(--gold); }
.contact-info h2 { color: var(--white); margin-bottom: 18px; }
.contact-info .lead { color: rgba(250, 248, 244, 0.78); margin-bottom: 40px; }
.contact-info dl { margin: 0; }
.contact-info .info-row {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(216, 213, 206, 0.18);
  font-size: 0.96rem;
}
.contact-info .info-row:last-child { border-bottom: none; }
.info-label {
  width: 110px;
  flex-shrink: 0;
  color: rgba(250, 248, 244, 0.6);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 2px;
}
.info-value { color: var(--cream); }
.info-value a:hover { color: var(--gold); }

.contact-note {
  margin-top: 28px;
  font-size: 0.85rem;
  color: rgba(250, 248, 244, 0.6);
}

/* Form */
.contact-form {
  background: var(--white);
  color: var(--text);
  padding: 40px;
  border-radius: var(--radius);
}
.contact-form .form-row { margin-bottom: 20px; }
.contact-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin-bottom: 8px;
}
.contact-form label .req { color: var(--gold-dark); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,42,78,0.18);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--warm-gray);
  margin-bottom: 20px;
}
.checkbox-row input { width: auto; margin-top: 3px; flex-shrink: 0; }
.checkbox-row a { color: var(--navy); text-decoration: underline; }
.form-submit { width: 100%; justify-content: center; padding: 16px; }
.legal-note {
  font-size: 0.78rem;
  color: var(--warm-gray);
  margin-top: 14px;
  line-height: 1.5;
}

/* ---------- FOOTER ---------- */

.footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-desc {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--warm-gray);
  max-width: 280px;
}
.footer-block h5 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 14px;
}
.footer-block ul { list-style: none; margin: 0; padding: 0; }
.footer-block li {
  font-size: 0.86rem;
  color: var(--warm-gray);
  padding: 4px 0;
}
.footer-block a:hover { color: var(--navy); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 0.82rem;
  color: var(--warm-gray);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- ANIMACIONES ENTRADA ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; margin: 0 auto; aspect-ratio: 5/4; }
  .cards-grid { grid-template-columns: 1fr; gap: 20px; }
  .axis, .axis--reverse { grid-template-columns: 1fr; }
  .axis--reverse .axis-head { order: 0; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; }
  .method { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .method::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-inner { height: 80px; }
  .logo-header { height: 48px; }     /* Tablet: tamaño intermedio */
  .nav.is-open .nav-links {
    display: flex;
    position: absolute;
    top: 80px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 20px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    gap: 18px;
  }
  .services-grid { grid-template-columns: 1fr; gap: 28px; }
  .method { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 22px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .card { padding: 28px 24px; }
  .nav-inner { gap: 12px; height: 76px; }
  /* En móvil: logo completo pero más pequeño */
  .logo-header { height: 38px; }
  /* Footer logo más pequeño en móvil */
  .logo-svg-footer { max-width: 260px; }
}

/* ---------- FORMULARIO: estado y honeypot ---------- */

/* Honeypot oculto: invisible para usuarios, lectores de pantalla y tab,
   pero presente en el DOM para que los bots lo rellenen. */
.hp-field {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Feedback inline tras envío (éxito o error) */
.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.form-status.is-success {
  background: #ecf8ef;
  color: #1d6b2f;
  border: 1px solid #b9e3c2;
}
.form-status.is-error {
  background: #fdecec;
  color: #8a1c1c;
  border: 1px solid #f1c2c2;
}

/* Botón mientras se envía */
.form-submit[disabled] {
  opacity: 0.65;
  cursor: wait;
}

/* ---------- ACCESIBILIDAD GLOBAL & FIXES DEL AUDIT ---------- */

/* color-scheme: light evita que Windows dark mode pinte inputs/scrollbars oscuros */
html { color-scheme: light; }

/* Compensar header sticky (93px desktop) cuando se navega a una ancla */
section[id], main[id] { scroll-margin-top: 110px; }
@media (max-width: 720px) {
  section[id], main[id] { scroll-margin-top: 88px; }
}

/* Skip link: invisible hasta que recibe foco con Tab */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  z-index: 10000;
  transition: top 120ms ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Tap rápido en móvil + sin highlight gris en iOS */
.btn,
.btn-text,
.nav-links a,
.nav-toggle,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Focus visible explícito para botones y enlaces de navegación
   (consistente con la marca; reemplaza outline default del browser) */
.btn:focus-visible,
.nav-cta:focus-visible,
.btn-text:focus-visible,
.nav-links a:focus-visible,
.logo:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Native <select>: fija bg + color para que Windows dark mode no lo invierta */
.contact-form select {
  background-color: var(--white);
  color: var(--text);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231B2A4E' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 40px;
}

/* Safe-area en footer y secciones full-bleed para iPhones con home indicator */
.footer,
.bg-navy {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* Tabular-nums en los números grandes de metodología (01·02·03·04) */
.method-num {
  font-variant-numeric: tabular-nums;
}
