/* ===========================================================================
   MAGAMBO · Estudio Jurídico — Sistema de diseño compartido
   Estética: beige / papel cálido, minimalista y sobria.
   Tipografías: Fraunces (display serif) + Hanken Grotesk (cuerpo).
   =========================================================================== */

:root {
  /* Paleta */
  --paper:      #F6F1E7;  /* fondo papel cálido */
  --paper-2:    #EFE7D7;  /* fondo de secciones alternas */
  --paper-3:    #EAE0CD;  /* tarjetas / hover suave */
  --ink:        #1F1B16;  /* texto principal (casi negro cálido) */
  --ink-soft:   #5A534A;  /* texto secundario */
  --ink-faint:  #8B8275;  /* texto terciario / metadatos */
  --line:       #DBD2C0;  /* hairlines / bordes */
  --brass:      #B8924A;  /* acento latón */
  --brass-dark: #9A7838;
  --green:      #3F6B5D;  /* estados positivos */
  --terra:      #A8502F;  /* alertas / indemnización */
  --white:      #FFFFFF;

  --display: 'Fraunces', Georgia, serif;
  --body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --max: 1240px;
  --gutter: clamp(22px, 5vw, 80px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

/* ---------------------------------------------------------------- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(246, 241, 231, 0.82);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.logo svg { width: 36px; height: 36px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: var(--body); font-weight: 800; letter-spacing: 0.16em; font-size: 20px; }
.logo-sub { font-weight: 400; font-size: 9px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-soft); margin-top: 5px; }
.nav-links { display: flex; gap: 32px; list-style: none; font-size: 14px; font-weight: 500; }
.nav-links a { position: relative; color: var(--ink-soft); transition: color .2s; padding: 4px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px; background: var(--brass); transition: width .25s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  background: var(--ink); color: var(--paper);
  padding: 11px 20px; font-size: 13px; font-weight: 600; letter-spacing: 0.03em;
  border: 1px solid var(--ink); transition: transform .15s, background .15s;
}
.nav-cta:hover { transform: translateY(-1px); background: var(--brass-dark); border-color: var(--brass-dark); }

/* ------------------------------------------------------------ BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; font-size: 14px; font-weight: 600; letter-spacing: 0.03em;
  cursor: pointer; transition: all .2s ease; border: 1px solid var(--ink);
  font-family: var(--body);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--brass-dark); border-color: var(--brass-dark); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-brass { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.btn-brass:hover { background: var(--brass-dark); border-color: var(--brass-dark); color: var(--paper); transform: translateY(-2px); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ----------------------------------------------------------- SECTIONS ---- */
section { padding: clamp(72px, 10vw, 120px) var(--gutter); }
.wrap { max-width: var(--max); margin: 0 auto; }
.section-header { max-width: var(--max); margin: 0 auto 64px; }
.section-eyebrow {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 22px; display: flex; align-items: center; gap: 14px;
}
.section-eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--brass); }
.section-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(32px, 4.4vw, 54px); line-height: 1.1; letter-spacing: -0.015em; max-width: 900px;
}
.section-title em { font-style: italic; color: var(--brass-dark); }

/* ------------------------------------------------------------- FOOTER ---- */
footer {
  background: var(--ink); color: var(--ink-faint);
  padding: 72px var(--gutter) 36px; border-top: 1px solid var(--line);
}
.footer-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px; margin-bottom: 56px; }
.footer-brand .logo { color: var(--paper); margin-bottom: 18px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 320px; color: #B8B0A2; }
.footer-col h4 { font-family: var(--body); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper); margin-bottom: 18px; font-weight: 700; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a { transition: color .2s; word-break: break-word; }
.footer-col a:hover { color: var(--brass); }
.footer-bottom { max-width: var(--max); margin: 0 auto; padding-top: 28px; border-top: 1px solid #3A352D; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 12px; letter-spacing: 0.04em; }

/* ------------------------------------------------ WHATSAPP FLOTANTE ------ */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.wa-float:hover { transform: scale(1.07); box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float .wa-label {
  position: absolute; right: 70px; white-space: nowrap;
  background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 6px; opacity: 0; transform: translateX(8px);
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.wa-float:hover .wa-label { opacity: 1; transform: translateX(0); }

/* ------------------------------------------------------- ANIMACIONES ----- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------- RESPONSIVE ------ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .wa-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
}
