/* =========================
   RESET Y BASE
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --muted: #5b6474;
  --line: #d9dfeb;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --primary-soft: rgba(79, 70, 229, 0.08);
  --warning-bg: #fff4cc;
  --warning-border: #f1d36b;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  --shadow-strong: 0 18px 40px rgba(17, 24, 39, 0.12);
  --radius: 18px;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 30%),
    radial-gradient(circle at bottom right, rgba(79, 70, 229, 0.06), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
}

strong {
  font-weight: 700;
}

p {
  font-size: 1rem;
}

/* =========================
   ESTRUCTURA GENERAL
========================= */
.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
}

.page {
  min-height: calc(100vh - 90px);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 440px);
  gap: 32px;
  align-items: center;
}

/* =========================
   HEADER
========================= */
header {
  padding: 16px 0 0;
}

.topbar {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}

.brand span {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--muted);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================
   TARJETAS
========================= */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}

.formCard {
  max-width: 980px;
}

/* =========================
   TEXTOS
========================= */
.kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(2.1rem, 3vw, 2.8rem);
  line-height: 1.12;
  margin-bottom: 14px;
}

h2 {
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 22px;
}

.hint {
  font-size: 0.95rem;
  color: var(--muted);
}

/* =========================
   BOTONES Y LINKS
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.22);
}

.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--primary);
}

.linkPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--primary);
  background: #fff;
}

.link {
  color: var(--primary);
  text-decoration: none;
}

/* =========================
   HOME
========================= */
.how {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.howItem {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.howIcon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.howItem p {
  font-size: 0.98rem;
  color: var(--muted);
  margin-top: 2px;
}

.roles {
  display: grid;
  gap: 12px;
}

.rolesBig {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0;
}

.roleCard {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  transition: 0.2s ease;
}

.roleCard:hover {
  border-color: #b8c2d8;
  transform: translateY(-1px);
}

.roleHead {
  display: flex;
  align-items: center;
  gap: 10px;
}

.roleEmoji {
  font-size: 1rem;
}

.roleTitle {
  font-size: 1rem;
  font-weight: 800;
}

.roleDesc {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

.alert {
  margin-top: 18px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.96rem;
}

.cta2 {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.ctaBtn {
  display: block;
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none;
  transition: 0.2s ease;
}

.ctaBtn:hover {
  transform: translateY(-1px);
}

.ctaBtn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.ctaBtn.outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--line);
}

.ctaMain {
  display: block;
  font-weight: 800;
  font-size: 1rem;
}

.ctaSub {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  color: inherit;
  opacity: 0.9;
}

/* =========================
   VÍDEO
========================= */
.videoWrap {
  width: 100%;
}

.videoTall iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: 16px;
  background: #000;
}

.soundBtn {
  margin-top: 12px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
}

/* =========================
   FORMULARIOS
========================= */
.form {
  display: grid;
  gap: 18px;
}

.twoCols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.98rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
}

.check input {
  margin-top: 3px;
}

.bigBtn {
  width: 100%;
  min-height: 54px;
  font-size: 1.02rem;
}

.belowForm {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   LOGIN
========================= */
.loginCard {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 28px 26px;
  text-align: center;
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
}

.loginCard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.loginCard h1,
.loginCard h2 {
  margin-bottom: 10px;
}

.loginCard .subtitle {
  margin-bottom: 18px;
}

.loginCard .form {
  gap: 14px;
}

.loginCard .field input,
.loginCard .form > input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 1rem;
  background: var(--surface-2);
  color: var(--text);
}

.loginCard .field input:focus,
.loginCard .form > input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
}

.loginCard .btn {
  margin-top: 2px;
  min-height: 54px;
  font-size: 1rem;
}

.loginLinks {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.loginLinks a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.divider {
  text-align: center;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.divider span {
  display: inline-block;
  padding: 0 10px;
}

.googleBox {
  display: flex;
  justify-content: center;
}

.g_id_signin {
  display: inline-block;
}

#loginError,
#logoutOk,
#errorBox {
  text-align: left;
}

.loginHero {
  position: relative;
  padding: 34px 34px 30px;
}

.loginHero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.10), transparent 65%);
  pointer-events: none;
}

.loginHeroBadge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.loginHeroList {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.loginHeroItem {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
}

.loginHeroCheck {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.loginTrust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.loginTrustBox {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.loginTrustBox strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.loginTrustBox span {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
}

.loginLogo {
  width: 70px;
  margin: 0 auto 10px;
}

.loginBrand {
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 2px;
}

.loginMini {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 18px;
}

/* =========================
   AVISOS / NOTICE
========================= */
.notice {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.notice ul {
  margin-left: 20px;
}

/* =========================
   FOOTER
========================= */
footer {
  margin-top: 24px;
  padding: 8px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .rolesBig,
  .loginTrust {
    grid-template-columns: 1fr 1fr;
  }

  .loginCard {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 17px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .twoCols,
  .rolesBig,
  .loginTrust {
    grid-template-columns: 1fr;
  }

  .wrap,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .card {
    padding: 20px;
  }

  .loginCard {
    padding: 24px 18px 20px;
  }

  .loginLinks,
  .belowForm {
    flex-direction: column;
  }

  .loginHero {
    padding: 22px 20px;
  }
}