:root {
  color-scheme: light;
  --navy: #09234d;
  --navy-2: #12335f;
  --green: #0f5a35;
  --green-2: #176640;
  --gold: #c5a257;
  --ink: #18304f;
  --muted: #5f6f7d;
  --surface: #ffffff;
  --line: #dbe3eb;
  --page: #f5f7f8;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 34px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.86) 0 26%, rgba(255, 255, 255, 0.58) 42% 58%, rgba(255, 255, 255, 0.82) 78% 100%),
    url("assets/portal-background.png") center / cover no-repeat,
    var(--page);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.portal {
  width: min(920px, 100%);
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  margin-bottom: 26px;
}

.brand-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: var(--navy);
}

.brand-mark svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

h1 {
  margin: 4px 0 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 3.45rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.title-rule {
  width: 210px;
  height: 2px;
  position: relative;
  display: block;
  margin: 16px 0 14px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.title-rule::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

.lead {
  margin: 0;
  color: #526171;
  font-size: 1rem;
  line-height: 1.5;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 46px);
  align-items: stretch;
}

.access-option {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid rgba(219, 227, 235, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: inherit;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 20px 54px rgba(9, 35, 77, 0.2);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.access-option:hover,
.access-option:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 26px 66px rgba(9, 35, 77, 0.26);
  outline: none;
}

.card-photo {
  height: 96px;
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.9)),
    url("assets/portal-background.png") center / cover no-repeat;
  filter: saturate(0.65);
}

.notaria .card-photo {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(9, 35, 77, 0.34)),
    url("assets/notaria-card.png") center 58% / cover no-repeat;
}

.conservador .card-photo {
  background-position: 88% 48%;
}

.card-photo::after {
  content: "";
  display: block;
  height: 4px;
  margin-top: 92px;
}

.notaria .card-photo::after,
.notaria .button-label {
  background: var(--navy);
}

.conservador .card-photo::after,
.conservador .button-label {
  background: var(--green);
}

.icon {
  width: 92px;
  height: 92px;
  z-index: 1;
  display: grid;
  place-items: center;
  align-self: center;
  margin-top: -46px;
  border-radius: 999px;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(9, 35, 77, 0.2);
}

.notaria .icon {
  background: var(--navy);
}

.conservador .icon {
  background: var(--green);
}

.icon svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 18px 24px 24px;
}

.access-option strong {
  display: block;
  min-height: 72px;
  color: currentColor;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 2.8vw, 1.58rem);
  line-height: 1.08;
  text-transform: uppercase;
}

.notaria {
  color: var(--navy);
}

.conservador {
  color: var(--green);
}

.access-option small {
  max-width: 270px;
  display: block;
  margin: 6px auto 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.button-label {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: auto;
  padding: 12px 16px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.button-label::after {
  content: "->";
  font-size: 1.05rem;
  font-weight: 700;
}

.site-footer {
  width: fit-content;
  max-width: 100%;
  margin: 18px auto 0;
  padding: 8px 14px;
  border: 1px solid rgba(219, 227, 235, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 36px rgba(9, 35, 77, 0.1);
  color: #3f5060;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.site-footer p {
  margin: 0;
  padding: 0;
}

.site-footer p + p {
  margin-top: 2px;
}

.site-footer strong {
  color: var(--navy);
}

@media (max-width: 760px) {
  body {
    align-items: start;
    padding-top: 28px;
  }

  .portal {
    width: min(430px, 100%);
  }

  .access-grid {
    grid-template-columns: 1fr;
  }

  .access-option {
    min-height: 360px;
  }

  .access-option strong {
    min-height: auto;
  }

  .site-footer {
    text-align: center;
  }
}

html { scroll-padding-top: 24px; }
body { display: flex; flex-direction: column; align-items: center; padding: 0 18px 34px; }
.portal { margin: auto 0; }
.topbar { position: static; flex-shrink: 0; width: calc(100% + 36px); margin: 0 -18px 30px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); box-shadow: 0 4px 24px rgba(9,35,77,.05); }
.topnav { max-width: 1120px; margin: auto; padding: 22px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.topnav a { color: var(--navy); text-decoration: none; }
.nav-brand { display: block; max-width: 100%; text-align: center; font-family: Georgia, serif; font-size: clamp(1rem, 2vw, 1.4rem); font-weight: 700; line-height: 1.4; }
.brand-institutions, .brand-person { display: block; }
.brand-person { margin-top: 6px; font-size: .92em; font-weight: 400; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 12px; font-size: 1rem; font-weight: 600; }

.nav-links > a, .nav-links > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 18px; border: 1px solid var(--navy); border-radius: 6px; background: var(--navy); color: #fff; text-align: center; font: inherit; line-height: 1.35; text-decoration: none; }
.nav-links > a:hover, .nav-links > button:hover { background: var(--navy-2); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.send-message { background: var(--navy); color: white; border: 1px solid var(--navy); border-radius: 6px; padding: 12px 20px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 16px; }
.send-message:hover { background: var(--navy-2); }
.send-message:disabled { cursor: wait; opacity: .65; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.contact-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 30px; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 12px; color: var(--ink); box-shadow: 0 24px 80px rgba(9,35,77,.25); }
.contact-dialog::backdrop { background: rgba(9,25,46,.65); }
body:has(.contact-dialog[open]) { overflow: hidden; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 700; color: var(--green); }
.contact-dialog h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.5rem, 5vw, 2rem); color: var(--navy); }
.close-dialog { flex-shrink: 0; width: 36px; height: 36px; background: #f2f5f7; border: 0; border-radius: 50%; color: var(--navy); font-size: 1.6rem; line-height: 1; }
#contact-description, #executive-description { margin: 16px 0 24px; font-size: .9rem; color: var(--muted); line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.form-grid label { display: grid; gap: 8px; font-size: .83rem; font-weight: 600; }
.form-grid [hidden] { display: none; }
.full-width { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid #c6d0db; border-radius: 6px; background: white; color: var(--ink); font-size: .9rem; font-weight: 400; }
.form-grid textarea { resize: vertical; min-height: 110px; }
.recipient-note { color: var(--green); font-size: .8rem; overflow-wrap: anywhere; }
.recipient-note:empty, .form-status:empty { display: none; }
.form-help, .form-status { font-size: .8rem; line-height: 1.6; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.cancel-dialog { padding: 12px 18px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
.form-status { padding: 12px; background: #f0f5f3; border-radius: 6px; }
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notaria-competencia { display: block; margin: 4px 0 10px; color: var(--navy); font-size: .85rem; font-weight: 600; line-height: 1.5; }
@media (max-width: 760px) {
 body { padding-top: 0; }
 .topnav { flex-direction: column; gap: 14px; padding: 16px; }
 .nav-links { gap: 10px; font-size: .9rem; width: 100%; }
 .nav-links > a, .nav-links > button { padding: 10px 14px; }

 .contact-dialog { padding: 22px 18px; }
 .form-grid { grid-template-columns: 1fr; }
 .form-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .access-option { transition: none; } }

