/* ============================================================
   Comunidad GPTrader — Motion Landing (mobile-first)
   Hereda variables y base de styles.css
   ============================================================ */

body.comunidad { overflow-x: hidden; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.55);
}

/* ---------- Reveal genérico (stagger via --i) ---------- */
.m-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.m-reveal.m-in {
  opacity: 1;
  transform: none;
}

/* ---------- Hero ---------- */
.m-hero {
  position: relative;
  padding: clamp(3.5rem, 10vw, 7.5rem) 0 0;
  overflow: clip;
}
.m-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.m-hero-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin: 0;
  border: 1px solid rgba(244, 241, 234, 0.16);
  background: #111;
}
.m-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  filter: saturate(0.76) contrast(1.08) brightness(0.9);
}
.m-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13,13,13,0.06), transparent 42%, rgba(13,13,13,0.32));
  mix-blend-mode: soft-light;
}

.m-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 239, 231, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 231, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 72% at 50% 18%, #000 28%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 90% 72% at 50% 18%, #000 28%, transparent 76%);
  pointer-events: none;
}

.m-title {
  max-width: 15ch;
  margin-bottom: clamp(1.2rem, 3vw, 1.8rem);
}
.m-title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(105%) rotate(2deg);
  animation: wordUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(120ms + var(--i, 0) * 80ms);
  will-change: transform, opacity;
}
@keyframes wordUp {
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}
.m-title .w.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-soft) 45%, var(--accent));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    wordUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
    gradSlide 5s ease-in-out infinite;
  animation-delay: calc(120ms + var(--i, 0) * 80ms), 1.4s;
}
@keyframes gradSlide {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.lead strong { color: var(--fg); font-weight: 700; }

.m-hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: clamp(1.4rem, 3vw, 2rem); }

/* ---------- Ticker marquee ---------- */
.ticker {
  position: relative;
  z-index: 2;
  margin-top: clamp(2.2rem, 5vw, 3.6rem);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(17, 16, 14, 0.55);
  overflow: hidden;
  padding: 0.9rem 0;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
  white-space: nowrap;
}
.ticker-track span.hl { color: var(--accent); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Stats ---------- */
.m-stats { padding: clamp(2.4rem, 6vw, 4rem) 0 0; }
.m-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.m-stat {
  text-align: center;
  padding: clamp(0.9rem, 2.5vw, 1.5rem) 0.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(17, 16, 14, 0.6);
}
.m-stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 6vw, 3.4rem);
  line-height: 1.05;
  color: var(--fg);
  text-shadow: 0 0 26px rgba(57, 255, 20, 0.28);
  font-variant-numeric: tabular-nums;
}
.m-stat span {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

/* ---------- Benefits cards ---------- */
.m-benefits h2 { max-width: 16ch; }
.m-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
}
.b-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(23, 21, 18, 0.92), rgba(17, 16, 14, 0.78));
  padding: 1.35rem;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  will-change: transform;
}
.b-card:hover {
  border-color: color-mix(in srgb, var(--accent), var(--border) 42%);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(57, 255, 20, 0.1),
    0 0 44px rgba(57, 255, 20, 0.06);
}
.b-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 58%);
  background: rgba(57, 255, 20, 0.07);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.b-card h3 { font-size: 1.4rem; margin-bottom: 0.55rem; }
.b-card p { font-size: 0.95rem; line-height: 1.65; }
.b-card p strong { color: var(--fg); }
.b-num {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--soft);
  opacity: 0.75;
}

/* ---------- Torneo highlight ---------- */
.m-torneo {
  position: relative;
  overflow: clip;
  text-align: center;
}
.m-torneo-inner { position: relative; z-index: 2; }
.m-big {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(4.2rem, 16vw, 10.5rem);
  line-height: 1;
  color: var(--accent);
  margin: clamp(0.6rem, 2vw, 1.2rem) 0;
  animation: pulseGlow 3.4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 30px rgba(57, 255, 20, 0.22); }
  50% { text-shadow: 0 0 74px rgba(57, 255, 20, 0.48); }
}
.m-torneo .lead { max-width: 56ch; margin: 0 auto; }
.m-note {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.62rem 1.1rem;
  border: 1px dashed color-mix(in srgb, var(--accent), transparent 42%);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent-soft);
  background: rgba(57, 255, 20, 0.05);
}

/* ---------- Steps ---------- */
.m-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
}
.m-step {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(17, 16, 14, 0.6);
  padding: 1.3rem;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.m-step:hover { border-color: color-mix(in srgb, var(--accent), var(--border) 50%); transform: translateY(-3px); }
.m-step .meta { color: var(--accent); }
.m-step h3 { font-size: 1.35rem; margin: 0.55rem 0; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(17, 16, 14, 0.6);
  padding: 1rem 1.2rem;
}
.faq details + details { margin-top: 0.8rem; }
.faq summary {
  cursor: pointer;
  color: var(--fg);
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq details p { margin-top: 0.6rem; }
.faq h2 { margin-bottom: 1.6rem; }

/* ---------- Final CTA ---------- */
.m-final {
  position: relative;
  overflow: clip;
  text-align: center;
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  border-top: 1px solid var(--border);
}
.m-final .lead { max-width: 52ch; margin: 0 auto; }
.m-final .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: clamp(1.5rem, 3vw, 2.2rem);
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .m-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .m-steps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .m-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .m-hero-inner { grid-template-columns: 1fr; }
  .m-hero-photo { order: -1; max-height: 420px; }
  .m-stats-grid { gap: 0.6rem; }
  .m-stat b { font-size: 1.55rem; }
  .m-stat span { font-size: 0.6rem; }
  .m-hero .actions .button { width: 100%; }
  .ticker-track { gap: 1.5rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .m-reveal { opacity: 1; transform: none; transition: none; }
  .m-title .w,
  .m-title .w.grad { animation: none; opacity: 1; transform: none; color: var(--accent); }
  .m-title .w { color: inherit; }
  .ticker-track { animation: none; }
  .m-big { animation: none; }
  .scroll-progress { display: none; }
}
