/* Brickly landing — mirrors the app's design system:
   near-black canvas, mustard yellow + sage green, bold rounded type. */

:root {
  --bg: #121214;
  --surface: #1c1c1f;
  --surface-hi: #27272b;
  --paper: #f2f1ed;
  --paper-dim: rgba(242, 241, 237, 0.55);
  --ink: #151517;
  --yellow: #e5df70;
  --green: #9fce8e;
  --danger: #eb6b57;
  --radius: 26px;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--paper);
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  line-height: 1.6;
  overflow-x: clip;
}

h1, h2, h3 { font-weight: 900; line-height: 1.15; letter-spacing: -0.01em; }
.yellow { color: var(--yellow); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; width: 100%;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(18, 18, 20, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 22px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); font-weight: 900; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--paper-dim); text-decoration: none; font-size: 15px; font-weight: 700; transition: color 0.2s; padding: 12px 4px; }
.nav-links a:hover { color: var(--yellow); }
.lang-pill {
  font-size: 13px; font-weight: 800; text-decoration: none;
  color: var(--paper-dim); border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 14px; border-radius: 999px; margin-right: 12px;
  transition: color 0.2s, border-color 0.2s;
}
.lang-pill:hover { color: var(--yellow); border-color: var(--yellow); }
.nav-right { display: flex; align-items: center; }

/* aviso suave de idioma */
.lang-suggest {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 90; display: flex; align-items: center; gap: 12px;
  background: var(--surface-hi); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px; padding: 10px 10px 10px 20px;
  font-size: 14px; font-weight: 700; color: var(--paper);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
}
.lang-suggest a {
  background: var(--yellow); color: var(--ink); text-decoration: none;
  font-weight: 800; padding: 8px 16px; border-radius: 999px; white-space: nowrap;
}
.lang-suggest button {
  background: none; border: none; color: var(--paper-dim);
  font-size: 17px; cursor: pointer; padding: 6px 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
  background: var(--yellow); color: var(--ink);
  font-weight: 800; font-size: 16px; text-decoration: none;
  padding: 14px 26px; border-radius: 999px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  box-shadow: 0 6px 24px rgba(229, 223, 112, 0.18);
}
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 32px rgba(229, 223, 112, 0.28); }
.btn:active { transform: scale(0.97); }
.btn-small { padding: 10px 20px; font-size: 14px; }
.btn-ghost { background: var(--surface-hi); color: var(--paper); box-shadow: none; }
.btn-appstore { background: var(--paper); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
}
/* rejilla blueprint de fondo, desvanecida en los bordes */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(242, 241, 237, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 241, 237, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, black 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, black 25%, transparent 72%);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 30px; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding: 76px 22px 56px;
  text-align: left;
}
/* palabras del titular (entrada escalonada vía GSAP) */
.hero h1 .w { display: inline-block; }
.hl { position: relative; }
.hl-stroke {
  position: absolute; left: -3%; bottom: -0.12em; width: 106%; height: 0.42em;
  color: var(--green); opacity: 0.85;
}
.glow { position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.glow-yellow { width: 380px; height: 380px; background: rgba(229, 223, 112, 0.13); top: -120px; left: -140px; }
.glow-green { width: 340px; height: 340px; background: rgba(159, 206, 142, 0.12); bottom: -80px; right: -60px; }

.chip {
  display: inline-block; background: var(--surface-hi); color: var(--yellow);
  font-size: 13px; font-weight: 800; padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 5vw, 58px); margin-bottom: 20px; }
.lead { font-size: 18px; color: var(--paper-dim); max-width: 540px; margin: 0 0 30px; }
.lead strong { color: var(--paper); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.micro { font-size: 13px; color: rgba(242, 241, 237, 0.55); margin-top: 16px; }

/* ---------- Phones ---------- */
.phone {
  border-radius: 44px; padding: 10px; background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  max-width: 290px; margin: 0 auto;
}
.phone img { width: 100%; display: block; border-radius: 36px; }
.hero-phone { position: relative; display: flex; justify-content: center; }
.hero-device { transform: rotate(-3deg); max-width: 280px; will-change: transform; }

/* chips flotantes alrededor del teléfono */
.float-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13.5px;
  padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
  will-change: transform;
}
.float-chip svg { width: 17px; height: 17px; }
.fc1 {
  top: 9%; left: -4%;
  background: var(--surface-hi); color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.fc1 svg { color: var(--yellow); }
.fc2 { top: 30%; right: -6%; background: var(--yellow); color: var(--ink); }
.fc3 { bottom: 13%; left: -9%; background: var(--green); color: var(--ink); }

/* ticker de temas al pie del hero */
.ticker {
  position: relative; overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 13px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.ticker-track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  animation: ticker 26s linear infinite;
}
.ticker-track span {
  font-size: 13.5px; font-weight: 800; letter-spacing: 0.04em;
  color: rgba(242, 241, 237, 0.45); white-space: nowrap;
}
.ticker-track i {
  width: 7px; height: 7px; border-radius: 2px; background: var(--yellow); opacity: 0.55;
  transform: rotate(45deg); flex: none;
}
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }


/* ---------- Journey (scrollytelling) ---------- */
.journey-wrap {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: start; text-align: left; margin-top: 30px;
}
.journey-steps { display: flex; flex-direction: column; }
.jstep {
  min-height: 72vh;
  display: flex; flex-direction: column; justify-content: center;
  gap: 12px; max-width: 420px; margin-left: auto; padding-right: 10px;
  opacity: 0.22; transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.jstep.is-active { opacity: 1; transform: none; }
.jstep-chip {
  align-self: flex-start;
  background: rgba(229, 223, 112, 0.12); color: var(--yellow);
  font-size: 12.5px; font-weight: 800; padding: 6px 14px; border-radius: 999px;
}
.jstep h3 { font-size: clamp(22px, 2.6vw, 30px); }
.jstep p { font-size: 16px; color: var(--paper-dim); }
.jstep-device { display: none; }

.journey-phone {
  position: sticky; top: calc(50vh - 290px);
  display: flex; justify-content: flex-start; padding-left: 10px;
}
.jphone { position: relative; max-width: 270px; width: 100%; }
.jphone .jscreen { position: absolute; inset: 10px; width: calc(100% - 20px); opacity: 0; }
.jphone .jscreen.is-on { position: relative; inset: auto; width: 100%; opacity: 1; }

/* riel de progreso central */
.journey-rail {
  position: absolute; left: 50%; top: 4vh; bottom: 4vh; width: 3px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.07); border-radius: 2px;
}
.journey-rail-fill {
  display: block; width: 100%; height: 100%;
  background: var(--yellow); border-radius: 2px;
  transform: scaleY(0); transform-origin: top;
}

@media (max-width: 900px) {
  /* Móvil: baraja de tarjetas. Cada capítulo se queda pegado arriba y el
     siguiente desliza por encima (sticky stack). */
  .journey-wrap { display: block; }
  .journey-rail { display: none; }
  .journey-phone { display: none; }
  .journey-steps { display: block; }
  .jstep {
    position: sticky; top: 84px;
    min-height: 0; max-width: 460px; margin: 0 auto 30px;
    padding: 26px 22px 30px;
    align-items: center; text-align: center; justify-content: flex-start;
    opacity: 1; transform: none;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: 0 -16px 44px rgba(0, 0, 0, 0.5);
  }
  /* Cada tarjeta posterior SIEMPRE pinta encima de la anterior */
  .jstep:nth-of-type(1) { z-index: 1; }
  .jstep:nth-of-type(2) { z-index: 2; }
  .jstep:nth-of-type(3) { z-index: 3; }
  .jstep:nth-of-type(4) { z-index: 4; }
  .jstep-device {
    display: block; width: 175px; max-width: 50vw; margin: 0 auto 6px;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.5));
  }
  .jstep-chip { align-self: center; }
  /* Titular del journey en dos líneas: blanco arriba, amarillo abajo */
  .journey h2 .t1, .journey h2 .t2 { display: block; }
}

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: var(--maxw); margin: 10px auto 0; padding: 0 22px;
}
.stats-strip div {
  background: var(--surface); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center;
}
.stats-strip strong { font-size: 30px; font-weight: 900; color: var(--yellow); }
.stats-strip span { font-size: 13.5px; color: var(--paper-dim); }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 88px 22px 10px; text-align: center; }
.section h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 12px; }
.section-sub { color: var(--paper-dim); font-size: 17px; margin: 0 auto 36px; max-width: 560px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 26px;
  text-align: left;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s;
}
.card:hover { transform: translateY(-4px); background: var(--surface-hi); }
.card-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(229, 223, 112, 0.12); color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--paper-dim); }

/* ---------- Courses ---------- */
.course-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; text-align: left; }
.course {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface); border-radius: 20px; padding: 18px 22px;
}
.course.available { background: var(--yellow); }
.course.available .course-name { color: var(--ink); }
.course-name { font-weight: 800; font-size: 16.5px; }
.course.soon .course-name { color: var(--paper-dim); font-weight: 700; }
.tag {
  font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 999px;
  background: var(--surface-hi); color: var(--paper-dim); white-space: nowrap;
}
.tag-yellow { background: var(--ink); color: var(--yellow); }
.tag-ink { background: var(--ink); color: var(--yellow); position: absolute; top: -13px; right: 24px; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 0 auto; text-align: left; }
.price-card {
  position: relative; background: var(--surface); border-radius: var(--radius); padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.price-card.pro { background: var(--surface-hi); border: 2px solid var(--yellow); }
.price-card h3 { font-size: 20px; margin-bottom: 6px; }
.price { font-size: 40px; font-weight: 900; color: var(--yellow); }
.price small { font-size: 16px; color: var(--paper-dim); font-weight: 700; }
.price-alt { font-size: 13.5px; color: var(--green); font-weight: 800; margin-bottom: 6px; }
.price-card ul { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.price-card li {
  font-size: 14.5px; color: var(--paper-dim);
  padding-left: 18px; position: relative;
}
.price-card li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--yellow);
}
.price-card.pro li::before { background: var(--green); }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.faq details {
  background: var(--surface); border-radius: 20px; padding: 18px 22px;
}
.faq summary {
  font-weight: 800; font-size: 16px; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after { content: "+"; font-size: 22px; color: var(--yellow); transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; font-size: 14.5px; color: var(--paper-dim); }

/* ---------- Final CTA & footer ---------- */
.final-cta {
  text-align: center; max-width: var(--maxw); margin: 60px auto 0; padding: 70px 22px;
}
.final-cta img { border-radius: 18px; margin-bottom: 18px; }
.final-cta h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }
.final-cta p { color: var(--paper-dim); margin-bottom: 26px; }

@media (prefers-reduced-motion: no-preference) {
  .final-cta .btn-appstore { animation: ctaGlow 2.6s ease-in-out infinite; }
  @keyframes ctaGlow {
    0%, 100% { box-shadow: 0 6px 24px rgba(229, 223, 112, 0.15); }
    50% { box-shadow: 0 10px 42px rgba(229, 223, 112, 0.5); }
  }
}
.ticker:hover .ticker-track { animation-play-state: paused; }

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-width: var(--maxw); margin: 40px auto 0; padding: 40px 22px 50px;
  display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 17px; }
.footer-brand img { border-radius: 7px; }
.disclaimer { font-size: 12.5px; color: rgba(242, 241, 237, 0.5); max-width: 760px; }
.footer-links { display: flex; gap: 22px; justify-content: center; }
.footer-links a { color: var(--paper-dim); font-size: 13.5px; font-weight: 700; text-decoration: none; padding: 10px 0; display: inline-block; }
.footer-links a:hover { color: var(--yellow); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 52px; gap: 10px; }
  .lead { margin: 0 auto 30px; }
  .cta-row { justify-content: center; }
  .hero-phone { margin-top: 34px; }
  .hero-device { max-width: 240px; }
  .fc1 { left: 2%; }
  .fc2 { right: 0; }
  .fc3 { left: 0; bottom: 8%; }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
}
