/* Fuentes locales originales. Licencias SIL OFL en ../../licenses/. */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fredoka-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/nunito-bold.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --yellow: #FDDF21;
  --green: #27AE60;
  --action: #178247;
  --green-dark: #17613b;
  --orange: #FDA302;
  --orange-dark: #935000;
  --ink: #202a31;
  --muted: #59666e;
  --gray: #f2f4f6;
  --mint: #edf7f0;
  --paper: #fff9e7;
  --line: #e5eae4;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-block: 24px; }
body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 10% 0%, #fff0b8 0, transparent 48%),
    radial-gradient(ellipse at 100% 65%, #fff3cd 0, transparent 52%),
    var(--paper);
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
h1, h2, p { margin: 0; }
h1, h2, h3, h4, h5, h6, .wordmark { font-family: "Fredoka", sans-serif; font-weight: 700; }
h2 { line-height: 1.25; }
b, strong { font-weight: 700; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 10; padding: 10px 18px; border-radius: 12px; background: var(--ink); color: white; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.page-pattern { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .9; }
.page { width: min(calc(100% - 32px), 440px); margin-inline: auto; padding-block: max(20px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-bottom)); }
.brand-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.wordmark { color: var(--yellow); font-size: clamp(28px, 8vw, 36px); line-height: 1.1; }
.beta-badge { flex-shrink: 0; padding: 6px 13px; border: 2px solid var(--yellow); border-radius: 999px; background: var(--yellow); box-shadow: inset 0 0 0 3px var(--paper); color: #fff; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 13px; line-height: 1.4; }
.hero { position: relative; z-index: 1; margin-top: -10px; padding: 28px 20px 24px; border: 1px solid #f0e7cf; border-radius: 28px; background: #fff; box-shadow: 0 12px 40px rgb(117 90 26 / 8%); }
.introduction, .welcome-card { min-width: 0; }
.mascot { position: relative; width: min(68%, 240px); aspect-ratio: 246 / 160; margin: 0 auto; }
.mico, .mico-snout { width: 100%; height: 100%; }
.mico-snout { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.rays { position: absolute; width: 27px; height: 36px; color: var(--yellow); }
.rays-left { left: -30px; top: 43%; transform: rotate(-7deg); }
.rays-right { right: -28px; top: 4%; transform: rotate(9deg); }
.welcome-copy { text-align: center; }
h1 { font-size: clamp(27px, 6.6vw, 32px); line-height: 1.15; letter-spacing: -.5px; text-wrap: balance; }
.title-brand { display: block; color: var(--yellow); }
.welcome-text { max-width: 36ch; margin: 14px auto 0; color: var(--muted); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.beta-note { max-width: 40ch; margin: 12px auto 0; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; text-wrap: pretty; }
.welcome-card { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.download-intro { margin-top: 8px; color: var(--muted); font-size: 15px; }
.download-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 62px; margin-top: 20px; padding: 13px 16px; border: 3px solid var(--action); border-radius: 999px; background: var(--action); box-shadow: inset 0 0 0 3px #fff; color: #fff; font-size: clamp(17px, 4.8vw, 21px); line-height: 1.3; text-align: center; text-decoration: none; transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
.apk-button { margin-top: 0; }
.download-button:hover { background: var(--green-dark); border-color: var(--green-dark); }
.download-button:active { background: #124e30; border-color: #124e30; }
.download-button:disabled { cursor: default; opacity: .75; }
.download-icon { flex-shrink: 0; width: 24px; height: 27px; }
.button-label { flex: 1; text-align: center; }
.chevron { flex-shrink: 0; width: 8px; height: 16px; }
.apk-details { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.apk-compatibility { margin: 8px auto 0; max-width: 38ch; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; text-wrap: pretty; }
.installation-guide { margin-top: 24px; border: 1px solid #dbeadd; border-radius: 16px; background: var(--mint); font-size: 14px; line-height: 1.65; }
.installation-guide summary { min-height: 52px; padding: 14px 16px; color: var(--green-dark); font-family: "Nunito", sans-serif; font-weight: 700; border-radius: 15px; }
.installation-guide summary:hover { background: #e1f0e6; }
.installation-guide[open] summary { border-bottom: 1px solid #dbeadd; border-radius: 15px 15px 0 0; }
.installation-guide ol { padding: 0 18px 0 36px; margin: 16px 0; }
.installation-guide li + li { margin-top: 12px; }
.installation-guide li::marker { color: var(--green-dark); font-weight: 700; }
.installation-guide p { padding: 0 18px 18px; color: var(--muted); font-size: 13px; }
.installation-guide strong { overflow-wrap: anywhere; }
.installation-help { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.installation-help a { display: inline-flex; min-height: 44px; align-items: center; color: var(--green-dark); font-weight: 700; }
.support-section { display: grid; gap: 24px; margin-top: 28px; padding: 0 8px; }
.feedback-block h2, .help-title { font-size: 17px; }
.feedback-block > p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.feedback-link { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; max-width: 100%; margin-top: 14px; padding: 10px 15px; border: 1px solid #e8c595; border-radius: 999px; background: #fffaf1; color: var(--orange-dark); font-family: "Nunito", sans-serif; font-weight: 700; font-size: 14px; line-height: 1.4; text-decoration: none; }
.feedback-link:hover { background: #fff0d9; border-color: #c88b39; }
.feedback-icon { width: 20px; height: 22px; flex-shrink: 0; }
.help { display: flex; align-items: flex-start; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.mail-icon { width: 23px; height: 23px; flex-shrink: 0; color: var(--green-dark); }
.help-copy { min-width: 0; }
.help-title { color: var(--ink); }
.help-text { margin-top: 6px; color: var(--muted); font-size: 14px; }
.support-email { display: block; min-height: 44px; padding-top: 4px; overflow-wrap: anywhere; }
.email-domain { white-space: nowrap; }
.support-email:hover { color: var(--green-dark); }

/* Acceso alternativo y Play Store: se conservan los estados configurables. */
.access-form { margin-top: 20px; }
.code-panel { padding: 16px; border-radius: 16px; background: var(--gray); }
.code-label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 15px; font-weight: 700; }
.lock-icon { flex-shrink: 0; width: 20px; height: 24px; color: var(--muted); }
.code-input { display: block; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #78858c; border-radius: 10px; background: #fff; color: var(--ink); font-size: 16px; }
.code-input::placeholder { color: var(--muted); opacity: 1; }
.code-input[aria-invalid="true"] { border: 2px solid #a62323; }
.download-status { margin-top: 14px; font-size: 14px; line-height: 1.5; text-align: center; }
.download-status[data-state="success"] { color: var(--green-dark); }
.availability { margin: 16px 0 8px; color: var(--muted); font-size: 14px; text-align: center; }
.stores { display: flex; justify-content: center; }
.store-link { display: flex; align-items: center; gap: 10px; min-height: 55px; padding: 10px 18px; border-radius: 12px; background: #0b0f12; color: white; text-decoration: none; }
.store-link:hover { background: #25292b; }
.store-link[aria-disabled="true"] { cursor: default; }
.store-icon { width: 27px; height: 32px; flex-shrink: 0; }
.store-copy { display: flex; flex-direction: column; line-height: 1.2; }
.store-kicker { font-size: 10px; }
.store-name { font-size: 19px; }

/* Movimiento breve y ligero: únicamente opacidad y transformaciones. */
@keyframes content-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mico-greet {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-4px) rotate(-1deg); }
}
@keyframes download-cue {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(3px); }
}
@media (prefers-reduced-motion: no-preference) {
  .brand-header { animation: content-enter .5s cubic-bezier(.2, .7, .2, 1) both; }
  .hero { animation: content-enter .6s cubic-bezier(.2, .7, .2, 1) .08s both; }
  .support-section { animation: content-enter .6s cubic-bezier(.2, .7, .2, 1) .16s both; }
  .mico, .mico-snout { animation: mico-greet 2.4s ease-in-out .65s 2; transform-origin: 50% 85%; }
  .feedback-link { transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
  .installation-guide summary { transition: background-color .18s ease; }
  .installation-guide[open] ol, .installation-guide[open] p { animation: content-enter .25s ease both; }
  .download-button:active, .feedback-link:active { transform: scale(.98); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .download-button:hover, .feedback-link:hover { transform: translateY(-2px); }
  .download-button:hover .download-icon { animation: download-cue .5s ease; }
  .download-button:active, .feedback-link:active { transform: scale(.98); }
}

@media (max-width: 359px) {
  .page { width: calc(100% - 24px); padding-top: 16px; }
  .brand-header { gap: 8px; margin-bottom: 20px; }
  .wordmark { font-size: 27px; }
  .beta-badge { padding-inline: 10px; font-size: 12px; }
  .hero { padding: 26px 16px 20px; border-radius: 24px; }
  .download-button { gap: 7px; padding-inline: 12px; }
  .download-icon { width: 21px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .hero, .welcome-card, .installation-guide, .beta-badge { border: 1px solid CanvasText; }
  .download-button, .feedback-link { border: 2px solid ButtonText; }
  .wordmark, .title-brand { color: CanvasText; }
  .page-pattern { display: none; }
}
/* Solicitud de acceso a la beta. */
#beta-form { margin-top: 0; }
.email-note { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
/* Acceso con Google. */
.google-button { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: none; }
.google-button:hover { background: var(--mint); border-color: var(--green-dark); }
.google-mark { color: #4285f4; font: 700 24px Arial, sans-serif; }
.profile-name { margin-top: 16px; font-size: 18px; text-align: center; overflow-wrap: anywhere; }
#profile-email { text-align: center; overflow-wrap: anywhere; }
.account-switch { display: block; min-height: 44px; margin: 10px auto 0; padding: 8px 16px; border: 0; background: transparent; color: var(--green-dark); text-decoration: underline; cursor: pointer; }
/* Formulario y bienvenida: paleta y tipografías de CONOMIC. */
.signup-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--muted); font-size: 13px; text-align: center; }
.signup-divider::before, .signup-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-field + .form-field { margin-top: 18px; }
.manual-form .code-label { margin-bottom: 8px; }
.manual-form .code-input { min-height: 52px; border-color: #bac6be; border-radius: 14px; padding: 12px 14px; }
.manual-form .code-input:focus { border-color: var(--green-dark); outline: 3px solid #27ae6026; outline-offset: 2px; }
.manual-form .code-input[aria-invalid="true"] { border-color: #a62323; }
.field-error { margin-top: 6px; color: #a62323; font-size: 13px; }
.privacy-note { margin: 16px auto 0; max-width: 38ch; color: var(--muted); font-size: 12px; text-align: center; }
.signup-success { padding: 16px 0 4px; text-align: center; }
.success-emblem { width: 100px; height: 100px; margin: 4px auto 24px; }
.success-emblem svg { display: block; width: 100%; height: 100%; }
.success-kicker { color: var(--green-dark); font-size: 13px; }
.signup-success h2 { margin: 8px 0 14px; font-family: "Fredoka", sans-serif; font-size: clamp(27px, 7vw, 34px); line-height: 1.2; }
#success-message { color: var(--muted); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.success-next { margin-top: 24px; padding: 18px; border: 1px solid #dbeadd; border-radius: 18px; background: var(--mint); text-align: left; }
.success-next strong { color: var(--green-dark); font-size: 15px; }
.success-next p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.success-thanks { margin-top: 22px; color: var(--green-dark); font-size: 14px; }
@media (prefers-reduced-motion: no-preference) { .signup-success { animation: content-enter .4s ease both; } }
