/*
  Sistema visual compartido de las páginas web de Aalbon (verificación, cuenta,
  portada). Usa los mismos tokens de color que la app (src/theme/tokens.ts) y
  las mismas familias tipográficas (Fraunces + Manrope) para que estas páginas
  se sientan parte de la misma marca, no una plantilla genérica aparte.
*/

:root {
  --bg: #f4fbf8;
  --surface: #ffffff;
  --surface-muted: #eaf7f2;
  --line: #dceae6;
  --text: #0c2625;
  --text-soft: rgba(12, 38, 37, 0.64);
  --text-faint: rgba(12, 38, 37, 0.46);

  --teal-900: #063b3a;
  --teal-700: #0b6e6b;
  --teal-600: #0e8079;
  --teal-500: #13a093;
  --blue-700: #1d6f8f;
  --blue-500: #2e9bbd;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow: 0 16px 40px rgba(6, 59, 58, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-1.5deg); }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

/* Textura de fondo discreta: dos formas orgánicas, no un gradiente diagonal genérico. */
body.textured {
  background:
    radial-gradient(480px 380px at 92% -6%, rgba(46, 155, 189, 0.14), transparent 60%),
    radial-gradient(560px 460px at -10% 100%, rgba(14, 128, 121, 0.12), transparent 60%),
    var(--bg);
}

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}

p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ---------- Página tipo "tarjeta" (verificación / cuenta) ---------- */

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  position: relative;
  width: min(100%, 460px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px 32px 32px;
  text-align: center;
  overflow: hidden;
}

/* Trazo orgánico en la esquina, en vez de una insignia circular con gradiente. */
.card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(19, 160, 147, 0.18), transparent 70%);
  pointer-events: none;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal-700);
  letter-spacing: 0.01em;
}

.wordmark::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--teal-500);
}

.badge {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--teal-600);
  color: #fff;
  font-size: 26px;
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-700);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.card > p {
  font-size: 0.98rem;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.96rem;
  border: 0;
  cursor: pointer;
  font-feature-settings: normal;
  box-shadow: 0 0 0 rgba(6, 59, 58, 0);
  transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.button-primary {
  background: var(--teal-600);
  color: #fff;
}

.button-primary:hover {
  background: var(--teal-700);
  box-shadow: 0 10px 24px rgba(11, 110, 107, 0.28);
}

.button-secondary {
  background: var(--surface-muted);
  color: var(--teal-700);
}

.button-secondary:hover {
  background: var(--line);
}

.status {
  margin-top: 16px;
  font-size: 0.94rem;
}

.status.error {
  color: var(--teal-900);
}

.status.success {
  color: var(--teal-700);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  text-align: left;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  color: var(--text);
  background: var(--bg);
  font: inherit;
  font-family: var(--font-body);
  outline: none;
}

.field input:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(14, 128, 121, 0.14);
}

.password-meter {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.password-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue-500);
  transition: width 220ms ease, background-color 220ms ease;
}

.password-meter span[data-level="medium"] {
  background: var(--teal-500);
}

.password-meter span[data-level="strong"] {
  background: var(--teal-500);
}

.policy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy-list li {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--text-faint);
  background: var(--surface-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.policy-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(12, 38, 37, 0.22);
}

.policy-list li.passed {
  border-color: rgba(14, 128, 121, 0.28);
  color: var(--teal-700);
  background: rgba(14, 128, 121, 0.09);
}

.policy-list li.passed::before {
  background: var(--teal-500);
}

.page-footer {
  margin-top: 22px;
  font-size: 0.84rem;
  color: var(--text-faint);
}

.page-footer a {
  color: var(--teal-700);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 430px) {
  .shell {
    padding: 16px;
  }

  .card {
    padding: 30px 22px 26px;
  }

  .policy-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- Páginas "de sitio" (portada, legales): cabecera + pie compartidos ---------- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 24px 0;
}

.site-header .wordmark {
  margin: 0;
  font-size: 1.2rem;
}

.site-header nav {
  display: flex;
  gap: 26px;
}

.site-header nav a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-soft);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--teal-700);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  padding-bottom: 32px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand p {
  font-size: clamp(0.68rem, 2.6vw, 0.86rem);
  white-space: nowrap;
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-links div {
  display: grid;
  gap: 8px;
}

.footer-links h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 4px;
}

.footer-links a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--teal-700);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ---------- Páginas legales ---------- */

.legal-hero {
  padding: 48px 0 8px;
}

.legal-hero .eyebrow {
  color: var(--teal-700);
}

.legal-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-top: 8px;
}

.legal-hero .updated {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--text-faint);
}

.legal-notice {
  margin: 24px 0 8px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(14, 128, 121, 0.08);
  border: 1px solid rgba(14, 128, 121, 0.24);
  font-size: 0.88rem;
  color: var(--text);
}

.legal {
  max-width: 720px;
  padding: 24px 0 72px;
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 10px;
}

.legal h2:first-of-type {
  margin-top: 24px;
}

.legal p, .legal li {
  font-size: 0.96rem;
  margin-bottom: 10px;
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.legal strong {
  color: var(--text);
}

@media (max-width: 760px) {
  .footer-grid {
    flex-direction: column;
  }
}
