/* Sitio público de NuAp (www.thenuap.com y páginas legales). Marca: Nunito para títulos, Inter para texto. */
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(fonts/nunito-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url(fonts/nunito-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }

:root {
  --indigo: #1B1464;
  --blue: #2E3192;
  --night: #080B2C;
  --teal: #14B8C4;
  --yellow: #F5D33B;
  --paper: #F8F9FB;
  --surface: #FFFFFF;
  --ink: #1F2937;
  --muted: #5B6170;
  --line: #DADDEA;
  --heading: #1B1464;
  --link: #2E3192;
  --radius: 14px;
  --brand: 'Nunito', 'Varela Round', system-ui, sans-serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #080B2C; --surface: #11163F; --ink: #E5E7EB; --muted: #A5ACC4; --line: #262C62;
    --heading: #FFFFFF; --link: #A9B8FF; color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--text); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--brand); font-weight: 900; line-height: 1.08; letter-spacing: -0.01em; margin: 0; color: var(--heading); text-wrap: balance; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
h3 { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
p { margin: 0; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--indigo); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 16px; }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px;
  border-radius: 999px; font: 600 1rem/1 var(--text); text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn-yellow { background: var(--yellow); color: var(--indigo); }
.btn-yellow:hover { background: #FFE266; color: var(--indigo); }
.btn-light { background: #fff; color: var(--indigo); }
.btn-light:hover { background: #E8EAF8; color: var(--indigo); }
.btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.btn-ghost:hover { color: #fff; box-shadow: inset 0 0 0 2px #fff; }

/* ---- Encabezado ---- */
.top { background: var(--indigo); position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand img { width: 60px; height: auto; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: #D9DCF5; text-decoration: none; font-weight: 600; font-size: .95rem; }
.top nav a:hover { color: #fff; }

/* ---- Hero: el radio de cobertura del barrio ---- */
.hero { background: var(--indigo); color: #E6E8FA; padding: 32px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.75rem, 1.6rem + 5.2vw, 5.25rem); line-height: .98; letter-spacing: -0.02em; max-width: 11ch; }
.lead { font-size: 1.1875rem; line-height: 1.55; max-width: 34em; margin-top: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stores { margin-top: 22px; font-size: .95rem; color: #B9BEE8; max-width: 32em; }
.stores a { color: #fff; }

.radar { margin: 0; }
.radar svg { width: 100%; height: auto; max-width: 480px; margin-inline: auto; display: block; overflow: visible; }
.ring-label { fill: var(--teal); font: 600 14px var(--text); }
.shop { fill: #6FA8F5; }
.shop.win { fill: var(--yellow); }
.radar figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 14px; font-size: .875rem; color: #C3C7EE; }
.radar figcaption span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-white { background: #fff; }
.dot-shop { background: #6FA8F5; }
.dot-yellow { background: var(--yellow); }

/* Una sola secuencia al cargar: aparece el radio, se encienden las tiendas, acepta la más cercana y sale el domiciliario. */
@media (prefers-reduced-motion: no-preference) {
  .ring { transform-origin: 200px 200px; animation: ring-in 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .ring-label { animation: fade .6s .9s both; }
  .shop { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
  .s1 { animation-delay: 1s; } .s2 { animation-delay: 1.15s; } .s3 { animation-delay: 1.3s; } .s4 { animation-delay: 1.45s; }
  .shop.win { animation: pop .45s 1.6s cubic-bezier(.3, 1.6, .5, 1) both, accept 1.2s 2.2s ease-out both; }
  .route { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 1s 2.6s ease-in-out forwards; }
}
@keyframes ring-in { from { transform: scale(.15); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0); } }
@keyframes accept { 40% { filter: drop-shadow(0 0 12px rgba(245, 211, 59, .9)); } 100% { filter: drop-shadow(0 0 5px rgba(245, 211, 59, .6)); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---- Bandas de contenido ---- */
.band { padding: 88px 0; }
.band-white { background: var(--surface); }
.band-night { background: var(--night); color: #D9DCF5; }
.band-night h2, .band-night h3 { color: #fff; }
@media (prefers-color-scheme: dark) { .band-night { background: #0E1243; } }

/* Pasos del pedido: es una secuencia, por eso van numerados */
.steps { list-style: none; counter-reset: paso; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps li { counter-increment: paso; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(paso); position: absolute; top: 0; left: 0; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue); color: #fff; font: 900 1.25rem var(--brand);
}
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 23px; left: 58px; right: -20px; border-top: 2px dashed #B9BEE8; }
.steps p { margin-top: 10px; color: var(--muted); }
.note { margin-top: 44px; padding-left: 16px; border-left: 4px solid var(--yellow); color: var(--muted); max-width: 46em; }

/* Qué hay en NuAp */
.offer { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.offer-side { position: sticky; top: 104px; }
.offer-list { margin: 0; }
.offer-list > div { padding: 26px 0; border-top: 1px solid var(--line); }
.offer-list > div:last-child { border-bottom: 1px solid var(--line); }
.offer-list dt { font: 800 1.5rem/1.2 var(--brand); color: var(--heading); }
.offer-list dd { margin: 8px 0 0; color: var(--muted); max-width: 38em; }

/* Fotos opcionales (Canva): solo aparecen si el archivo existe en public/img */
.photo { margin: 28px 0 0; border-radius: 24px; overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.photo-wide img { aspect-ratio: 21 / 9; }

/* Trabaja con NuAp */
.lead-narrow { margin-top: 14px; color: #B9BEE8; }
.roles { list-style: none; margin: 40px 0 0; padding: 0; }
.roles li { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 28px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.roles li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.roles p { margin-top: 8px; color: #B9BEE8; max-width: 40em; }

/* Ayuda */
.help h2 { margin-bottom: 32px; }
.help-grid { display: grid; gap: 10px; max-width: 760px; }
details { background: var(--surface); border-radius: var(--radius); padding: 0 22px; border: 1px solid var(--line); }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; color: var(--heading); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 800 1.4rem/1 var(--brand); color: var(--link); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 20px; color: var(--muted); }

/* ---- Páginas de texto (legales y contacto) ---- */
.page { padding: 48px 0 72px; min-height: calc(100vh - 420px); }
.page .wrap { max-width: 820px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); }
.card h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin-bottom: 16px; }
.card h2 { font-size: 1.5rem; margin: 28px 0 10px; }
.card h3 { font-size: 1.2rem; margin: 22px 0 8px; }
.card p, .card ul, .card ol { margin: 0 0 14px; }
.muted { color: var(--muted); font-size: .9rem; }

/* ---- Pie ---- */
.foot { background: var(--indigo); color: #C3C7EE; padding: 56px 0 28px; font-size: .95rem; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-grid > div p { margin-top: 16px; line-height: 1.7; }
.foot-grid img { width: 60px; }
.foot nav { display: flex; flex-direction: column; gap: 8px; }
.foot nav h2 { font: 600 .95rem var(--text); color: #8F95CF; margin-bottom: 4px; }
.foot-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .875rem; color: #A5AAE0; display: grid; gap: 8px; }
.foot-legal a { text-decoration: underline; }

/* ---- Responsivo ---- */
@media (max-width: 920px) {
  .hero-grid, .offer { grid-template-columns: 1fr; }
  .offer-side { position: static; }
  .radar { max-width: 340px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .top nav { display: none; }
  .top-row .btn { margin-left: auto; }
  .hero { padding: 24px 0 56px; }
  .band { padding: 64px 0; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li { padding: 0 0 0 64px; }
  .roles li { flex-direction: column; align-items: flex-start; gap: 16px; }
  .cta-row .btn { flex: 1 1 100%; }
}
