/* Programa Embajadores — minimal */
:root {
  --brand: #6B4EFF;
  --brand-hover: #5A3DE8;
  --bg: #F7F7F8;
  --surface: #FFFFFF;
  --ink: #111827;
  --ink-mid: #4B5563;
  --ink-light: #9CA3AF;
  --line: #E8EAED;
  --focus: rgba(107, 78, 255, 0.2);
  --success-bg: #F0FDF4;
  --success-ink: #166534;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 40px;
}

.emb-page {
  width: 100%;
  max-width: 440px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.emb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 32px 36px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.emb-brand {
  text-align: center;
  margin-bottom: 32px;
}

.emb-brand a {
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 12px;
}

.emb-brand svg {
  height: 68px;
  width: auto;
  display: block;
}

.emb-tagline {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mid);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  line-height: 1.4;
}

.emb-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 8px;
}

.emb-brand h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}

.emb-lead {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.6;
  max-width: 32ch;
  margin: 0 auto;
}

.emb-alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.55;
  text-align: center;
}

.emb-alert--success {
  background: var(--success-bg);
  color: var(--success-ink);
  border: 1px solid #BBF7D0;
}

.emb-alert--error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.emb-alert a {
  color: inherit;
  font-weight: 600;
}

.emb-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.emb-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 400px) {
  .emb-grid--split {
    grid-template-columns: 1fr 1fr;
  }
}

.emb-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  margin-bottom: 6px;
}

.emb-field label span {
  color: var(--ink-light);
  font-weight: 400;
}

.emb-field input,
.emb-field select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.emb-field input::placeholder {
  color: #C4C9D2;
}

.emb-select-wrap {
  position: relative;
}

.emb-select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-light);
  border-bottom: 2px solid var(--ink-light);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.emb-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

.emb-field select:invalid {
  color: var(--ink-light);
}

.emb-field-otro[hidden] {
  display: none;
}

.emb-field input:focus,
.emb-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus);
}

.emb-field input[aria-invalid="true"],
.emb-field select[aria-invalid="true"] {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.emb-field-hint {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 4px;
}

.emb-field-error {
  font-size: 12px;
  color: #DC2626;
  margin-top: 4px;
  display: none;
}

.emb-field-error.is-visible {
  display: block;
}

.emb-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.emb-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--ink-mid);
  line-height: 1.55;
  padding-top: 4px;
}

.emb-consent input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--brand);
}

.emb-consent a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

.emb-consent a:hover {
  text-decoration: underline;
}

.emb-submit {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}

.emb-submit:hover:not(:disabled) {
  background: var(--brand-hover);
}

.emb-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.emb-note {
  font-size: 12px;
  color: var(--ink-light);
  text-align: center;
  line-height: 1.5;
}

.emb-note a {
  color: var(--ink-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.emb-note a:hover {
  color: var(--brand);
}

.emb-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-light);
}

.emb-footer a {
  color: var(--ink-light);
  text-decoration: none;
}

.emb-footer a:hover {
  color: var(--brand);
}

/* Pantalla de confirmación: ocultar formulario por completo */
html.emb-page--success #embajadores-form,
html.emb-page--success #emb-error,
.emb-card--success #embajadores-form,
.emb-card--success #emb-error {
  display: none !important;
}

html.emb-page--success .emb-brand .emb-eyebrow,
html.emb-page--success .emb-brand h1,
html.emb-page--success .emb-brand .emb-lead,
.emb-card--success .emb-brand .emb-eyebrow,
.emb-card--success .emb-brand h1,
.emb-card--success .emb-brand .emb-lead {
  display: none !important;
}

html.emb-page--success #emb-success-panel,
.emb-card--success #emb-success-panel {
  display: block !important;
}

#emb-success-panel[hidden] {
  display: none !important;
}

.emb-success-view {
  text-align: center;
  padding: 8px 0 4px;
}

.emb-success-view .emb-brand {
  margin-bottom: 20px;
}

.emb-success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.emb-success-view h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.emb-success-message {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.65;
  text-align: left;
  max-width: 36ch;
  margin: 0 auto;
}

@media (max-width: 420px) {
  body { padding: 20px 16px 32px; }
  .emb-card { padding: 32px 22px 28px; }
  .emb-brand svg { height: 60px; }
  .emb-tagline { font-size: 13px; }
}
