:root {
  --bg: #0b0f14;
  --bg-elevated: #121821;
  --bg-card: rgba(18, 24, 33, 0.92);
  --lime: #e7ff00;
  --lime-soft: rgba(231, 255, 0, 0.12);
  --text: #f4f7fb;
  --text-muted: rgba(244, 247, 251, 0.62);
  --border: rgba(255, 255, 255, 0.1);
  --danger: #ff453a;
  --radius: 14px;
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --max: 1100px;
  --nav-h: 110px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(11, 15, 20, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.brand img {
  width: clamp(160px, 22vw, 220px);
  height: auto;
  max-height: 78px;
  object-fit: contain;
  object-position: left center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover,
.nav-links a.btn-primary[aria-current="page"] {
  color: #0b0f14;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border-bottom-left-radius: 4px;
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--lime);
  color: #0b0f14;
  box-shadow: 0 8px 28px rgba(231, 255, 0, 0.18);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}

.btn-nav {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 1.5rem) 0 3.5rem;
}

.hero__media {
  position: absolute;
  inset: -8%;
  background:
    linear-gradient(180deg, rgba(11, 15, 20, 0.42) 0%, rgba(11, 15, 20, 0.72) 45%, rgba(11, 15, 20, 0.94) 100%),
    url("../assets/fondo-login.png") center / cover no-repeat;
  animation: drift 34s linear infinite;
  will-change: transform;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 560px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.35rem;
  animation: rise 0.8s ease both;
}

.hero__brand {
  margin: 0;
  line-height: 0;
}

.hero__brand img {
  width: min(78vw, 420px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.55));
}

.hero__lead {
  max-width: 28rem;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  line-height: 1.5;
}

.hero__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: min(100%, 440px);
  margin-top: 0.35rem;
}

.hero__actions .btn {
  width: 100%;
  min-height: 52px;
}

.section {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 4.5rem 0;
}

.section--alt {
  width: 100%;
  background:
    radial-gradient(ellipse at top, rgba(231, 255, 0, 0.05), transparent 55%),
    linear-gradient(180deg, #0d131b, #0b0f14);
}

.section--alt .section__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding: 4.5rem 0;
}

.section__eyebrow {
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.section__text {
  max-width: 40rem;
  color: var(--text-muted);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.feature {
  padding: 1.35rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.feature h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}

.site-footer__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* Auth layout */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 1.5rem) 1rem 2rem;
  position: relative;
  overflow: hidden;
}

.auth-page__bg {
  position: absolute;
  inset: -6%;
  background:
    linear-gradient(180deg, rgba(11, 15, 20, 0.55), rgba(11, 15, 20, 0.92)),
    url("../assets/fondo-login.png") center / cover no-repeat;
  animation: drift 34s linear infinite;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: 1.75rem 1.4rem 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: rise 0.7s ease both;
}

.auth-card__logo {
  width: min(86%, 300px);
  height: auto;
  margin: 0 auto 1.15rem;
  object-fit: contain;
}

.auth-card h1 {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.auth-card__subtitle {
  margin: 0.4rem 0 1.4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.field__control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0 0.9rem;
  border-radius: var(--radius);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field__control:focus-within {
  border-color: rgba(231, 255, 0, 0.45);
  background: var(--lime-soft);
}

.field__control input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0.85rem 0;
}

.field__toggle {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.field__error {
  margin: 0.4rem 0 0;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-card .btn-primary {
  width: 100%;
  margin-top: 0.35rem;
}

.auth-alert {
  display: none;
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.auth-alert.is-visible {
  display: block;
}

.auth-alert--error {
  border-color: rgba(255, 69, 58, 0.45);
  background: rgba(255, 69, 58, 0.1);
  color: #ffb4af;
}

.auth-alert--ok {
  border-color: rgba(231, 255, 0, 0.35);
  background: var(--lime-soft);
  color: #eef8b0;
}

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.auth-footer a {
  color: var(--lime);
  font-weight: 700;
}

.auth-note {
  margin-top: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Legal pages */
.legal-page {
  padding: calc(var(--nav-h) + 2.5rem) 0 4rem;
}

.legal-shell {
  width: min(100% - 2rem, 820px);
  margin-inline: auto;
}

.legal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
}

.lang-switch button.is-active {
  background: var(--lime);
  color: #000;
}

.legal-intro {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 1rem;
}

.legal-intro h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.legal-intro p {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
}

.legal-intro p:last-child {
  margin-bottom: 0;
}

.accordion {
  display: grid;
  gap: 0.65rem;
}

.accordion details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 1.1rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  color: var(--lime);
  font-size: 1.2rem;
  font-weight: 800;
}

.accordion details[open] summary::after {
  content: "–";
}

.accordion .accordion__body {
  border-top: 1px solid var(--border);
  padding: 0.9rem 1.1rem 1.1rem;
}

.accordion .accordion__body p {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.accordion .accordion__body p:last-child {
  margin-bottom: 0;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1.12);
  }
  25% {
    transform: translate3d(28px, -18px, 0) scale(1.18);
  }
  50% {
    transform: translate3d(0, -28px, 0) scale(1.12);
  }
  75% {
    transform: translate3d(-28px, -12px, 0) scale(1.08);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1.12);
  }
}

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

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

  .nav-links a:not(.btn) {
    display: none;
  }

  .brand img {
    width: clamp(140px, 42vw, 180px);
    max-height: 64px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .hero__media,
  .auth-page__bg,
  .hero__content,
  .auth-card {
    animation: none;
  }
}
