/* ==========================================================================
   Agrupa · landing
   Estilos propios que complementan Tailwind: cabecera, mockups y detalles.
   ========================================================================== */

/* ---------- Utilidades base ---------- */

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--color-brand-950);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Cabecera ---------- */

.site-header {
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.35s var(--ease-out-expo),
    border-color 0.35s var(--ease-out-expo),
    box-shadow 0.35s var(--ease-out-expo),
    backdrop-filter 0.35s var(--ease-out-expo);
}

.site-header[data-scrolled] {
  border-bottom-color: rgb(6 35 28 / 0.08);
  background: rgb(246 248 243 / 0.84);
  box-shadow: 0 16px 40px -34px rgb(6 35 28 / 0.5);
  backdrop-filter: blur(18px) saturate(1.35);
}

.logo-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.72rem;
  background: var(--color-brand-950);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.16),
    0 8px 18px -10px rgb(6 35 28 / 0.8);
}

.mobile-panel:not([hidden]) .mobile-card {
  animation: panel-in 0.28s var(--ease-out-expo) both;
}

.menu-scrim {
  position: fixed;
  inset: 72px 0 0;
  background: rgb(6 35 28 / 0.28);
  backdrop-filter: blur(3px);
}

body.menu-open {
  overflow: hidden;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

[data-menu-toggle] .icon-close {
  display: none;
}

[data-menu-toggle][aria-expanded="true"] .icon-open {
  display: none;
}

[data-menu-toggle][aria-expanded="true"] .icon-close {
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(58% 48% at 82% 12%, rgb(214 251 116 / 0.32), transparent 72%),
    radial-gradient(46% 42% at 6% -4%, rgb(198 233 221 / 0.62), transparent 74%),
    linear-gradient(180deg, #f7f9f3 0%, var(--color-paper) 70%);
}

.hero-dots {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.5;
  background-image: radial-gradient(rgb(6 35 28 / 0.2) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(72% 62% at 52% 28%, #000 12%, transparent 74%);
  -webkit-mask-image: radial-gradient(72% 62% at 52% 28%, #000 12%, transparent 74%);
}

.hero-arc {
  position: absolute;
  z-index: -1;
  border: 1px solid rgb(6 35 28 / 0.08);
  border-radius: 999px;
  pointer-events: none;
}

.underline-mark {
  display: inline-block;
  padding-bottom: 0.08em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 18' preserveAspectRatio='none'%3E%3Cpath d='M3 12C70 5 150 3 297 9' fill='none' stroke='%23c3ef56' stroke-width='10' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.15em;
}

.check-dot {
  display: inline-grid;
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  place-items: center;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-brand-950);
}

.check-dot svg {
  width: 0.7rem;
  height: 0.7rem;
  stroke-width: 3.2;
}

/* ---------- Marquee de tipos de grupo ---------- */

.marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: flex;
  min-width: 100%;
  flex: 0 0 auto;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  animation: marquee 42s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(6 35 28 / 0.58);
}

.marquee-item::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--color-accent-strong);
  box-shadow: 0 0 0 3px rgb(195 239 86 / 0.18);
}

/* ---------- Mockup de la app ---------- */

.mockup-shell {
  position: relative;
  padding: 0.55rem;
  border: 1px solid rgb(6 35 28 / 0.1);
  border-radius: 2rem;
  background: rgb(255 255 255 / 0.72);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 #fff;
  backdrop-filter: blur(14px);
}

.mockup-window {
  overflow: hidden;
  border-radius: 1.55rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(6 35 28 / 0.04);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgb(6 35 28 / 0.07);
  background: #fbfcf9;
}

.window-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgb(6 35 28 / 0.14);
}

.url-pill {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  border-radius: 0.45rem;
  background: rgb(6 35 28 / 0.05);
  padding: 0.35rem 0.6rem;
  color: var(--color-muted);
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.url-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.avatar-sm {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  font-size: 0.56rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.pill-paid {
  background: #dcfce7;
  color: #166534;
}

.pill-pending {
  background: #fef3c7;
  color: #92400e;
}

.pill-neutral {
  background: rgb(6 35 28 / 0.06);
  color: #4f5f57;
}

.pill-open {
  border: 1px solid rgb(15 107 87 / 0.14);
  background: var(--color-brand-50);
  color: var(--color-brand-800);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
}

.progress {
  height: 0.375rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(6 35 28 / 0.08);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-brand-600), var(--color-brand-400));
}

/* Tarjeta flotante del hero */

.floating-toast {
  position: absolute;
  z-index: 2;
  width: 12.5rem;
  border: 1px solid rgb(6 35 28 / 0.1);
  border-radius: 1rem;
  background: #fff;
  padding: 0.7rem;
  box-shadow: var(--shadow-float);
}

.floating-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgb(6 35 28 / 0.1);
  border-radius: 999px;
  background: #fff;
  padding: 0.5rem 0.75rem;
  box-shadow: var(--shadow-float);
  font-size: 0.65rem;
  font-weight: 650;
  color: var(--color-brand-900);
}

/* ---------- Características ---------- */

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgb(6 35 28 / 0.1);
  border-radius: 1.75rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(6 35 28 / 0.04);
  transition:
    transform 0.4s var(--ease-out-expo),
    border-color 0.4s var(--ease-out-expo),
    box-shadow 0.4s var(--ease-out-expo);
}

@media (min-width: 640px) {
  .feature-card {
    padding: 2rem;
  }
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgb(6 35 28 / 0.2);
  box-shadow: var(--shadow-card);
}

.feature-dark {
  border-color: rgb(255 255 255 / 0.08);
  background:
    radial-gradient(120% 120% at 100% 0%, rgb(22 131 107 / 0.35), transparent 55%),
    linear-gradient(155deg, #0a3f34 0%, #06231c 58%, #041a14 100%);
  color: #fff;
}

.feature-dark:hover {
  border-color: rgb(214 251 116 / 0.32);
}

.feature-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  place-items: center;
  border: 1px solid rgb(6 35 28 / 0.05);
  border-radius: 0.95rem;
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  transition: transform 0.4s var(--ease-out-expo);
}

.feature-card:hover .feature-icon {
  transform: rotate(-6deg) scale(1.04);
}

.feature-dark .feature-icon {
  border-color: rgb(214 251 116 / 0.24);
  background: rgb(214 251 116 / 0.12);
  color: var(--color-accent);
}

.chip-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.06);
  padding: 0.35rem 0.7rem;
  color: rgb(255 255 255 / 0.72);
  font-size: 0.65rem;
  font-weight: 500;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgb(6 35 28 / 0.1);
  border-radius: 999px;
  background: #fff;
  padding: 0.3rem 0.6rem;
  color: var(--color-brand-900);
  font-size: 0.64rem;
  font-weight: 600;
}

.tag-accent {
  border-color: rgb(15 107 87 / 0.16);
  background: var(--color-brand-50);
}

/* Teléfono ilustrado de la tarjeta de link público */

.phone-shell {
  position: relative;
  width: 100%;
  max-width: 13.5rem;
  margin-inline: auto;
  padding: 0.35rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 1.8rem;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0.04));
  box-shadow: 0 34px 60px -24px #01100c;
  transform: rotate(2deg);
}

.phone-screen {
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--color-paper);
  padding: 0.8rem;
}

.input-mock {
  border: 1px solid rgb(6 35 28 / 0.12);
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.45rem 0.55rem;
  color: rgb(6 35 28 / 0.5);
  font-size: 0.56rem;
}

.choice-mock {
  border: 1px solid rgb(6 35 28 / 0.12);
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.4rem 0.3rem;
  text-align: center;
  color: var(--color-brand-800);
  font-size: 0.56rem;
  font-weight: 650;
}

.choice-mock.is-on {
  border-color: var(--color-brand-700);
  background: var(--color-brand-700);
  color: #fff;
}

/* ---------- Cómo funciona ---------- */

.step-num {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 1rem;
  background: var(--color-brand-950);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 14px 24px -16px rgb(6 35 28 / 0.9);
}

.step-line {
  position: absolute;
  top: 1.5rem;
  right: 18%;
  left: 18%;
  border-top: 1px dashed rgb(6 35 28 / 0.16);
}

/* ---------- Privacidad ---------- */

.grain {
  position: relative;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.lock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.65rem;
}

.lock-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: rgb(6 35 28 / 0.09);
}

/* ---------- Preguntas frecuentes ---------- */

.faq-item {
  overflow: hidden;
  border: 1px solid rgb(6 35 28 / 0.1);
  border-radius: 1.25rem;
  background: #fff;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.faq-item[open] {
  border-color: rgb(15 107 87 / 0.28);
  box-shadow: 0 20px 44px -34px rgb(6 35 28 / 0.45);
}

.faq-item summary {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
}

@media (min-width: 640px) {
  .faq-item summary {
    padding: 1.15rem 1.4rem;
    font-size: 0.95rem;
  }
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  flex: none;
  place-items: center;
  border-radius: 999px;
  background: rgb(6 35 28 / 0.05);
  color: var(--color-brand-900);
  transition:
    transform 0.3s var(--ease-out-expo),
    background-color 0.3s ease,
    color 0.3s ease;
}

.faq-icon svg {
  width: 0.85rem;
  height: 0.85rem;
}

.faq-item[open] .faq-icon {
  background: var(--color-accent);
  color: var(--color-brand-950);
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.2rem 1.15rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

@media (min-width: 640px) {
  .faq-answer {
    padding: 0 1.4rem 1.3rem;
  }
}

/* ---------- CTA final ---------- */

.cta-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(110% 130% at 100% 0%, #efffb3 0%, #d6fb74 46%, #c3ef56 100%);
}

.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  background-image: radial-gradient(rgb(6 35 28 / 0.2) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(80% 80% at 82% 18%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(80% 80% at 82% 18%, #000, transparent 72%);
  pointer-events: none;
}

.cta-a {
  position: absolute;
  right: -0.06em;
  bottom: -0.34em;
  z-index: -1;
  color: rgb(6 35 28 / 0.07);
  font-family: var(--font-heading);
  font-size: clamp(16rem, 32vw, 30rem);
  font-weight: 800;
  line-height: 0.7;
  letter-spacing: -0.08em;
  user-select: none;
  pointer-events: none;
}

/* ---------- Aparición al hacer scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee-track,
  .animate-float,
  .animate-float-slow {
    animation: none !important;
  }

  .feature-card:hover,
  .btn:hover {
    transform: none;
  }

  .mobile-panel:not([hidden]) .mobile-card {
    animation: none;
  }
}
