/* ======================================================
   BALANCE · Despacho Contable — hoja de estilos
   Paleta: verde pino + jade + latón sobre papel claro
   ====================================================== */

:root {
  --pine:      #0e2340;   /* azul marino profundo (secciones oscuras) */
  --pine-2:    #16385a;
  --paper:     #f1f4f8;   /* fondo claro, azul muy tenue */
  --paper-2:   #ffffff;
  --jade:      #2563a8;   /* acento principal (azul) */
  --jade-soft: #e4edf8;
  --brass:     #c9a24b;   /* acento cálido (dorado) */
  --ink:       #0f1e30;   /* texto */
  --muted:     #566579;   /* texto secundario */
  --line:      rgba(14, 35, 64, 0.12);

  --wrap: 1140px;
  --radius: 16px;
  --shadow: 0 20px 50px -24px rgba(13, 43, 38, 0.45);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Tipografía base ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 14px;
}

.section-title { font-size: clamp(1.9rem, 4vw, 2.9rem); }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-lead, .section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; margin-top: 14px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-solid { background: var(--brass); color: var(--pine); }
.btn-solid:hover { transform: translateY(-2px); background: #d6b05f; }

.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255,255,255,0.08); }

.btn-wa { background: #1faf5a; color: #fff; margin-top: 26px; }
.btn-wa:hover { transform: translateY(-2px); background: #23c063; }
.btn-wa svg { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 245, 241, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  color: var(--jade);
  background: var(--jade-soft);
  border-radius: 10px;
}
.brand-mark svg { width: 22px; height: 22px; }

.site-nav { display: flex; gap: 30px; margin-left: auto; margin-right: 26px; }
.site-nav a { font-weight: 500; color: var(--muted); transition: color 0.2s; }
.site-nav a:hover { color: var(--ink); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.25s; }

.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 12px 24px 22px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mobile-nav a { padding: 12px 4px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 12px; border: 0; }

/* ---------- Motivo de líneas tipo hoja contable ---------- */
.ledger-lines {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 43px,
    rgba(255, 255, 255, 0.05) 44px
  );
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 85% 0%, rgba(23,135,107,0.30) 0%, transparent 55%),
    var(--pine);
  color: #eaf1ec;
  padding: 90px 0 96px;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero .eyebrow { color: var(--brass); }
.hero-title { font-size: clamp(2.4rem, 5.2vw, 4rem); color: #fff; }

.underline-word { position: relative; white-space: nowrap; color: var(--brass); }
.brush { position: absolute; left: 0; right: 0; bottom: -0.18em; width: 100%; height: 0.5em; color: var(--brass); }

.hero-sub { margin-top: 22px; font-size: 1.15rem; color: #c3d3cb; max-width: 520px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero .btn-ghost { color: #eaf1ec; }

.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 22px; margin-top: 40px; font-size: 0.92rem; color: #a9bcb3; }
.hero-trust li { display: flex; align-items: center; gap: 9px; }
.hero-trust .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--jade); }

/* Tarjeta firma: mini balance */
.hero-card { display: flex; justify-content: center; }
.balance-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, #ffffff, #f6faf7);
  color: var(--ink);
  border-radius: 20px;
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.6);
}
.balance-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.balance-label { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.balance-chip { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--jade); background: var(--jade-soft); padding: 5px 11px; border-radius: 999px; }
.balance-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 0.95rem; color: var(--muted); }
.balance-row b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.balance-divider { height: 1px; background: var(--line); margin: 8px 0; }
.balance-total { font-size: 1.02rem; }
.balance-total span { color: var(--ink); font-weight: 600; }
.balance-total b { color: var(--jade); font-size: 1.25rem; font-family: var(--font-display); }
.balance-foot { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 0.85rem; color: var(--jade); font-weight: 500; }
.balance-foot svg { width: 18px; height: 18px; }

/* ---------- Servicios ---------- */
.services { padding: 96px 0; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.service-ic {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 13px;
  background: var(--jade-soft);
  color: var(--jade);
  margin-bottom: 20px;
}
.service-ic svg { width: 26px; height: 26px; }
.service-card:hover .service-ic { background: var(--jade); color: #fff; }
.service-card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Nosotros ---------- */
.about { padding: 20px 0 96px; }
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.about-copy > p { color: var(--muted); margin-top: 14px; font-size: 1.08rem; }
.about-points { list-style: none; margin-top: 28px; display: grid; gap: 16px; }
.about-points li { display: flex; gap: 13px; align-items: flex-start; }
.about-points svg { width: 22px; height: 22px; color: var(--jade); flex-shrink: 0; margin-top: 2px; }
.about-points b { color: var(--ink); }
.about-points div { color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: var(--pine);
  border-radius: 24px;
  padding: 34px;
}
.stat { padding: 18px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.6rem; color: var(--brass); font-variant-numeric: tabular-nums; }
.stat span { color: #a9bcb3; font-size: 0.92rem; }

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(23,135,107,0.28) 0%, transparent 55%),
    var(--pine);
  color: #eaf1ec;
  padding: 90px 0;
}
.contact-grid { position: relative; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: start; }
.contact .eyebrow { color: var(--brass); }
.contact .section-title { color: #fff; }
.contact-lead { color: #c3d3cb; margin-top: 14px; font-size: 1.1rem; max-width: 400px; }

.contact-direct { list-style: none; margin-top: 34px; display: grid; gap: 20px; }
.contact-direct li { display: flex; gap: 15px; align-items: center; }
.contact-direct .ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,0.08); color: var(--brass); flex-shrink: 0; }
.contact-direct .ic svg { width: 22px; height: 22px; }
.contact-direct small { display: block; color: #a9bcb3; font-size: 0.8rem; }
.contact-direct a, .contact-direct span:not(.ic) { color: #fff; font-weight: 500; font-size: 1.02rem; }
.contact-direct a:hover { color: var(--brass); }

/* Formulario */
.form-card { background: var(--paper-2); color: var(--ink); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(23,135,107,0.15);
}
.form-note { margin-top: 14px; font-size: 0.92rem; text-align: center; min-height: 1.2em; }
.form-note.ok { color: var(--jade); }
.form-note.err { color: #c0392b; }

/* ---------- Footer ---------- */
.site-footer { background: #0a211d; color: #cfe0d8; padding: 54px 0 34px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #fff; flex-wrap: wrap; }
.footer-brand .brand-mark { background: rgba(255,255,255,0.08); color: var(--brass); }
.footer-brand p { width: 100%; font-family: var(--font-body); font-weight: 400; font-size: 0.9rem; color: #93a89f; margin-top: 4px; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { color: #cfe0d8; font-weight: 500; }
.footer-links a:hover { color: var(--brass); }
.footer-legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px; font-size: 0.85rem; color: #7f948b; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: grid; place-items: center;
  width: 58px; height: 58px;
  background: #1faf5a; color: #fff;
  border-radius: 50%;
  box-shadow: 0 12px 28px -8px rgba(31,175,90,0.7);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .hero { padding: 66px 0 72px; }
  .services, .contact { padding: 70px 0; }
  .about { padding: 10px 0 70px; }
  .services-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-trust { gap: 12px 22px; }
}

/* ---------- Accesibilidad ---------- */
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .service-card:hover, .wa-float:hover { transform: none; }
}
