/* ==========================================================================
   Deca CMR · Base
   Paleta y tipografía extraídas de plastic7a.com
   ========================================================================== */

:root {
  /* Marca Plastic7A */
  --p7a-blue: #0292db;        /* azul corporativo (menú activo, titulares) */
  --p7a-blue-strong: #0279b8; /* azul para superficies con texto blanco (contraste AA) */
  --p7a-blue-deep: #01537f;
  --p7a-charcoal: #2d2d2d;    /* cabecera y pie */
  --p7a-ink: #212121;         /* texto principal */
  --p7a-muted: #6b6f73;
  --p7a-bg: #f4f4f4;          /* fondos de sección */
  --p7a-field: #f1f3f5;
  --p7a-line: #d0d5d2;
  --p7a-surface: #ffffff;
  --p7a-danger: #c62828;

  --font: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-h: 80px;
}

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

html,
body {
  margin: 0;
}

/* Los saltos a un ancla no quedan tapados por la cabecera fija */
html {
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font);
  color: var(--p7a-ink);
  background: var(--p7a-bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Cabecera (réplica de plastic7a.com sin enlaces)
   ========================================================================== */

/* Fija arriba: siempre visible al desplazarse */
.site-header {
  flex-shrink: 0;
  height: var(--header-h);
  background: var(--p7a-charcoal);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: 1170px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo: enlace al inicio */
.site-header__brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
}

.site-header__brand:focus-visible {
  outline: 2px solid var(--p7a-blue);
  outline-offset: 6px;
}

.site-header__logo {
  height: 36px;
  width: auto;
}

/* Solo visible si el logo no carga */
.site-header__wordmark {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-header__wordmark b {
  color: var(--p7a-blue);
}

.site-header__app {
  padding-left: 14px;
  border-left: 2px solid var(--p7a-blue);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.8);
}

/* Con la sesión iniciada: correo del usuario y botón de salir */
.site-header__actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-header__actions form {
  margin: 0;
}

.site-header__user {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 700px) {
  .site-header__user {
    display: none;
  }
}

@media (max-width: 570px) {
  :root {
    --header-h: 64px;
  }

  .site-header__inner {
    padding: 0 16px;
  }

  .site-header__logo {
    height: 26px;
  }

  .site-header__app {
    padding-left: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 420px) {
  .site-header .btn__label {
    display: none;
  }

  .site-header .btn--sm {
    padding: 0 10px;
  }
}

@media (max-width: 359px) {
  .site-header__inner {
    justify-content: center;
  }

  .site-header__app {
    display: none;
  }
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
  min-width: 150px;
  height: 48px;
  margin: 12px 0 4px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--p7a-blue-strong);
  border: none;
  border-radius: 48px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.btn:not(:disabled):hover {
  background: var(--p7a-blue-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 121, 184, 0.35);
}

.btn:focus-visible {
  outline: 3px solid rgba(2, 146, 219, 0.45);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* Botón transparente con borde blanco (sobre fondo oscuro o azul) */
.btn--ghost {
  min-width: 130px;
  height: 42px;
  margin: 0;
  background: none;
  border: 2px solid #fff;
  font-size: 0.78rem;
}

.btn--ghost:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.btn--ghost:focus-visible {
  outline-color: #fff;
}

.btn--sm {
  min-width: 0;
  height: 36px;
  padding: 0 16px;
  font-size: 0.72rem;
}

/* Botón con aspecto de enlace ("Reenviar código", "Cambiar correo"…) */
.btn-link {
  padding: 4px 2px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--p7a-blue-strong);
  text-decoration: underline;
  text-decoration-color: rgba(2, 121, 184, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-link:not(:disabled):hover {
  color: var(--p7a-blue-deep);
  text-decoration-color: currentColor;
}

.btn-link:disabled {
  color: var(--p7a-muted);
  text-decoration: none;
  cursor: default;
}

.btn-link:focus-visible {
  outline: 2px solid var(--p7a-blue);
  outline-offset: 2px;
  border-radius: 4px;
}
