:root {
  --bg: #f6f8fb;
  --bg-2: #ffffff;
  --bg-3: #eef2f7;
  --ink: #0f1a2b;
  --muted: #5c6777;
  --brand: #b88a1a;
  --brand-2: #d4af37;
  --border: rgba(17, 24, 39, 0.12);
  --ring: 0 0 0 3px rgba(212, 175, 55, 0.25);
  --error: #e11d48;
  --error-ring: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}
h1, h2, h3, h4 { font-family: Merriweather, 'Times New Roman', serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.centered { text-align: center; }
.muted { color: var(--muted); }
.legal { font-size: 13px; color: #6b7482; }

/* Botones */
.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: transform .06s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--ink); }
.btn-primary { background: linear-gradient(135deg, #f2d773, var(--brand-2)); color: #1a1400; box-shadow: 0 10px 24px rgba(212, 175, 55, 0.22); }
.btn-alt { background: #1a1a1a; color: #fff; }
.btn-alt:hover { background: #000; text-decoration: none; }

/* Header & Navegaci¨Žn */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
}
header .nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.brand { flex: 1 1 auto; min-width: 0; }
.brand img { height: 60px; width: auto; max-width: 100%; display: block; }
.menu { display: flex; gap: 10px; align-items: center; }
.hamb {
  display: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 0;
  cursor: pointer;
}
.hamb:focus { outline: none; box-shadow: var(--ring); }

.mobile-menu {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 30px rgba(2, 8, 23, 0.12);
  padding: 12px 16px;
  z-index: 2000;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .25s ease, opacity .2s ease;
}
.mobile-menu.open { max-height: 320px; opacity: 1; }
.mobile-menu a { display: block; padding: 12px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.mobile-menu a:hover { background: var(--bg-3); }
.mobile-menu .cta { background: linear-gradient(135deg, #f2d773, var(--brand-2)); color: #1a1400; text-align: center; }

@media (max-width: 760px) {
  .container.nav { padding-left: 16px; padding-right: 16px; }
  .menu { display: none; }
  .hamb { display: inline-flex; margin-left: auto; }
  .brand img { height: 42px; max-width: 55vw; }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fff, #f6f8fb);
}
.slider { position: absolute; inset: 0; z-index: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.hero .overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.65), rgba(246, 248, 251, 0.95)); }
.hero > .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(32px, 4.5vw, 56px); margin: 18px 0 10px; }
.hero .lead { color: #384a63; font-size: clamp(16px, 2vw, 19px); max-width: 880px; margin: 0 auto; }
.hero .ctas { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; gap: 8px; justify-content: center; z-index: 3; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--border); background: #fff; opacity: .9; cursor: pointer; }
.dot.active { background: var(--brand-2); border-color: var(--brand-2); }

/* Layout & Secciones */
section { padding: 64px 0; scroll-margin-top: 80px; }
.band { background: var(--bg-2); }
.band h1 { font-size: 2rem; margin-bottom: 1rem; }
.sec .kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; font-weight: 700; }
.sec h2 { font-size: clamp(24px, 3.5vw, 38px); margin: 0; }
.sec p { color: #425066; margin: 6px 0 0; }

.grid { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1.2fr 0.8fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.04);
}
.card h2 { margin-top: 1.5rem; color: #0b2540; font-size: 1.3rem; }
.card h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.2rem; color: var(--ink); }
.card p, .card ul, .card ol { color: #374151; line-height: 1.65; font-size: 0.96rem; }
.card ul, .card ol { margin: 10px 0 10px 20px; padding-left: 0; }
.card li { margin-bottom: 0.4rem; }

/* Tarjetas Destacadas Horizontales */
.card-featured {
  border-left: 4px solid var(--brand-2);
  background: linear-gradient(180deg, #ffffff, #fafbfd);
  transition: transform .15s ease, box-shadow .2s ease;
}
.card-featured:hover {
  box-shadow: 0 14px 28px rgba(2, 8, 23, 0.07);
}

@media (max-width: 899px) {
  .card-featured .grid.grid-2 {
    grid-template-columns: 1fr;
    gap: 18px !important;
  }
}

/* Collage */
.collage { position: relative; min-height: 340px; }
.collage .img1, .collage .img2 {
  position: absolute;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 22px rgba(2, 8, 23, 0.08);
}
.collage .img1 { inset: 0 38% 18% 0; background-image: url('img/office-balance2.jpg'); }
.collage .img2 { inset: 22% 0 0 56%; background-image: url('img/legal-team2.jpg'); }

/* Formulario Contacto */
#form .field { margin-bottom: 14px; }
#form label { font-weight: 700; color: var(--ink); margin-bottom: 6px; display: block; font-size: 0.95rem; }
#form input, #form select, #form textarea {
  width: 100%;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 4px 10px rgba(2, 8, 23, 0.03);
  font-family: inherit;
  font-size: 0.95rem;
}
#form input:focus, #form select:focus, #form textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: var(--ring); }
#form input.is-invalid, #form select.is-invalid, #form textarea.is-invalid { border-color: var(--error); box-shadow: var(--error-ring); }
.checkbox { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 16px; cursor: pointer; font-size: 0.9rem; }
.checkbox input { margin-top: 4px; }
.checkbox input.is-invalid + span { color: var(--error); }

@media (max-width: 760px) {
  #form .grid.grid-2 { grid-template-columns: 1fr; }
  #form button.btn { width: 100%; }
}

/* P¨˘gina de Gracias */
main.thanks {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}
main.thanks h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--ink); margin-bottom: 16px; }
main.thanks p { color: #475569; max-width: 600px; margin: 0 auto 24px; font-size: 1.05rem; }
main.thanks .actions { display: flex; justify-content: center; gap: 14px; }

/* Footer */
footer {
  background: var(--bg-3);
  padding: 3rem 1rem 2rem;
  border-top: 1px solid var(--border);
}
footer h4 { margin-top: 0; margin-bottom: 12px; }
footer a { color: var(--brand); }
footer .disclaimer {
  text-align: center;
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.6;
  max-width: 850px;
  margin: 12px auto 0;
}
@media (max-width: 760px) {
  footer .grid { grid-template-columns: 1fr; text-align: center; }
  footer img { margin: 0 auto 0.5rem; }
}