/* «Tu huella Fonopen» · Balance social 2026 + Gira y Gana.
   Colores corporativos de FONOPEN (logo «30 años»): azul, amarillo y rojo de la familia. */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --fo-plum: #0b2a80;
  --fo-violet: #0a4cf2;
  --fo-coral: #e5403e;
  --fo-coral-dark: #c42b29;
  --fo-mint: #0a4cf2;
  --fo-mint-soft: #e9f0ff;
  --fo-sun: #fdc53a;
  --fo-ink: #14213d;
  --fo-muted: #5f6675;
  --fo-line: #e1e7f2;
  --fo-bg: #f6f8fc;
  --fo-white: #ffffff;
  --fo-danger: #c62828;
  --fo-radius: 20px;
  --fo-shadow: 0 24px 60px -28px rgba(11, 42, 128, .40);
  --fo-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.fo {
  margin: 0;
  font-family: var(--fo-font);
  color: var(--fo-ink);
  background:
    radial-gradient(1200px 500px at 110% -10%, rgba(253, 197, 58, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(10, 76, 242, .10), transparent 60%),
    var(--fo-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--fo-violet); }

/* Barra superior */
.fo-top { padding: 14px 16px; }
.fo-top .fo-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fo-brand { display: flex; align-items: center; gap: 12px; color: var(--fo-plum); text-decoration: none; }
.fo-brand svg { width: 38px; height: 38px; flex: none; }
.fo-brand-text { line-height: 1.05; }
.fo-brand-text strong { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.fo-brand-text strong span { color: var(--fo-coral); }
.fo-brand-text small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--fo-muted); }
.fo-brand-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: #fff; color: var(--fo-plum); font-weight: 800; font-size: 14px; white-space: nowrap;
  box-shadow: 0 8px 20px -14px rgba(11, 42, 128, .6);
}
.fo-brand-tag svg { width: 22px; height: 22px; }
@media (max-width: 420px) { .fo-brand-tag { display: none; } }
.fo-brand img { height: 46px; width: auto; display: block; }
@media (max-width: 520px) { .fo-brand img { height: 34px; } }
.fo-top form button {
  background: transparent; border: 1.5px solid var(--fo-line); color: var(--fo-plum); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px;
}

.fo-wrap { max-width: 1080px; margin: 0 auto; }
.fo-main { padding: 12px 16px 48px; flex: 1; }

.fo-card {
  background: var(--fo-white);
  border-radius: var(--fo-radius);
  box-shadow: var(--fo-shadow);
  padding: 28px;
}
@media (max-width: 520px) { .fo-card { padding: 22px 18px; } }
.fo-card + .fo-card { margin-top: 20px; }

/* Portada del ingreso */
.fo-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 900px) { .fo-grid { grid-template-columns: 1.05fr .95fr; } }
.fo-hero { position: relative; padding: 8px 4px; }
.fo-hero-art { width: min(260px, 60vw); display: block; margin: 0 0 8px -6px; }
.fo-hero-art svg { width: 100%; height: auto; display: block; }
.fo-kicker {
  display: inline-block; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px; background: #fff;
  color: var(--fo-violet); font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  box-shadow: 0 8px 20px -14px rgba(11, 42, 128, .6);
}
.fo-hero h1 { margin: 0 0 14px; font-size: clamp(32px, 5.4vw, 54px); line-height: 1.02; letter-spacing: -1.2px; color: var(--fo-plum); font-weight: 800; }
.fo-hero h1 em { font-style: normal; color: var(--fo-coral); }
.fo-hero p { font-size: 18px; line-height: 1.55; color: var(--fo-muted); margin: 0 0 20px; max-width: 520px; }
.fo-hero-cover { width: 100%; border-radius: var(--fo-radius); display: block; box-shadow: var(--fo-shadow); }
.fo-steps-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 460px; }
.fo-steps-mini li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.fo-steps-mini b {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--fo-plum); color: #fff; font-size: 14px;
}
.fo-steps-mini li:nth-child(2) b { background: var(--fo-coral); }
.fo-steps-mini li:nth-child(3) b { background: var(--fo-sun); color: var(--fo-ink); }
.fo-prize-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 14px; border-radius: 14px;
  background: #fff7e3; color: #6a4a00; font-weight: 700; font-size: 15px;
}

h1.fo-title, h2.fo-title { margin: 0 0 10px; font-weight: 800; line-height: 1.15; letter-spacing: -.4px; }
h1.fo-title { font-size: clamp(24px, 4vw, 32px); color: var(--fo-plum); }
h2.fo-title { font-size: 20px; color: var(--fo-plum); }
.fo-lead { color: var(--fo-muted); line-height: 1.55; margin: 0 0 18px; }
.fo-legal { font-size: 14px; line-height: 1.55; color: #3d3748; }
.fo-legal ul { padding-left: 20px; margin: 8px 0; }
.fo-legal-box { max-height: 200px; overflow-y: auto; border: 1px solid var(--fo-line); border-radius: 14px; padding: 14px 16px; background: #fcfaff; }
.fo-legal-box p { margin: 6px 0; }

.fo-field { margin-bottom: 22px; }
.fo-field label.fo-label, .fo-field .fo-label { display: block; font-weight: 700; margin-bottom: 10px; font-size: 16px; line-height: 1.4; }
.fo-help { display: block; font-size: 13px; color: var(--fo-muted); margin-top: 6px; }
.fo-input, .fo-textarea {
  width: 100%; padding: 14px 16px; border: 2px solid var(--fo-line); border-radius: 14px;
  font: inherit; font-size: 17px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.fo-textarea { min-height: 140px; resize: vertical; font-size: 16px; line-height: 1.5; }
.fo-input:focus, .fo-textarea:focus { outline: none; border-color: var(--fo-violet); box-shadow: 0 0 0 4px rgba(10, 76, 242, .12); }

/* Opciones como tarjetas táctiles */
.fo-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fo-option { position: relative; display: block; }
.fo-option input { position: absolute; opacity: 0; pointer-events: none; }
.fo-option span {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 12px;
  border: 2px solid var(--fo-line); border-radius: 14px; cursor: pointer; text-align: center;
  font-weight: 600; line-height: 1.25; background: #fff; transition: all .15s;
}
.fo-option span:hover { border-color: #b9c9ef; }
.fo-option input:checked + span { border-color: var(--fo-violet); background: var(--fo-mint-soft); color: var(--fo-plum); }
.fo-option input:checked + span::before { content: '✓'; font-weight: 800; margin-right: 6px; color: var(--fo-coral); }
.fo-option input:focus-visible + span { outline: 3px solid rgba(10, 76, 242, .35); outline-offset: 2px; }

.fo-has-error .fo-input, .fo-has-error .fo-textarea, .fo-has-error .fo-option span { border-color: #e7a2a2; }
.fo-has-error .fo-option input:checked + span { border-color: var(--fo-mint); }
.fo-check.fo-has-error { outline: 2px solid var(--fo-danger); outline-offset: 4px; border-radius: 8px; }
.fo-error { color: var(--fo-danger); font-size: 13px; margin-top: 6px; display: block; font-weight: 600; }
.fo-errors { background: #fff2f2; border: 1px solid #f2c0c0; color: #8f1c1c; border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; }
.fo-errors ul { margin: 6px 0 0; padding-left: 18px; }
.fo-errors a { color: #8f1c1c; font-weight: 700; }
.fo-hidden { display: none !important; }

.fo-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 14px; line-height: 1.45; cursor: pointer; }
.fo-check input { margin-top: 2px; width: 20px; height: 20px; accent-color: var(--fo-violet); flex: none; }

/* Botones */
.fo-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 0; border-radius: 16px; padding: 17px 22px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 18px; letter-spacing: .2px; text-align: center; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #1a5cff 0%, var(--fo-violet) 55%, #0838c4 100%);
  box-shadow: 0 16px 30px -14px rgba(10, 76, 242, .75); transition: transform .15s, filter .15s;
}
.fo-button:hover { transform: translateY(-1px); filter: brightness(1.04); }
.fo-button:disabled { opacity: .55; cursor: default; transform: none; }
.fo-button.fo-secondary { background: #fff; color: var(--fo-plum); border: 2px solid var(--fo-line); box-shadow: none; font-size: 16px; }
.fo-button.fo-ghost { background: transparent; color: var(--fo-muted); box-shadow: none; font-size: 16px; width: auto; padding: 14px 10px; }

/* «Tu huella»: pasos */
.fo-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.fo-progress-art { width: 76px; height: 76px; flex: none; }
.fo-progress-art svg { width: 100%; height: 100%; display: block; }
.fo-progress-text small { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--fo-coral); }
.fo-progress-text strong { display: block; font-size: clamp(20px, 3.4vw, 26px); color: var(--fo-plum); line-height: 1.15; }
.fo-progress-text span { display: block; color: var(--fo-muted); font-size: 15px; margin-top: 4px; }
.fo-bar { display: flex; gap: 6px; margin: 0 0 24px; }
.fo-bar i { flex: 1; height: 6px; border-radius: 999px; background: var(--fo-line); transition: background .3s; }
.fo-bar i.is-on { background: linear-gradient(90deg, var(--fo-violet), var(--fo-coral)); }

.fo-step { animation: fo-in .35s ease both; }
.fo-js .fo-step:not(.is-current) { display: none; }
.fo-step-head { display: none; }
body:not(.fo-js) .fo-step-head { display: block; }
body:not(.fo-js) .fo-step { margin-bottom: 28px; padding-bottom: 8px; border-bottom: 1px solid var(--fo-line); }
@keyframes fo-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.fo-nav { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.fo-nav .fo-button { flex: 1; }
.fo-js .fo-nav-final { display: none; }
.fo-js .fo-step.is-last ~ .fo-nav-final, .fo-js .fo-nav-final.is-visible { display: block; }
.fo-step-alert { display: none; margin: 0 0 14px; }
.fo-step-alert.is-visible { display: block; }
.fo-user { display: inline-block; margin-bottom: 16px; font-size: 14px; color: var(--fo-muted); }
.fo-user b { color: var(--fo-plum); }

/* Huella digital (SVG) */
.fo-ridge { fill: none; stroke: #dfe6f3; stroke-width: 3.2; stroke-linecap: round; transition: stroke .5s ease; }
.fo-ridge.is-on { stroke: url(#fo-huella-grad); }
.fo-huella-solid .fo-ridge { stroke: url(#fo-huella-grad); }
.fo-huella-light .fo-ridge { stroke: rgba(255, 255, 255, .9); }

/* Ruleta */
.fo-wheel-zone { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.fo-wheel-box { position: relative; width: min(86vw, 420px); aspect-ratio: 1; }
.fo-wheel { width: 100%; height: 100%; transition: transform 6.5s cubic-bezier(.12, .7, .08, 1); will-change: transform; filter: drop-shadow(0 18px 30px rgba(11, 42, 128, .35)); }
.fo-pointer {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; z-index: 2;
  border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 38px solid var(--fo-plum);
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.3));
}
.fo-hub {
  position: absolute; inset: 50% auto auto 50%; width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #fff4d6 55%, var(--fo-sun));
  border: 6px solid var(--fo-plum); display: grid; place-items: center; text-align: center;
  font-weight: 800; font-size: 13px; line-height: 1.1; color: var(--fo-plum);
}

.fo-result { text-align: center; }
.fo-result-art { width: 120px; margin: 0 auto 14px; }
.fo-result-art svg { width: 100%; height: auto; display: block; }
.fo-result img { max-width: 100%; border-radius: var(--fo-radius); margin: 12px auto; display: block; }
.fo-result img.fo-result-img { width: 100%; max-width: 460px; height: auto; margin-top: 0; }
.fo-prize-box { margin: 18px auto; padding: 16px; border-radius: 16px; background: #fff7e3; color: #5c4100; font-weight: 700; max-width: 420px; }

.fo-footer { text-align: center; font-size: 13px; color: var(--fo-muted); padding: 22px 16px 28px; }
.fo-footer a { color: var(--fo-violet); }

/* Ingreso al panel de administración */
.fo-admin-login { max-width: 460px; margin: 24px auto 0; }
.fo-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--fo-coral); }

/* Panel de administración (sobre Bootstrap) */
.fo-admin-nav { background: linear-gradient(135deg, var(--fo-plum) 0%, var(--fo-violet) 100%) !important; }
.fo-admin-nav .navbar-brand { font-weight: 800; letter-spacing: .2px; }
.fo-admin-nav .nav-link { color: rgba(255,255,255,.85) !important; }
.fo-admin-nav .nav-link:hover, .fo-admin-nav .nav-link.active { color: #fff !important; }
body.fo-admin { background: var(--fo-bg); font-family: var(--fo-font); }
body.fo-admin .card { border: 0; border-radius: 16px; box-shadow: 0 10px 30px -18px rgba(11, 42, 128, .45); }
body.fo-admin .btn-primary { background: var(--fo-violet); border-color: var(--fo-violet); }
body.fo-admin .btn-primary:hover { background: var(--fo-plum); border-color: var(--fo-plum); }
body.fo-admin .btn-outline-primary { color: var(--fo-violet); border-color: var(--fo-violet); }
body.fo-admin .btn-outline-primary:hover { background: var(--fo-violet); color: #fff; }
.fo-meter { height: 10px; border-radius: 999px; background: var(--fo-line); overflow: hidden; }
.fo-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--fo-violet), var(--fo-coral)); }

@media (prefers-reduced-motion: reduce) {
  .fo-step { animation: none; }
  .fo-wheel { transition-duration: 1.5s; }
}
