/* ============================================================
   NULIDAD MATRIMONIAL — Daniel Vicente López Villafranca
   Sistema visual compartido
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Mulish:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Neutros cálidos */
  --paper:      oklch(0.985 0.006 80);
  --paper-2:    oklch(0.965 0.009 78);
  --paper-3:    oklch(0.935 0.012 76);
  --ink:        oklch(0.255 0.012 55);
  --ink-soft:   oklch(0.42 0.014 55);
  --ink-faint:  oklch(0.60 0.012 60);
  --line:       oklch(0.90 0.012 70);
  --line-soft:  oklch(0.93 0.010 72);

  /* Rojo corporativo (vino / carmesí) */
  --red:        oklch(0.46 0.155 24);
  --red-deep:   oklch(0.37 0.13 22);
  --red-bright: oklch(0.55 0.18 26);
  --red-tint:   oklch(0.95 0.03 24);

  /* Azul celeste corporativo */
  --celeste:        oklch(0.74 0.085 235);
  --celeste-deep:   oklch(0.50 0.10 248);
  --celeste-ink:    oklch(0.40 0.075 250);
  --celeste-tint:   oklch(0.955 0.022 235);

  /* Iris (acento puntual) */
  --iris:       oklch(0.55 0.13 292);
  --iris-tint:  oklch(0.955 0.025 292);

  --gold:       oklch(0.66 0.10 75);

  --shadow-sm: 0 1px 2px oklch(0.3 0.02 50 / 0.06), 0 2px 6px oklch(0.3 0.02 50 / 0.05);
  --shadow-md: 0 4px 14px oklch(0.3 0.02 50 / 0.08), 0 2px 6px oklch(0.3 0.02 50 / 0.05);
  --shadow-lg: 0 18px 50px oklch(0.3 0.03 50 / 0.13), 0 6px 18px oklch(0.3 0.02 50 / 0.07);

  --maxw: 1200px;
  --radius: 4px;
  --radius-lg: 8px;

  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

p { margin: 0 0 1.1em; text-wrap: pretty; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-deep); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 32px; }

/* Etiqueta superior tipo kicker */
.kicker {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--red);
  display: inline-block;
}

/* ===================== HEADER / NAV ===================== */
.topbar {
  background: var(--red-deep);
  color: oklch(0.95 0.02 30);
  font-size: 13.5px;
  letter-spacing: 0.01em;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 40px;
  flex-wrap: wrap;
}
.topbar a { color: oklch(0.95 0.02 30); }
.topbar .tb-group { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar .tb-item { display: inline-flex; align-items: center; gap: 8px; opacity: 0.95; }
.topbar .tb-item svg { width: 15px; height: 15px; opacity: 0.85; }
.topbar .tb-cta {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(0.985 0.006 80 / 0.96);
  backdrop-filter: saturate(140%) blur(10px);
}
.sh-top { border-bottom: 1px solid var(--line); }
.sh-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.sh-nav-bar { }
.sh-nav-bar > .wrap { display: flex; align-items: stretch; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand .crest {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  flex: none;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.18), inset 0 0 0 4px oklch(1 0 0 / 0.06);
}
.brand-logo { width: 52px; height: 52px; object-fit: contain; flex: none; }
.brand .bt { line-height: 1.05; }
.brand .bt strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: block;
}
.brand .bt span {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

/* Nav principal */
.mainnav { display: flex; align-items: stretch; gap: 2px; }
.mainnav > li { list-style: none; position: relative; }
.mainnav { margin: 0; padding: 0; }
.mainnav > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.mainnav > li > a:hover,
.mainnav > li.current > a { color: var(--red); border-bottom-color: var(--red); }
.mainnav .caret { width: 9px; height: 9px; opacity: 0.6; transition: transform 0.2s; }
.mainnav > li:hover .caret { transform: rotate(180deg); }

/* Submenú desplegable */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 320px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 120;
}
.mainnav > li:hover .submenu,
.mainnav > li:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu.right { left: auto; right: 0; }
.submenu li { list-style: none; }
.submenu a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.35;
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.submenu a .num {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  min-width: 18px;
  flex: none;
}
.submenu a:hover { background: var(--red-tint); color: var(--red-deep); }
.submenu .sub-new {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--celeste-deep);
  padding: 2px 7px;
  border-radius: 20px;
  align-self: center;
}

.menu-btn {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 46px; height: 46px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn svg { width: 22px; height: 22px; color: var(--ink); }

/* ===================== BOTONES ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.03em;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.18s, background 0.18s, color 0.18s;
  text-transform: uppercase;
  line-height: 1;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--red-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--red); border-color: var(--red); }
.btn-ghost:hover { background: var(--red); color: #fff; }
.btn-light { background: #fff; color: var(--red); box-shadow: var(--shadow-sm); }
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ===================== SECCIONES GENÉRICAS ===================== */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.bg-paper2 { background: var(--paper-2); }
.bg-celeste { background: var(--celeste-tint); }

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { color: var(--ink-soft); font-size: 18px; margin-top: 10px; }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--ink); color: oklch(0.84 0.01 70); font-size: 14.5px; }
.site-footer a { color: oklch(0.84 0.01 70); }
.site-footer a:hover { color: #fff; }
.footer-top { padding: 64px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 2fr 1fr;
  gap: 48px;
}
.footer-brand .bt strong { color: #fff; }
.footer-brand .bt span { color: oklch(0.7 0.01 70); }
.footer-contact { margin-top: 22px; line-height: 1.9; font-style: normal; color: oklch(0.82 0.01 70); }
.footer-contact strong { color: #fff; font-weight: 600; }
.footer h4 {
  color: #fff; font-family: var(--sans); font-size: 12.5px;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800;
  margin-bottom: 18px;
}
.footer-links { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.footer-links li { margin-bottom: 9px; break-inside: avoid; }
.regions { font-size: 13px; color: oklch(0.74 0.01 70); line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid oklch(1 0 0 / 0.1);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: oklch(0.68 0.01 70);
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 2px; }
.dev-credit { display: inline-flex; align-items: center; gap: 8px; }

/* ===================== FORMULARIO DE CONTACTO ===================== */
.contact-data { list-style: none; padding: 0; margin: 28px 0 28px; display: grid; gap: 18px; }
.contact-data li { display: flex; gap: 16px; align-items: flex-start; }
.contact-data svg { width: 22px; height: 22px; color: var(--red); flex: none; margin-top: 4px; }
.contact-data span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.contact-data a, .contact-data address { font-size: 18px; font-style: normal; color: var(--ink); font-family: var(--serif); }
.contact-data address { font-size: 16px; line-height: 1.4; }
.map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); height: 240px; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(0.2); }

.contacto-form {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 38px; box-shadow: var(--shadow-md);
}
.contacto-form h3 { font-size: 24px; margin-bottom: 22px; }
.contacto-form label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 16px; letter-spacing: 0.02em; }
.contacto-form input, .contacto-form select, .contacto-form textarea {
  width: 100%; margin-top: 7px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--sans); font-size: 15px; color: var(--ink); background: var(--paper);
  font-weight: 400; transition: border-color 0.15s, box-shadow 0.15s;
}
.contacto-form input:focus, .contacto-form select:focus, .contacto-form textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint);
}
.contacto-form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contacto-form .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 13px; color: var(--ink-soft); }
.contacto-form .check input { width: auto; margin: 3px 0 0; }
.contacto-form .btn { width: 100%; justify-content: center; margin-top: 6px; }
.form-note { font-size: 13px; color: var(--celeste-deep); margin: 14px 0 0; font-weight: 600; }
.form-error { color: #c0392b; }
.contacto-form .btn[disabled] { opacity: .6; cursor: not-allowed; }
.error-msg { display: block; font-size: 12px; color: #c0392b; font-weight: 600; margin-top: 4px; min-height: 16px; }
.contacto-form input.campo-error,
.contacto-form select.campo-error,
.contacto-form textarea.campo-error { border-color: #c0392b; box-shadow: 0 0 0 3px oklch(0.65 0.18 25 / 0.12); }

/* ===================== UTILIDADES ===================== */
.lead { font-size: 20px; line-height: 1.7; color: var(--ink-soft); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.center { text-align: center; }

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .sh-nav-bar { border-bottom: none; }
  .sh-top { }

  /* Dropdown debajo del header */
  .mainnav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: var(--paper);
    border-top: 3px solid var(--red-deep);
    box-shadow: 0 8px 28px oklch(0.2 0.02 50 / 0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 130;
  }
  .site-header.nav-open .mainnav {
    max-height: 80vh;
    overflow-y: auto;
  }
  .mainnav > li > a {
    height: auto;
    padding: 15px 24px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
  }
  .mainnav > li > a:hover,
  .mainnav > li.current > a { background: var(--red-tint); border-bottom-color: var(--line-soft); }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0;
    padding: 2px 0 8px 36px;
    min-width: 0; background: var(--paper-2);
    display: none;
  }
  .mainnav > li.open .submenu { display: block; }
  .mainnav .caret { margin-left: auto; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding: 0 20px; }
  .section { padding: 64px 0; }
  .topbar .tb-group.secondary { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { columns: 1; }
  .form-row { grid-template-columns: 1fr; }
  .sh-top-inner { padding-top: 10px; padding-bottom: 10px; }
  .brand .bt strong { font-size: 16px; }
  .brand .bt span { font-size: 10px; }
  .brand-logo { width: 40px; height: 40px; }
}
