/* Nexo España - V4 desktop + mobile horizontal cards */
*{box-sizing:border-box}
html{scroll-behavior:smooth;overflow-x:hidden}
body{
  margin:0;
  background:#08090d;
  color:#fff;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  line-height:1.5;
  overflow-x:hidden
}
img{max-width:100%;display:block}
button,input,textarea,select{font:inherit}
button{cursor:pointer}

.topbar{
  height:68px;
  padding:0 28px;
  display:flex;
  align-items:center;
  gap:16px;
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(8,9,13,.95);
  backdrop-filter:blur(12px);
  border-bottom:1px solid #222530
}
.brand{
  display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;white-space:nowrap
}
.brand img{height:38px;max-width:150px;object-fit:contain}
.brand b{font-size:18px}
.brand-mark{
  display:grid;place-items:center;width:38px;height:38px;border-radius:12px;
  background:linear-gradient(135deg,#ff2e55,#7c3cff);font-weight:900
}
.free-pill{
  margin-right:auto;font-size:12px;font-weight:800;letter-spacing:.08em;color:#d8d9df
}

.btn{
  border:0;border-radius:14px;padding:13px 20px;font-weight:900;letter-spacing:.02em;
  text-align:center;transition:.18s ease
}
.btn:active{transform:scale(.98)}
.btn-small{background:#ff304f;color:#fff}
.btn-primary{
  background:linear-gradient(135deg,#ff294d,#ff5d39);
  box-shadow:0 12px 30px rgba(255,46,76,.22);color:#fff
}
.btn-outline{border:1px solid #5d606d;background:transparent;color:#fff}

.hero{padding:16px 20px 0}
.hero-poster{
  min-height:520px;border-radius:24px;display:flex;align-items:center;overflow:hidden;
  background:
    linear-gradient(90deg,rgba(7,8,12,.10),rgba(7,8,12,.86)),
    radial-gradient(circle at 25% 30%,#3b1d30 0,#16121b 35%,#0b0c11 75%);
  background-size:cover;background-position:center;border:1px solid #232531
}
.hero-copy{max-width:720px;padding:64px}
.eyebrow{font-size:12px;font-weight:900;letter-spacing:.09em;color:#f4c1ca}
.eyebrow.red{color:#ff4a68}
.hero h1,.section h2,.final-cta h2{
  font-size:clamp(36px,5vw,68px);line-height:1.02;letter-spacing:-.045em;margin:14px 0 16px
}
.hero p,.sub,.story p,.app-showcase p,.final-cta p{color:#b7bac5;font-size:16px}
.download-label{font-weight:800;margin:18px 0}
.download-label strong{display:inline-block;background:#ff2e4e;padding:4px 8px;border-radius:6px;font-size:12px}
.checks{display:flex;flex-wrap:wrap;gap:10px 18px;margin:14px 0;color:#d6d8e1;font-size:12px;font-weight:800}
.minor{margin-top:10px;color:#777b8a;font-size:11px}

.section{
  padding:58px 24px;
  max-width:1480px;
  margin:auto
}
.section>h2{font-size:clamp(30px,3.6vw,52px)}
.sub{margin-top:-4px}

.tabs{
  display:flex;gap:8px;margin:18px 0 20px;overflow-x:auto;scrollbar-width:none
}
.tabs::-webkit-scrollbar{display:none}
.tab{
  flex:0 0 auto;background:#171922;color:#8e92a1;border:1px solid #272a35;
  border-radius:999px;padding:10px 18px;font-weight:900;white-space:nowrap
}
.tab.active{background:#fff;color:#111}

.ranking{display:none}
.ranking.active{display:block}
.ranking h3{font-size:24px;margin:0 0 14px}

/* IMPORTANT: desktop and mobile are both horizontal scrollers */
.rank-grid{
  display:flex!important;
  gap:16px;
  overflow-x:auto;
  overflow-y:hidden;
  margin:0;
  padding:2px 2px 10px;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none
}
.rank-grid::-webkit-scrollbar{display:none}

.card{
  position:relative;
  flex:0 0 300px;
  min-width:300px;
  scroll-snap-align:start
}

/* HORIZONTAL POSTERS */
.poster{
  width:100%;
  aspect-ratio:16/9;
  border-radius:18px;
  background:linear-gradient(145deg,#303341,#15171d);
  background-position:center;
  background-size:cover;
  border:1px solid #2b2e39;
  overflow:hidden
}
.card .rank{
  position:absolute;z-index:3;top:8px;left:8px;
  font-size:42px;font-weight:1000;line-height:1;color:#fff;
  text-shadow:0 4px 15px #000;-webkit-text-stroke:1px rgba(0,0,0,.5)
}
.card b{
  display:block;margin-top:8px;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.card small{display:block;margin-top:2px;color:#858997;font-size:12px}
.center{
  display:block;
  margin:18px auto 0;
  min-width:300px
}

.story{
  display:grid;grid-template-columns:.9fr 1.1fr;align-items:center;gap:40px
}
.story h2,.app-copy>h2{font-size:clamp(34px,4vw,58px);line-height:1.04}
.mosaic{
  display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch
}
.mosaic::-webkit-scrollbar{display:none}
.mosaic-card{
  position:relative;
  flex:0 0 320px;
  aspect-ratio:16/9;
  border-radius:18px;
  background:linear-gradient(145deg,#3d2431,#14161d);
  background-size:cover;background-position:center;
  display:flex;align-items:end;padding:14px;border:1px solid #2e303c;overflow:hidden
}
.mosaic-card span{font-size:12px;font-weight:900;text-shadow:0 2px 8px #000}

.app-showcase{
  display:grid;grid-template-columns:1fr 390px;gap:56px;align-items:center
}
.phone-copy{margin:26px 0}
.phone-copy small{color:#ff4b69;font-weight:900}
.phone{
  width:100%;border:7px solid #242631;border-radius:36px;background:#0f1117;
  padding:14px;box-shadow:0 30px 80px #000;overflow:hidden
}
.phone-head{display:flex;justify-content:space-between;padding:8px 5px 12px}
.phone-feature{
  height:320px;background:linear-gradient(135deg,#422436,#12141c);
  background-size:cover;background-position:center;border-radius:20px;padding:18px;
  display:flex;flex-direction:column;justify-content:end
}
.phone-feature small{font-size:10px;color:#ff8ca0;font-weight:900}
.phone-feature strong{font-size:26px}
.phone-feature button{margin-top:10px;width:max-content;border:0;border-radius:8px;padding:8px 11px;font-weight:800}
.phone-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.tiny-poster{aspect-ratio:16/9;border-radius:9px;background:#22252e;background-size:cover;background-position:center}
.phone-nav{font-size:10px;color:#818594;text-align:center;border-top:1px solid #272a35;padding-top:12px}
.vertical{flex-direction:column}

.steps{text-align:center}
.step-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:28px}
.step{background:#11131a;border:1px solid #232631;border-radius:20px;padding:28px}
.step>span{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#ff304f;font-weight:900}
.step p{color:#8b8f9d}

.final-cta{
  text-align:center;padding:74px 7vw 110px;
  background:radial-gradient(circle at 50% 100%,#3b121d,#0b0c11 50%)
}
.final-cta h2{font-size:clamp(36px,5vw,64px)}
.final-cta small{display:block;color:#858997;margin-top:12px}
.sticky{display:none}

@media(max-width:1100px){
  .card{flex-basis:270px;min-width:270px}
  .mosaic-card{flex-basis:290px}
  .story{grid-template-columns:1fr}
}

@media(max-width:768px){
  body{padding-bottom:72px}
  .topbar{height:60px;padding:0 10px;gap:8px}
  .free-pill{display:none}
  .brand img{height:32px;max-width:110px}
  .brand b{font-size:15px}
  .topbar .btn-small{height:40px;padding:0 14px;font-size:13px}

  .hero{padding:8px 8px 0}
  .hero-poster{min-height:470px;border-radius:18px}
  .hero-copy{padding:26px 16px}
  .hero h1{font-size:34px}
  .hero p{font-size:14px}
  .download-label{font-size:13px;margin:12px 0}
  .checks{gap:7px;font-size:11px}
  .hero .btn-primary{width:100%;min-height:50px;font-size:15px}

  .section{padding:28px 10px}
  .section>h2{font-size:28px;margin:8px 0 6px}
  .sub{font-size:13px}
  .tabs{margin:14px 0 18px}
  .tab{min-height:40px;padding:0 16px;font-size:13px;display:grid;place-items:center}
  .ranking h3{font-size:19px;margin-bottom:12px}

  .rank-grid{gap:10px;padding-bottom:8px}
  .card{
    flex:0 0 78vw;
    min-width:78vw;
    max-width:360px
  }
  .poster{aspect-ratio:16/9;border-radius:16px}
  .card .rank{font-size:34px;top:6px;left:7px}
  .card b{font-size:14px}
  .card small{font-size:11px}
  .ranking .btn-primary,.center{width:100%;min-width:0;min-height:50px;margin-top:14px}

  .story{gap:16px;padding-top:18px}
  .story h2{font-size:30px;margin:8px 0 10px}
  .story p{font-size:14px}
  .mosaic{gap:10px}
  .mosaic-card{
    flex:0 0 78vw;
    min-width:78vw;
    max-width:380px;
    aspect-ratio:16/9;
    border-radius:16px
  }

  .app-showcase{grid-template-columns:1fr;gap:18px}
  .app-copy>h2{font-size:30px}
  .phone-copy h2{font-size:27px}
  .app-showcase p{font-size:14px}
  .phone{max-width:100%;border-width:6px;border-radius:28px;padding:12px}
  .phone-feature{height:220px;border-radius:18px}
  .tiny-poster{aspect-ratio:16/9}

  .steps h2{font-size:29px}
  .step-grid{grid-template-columns:1fr;gap:10px;margin-top:18px}
  .step{padding:16px;text-align:left;border-radius:16px}
  .step p{font-size:12px}

  .final-cta{padding:34px 12px 105px}
  .final-cta h2{font-size:30px}
  .final-cta p{font-size:14px}
  .final-cta .btn-primary{width:100%;min-height:50px}

  .sticky{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;
    min-height:64px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));
    align-items:center;justify-content:space-between;gap:10px;
    background:rgba(10,12,18,.97);backdrop-filter:blur(14px);
    border-top:1px solid rgba(255,255,255,.08)
  }
  .sticky div{min-width:0;flex:1}
  .sticky b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sticky small{display:block;font-size:9px;color:#898d99;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sticky .btn-small{height:40px;padding:0 14px;font-size:13px}
}

@media(max-width:390px){
  .card,.mosaic-card{flex-basis:82vw;min-width:82vw}
  .hero h1{font-size:31px}
}


/* ===== V6: text inside image, three-line overlay ===== */
.poster,
.mosaic-card{
  position:relative;
}

.poster::after,
.mosaic-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(
    to top,
    rgba(4,5,9,.92) 0%,
    rgba(4,5,9,.58) 28%,
    rgba(4,5,9,.10) 58%,
    rgba(4,5,9,0) 76%
  );
  border-radius:inherit;
}

.poster-overlay{
  position:absolute;
  z-index:4;
  left:16px;
  right:16px;
  bottom:14px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  min-width:0;
  text-shadow:0 2px 10px rgba(0,0,0,.75);
}

.poster-genre{
  display:inline-block;
  color:#ffd24a;
  font-size:10px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.poster-title{
  display:block;
  max-width:100%;
  color:#fff;
  font-size:18px;
  line-height:1.08;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.poster-desc{
  display:block;
  max-width:100%;
  color:rgba(255,255,255,.84);
  font-size:10px;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* remove old below-image labels if an older HTML version remains cached */
.card > div:not(.poster){
  display:none!important;
}
.card > b,
.card > small{
  display:none!important;
}

/* old card label rules no longer needed */
.card b,
.card small{
  margin:0;
}

/* Mosaic uses the same overlay */
.mosaic-card{
  padding:0!important;
}
.mosaic-card > span{
  display:none!important;
}
.mosaic-overlay{
  left:14px;
  right:14px;
  bottom:12px;
}

@media(max-width:768px){
  .poster-overlay{
    left:13px;
    right:13px;
    bottom:12px;
    gap:2px;
  }
  .poster-genre{
    font-size:9px;
  }
  .poster-title{
    font-size:16px;
  }
  .poster-desc{
    font-size:9px;
  }
}

@media(max-width:390px){
  .poster-title{
    font-size:15px;
  }
}


/* ===== V7 editable content labels ===== */
.poster-desc{
  white-space:normal!important;
  overflow:hidden;
  display:-webkit-box!important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  max-width:100%;
}
.poster-title{
  white-space:nowrap;
}
