/* ==========================================================
   NOXAA Estudio Jurídico — estilos (mobile-first)
   ========================================================== */

:root {
  --navy: #0f3b66;
  --navy-dark: #0a2a4a;
  --gold: #c9a24a;
  --gold-dark: #b08a34;
  --bg: #eeeeee;
  --white: #ffffff;
  --text: #1f2a37;
  --muted: #5b6676;
  --border: #d9dde3;

  --font-title: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 10px;
  --shadow: 0 6px 24px rgba(15, 59, 102, 0.1);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--navy); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 { font-family: var(--font-title); color: var(--navy); line-height: 1.2; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.container { width: min(100% - 32px, 1120px); margin-inline: auto; }
.container-narrow { width: min(100% - 32px, 780px); }
.center { text-align: center; margin-top: 2rem; }
.text-gold { color: var(--gold); }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font: 600 0.95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Logo (recreado con texto) ---------- */
.logo { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; }
.logo-word {
  font-family: var(--font-title); font-weight: 500; font-size: 1.9rem;
  letter-spacing: 0.01em; color: var(--navy);
}
.logo-a { color: var(--gold); margin-left: -0.05em; }
.logo-line { display: block; width: 100%; height: 1.5px; background: var(--navy); margin: 3px 0 4px; }
.logo-sub { font-size: 0.5rem; font-weight: 700; letter-spacing: 0.22em; color: var(--navy); }
.logo-sub span { color: var(--gold); }

.logo-light .logo-word, .logo-light .logo-sub { color: #fff; }
.logo-light .logo-line { background: rgba(255, 255, 255, 0.7); }
.logo-light .logo-a, .logo-light .logo-sub span { color: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.nav-toggle {
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 24px; height: 2px; background: var(--navy);
  border-radius: 2px; transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 8px 16px 20px; display: none;
}
.main-nav.is-open { display: block; }
.main-nav a:not(.btn) {
  display: block; padding: 12px 4px; color: var(--navy); font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.main-nav a:not(.btn):hover { color: var(--gold-dark); }
.main-nav li:last-child { margin-top: 16px; }
.main-nav .btn { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--bg);
  padding: 56px 0 96px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--navy) 22%, transparent 24%);
  background-size: 18px 18px; opacity: 0.35;
  -webkit-mask-image: linear-gradient(to top right, #000 0%, transparent 55%);
          mask-image: linear-gradient(to top right, #000 0%, transparent 55%);
}
.hero-inner { position: relative; max-width: 820px; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 0.75rem;
}
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); margin-bottom: 1rem; }
.hero-lead { font-size: 1.1rem; color: var(--text); max-width: 640px; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 2rem; }
.trust-list { display: grid; gap: 8px; font-size: 0.92rem; font-weight: 500; color: var(--navy); }
.trust-list li { display: flex; align-items: center; gap: 8px; }
.trust-list svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--gold-dark); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head p:last-child { color: var(--muted); margin-bottom: 0; }

/* Pasos */
.steps { display: grid; gap: 20px; }
.step {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow);
}
.step p { color: var(--muted); margin-bottom: 0; }
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: var(--gold); font: 600 1.3rem var(--font-title); margin-bottom: 14px;
}

/* Tarjetas */
.cards { display: grid; gap: 20px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 28px 24px;
  border-top: 4px solid var(--gold); box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin-bottom: 0; }
.card-icon { width: 40px; height: 40px; margin-bottom: 14px; fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Por qué elegirnos */
.features { display: grid; gap: 28px; }
.features li { padding-left: 20px; border-left: 3px solid var(--gold); }
.features p { color: var(--muted); margin-bottom: 0; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; position: relative;
  font-weight: 600; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--gold-dark); transition: transform 0.2s;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 20px; margin: 0; color: var(--muted); }

/* Contacto */
.contact-grid { display: grid; gap: 40px; }
.contact-list { margin: 1.25rem 0 1.75rem; display: grid; gap: 8px; }
.contact-form {
  background: var(--bg); border-radius: var(--radius); padding: 28px 22px; border-top: 4px solid var(--navy);
  display: grid; gap: 16px;
}
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.opt { font-weight: 400; color: var(--muted); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); }
.field-check label { font-weight: 400; color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; font-weight: 600; min-height: 1.5em; }
.form-status.is-ok { color: #1b6e3a; }
.form-status.is-error { color: #b3261e; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #d8e0ea; padding: 56px 0 24px; font-size: 0.94rem; }
.site-footer a { color: #d8e0ea; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; gap: 32px; padding-bottom: 32px; }
.footer-grid ul { display: grid; gap: 8px; }
.footer-title { font: 700 0.8rem var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.footer-text { margin: 16px 0 0; max-width: 280px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 20px; display: grid; gap: 8px; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
.footer-legal { color: #9fb0c4; font-size: 0.8rem; }

/* Botón flotante WhatsApp */
/* Redes sociales */
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1.5rem; }
.social-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.9rem; color: var(--navy); transition: background .2s, color .2s, border-color .2s; }
.social-links a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.social-links svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.site-footer .social-links-footer { display: flex; gap: 10px; margin: 14px 0 0; }
.social-links-footer a { padding: 0; width: 38px; height: 38px; justify-content: center; border-color: rgba(255,255,255,.3); color: #d8e0ea; }
.social-links-footer a:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-dark); }

.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 56px; height: 56px;
  border-radius: 50%; background: #25d366; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Páginas legales ---------- */
.legal { padding: 48px 0 72px; }
.legal h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--text); }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.legal .updated { color: var(--muted); font-size: 0.9rem; }
.legal-note { background: var(--bg); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 6px; font-size: 0.92rem; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; }
  .trust-list { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 32px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); gap: 32px 40px; }
}

@media (min-width: 900px) {
  :root { --header-h: 78px; }
  .logo-word { font-size: 2.2rem; }
  .nav-toggle { display: none; }
  .main-nav { position: static; display: block; padding: 0; border: 0; background: transparent; }
  .main-nav ul { display: flex; align-items: center; gap: 28px; }
  .main-nav a:not(.btn) { padding: 6px 0; border: 0; font-size: 0.92rem; }
  .main-nav li:last-child { margin: 0; }
  .main-nav .btn { width: auto; }

  .hero { padding: 96px 0 140px; }
  .section { padding: 88px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
  .contact-form { padding: 36px; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1.3fr 1.3fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
