/**
 * Styling for the Flagship Ads signup page (index.html).
 */

:root {
  --bg: #070b14;
  --bg-2: #0b1220;
  --bg-3: #111827;
  --card: #132037;
  --card-2: #152033;
  --meta: #1877f2;
  --meta-deep: #0d65d9;
  --meta-mid: #4b9bff;
  --meta-soft: #7bb3ff;
  --text: #f1f5f9;
  --muted: #cbd5e1;
  --muted-soft: #94a3b8;
  --success: #4ade80;
  --danger: #f87171;
  --whatsapp: #25d366;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 85% at 82% -10%, rgba(24, 119, 242, 0.16), transparent 58%),
    radial-gradient(90% 70% at 8% 105%, rgba(13, 101, 217, 0.14), transparent 62%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: rgba(24, 119, 242, 0.4); color: #fff; }

:focus-visible {
  outline: 2px solid rgba(24, 119, 242, 0.65);
  outline-offset: 3px;
}

button { font: inherit; color: inherit; }

/* ---------- shell ---------- */

.auth-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 1024px) {
  .auth-shell { grid-template-columns: minmax(0, 0.56fr) minmax(0, 1fr); }
}

/* ---------- left panel ---------- */

.auth-aside {
  position: relative;
  order: 2;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  overflow: hidden;
  border-top: 1px solid rgba(24, 119, 242, 0.14);
  background:
    radial-gradient(90% 55% at 12% 0%, rgba(24, 119, 242, 0.22), transparent 62%),
    linear-gradient(165deg, #0d1a30 0%, #0a1324 46%, #060a12 100%);
  padding: clamp(1.25rem, 3vh, 2rem) clamp(1.25rem, 4vw, 3rem) clamp(2rem, 5vw, 3.25rem);
}

@media (min-width: 1024px) {
  .auth-aside {
    order: 1;
    justify-content: space-between;
    border-top: 0;
    border-right: 1px solid rgba(24, 119, 242, 0.14);
  }
}

.aside-glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
}

.aside-glow--one {
  top: -20%;
  left: -24%;
  width: 27rem;
  height: 27rem;
  background: rgba(13, 101, 217, 0.26);
}

.aside-glow--two {
  right: -32%;
  bottom: -14%;
  width: 23rem;
  height: 23rem;
  background: rgba(24, 119, 242, 0.14);
}

.noise::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.aside-body { position: relative; z-index: 1; }

/* ---------- logo ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo img {
  display: block;
  height: 5.25rem;
  width: auto;
}

.aside-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0 0.5rem;
  vertical-align: middle;
  border: 1px solid rgba(241, 245, 249, 0.08);
  border-radius: 9999px;
  background: rgba(19, 32, 55, 0.85);
  padding: 0.3125rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted-soft);
}

.aside-tag i {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--meta);
  animation: softPulse 4s ease-in-out infinite;
}

@keyframes softPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

/* ---------- headline ---------- */

.aside-heading {
  margin: 1rem 0 0;
  max-width: 20ch;
  font-size: clamp(1.75rem, 2.4vw + 0.75rem, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.aside-heading em { font-style: normal; color: var(--meta-mid); }

.aside-copy {
  margin: 1.125rem 0 0;
  max-width: 44ch;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- benefits ---------- */

.benefits {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin: clamp(1.75rem, 4vw, 2.25rem) 0 0;
  padding: 0;
  list-style: none;
}

.benefit { display: flex; align-items: flex-start; gap: 0.875rem; }

.benefit__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border: 1px solid rgba(24, 119, 242, 0.2);
  border-radius: 0.875rem;
  background: rgba(13, 101, 217, 0.14);
  color: var(--meta-mid);
}

.benefit__icon svg { width: 1.0625rem; height: 1.0625rem; }

.benefit__title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.benefit__desc {
  margin-top: 0.1875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted-soft);
}

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
  padding-top: clamp(1.5rem, 3vw, 1.875rem);
  border-top: 1px solid rgba(241, 245, 249, 0.07);
}

.stat__value {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--meta-mid);
  white-space: nowrap;
}

.stat__prefix {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(96, 165, 250, 0.75);
}

.stat__label {
  margin-top: 0.1875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted-soft);
}

.aside-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.75);
}

.aside-foot p { margin: 0; }

.aside-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.125rem;
}

.aside-foot a {
  font-weight: 600;
  color: var(--muted-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.aside-foot a:hover { color: var(--meta-mid); }

/* ---------- right panel ---------- */

.auth-main {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.75rem;
  padding: clamp(2.5rem, 7vh, 4.5rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 1024px) { .auth-main { order: 2; } }

.mobile-logo { align-self: flex-start; }

@media (min-width: 1024px) { .mobile-logo { display: none; } }

.auth-panel { width: 100%; max-width: 30rem; }

/* ---------- steps ---------- */

.step { display: none; }

.step.is-active {
  display: block;
  animation: stepIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(24, 119, 242, 0.25);
  border-radius: 9999px;
  background: rgba(19, 32, 55, 0.85);
  padding: 0.4375rem 0.9375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--meta-mid);
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.12);
}

.badge svg { width: 0.875rem; height: 0.875rem; }

.auth-title {
  margin: 1.375rem 0 0;
  font-size: clamp(1.75rem, 2.4vw + 0.7rem, 2.35rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

.auth-sub {
  margin: 0.875rem 0 0;
  max-width: 40ch;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--muted);
}

.auth-form { margin-top: clamp(1.5rem, 4vw, 2rem); }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  margin-bottom: 1.25rem;
  border: 0;
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-soft);
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-back:hover { color: var(--meta-mid); }
.btn-back svg { width: 1rem; height: 1rem; }

/* ---------- fields ---------- */

.field { margin-top: 1.125rem; }
.field:first-of-type { margin-top: 0; }

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.input-field {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(11, 18, 32, 0.9);
  padding: 0.875rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field::placeholder { color: rgba(148, 163, 184, 0.75); font-weight: 500; }
.input-field:hover { border-color: rgba(24, 119, 242, 0.45); }

.input-field:focus {
  border-color: rgba(24, 119, 242, 0.8);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
}

.input-field.is-invalid {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.16);
}

.field-error {
  display: none;
  margin: 0.4375rem 0 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--danger);
}

.field-error.is-visible { display: block; }

.field-hint {
  margin: 0.4375rem 0 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.8);
}

/* ---------- phone field ---------- */

.phone-field {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(11, 18, 32, 0.9);
  padding: 0.4375rem 0.4375rem 0.4375rem 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-field:hover { border-color: rgba(24, 119, 242, 0.45); }

.phone-field.is-focused {
  border-color: rgba(24, 119, 242, 0.8);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
}

.phone-field.is-invalid {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.16);
}

.country-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  flex: 0 0 auto;
  border: 1px solid rgba(24, 119, 242, 0.2);
  border-radius: 0.75rem;
  background: rgba(19, 32, 55, 0.9);
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.country-trigger:hover {
  border-color: rgba(24, 119, 242, 0.5);
  background: rgba(24, 119, 242, 0.1);
}

.country-trigger img {
  width: 1.25rem;
  height: 0.9375rem;
  border-radius: 0.1875rem;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.2);
}

.country-trigger svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--muted-soft);
  transition: transform 0.2s ease;
}

.country-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.phone-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.625rem 0.5rem 0.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  outline: none;
}

.phone-input::placeholder { color: rgba(148, 163, 184, 0.75); font-weight: 500; }

/* ---------- country dropdown ---------- */

.country-wrap { position: relative; }

.country-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.625rem);
  left: 0;
  display: none;
  width: 17.5rem;
  max-height: 17rem;
  overflow-y: auto;
  border: 1px solid rgba(24, 119, 242, 0.2);
  border-radius: 1rem;
  background: var(--card);
  padding: 0.375rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.country-menu.is-open { display: block; }

.country-menu::-webkit-scrollbar { width: 8px; }
.country-menu::-webkit-scrollbar-thumb {
  border: 2px solid var(--card);
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.3);
}

.country-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  padding: 0.5625rem 0.625rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.country-option:hover,
.country-option[aria-selected="true"] {
  background: rgba(24, 119, 242, 0.12);
  color: var(--text);
}

.country-option img {
  width: 1.25rem;
  height: 0.9375rem;
  border-radius: 0.1875rem;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.2);
}

.country-option__name {
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.country-option__dial { flex: 0 0 auto; font-weight: 600; color: var(--muted-soft); }
.country-option[aria-selected="true"] .country-option__dial { color: var(--meta-mid); }

/* ---------- verified chip ---------- */

.verified-chip {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 1rem;
  background: rgba(74, 222, 128, 0.08);
  padding: 0.8125rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.verified-chip > svg { flex: 0 0 auto; width: 1.125rem; height: 1.125rem; color: var(--success); }
.verified-chip__num { flex: 1 1 auto; letter-spacing: 0.01em; }

.chip-change {
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--meta-mid);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chip-change:hover { color: var(--meta-soft); }

/* ---------- messages ---------- */

.form-msg {
  display: none;
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
}

.form-msg.is-visible { display: block; }
.form-msg--error { color: var(--danger); }
.form-msg--success { color: var(--success); }

/* ---------- buttons ---------- */

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.25rem;
  margin-top: 1.5rem;
  overflow: hidden;
  border: 0;
  border-radius: 9999px;
  background: var(--meta-deep);
  padding: 0 2rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(13, 101, 217, 0.28);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-primary:hover:not(:disabled) { background: #0a4ba8; transform: scale(1.02); }
.btn-primary:active:not(:disabled) { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.btn-primary svg { width: 1.0625rem; height: 1.0625rem; transition: transform 0.3s ease; }
.btn-primary:hover:not(:disabled) svg { transform: translateX(3px); }

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: skewX(-18deg);
}

.btn-primary:hover:not(:disabled)::after { animation: shineSweep 0.85s ease; }

@keyframes shineSweep {
  from { left: -60%; }
  to { left: 130%; }
}

.btn-primary.is-loading { pointer-events: none; opacity: 0.75; }

.spinner {
  width: 1.0625rem;
  height: 1.0625rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- success ---------- */

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 9999px;
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
  animation: popIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.success-icon svg { width: 1.75rem; height: 1.75rem; }

@keyframes popIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.summary-card {
  margin-top: 1.75rem;
  border: 1px solid rgba(24, 119, 242, 0.14);
  border-radius: 1.25rem;
  background: rgba(19, 32, 55, 0.7);
  padding: 1.125rem 1.25rem;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
}

.summary-row + .summary-row { border-top: 1px solid rgba(241, 245, 249, 0.06); }
.summary-row dt { font-weight: 600; color: var(--muted-soft); }

.summary-row dd {
  margin: 0;
  overflow: hidden;
  font-weight: 700;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-whatsapp {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 3.25rem;
  margin-top: 1.75rem;
  border: 0;
  border-radius: 9999px;
  background: var(--whatsapp);
  padding: 0 2rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #04180d;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.26);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-whatsapp:hover { background: #2ee06f; transform: scale(1.02); }
.btn-whatsapp:active { transform: scale(0.97); }
.btn-whatsapp svg { width: 1.25rem; height: 1.25rem; }

.success-note {
  margin: 1.125rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(148, 163, 184, 0.85);
}

.btn-ghost {
  display: block;
  width: 100%;
  margin-top: 0.875rem;
  border: 0;
  background: none;
  padding: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-soft);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-ghost:hover { color: var(--meta-mid); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
