/*
 * Prezu — sitio publico.
 *
 * Tokens portados de prezu_app/packages/prezu_ds/lib/colors.dart, con la
 * misma regla 60/30/10: fondo y superficies, texto, y la marca solo para lo
 * que tiene que llamar la atencion. Si cambia un color alla, cambia aca.
 */

:root {
  /* 60%: fondos y superficies */
  --bg: #faf8f6;
  --surface: #ffffff;
  --border: #e7e2dd;

  /* 30%: texto */
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #78716c;

  /* 10%: marca y acento */
  --brand: #8b4513;
  --brand-strong: #6b3410;
  --brand-soft: #f5ede6;
  --accent: #c2410c;
  /* Solo fondos e ilustracion: sobre blanco da 2,2:1, no es color de texto. */
  --accent-bright: #ff914d;

  --success: #15803d;
  --success-soft: #ecfdf3;

  --shadow-phone: 0 30px 60px -20px rgb(28 25 23 / 0.25);
  --shadow-card: 0 24px 48px -24px rgb(139 69 19 / 0.35);

  --font: 'Lexend Deca', ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 72rem;
  --gutter: 1.25rem;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mt-section {
  margin-top: 3rem;
}

.eyebrow {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow--bare {
  padding: 0;
  background: none;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  max-width: 34rem;
}

.section-title + .lead,
.eyebrow + .section-title {
  margin-top: 1rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 36rem;
}

/* ── Header ───────────────────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(231 226 221 / 0.6);
  background: rgb(250 248 246 / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo img {
  width: 28px;
  height: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.nav__link {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--text-2);
  transition:
    background-color 0.3s,
    color 0.3s;
}

.nav__link:hover,
.nav__link[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--brand);
}

.nav__cta {
  display: none;
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--surface);
  font-weight: 600;
  transition: background-color 0.3s;
}

.nav__cta:hover {
  background: var(--brand-strong);
}

/* ── Botones de tienda ────────────────────────────────────────────────── */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stores--center {
  justify-content: center;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 11rem;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  text-align: left;
  line-height: 1.2;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.store svg {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  fill: currentColor;
}

.store__caption {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

.store__name {
  display: block;
  font-weight: 600;
}

/* Con link configurado (lo pone js/main.js) el boton pasa a ser el CTA. */
.store[href] {
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.store[href]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgb(28 25 23 / 0.4);
}

.stores-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-3);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-block: 3.5rem 5rem;
}

.hero__title {
  margin-top: 1.5rem;
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  line-height: 1.08;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__subtitle {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-2);
}

.hero__cta {
  margin-top: 2.25rem;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

/* Sobre el pliegue: entra con animaciones al cargar, no con scroll. */
.hero .eyebrow,
.hero__title,
.hero__subtitle,
.hero__cta {
  animation: fade-up 0.8s var(--ease) both;
}

.hero__title {
  animation-delay: 100ms;
}
.hero__subtitle {
  animation-delay: 220ms;
}
.hero__cta {
  animation-delay: 340ms;
}

/* ── Secciones ────────────────────────────────────────────────────────── */

.section {
  padding-block: 5rem;
}

.section--tight {
  padding-block: 3rem;
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  gap: 2.5rem;
}

.grid-3--divided {
  padding-top: 4rem;
  border-top: 1px solid var(--border);
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.card h3 {
  font-size: 1.5rem;
}

.card p {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-2);
}

.card--link {
  transition:
    transform 0.5s var(--ease),
    border-color 0.5s,
    box-shadow 0.5s;
}

.card--link:hover {
  transform: translateY(-4px);
  border-color: rgb(139 69 19 / 0.3);
  box-shadow: var(--shadow-card);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: var(--brand-soft);
  color: var(--brand);
}

.card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.card__icon + h3 {
  margin-top: 1.5rem;
}

.card--link p {
  flex: 1;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-weight: 600;
  color: var(--brand);
}

.card__cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s;
}

.card--link:hover .card__cta svg {
  transform: translateX(4px);
}

.pillar h3 {
  font-size: 1.25rem;
}

.pillar p {
  margin-top: 0.5rem;
  color: var(--text-2);
}

/* Pasos */

.steps {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
  counter-reset: step;
}

.step {
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.step h3 {
  margin-top: 1.25rem;
  font-size: 1.25rem;
}

.step p {
  margin-top: 0.5rem;
  color: var(--text-2);
}

/* Bloque 0% (comercios) */

.figure-block {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.figure-block__figure {
  font-size: clamp(4.5rem, 10vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
}

.figure-block h2 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.figure-block .lead {
  margin-top: 1rem;
}

/* FAQ */

.faq {
  max-width: 48rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding-block: 1.25rem;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  font-size: 1.125rem;
  font-weight: 600;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--brand);
  transition: transform 0.3s;
}

.faq details[open] summary svg {
  transform: rotate(45deg);
}

.faq details p {
  margin-top: 0.75rem;
  color: var(--text-2);
}

/* Cierre con descarga */

.download {
  padding-block: 2rem 6rem;
  scroll-margin-top: 5rem;
}

.download__box {
  padding: 4rem 1.5rem;
  border-radius: 2rem;
  background: var(--brand-soft);
  text-align: center;
}

.download__box h2 {
  max-width: 34rem;
  margin-inline: auto;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.download__box .lead {
  margin: 1rem auto 0;
}

.download__box .stores {
  margin-top: 2.25rem;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-block: 2.5rem;
  font-size: 0.875rem;
}

.footer__tagline {
  margin-top: 0.5rem;
  color: var(--text-3);
}

.footer__nav {
  display: flex;
  gap: 1.25rem;
  color: var(--text-2);
}

.footer__nav a:hover {
  color: var(--brand);
}

.footer__copy {
  margin-top: 0.5rem;
  color: var(--text-3);
}

/* ── Paginas legales ──────────────────────────────────────────────────── */

.legal-hero {
  padding-block: 4rem 2.5rem;
}

.legal-hero__title {
  margin-top: 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.legal-hero__meta {
  margin-top: 0.75rem;
  color: var(--text-3);
  font-size: 0.875rem;
}

.legal-layout {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 6rem;
}

.legal-toc {
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.875rem;
}

.legal-toc__title {
  font-weight: 600;
}

.legal-toc ol {
  margin-top: 0.75rem;
  list-style: decimal;
  padding-left: 1.25rem;
  color: var(--text-2);
}

.legal-toc li + li {
  margin-top: 0.35rem;
}

.legal-toc a:hover {
  color: var(--brand);
}

.legal {
  max-width: 46rem;
  min-width: 0;
  color: var(--text-2);
}

.legal section {
  scroll-margin-top: 5rem;
}

.legal section + section {
  margin-top: 3rem;
}

.legal h2 {
  font-size: 1.5rem;
  color: var(--text);
}

.legal h3 {
  margin-top: 1.75rem;
  font-size: 1.125rem;
  color: var(--text);
}

.legal p,
.legal__list,
.legal__defs {
  margin-top: 0.875rem;
}

.legal strong {
  color: var(--text);
}

.legal__list {
  list-style: disc;
  padding-left: 1.25rem;
}

.legal__list li + li {
  margin-top: 0.5rem;
}

.legal__defs dt {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--text);
}

.legal__defs dd {
  margin: 0.25rem 0 0;
}

/* Dato a completar antes de publicar. */
.legal__todo {
  padding: 0 0.25rem;
  border-radius: 0.25rem;
  background: var(--brand-soft);
  color: var(--accent);
}

/* ── Ilustraciones del hero ───────────────────────────────────────────── */

/* Radar (home) */

.radar {
  width: 100%;
  max-width: 28rem;
  animation: fade-in 0.5s ease-out both;
}

.radar__ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
}

/* La onda: un anillo que se expande y se apaga, tres desfasados. */
.radar__wave {
  fill: var(--accent-bright);
  fill-opacity: 0.12;
  stroke: var(--accent-bright);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: ring 4.5s ease-out infinite;
}

/* Los retardos van por CSS (la CSP no permite style= inline). */
.radar__wave:nth-of-type(5) {
  animation-delay: 1500ms;
}
.radar__wave:nth-of-type(6) {
  animation-delay: 3000ms;
}

.radar__pin {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.6s var(--ease) both;
}

.radar > g:nth-of-type(1) .radar__pin {
  animation-delay: 700ms;
}
.radar > g:nth-of-type(2) .radar__pin {
  animation-delay: 900ms;
}
.radar > g:nth-of-type(3) .radar__pin {
  animation-delay: 1100ms;
}
.radar > g:nth-of-type(4) .radar__pin {
  animation-delay: 1300ms;
}
.radar > g:nth-of-type(5) .radar__pin {
  animation-delay: 1500ms;
}
.radar > g:nth-of-type(6) .radar__pin {
  animation-delay: 1700ms;
}

.radar__pin path {
  fill: var(--text);
}

.radar__pin circle {
  fill: var(--bg);
}

.radar__center {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.6s var(--ease) 300ms both;
}

.radar__center circle {
  fill: var(--accent);
}

.radar__center text {
  fill: var(--surface);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
}

/* Celular (clientes y comercios) */

.phone-float {
  animation: float 7s ease-in-out infinite;
}

.phone {
  position: relative;
  width: 17.5rem;
  height: 34rem;
  padding: 0.75rem;
  border-radius: 2.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-phone);
  animation: fade-up 0.8s var(--ease) both;
}

.phone::before {
  content: '';
  position: absolute;
  top: 1.25rem;
  left: 50%;
  width: 5rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--text);
  transform: translateX(-50%);
}

.phone__screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 3rem 1rem 1.25rem;
  border-radius: 2.1rem;
  background: var(--bg);
  overflow: hidden;
  font-size: 0.75rem;
}

.phone__title {
  font-size: 1.125rem;
  font-weight: 600;
}

.phone__subtitle {
  color: var(--text-3);
}

/* Ofertas (clientes) */

.offers {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.offer {
  position: relative;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  animation: slide-in 0.7s var(--ease) both;
}

.offer:nth-child(1) {
  animation-delay: 700ms;
}
.offer:nth-child(2) {
  animation-delay: 1150ms;
}
.offer:nth-child(3) {
  animation-delay: 1600ms;
}

.offer--chosen {
  border-color: var(--brand);
}

.offer__meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
}

.offer__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--text-2);
}

.offer__rating svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: var(--accent-bright);
}

.offer__price {
  margin-top: 0.375rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.offer__detail {
  color: var(--text-2);
}

.offer__tag {
  position: absolute;
  top: -0.625rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--surface);
  font-size: 0.65rem;
  font-weight: 600;
  transform-origin: center;
  animation: pop 0.6s var(--ease) 2500ms both;
}

.offer__tag svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* Cotizacion (comercios) */

.push {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  animation: drop-in 0.7s var(--ease) 700ms both;
}

.push__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: var(--accent);
  color: var(--surface);
}

.push__icon svg {
  width: 1rem;
  height: 1rem;
}

.push__head {
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
}

.push__head strong {
  color: var(--text);
}

.push__body {
  margin-top: 0.125rem;
  color: var(--text-2);
}

.quote__title {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.quote {
  margin-top: 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.quote li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.quote li + li {
  border-top: 1px solid var(--border);
}

.quote__name {
  font-size: 0.875rem;
  font-weight: 600;
}

.quote__qty {
  color: var(--text-3);
}

.quote__price {
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  animation: fade-in 0.5s ease-out both;
}

.quote li:nth-child(1) .quote__price {
  animation-delay: 1700ms;
}
.quote li:nth-child(2) .quote__price {
  animation-delay: 2200ms;
}
.quote li:nth-child(3) .quote__price {
  animation-delay: 2700ms;
}

.quote__sent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.875rem;
  border-radius: 1rem;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.875rem;
  font-weight: 600;
  transform-origin: center;
  animation: pop 0.6s var(--ease) 3500ms both;
}

.quote__sent svg {
  width: 1rem;
  height: 1rem;
}

/* ── Aparicion al scrollear ───────────────────────────────────────────── */

/*
 * `js/main.js` marca `data-visible` la primera vez que el bloque entra en
 * pantalla. Sin JS, `.no-js` deja todo visible (ver el <html> de cada pagina).
 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s var(--ease);
}

.reveal[data-visible],
.no-js .reveal {
  opacity: 1;
  transform: none;
}

.reveal[data-delay='1'] {
  transition-delay: 120ms;
}
.reveal[data-delay='2'] {
  transition-delay: 240ms;
}
.reveal[data-delay='3'] {
  transition-delay: 360ms;
}

/* ── Keyframes ────────────────────────────────────────────────────────── */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
}

@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes ring {
  from {
    opacity: 0.9;
    transform: scale(0.2);
  }
  to {
    opacity: 0;
    transform: scale(1);
  }
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (min-width: 40em) {
  :root {
    --gutter: 2rem;
  }

  .nav {
    gap: 0.5rem;
  }

  .nav__cta {
    display: inline-block;
  }

  .grid-2,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    padding: 2.5rem;
  }

  .figure-block {
    padding: 3rem;
  }

  .download__box {
    padding: 5rem 3rem;
  }

  .footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer__right {
    text-align: right;
  }

  .footer__nav {
    justify-content: flex-end;
  }
}

@media (min-width: 48em) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .figure-block {
    grid-template-columns: auto 1fr;
    gap: 3.5rem;
  }
}

@media (min-width: 64em) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    padding-block: 6rem 7rem;
  }

  .steps--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .legal-layout {
    grid-template-columns: 16rem 1fr;
    gap: 4rem;
    align-items: start;
  }

  .legal-toc {
    position: sticky;
    top: 6rem;
    max-height: calc(100dvh - 8rem);
    overflow-y: auto;
  }
}

/* ── Movimiento reducido ──────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
