/* ==========================================================================
   SiMMBA — hoja de estilos
   --------------------------------------------------------------------------
   Idea rectora: la línea de flotación. El logo divide aire y agua; la página
   hace lo mismo. El héroe está sumergido (oscuro, imagen a sangre), el cuerpo
   emerge a la superficie (crema, legible) y el pie vuelve a descender.

   Paleta extraída directamente del logo.
   ========================================================================== */

:root {
  /* Color ---------------------------------------------------------------- */
  --cream:      #FCF0E4;   /* fondo del logo */
  --cream-deep: #F5E4D2;   /* crema con una capa más de profundidad */
  --navy:       #003C60;   /* contorno del logo, texto principal */
  --navy-dark:  #002338;
  --ocean:      #006090;
  --cyan:       #0084A8;
  --foam:       #90D8D8;
  --coral:      #F87048;
  --coral-deep: #E05848;
  --coral-text: #B93A22;   /* coral legible como texto pequeño sobre crema */

  --ink:        var(--navy);
  --ink-soft:   #3A6480;

  /* Tipografía ------------------------------------------------------------ */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala fluida */
  --t-hero:  clamp(1.05rem, 0.85rem + 0.9vw,  1.5rem);
  --t-h2:    clamp(1.75rem, 1.3rem  + 2.1vw,  3rem);
  --t-h3:    clamp(1.1rem,  1rem    + 0.5vw,  1.35rem);
  --t-body:  clamp(1rem,    0.96rem + 0.2vw,  1.12rem);
  --t-small:  0.875rem;
  --t-stat:  clamp(2.5rem,  1.6rem  + 4vw,    4.75rem);

  /* Espaciado ------------------------------------------------------------- */
  --gap:     clamp(1.25rem, 0.9rem + 1.7vw, 2.75rem);
  --band-y:  clamp(3.5rem,  2.5rem + 4vw,   7rem);
  --measure: 68ch;
  --wrap:    76rem;

  --header-h: 4.5rem;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--ocean); text-underline-offset: 0.18em; }
a:hover { color: var(--coral-text); }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.015em; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Marca de dato pendiente, convención del proyecto */
.pending-mark {
  color: var(--coral-text);
  font-weight: 600;
  cursor: help;
}

/* --------------------------------------------------------------------------
   Encabezado
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color .35s ease, box-shadow .35s ease;
}

/* El logotipo lleva el texto en blanco, así que la barra se mantiene oscura
   siempre: transparente sobre el héroe, azul profundo al bajar. */
.site-header.is-stuck {
  background: var(--navy-dark);
  box-shadow: 0 1px 0 rgba(144, 216, 216, 0.22);
}

.header-inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Marca e idioma van juntos a la izquierda; la navegación, a la derecha. */
.header-left {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.4rem);
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  text-decoration: none;
  color: var(--cream);
}

.brand-mark { width: 2.4rem; height: 2.4rem; }

.brand-name {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

/* Navegación */

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.6vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .35s ease, border-color .2s ease;
}
.main-nav a:hover { border-bottom-color: var(--coral); }



.main-nav .nav-cta {
  background: var(--coral);
  color: var(--navy-dark);
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border-bottom: none;
}
.main-nav .nav-cta:hover { background: var(--coral-deep); color: #fff; border-bottom: none; }


/* Submenú desplegable */

.has-menu { position: relative; }

.submenu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 0 2px;
  cursor: pointer;
  white-space: nowrap;
}
.submenu-trigger:hover { border-bottom-color: var(--coral); }

.caret {
  width: 0.6rem;
  height: 0.45rem;
  transition: transform .2s ease;
}
.submenu-trigger[aria-expanded="true"] .caret { transform: rotate(180deg); }

.main-nav .submenu {
  position: absolute;
  top: calc(100% + 0.85rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 18rem;
  background: var(--navy-dark);
  border: 1px solid rgba(144, 216, 216, 0.28);
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(0, 20, 34, 0.45);
  padding: 0.4rem;
  margin: 0;
  list-style: none;
  display: none;
}
.main-nav .submenu-trigger[aria-expanded="true"] + .submenu { display: block; }

.main-nav .submenu a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  border-bottom: none;
  font-size: 0.92rem;
  line-height: 1.35;
  white-space: normal;
}
.main-nav .submenu a:hover {
  background: rgba(144, 216, 216, 0.14);
  color: var(--foam);
  border-bottom: none;
}

/* Botón hamburguesa */

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  color: #fff;
}


.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin-inline: auto;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: relative; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after  { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 62rem) {
  .nav-toggle { display: block; order: 3; }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--navy);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.is-open { max-height: 32rem; }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1.25rem;
  }
  .main-nav li { border-top: 1px solid rgba(144, 216, 216, 0.22); }

  .main-nav a,
  .site-header.is-stuck .main-nav a {
    display: block;
    color: var(--cream);
    padding: 0.9rem clamp(1.25rem, 5vw, 2rem);
    font-size: 1.05rem;
    border-bottom: none;
  }

  .main-nav .nav-cta {
    color: var(--coral);
    background: transparent;
    border-radius: 0;
  }

  .has-menu { position: static; }

  .submenu-trigger {
    width: 100%;
    justify-content: space-between;
    color: var(--cream);
    padding: 0.9rem clamp(1.25rem, 5vw, 2rem);
    font-size: 1.05rem;
    border-bottom: none;
  }

  .main-nav .submenu {
    position: static;
    transform: none;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.22);
    padding: 0;
  }
  .main-nav .submenu a {
    border-radius: 0;
    padding-left: clamp(2.25rem, 7vw, 3rem);
    font-size: 0.98rem;
  }
}

/* --------------------------------------------------------------------------
   Héroe
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--navy-dark);
  isolation: isolate;
}

.hero-media { position: absolute; inset: 0; z-index: -2; }

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.slide.is-active { opacity: 1; }

.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Velo: garantiza contraste del texto sobre cualquier fotografía */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(0,35,56,0.35) 0%, rgba(0,35,56,0.72) 70%),
    linear-gradient(180deg, rgba(0,35,56,0.55) 0%, rgba(0,35,56,0.25) 40%, rgba(0,35,56,0.75) 100%);
}

.hero-content {
  text-align: center;
  padding: var(--header-h) 1.5rem 9rem;
  max-width: 58rem;
}

.hero-content h1 { margin: 0 0 1.6rem; }

.hero-logo {
  width: min(100%, 46rem);
  height: auto;
  margin-inline: auto;
}

.hero-line {
  color: var(--cream);
  font-size: clamp(1.15rem, 0.95rem + 1vw, 1.7rem);
  font-weight: 500;
  line-height: 1.35;
  margin: 0 auto 2.4rem;
  max-width: 26ch;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0, 35, 56, 0.5);
}

.btn-dive {
  display: inline-block;
  background: var(--coral);
  color: var(--navy-dark);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 0.9rem 3rem;
  border-radius: 999px;
  transition: transform .2s ease, background-color .2s ease;
}
.btn-dive:hover {
  background: #FF8158;
  color: var(--navy-dark);
  transform: translateY(-2px);
}

/* Controles del carrusel */

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: clamp(4.5rem, 9vh, 6.5rem);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  z-index: 3;
}

.slide-arrow {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  background: rgba(252, 240, 228, 0.12);
  border: 1px solid rgba(252, 240, 228, 0.4);
  border-radius: 50%;
  color: var(--cream);
  cursor: pointer;
  padding: 0;
  transition: background-color .2s ease;
}
.slide-arrow:hover { background: rgba(252, 240, 228, 0.28); }
.slide-arrow svg { width: 1.15rem; height: 1.15rem; }

.slide-dots { display: flex; gap: 0.6rem; }

.slide-dots button {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--cream);
  background: transparent;
  cursor: pointer;
  transition: background-color .2s ease;
}
.slide-dots button[aria-selected="true"] { background: var(--coral); border-color: var(--coral); }

/* Línea de flotación */

.waterline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(48px, 6vw, 90px);
  z-index: 2;
}

.waterline-down { top: -1px; bottom: auto; }

/* --------------------------------------------------------------------------
   Numeralia
   -------------------------------------------------------------------------- */

.numeralia {
  width: min(100% - 2.5rem, var(--wrap));
  margin: clamp(2rem, 4vw, 3.5rem) auto clamp(3rem, 6vw, 5rem);
}

.numeralia dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  background: rgba(0, 60, 96, 0.18);
  border-block: 1px solid rgba(0, 60, 96, 0.18);
}

.stat {
  background: var(--cream);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(0.5rem, 2vw, 1.5rem);
}

.stat dt {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.stat dd {
  margin: 0;
  font-size: var(--t-stat);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--ocean);
  font-variant-numeric: tabular-nums;
}

.stat .unit {
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Rejilla 2×2
   -------------------------------------------------------------------------- */

.grid-2x2 {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  align-items: stretch;
}

@media (max-width: 52rem) {
  .grid-2x2 { grid-template-columns: 1fr; }
}

.cell-text {
  padding: clamp(0.5rem, 2vw, 1.5rem) 0;
  align-self: center;
}
.cell-text h2 { color: var(--navy); }

/* Los cuatro pasos del flujo de trabajo. Van numerados porque son
   una secuencia real, no una lista de rasgos. */
.pasos {
  counter-reset: paso;
  list-style: none;
  margin: 0 0 1.1em;
  padding: 0;
  max-width: var(--measure);
}

.pasos li {
  counter-increment: paso;
  position: relative;
  padding: 0.4rem 0 0.4rem 2.6rem;
  border-top: 1px solid rgba(0, 60, 96, 0.16);
  font-size: 0.98rem;
}
.pasos li:last-child { border-bottom: 1px solid rgba(0, 60, 96, 0.16); }

.pasos li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 1.7rem;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
}

.lede-quote {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--ocean);
  border-left: 3px solid var(--coral);
  padding-left: 1.1rem;
  margin-block: 1.5rem;
}

/* Fachadas de medios: el iframe entra al hacer clic, no antes. */

.cell-media {
  display: grid;
  min-height: 20rem;
}

/* En dos columnas, el medio ocupa exactamente el alto de la fila,
   es decir el alto del texto de al lado. En una columna vuelve a
   una relación de aspecto cómoda. */
@media (min-width: 52.001rem) {
  .cell-media { min-height: 0; }
  .cell-media > .embed-frame { height: 100%; aspect-ratio: auto; }
}

/* Contenedor una vez cargado el iframe */
.embed-frame {
  width: 100%;
  height: 100%;
  min-height: 20rem;
  aspect-ratio: 16 / 10;
  border: 0;
  display: block;
  background: var(--navy-dark);
}

/* --------------------------------------------------------------------------
   Bandas de contenido
   -------------------------------------------------------------------------- */

.band { padding-block: var(--band-y); }

.band-inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.band-narrow { max-width: 46rem; }

.band-etapas {
  background: var(--cream-deep);
  border-block: 1px solid rgba(0, 60, 96, 0.14);
}

.etapas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--gap);
  margin-top: 2.5rem;
}

.etapa {
  padding-top: 1.1rem;
  border-top: 3px solid rgba(0, 60, 96, 0.2);
}
.etapa-now { border-top-color: var(--coral); }

.etapa-estado {
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.etapa-now .etapa-estado { color: var(--coral-text); }

.etapa p { max-width: 42ch; }

.etapa-metodo {
  font-size: var(--t-small);
  color: var(--ink-soft);
  border-top: 1px solid rgba(0, 60, 96, 0.16);
  padding-top: 0.75rem;
  margin-top: 1rem;
}

.soon {
  display: inline-block;
  background: var(--navy);
  color: var(--cream);
  font-size: var(--t-small);
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.band-nosotros { background: var(--cream-deep); border-block: 1px solid rgba(0, 60, 96, 0.14); }

.cita {
  margin: 1.25rem 0;
  padding: 1.25rem 1.4rem;
  background: var(--cream-deep);
  border-left: 4px solid var(--ocean);
  font-size: 0.98rem;
  line-height: 1.6;
}
.band-nosotros .cita, .band-datos .cita { background: rgba(0, 60, 96, 0.06); }

.btn-copy {
  font-family: inherit;
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--navy);
  background: transparent;
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.btn-copy:hover { background: var(--navy); color: var(--cream); }

.copy-status {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--ocean);
  margin-left: 0.75rem;
}

.cita-nota {
  font-size: var(--t-small);
  color: var(--ink-soft);
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Pie
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  background: var(--navy-dark);
  color: var(--cream);
  padding-top: clamp(5rem, 9vw, 8rem);
}

.footer-inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
}

.site-footer h2 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--foam);
  letter-spacing: 0;
  margin-bottom: 0.85rem;
}

.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--coral); }

.footer-brand { display: flex; align-items: flex-start; gap: 0.9rem; }
.footer-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.footer-full { font-size: var(--t-small); color: rgba(252, 240, 228, 0.7); margin: 0; max-width: 22ch; }

.aliados {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.aliados a {
  display: block;
  line-height: 0;
  opacity: 0.82;
  transition: opacity .2s ease;
}
.aliados a:hover,
.aliados a:focus-visible { opacity: 1; }

.aliados img {
  height: auto;
  width: auto;
  max-height: 3.75rem;
  max-width: 12rem;
  object-fit: contain;
}

.footer-legal {
  border-top: 1px solid rgba(144, 216, 216, 0.22);
  margin: 0;
  padding: 1.4rem clamp(1.25rem, 5vw, 2rem);
  text-align: center;
  font-size: var(--t-small);
  color: rgba(252, 240, 228, 0.7);
  max-width: none;
}

/* --------------------------------------------------------------------------
   Entrada del héroe: un solo momento orquestado al cargar
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-logo, .hero-line, .btn-dive {
    animation: rise .85s cubic-bezier(.2, .7, .3, 1) backwards;
  }
  .hero-logo { animation-delay: .1s; }
  .hero-line { animation-delay: .28s; }
  .btn-dive  { animation-delay: .44s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Conmutador de idioma
   ========================================================================== */

.lang-switch {
  display: flex;
  gap: 0.25rem;
  padding-left: clamp(0.75rem, 1.6vw, 1.4rem);
  border-left: 1px solid rgba(252, 240, 228, 0.28);
}

.lang-switch button {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(252, 240, 228, 0.6);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.lang-switch button img {
  width: 1.25rem;
  height: auto;
  border-radius: 1px;
  opacity: 0.55;
  transition: opacity .2s ease;
}

.lang-switch button:hover { color: var(--cream); }
.lang-switch button:hover img { opacity: 0.85; }

.lang-switch button[aria-pressed="true"] {
  color: var(--cream);
  border-color: rgba(252, 240, 228, 0.45);
}
.lang-switch button[aria-pressed="true"] img { opacity: 1; }

/* ==========================================================================
   Contacto: botón y diálogo
   ========================================================================== */

.btn-contacto {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-dark);
  background: var(--foam);
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  text-align: left;
  transition: background-color .2s ease;
}
.btn-contacto:hover { background: #B4E6E6; }

.contacto-revelado {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(252, 240, 228, 0.85);
}

.dlg {
  width: min(100% - 2rem, 30rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid rgba(0, 60, 96, 0.25);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 20, 34, 0.35);
}
.dlg::backdrop { background: rgba(0, 20, 34, 0.62); }

/* Respaldo para navegadores sin soporte de <dialog> */
.dlg:not([open]) { display: none; }
.dlg[open] { display: block; }

.dlg h2 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.dlg-intro {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.dlg label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.dlg input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(0, 60, 96, 0.35);
  border-radius: 4px;
}
.dlg input[type="text"]:focus-visible { border-color: var(--ocean); }

.dlg-error {
  margin: -0.75rem 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--coral-text);
}

/* Campo trampa: fuera de la vista, fuera del foco, fuera del lector de
   pantalla. Solo un robot que rellena todo lo encuentra. */
.trampa {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dlg-acciones {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-ghost {
  font: inherit;
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--navy); }

/* En pantallas estrechas el conmutador se queda junto al logo, pero solo
   con la bandera: las siglas ES y EN se ocultan para ganar espacio. */
@media (max-width: 30rem) {
  .lang-switch button span { display: none; }
  .lang-switch button { padding: 0.3rem 0.35rem; }
  .brand-name { font-size: 1.1rem; }
  .brand-mark { width: 2rem; height: 2rem; }
}
