:root {
  color-scheme: dark;
  --bg: #050b14;
  --surface: #0b1523;
  --surface-raised: #101d2d;
  --surface-soft: #142338;
  --text: #f7f4ed;
  --text-muted: #9dadbf;
  --line: rgba(255, 255, 255, 0.1);
  --gold: #f5bd4f;
  --gold-bright: #ffd778;
  --green: #55d698;
  --red: #ff7777;
  --focus: #8ec5ff;
  --max-width: 1180px;
  --radius-small: 12px;
  --radius-medium: 20px;
  --radius-large: 32px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(28, 84, 133, 0.28), transparent 34rem),
    linear-gradient(180deg, #07111f 0, var(--bg) 42rem);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  letter-spacing: -0.02em;
}

main {
  width: min(calc(100% - 32px), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #07111f;
  background: var(--gold-bright);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(calc(100% - 32px), var(--max-width));
  min-height: 88px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(245, 189, 79, 0.5);
  border-radius: 14px;
  color: #07111f;
  background: linear-gradient(145deg, var(--gold-bright), #d99628);
  box-shadow: 0 10px 30px rgba(245, 189, 79, 0.18);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.secure-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.secure-label::before {
  content: "●";
  margin-right: 7px;
  color: var(--green);
  font-size: 0.6rem;
}

.language-switcher {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.68);
}

.language-button {
  min-width: 42px;
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
}

.language-button.is-active {
  color: #07111f;
  background: var(--gold-bright);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  color: #07111f;
  background: linear-gradient(135deg, var(--gold-bright), #e5a738);
  box-shadow: 0 16px 34px rgba(229, 167, 56, 0.2);
  cursor: pointer;
  font-weight: 850;
}

.primary-button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  filter: grayscale(0.5);
  opacity: 0.45;
}

.error-panel {
  margin: 30px 0 80px;
  padding: 20px;
  border: 1px solid rgba(255, 119, 119, 0.35);
  border-radius: var(--radius-medium);
  background: rgba(255, 119, 119, 0.08);
}

.error-panel button {
  margin-left: 16px;
  border: 0;
  color: var(--gold-bright);
  background: none;
  cursor: pointer;
  font-weight: 800;
}

.site-footer {
  display: flex;
  width: min(calc(100% - 32px), var(--max-width));
  min-height: 90px;
  margin: 50px auto 0;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.skeleton {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
  animation: pulse 1.4s ease-in-out infinite alternate;
}

.skeleton-title {
  width: min(620px, 90%);
  height: 1em;
}

.skeleton-line {
  width: 70%;
  height: 18px;
}

.skeleton-line.short {
  width: 38%;
}

@keyframes pulse {
  from {
    opacity: 0.45;
  }

  to {
    opacity: 0.9;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 76px;
  }

  .secure-label {
    display: none;
  }

  .brand small {
    display: none;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

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

/* =========================================================
   CONTROL REAL DE VISTAS
   ========================================================= */

[hidden] {
  display: none !important;
}

