/* Zafsi — hoja de estilo común a toda la web. Una idea por pantalla, mucho aire, tipografía grande.
   Las secciones con [data-scroll] reciben --p (0…1) desde js/site.js según lo que se ha recorrido de ellas. */

:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --blue: #0071e3;
  --display: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  --text: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--text); font-size: 17px; line-height: 1.47; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { width: min(1080px, calc(100% - 44px)); margin: 0 auto; }

/* Tipografía */
.h-xl { font-family: var(--display); font-weight: 600; font-size: clamp(44px, 7.2vw, 96px); line-height: 1.02; letter-spacing: -.035em; }
.h-l  { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5.4vw, 72px); line-height: 1.04; letter-spacing: -.03em; }
.h-m  { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -.025em; }
.lead { font-size: clamp(19px, 2.1vw, 26px); line-height: 1.35; letter-spacing: -.015em; color: var(--ink-2); font-weight: 450; }
.link { color: var(--blue); font-weight: 500; }
.link::after { content: " ›"; }
.link:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 7px 14px; border-radius: 99px; background: rgba(0, 0, 0, .05); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.on-dark .pill { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7); }

/* Menú */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav);
  background: rgba(255, 255, 255, .72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background .4s var(--ease), color .4s var(--ease); }
.nav.dark { background: rgba(0, 0, 0, .6); color: #f5f5f7; }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 30px; font-size: 13px; }
.nav .mark { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.03em;
  opacity: var(--mark, 1); transition: opacity .3s var(--ease); }
.nav .links { display: flex; gap: 26px; margin-left: auto; opacity: .85; }
.nav .links a:hover { opacity: .6; }
.nav .links .here { position: relative; }
.nav .links .here::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: currentColor; opacity: .5; }
.lang { font-size: 12px; font-weight: 500; letter-spacing: .04em; padding: 4px 9px; border-radius: 99px; border: 1px solid currentColor; opacity: .55; }
.lang:hover { opacity: 1; }

/* Revelados al entrar en pantalla */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-children] > * { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal-children].in > * { opacity: 1; transform: none; }
[data-reveal-children].in > *:nth-child(2) { transition-delay: .1s; }
[data-reveal-children].in > *:nth-child(3) { transition-delay: .2s; }
[data-reveal-children].in > *:nth-child(4) { transition-delay: .3s; }
[data-reveal-children].in > *:nth-child(5) { transition-delay: .4s; }

/* ——— Portada: la palabra a pantalla completa; al bajar se encoge y se desvanece suavemente ——— */
.hero { position: sticky; top: 0; z-index: 0; height: 100vh; height: 100svh; }
.hero .stage { height: 100%; display: grid; place-content: center; text-align: center; padding: 0 22px;
  transform: scale(calc(1 - var(--p, 0) * .14)); opacity: calc(1 - var(--p, 0) * .95); will-change: transform, opacity; }
.tiles { position: relative; z-index: 1; background: var(--bg); box-shadow: 0 -30px 60px -30px rgba(0, 0, 0, .12); }
.hero .cue { position: absolute; left: 50%; top: calc(100svh - 70px); width: 1px; height: 40px; background: linear-gradient(var(--ink-3), transparent);
  animation: cue 2.2s infinite var(--ease); opacity: calc(1 - var(--p, 0) * 8); }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.wordmark { font-family: var(--display); font-weight: 600; font-size: clamp(96px, 20vw, 260px); line-height: .9; letter-spacing: -.06em; }
.wordmark span { display: inline-block; opacity: 0; }
html.fonts-ready .wordmark span { animation: letter 1.1s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes letter { from { opacity: 0; transform: translateY(.3em); } to { opacity: 1; transform: none; } }
.hero .tag { margin-top: 22px; font-family: var(--display); font-weight: 500; font-size: clamp(19px, 2.2vw, 28px); letter-spacing: -.02em; color: var(--ink-2); opacity: 0; }
html.fonts-ready .hero .tag { animation: letter 1.1s .5s var(--ease) both; }

/* ——— Portada: una sección por app, estilo apple.com ——— */
.tile-sec { position: relative; overflow: clip; display: grid; grid-template-rows: auto 1fr; min-height: calc(100vh - var(--nav)); max-height: 1100px; }
.tile-sec.light { background: var(--bg-2); }
.tile-sec.dark { background: radial-gradient(120% 70% at 50% 100%, #26205e 0%, #07081a 60%); color: #f4f1ff; }
.tile-sec.dark .lead { color: #b9b4d8; }
.tile-sec.grey { background: var(--bg); min-height: auto; text-align: center; padding: 120px 22px; display: grid; gap: 12px; justify-items: center; }
.tile-text { text-align: center; padding: 56px 22px 28px; display: grid; gap: 10px; justify-items: center; }
.tile-text .lead { max-width: 560px; }
.name { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -.02em; }
.tile-sec.grey .name { color: var(--ink-2); }
.cta { display: flex; align-items: center; gap: 18px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 99px; background: var(--blue); color: #fff; font-weight: 500; font-size: 17px; transition: transform .3s var(--ease), background .3s; }
.btn:hover { background: #0077ed; transform: translateY(-1px); }
.tile-sec.dark .pill { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .75); }
.tile-visual { position: relative; align-self: end; padding: 10px 22px 0; display: grid; justify-items: center; }
.tile-sec.light .iphone.landscape { --w: min(980px, 92vw); margin: 0; transform: translateY(calc(8px + (1 - var(--p, 0)) * 40px)); will-change: transform; }
.tile-sec.light .tile-visual { padding-bottom: 0; margin-bottom: -4%; }
.tile-sec.dark { max-height: none; }
.tile-sec.dark .iphone.portrait { --w: min(310px, 64vw); margin: 0 0 72px; transform: translateY(calc((1 - var(--p, 0)) * 60px)); }
.napsi-halo { position: absolute; left: 50%; top: 0; width: min(760px, 120vw); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 130, 255, .32), transparent); pointer-events: none; }
.iphone .screen video.film { opacity: 0; transition: opacity .6s var(--ease); }
.iphone .screen video.film.ready { opacity: 1; }
/* Portada con vídeo a sangre (como Apple Arcade): los mundos de Drawlings detrás del nombre, con un velo para leer. */
.hero.has-film { background: #0d0b16; color: #fff; }
.hero-film { position: absolute; inset: 0; overflow: hidden; opacity: calc(1 - var(--p, 0) * .6); }
.hero-film img, .hero-film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%;
  transform: scale(calc(1.04 + var(--p, 0) * .08)); }
.hero-film video { opacity: 0; transition: opacity .8s var(--ease); }
.hero-film video.ready { opacity: 1; }
.hero-film .scrim { position: absolute; inset: 0;
  background: radial-gradient(62% 48% at 50% 47%, rgba(14, 9, 30, .5) 0%, rgba(14, 9, 30, .22) 60%, rgba(14, 9, 30, .08) 100%),
              linear-gradient(rgba(10, 8, 20, .42) 0%, rgba(10, 8, 20, .1) 22%, rgba(10, 8, 20, .1) 70%, rgba(10, 8, 20, .55) 100%); }
.hero.has-film .stage { position: relative; }
.hero.has-film .wordmark { text-shadow: 0 2px 30px rgba(10, 6, 30, .35); }
.hero.has-film .tag { color: rgba(255, 255, 255, .88); text-shadow: 0 1px 16px rgba(10, 6, 30, .5); }
.hero.has-film .hero-apps a { color: rgba(255, 255, 255, .9); text-shadow: 0 1px 10px rgba(10, 6, 30, .5); }
.hero.has-film .hero-apps img { box-shadow: 0 12px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .18); }
.hero.has-film .cue { background: linear-gradient(rgba(255, 255, 255, .8), transparent); }
.film-toggle { position: absolute; right: max(22px, env(safe-area-inset-right)); bottom: 26px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: calc(1 - var(--p, 0) * 3); transition: background .3s var(--ease); }
.film-toggle:hover { background: rgba(255, 255, 255, .26); }
.film-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.film-toggle .i-play, .film-toggle.paused .i-pause { display: none; }
.film-toggle.paused .i-play { display: block; }
.nav.over-film { background: rgba(12, 9, 24, .38); color: #fff; backdrop-filter: saturate(140%) blur(20px); -webkit-backdrop-filter: saturate(140%) blur(20px); }
.nav.over-film .lang { border-color: rgba(255, 255, 255, .7); }
/* En vertical, el vídeo apaisado recortado a pantalla completa dejaba a un personaje gigante: el nombre va arriba sobre
   la noche y los mundos son una franja a lo ancho abajo, fundida hacia arriba. */
@media (max-aspect-ratio: 1/1) {
  .hero-film { top: auto; height: min(56%, 108vw); -webkit-mask: linear-gradient(transparent, #000 30%); mask: linear-gradient(transparent, #000 30%); }
  .hero-film img, .hero-film video { object-position: 50% 70%; }
  .hero-film .scrim { background: linear-gradient(rgba(10, 8, 20, .2), rgba(10, 8, 20, .05) 50%, rgba(10, 8, 20, .45)); }
  .hero.has-film { background: radial-gradient(120% 60% at 50% 0%, #2a2160 0%, #0d0b16 70%); }
  .hero.has-film .stage { align-content: start; padding-top: calc(var(--nav) + 12svh); }
}
.tile-sec.light.has-bg { background: #fbf5e8 url(/assets/zafsi/drawlings_bg.jpg) center / cover no-repeat; }
.tile-sec.light.has-bg .lead { color: #5d5248; }

/* Presentación: las apps bajo el nombre */
.hero-apps { display: flex; justify-content: center; gap: 28px; margin-top: 44px;
  transform: translateY(calc(var(--p, 0) * 40px)) scale(calc(1 + var(--p, 0) * .15)); }
.hero-apps a { display: grid; justify-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); opacity: 0; }
html.fonts-ready .hero-apps a { animation: rise 1.2s var(--ease) both; animation-delay: calc(.9s + var(--i) * .12s); }
.hero-apps img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 10px 24px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .05); transition: transform .5s var(--ease); }
.hero-apps a:hover img { transform: translateY(-4px) scale(1.05); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.8); } to { opacity: 1; transform: none; } }

/* Mosaico a media anchura, como apple.com */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; background: var(--bg); }
.half { position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-height: 620px; text-align: center; }
.half.cream { background: #fbf5e8; color: #2d2620; }
.half.cream .name { color: #6b5e52; }
.half.cream .link { color: #e4573b; }
.half.night { background: radial-gradient(110% 80% at 50% 100%, #2a2266 0%, #07081a 65%); color: #f4f1ff; }
.half.night .name { color: #b9b4d8; }
.half.night .link { color: #a99bff; }
.half-text { display: grid; gap: 8px; justify-items: center; padding: 56px 22px 20px; }
.h-m { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.06; letter-spacing: -.03em; }
.half-visual { position: relative; display: grid; place-items: end center; padding: 0 22px; text-align: left; }
.half .iphone.landscape { --w: min(560px, 40vw); margin: 0 0 -6%; }
.half .ndi-phone.mini { --W: min(440px, 36vw); }
.half.night .ndi-status { color: #fff; }
.shelf { gap: 16px; padding: 130px 22px 120px; }
.shelf .lead { max-width: 560px; }
.shelf-apps { display: flex; gap: 56px; margin-top: 40px; }
.shelf-apps a { display: grid; justify-items: center; gap: 4px; transition: transform .4s var(--ease); }
.shelf-apps a:hover { transform: translateY(-4px); }
.shelf-apps img { width: 92px; height: 92px; border-radius: 21px; margin-bottom: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .05); }
.shelf-apps b { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.shelf-apps span { font-size: 14px; color: var(--ink-2); }
.stars { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .25;
  animation: twinkle var(--t, 5s) var(--delay, 0s) infinite ease-in-out; }
@keyframes twinkle { 0%, 100% { opacity: .1; } 50% { opacity: .8; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ——— Pie ——— */
.footer { background: var(--bg-2); color: var(--ink-2); font-size: 13px; padding: 40px 0 36px; }
.footer .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-bottom: 28px; border-bottom: 1px solid #d2d2d7; }
.footer h4 { color: var(--ink); font-size: 13px; margin-bottom: 8px; }
.footer .cols a { display: block; padding: 3px 0; } .footer .cols a:hover { color: var(--ink); }
.footer .copy { padding-top: 16px; font-size: 12px; color: var(--ink-3); display: flex; gap: 18px; flex-wrap: wrap; }

/* ——— Páginas de producto ——— */
.p-hero { padding: calc(var(--nav) + 90px) 22px 0; text-align: center; display: grid; gap: 16px; justify-items: center; }
.p-hero .lead { max-width: 620px; }
.p-hero .actions { display: flex; gap: 18px; align-items: center; margin-top: 8px; }

/* iPhone 16 Pro. Todo sale de un único ancho, --w (en vertical, el lado corto; en horizontal, el largo), así que
   funciona igual en Safari y en Chrome. Proporciones reales: pantalla 1320×2868, bisel 3,4 %, radios 17,7 % / 14 %,
   isla 126×37 pt a 11 pt del borde. */
.iphone { --w: min(340px, 72vw); position: relative; flex: none; background: #0b0b0d; isolation: isolate;
  box-shadow: 0 0 0 1.5px #2a2a2e, 0 0 0 3px #0d0d0f, 0 50px 100px -30px rgba(0, 0, 0, .45); }
.iphone::before { content: ""; position: absolute; inset: -3px; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(160deg, #7a7a80 0%, #3a3a3e 22%, #1b1b1e 50%, #3a3a3e 78%, #8a8a90 100%); }
.iphone .screen { position: absolute; overflow: hidden; background: #000; }
.iphone .screen video, .iphone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.iphone .island { position: absolute; background: #000; border-radius: 999px; pointer-events: none; }
.iphone.portrait { width: var(--w); height: calc(var(--w) * 2.1727); border-radius: calc(var(--w) * .177); }
.iphone.portrait .screen { inset: calc(var(--w) * .034); border-radius: calc(var(--w) * .14); }
.iphone.portrait .island { left: 50%; top: calc(var(--w) * .062); width: calc(var(--w) * .30); height: calc(var(--w) * .088); transform: translateX(-50%); }
.iphone.landscape { --w: min(1000px, 92vw); width: var(--w); height: calc(var(--w) * .4603); border-radius: calc(var(--w) * .0815); }
.iphone.landscape .screen { inset: calc(var(--w) * .01565); border-radius: calc(var(--w) * .0644); }
.iphone.landscape .island { top: 50%; left: calc(var(--w) * .0285); width: calc(var(--w) * .0405); height: calc(var(--w) * .138); transform: translateY(-50%); }
.iphone.landscape { margin: 56px auto 0;
  transform: perspective(1600px) rotateX(calc((1 - var(--k, 0)) * 18deg)) scale(calc(.9 + var(--k, 0) * .1)); will-change: transform; }
.iphone.portrait { margin: 0 auto;
  transform: translateY(calc((1 - var(--p, 0)) * 60px)) rotate(calc((1 - var(--p, 0)) * -3deg)); will-change: transform; }
.on-dark .iphone, .theme-night .iphone { box-shadow: 0 0 0 1.5px #2a2a2e, 0 0 0 3px #0d0d0f, 0 60px 120px -30px rgba(154, 140, 255, .35); }
.story { height: 380vh; position: relative; }
.story .sticky { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; max-width: 1080px; margin: 0 auto; padding: var(--nav) 22px 0; }
.paper { position: relative; width: min(100%, 68vh); aspect-ratio: 1; margin: 0 auto; background: #fff; border-radius: 22px;
  opacity: var(--in, 1); transform: translateY(calc((1 - var(--in, 1)) * 40px)) scale(calc(.96 + var(--in, 1) * .04));
  box-shadow: 0 1px 0 rgba(45, 38, 32, .05), 0 30px 60px -20px rgba(95, 70, 30, .25); }
.paper::before { content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 30px; margin-left: -55px; background: rgba(242, 178, 51, .7); transform: rotate(-3deg); border-radius: 3px; }
.monster { position: absolute; inset: 9% 13% 5%; overflow: visible; }
.monster .ink { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw, 0)); }
.monster .m-fill { opacity: var(--fill, 0); }
.monster .m-face { opacity: var(--face, 0); transform-origin: 200px 240px; transform: scale(calc(.7 + var(--face, 0) * .3)); }
.monster .m-shadow { opacity: var(--alive, 0); }
.monster .m-body { transform-origin: 200px 400px; } .monster .m-arm-l { transform-origin: 88px 246px; } .monster .m-arm-r { transform-origin: 312px 246px; }
.alive .m-body { animation: bob 1.1s var(--ease) infinite alternate; }
.alive .m-arm-r { animation: wave .55s ease-in-out infinite alternate; }
.alive .m-arm-l { animation: wave2 .9s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-24px) rotate(-2deg); } }
@keyframes wave { from { transform: rotate(-8deg); } to { transform: rotate(-38deg); } }
@keyframes wave2 { from { transform: rotate(4deg); } to { transform: rotate(14deg); } }
.friend { position: absolute; width: 19%; opacity: 0; transform: translateY(30px) scale(.5); transition: opacity .6s var(--ease), transform .8s cubic-bezier(.34, 1.56, .64, 1);
  filter: drop-shadow(0 10px 12px rgba(60, 40, 10, .18)); }
.friends .friend { opacity: 1; transform: none; }
.friend.f1 { left: -12%; bottom: 2%; transition-delay: 0s; }
.friend.f2 { left: -9%; top: 12%; width: 15%; transition-delay: .1s; }
.friend.f3 { left: 20%; top: -13%; width: 14%; transition-delay: .2s; }
.friend.f4 { right: 16%; top: -11%; width: 13%; transition-delay: .3s; }
.steps { list-style: none; display: grid; gap: 26px; }
.steps li { opacity: .18; transform: translateX(-8px); transition: opacity .5s var(--ease), transform .6s var(--ease); display: grid; gap: 4px; }
.steps li.on { opacity: 1; transform: none; }
.steps b { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.025em; line-height: 1.08; }
.steps span { color: #6b5e52; font-size: 18px; }

.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 1080px; margin: 0 auto; padding: 40px 22px 120px; }
.tile { position: relative; overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 20px 50px -20px rgba(95, 70, 30, .22); }
.tile.wide { grid-column: span 2; }
.tile img { width: 100%; aspect-ratio: 2868 / 1320; object-fit: cover; }
.tile figcaption { padding: 20px 24px 24px; display: grid; gap: 2px; }
.tile b { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.tile span { color: #6b5e52; }

.rail-sec { height: 260vh; position: relative; }
.rail-sec .sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 44px; overflow: hidden; }
.rail { display: flex; gap: 30px; padding: 0 8vw; width: max-content; transform: translateX(var(--rx, 0px)); will-change: transform; }
.rail figure { width: clamp(210px, 23vw, 290px); flex: none; text-align: center; }
.rail img { width: 100%; border-radius: 26px;
  -webkit-mask: linear-gradient(to bottom, transparent 0, #000 9%, #000 88%, transparent 100%); mask: linear-gradient(to bottom, transparent 0, #000 9%, #000 88%, transparent 100%); }
.rail figcaption { margin-top: 12px; font-weight: 500; color: #d7d2f5; font-size: 15px; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1080px; margin: 0 auto; padding: 20px 22px 140px; }
.feat { border-radius: 24px; padding: 26px; display: grid; gap: 6px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.feat img { width: 58%; margin: 0 auto 12px; }
.feat b { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.02em; }
.feat span { color: #a9a4c8; }
.strip { text-align: center; padding: 120px 22px; display: grid; gap: 12px; justify-items: center; }
.strip .lead { max-width: 600px; }

/* Filas: texto + pantalla real dentro de un iPhone vertical */
.rows { display: grid; gap: 40px; max-width: 1080px; margin: 0 auto; padding: 60px 22px 120px; }
.row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; min-height: 86vh; }
.row.flip .copy { order: 2; }
.row .copy { display: grid; gap: 14px; }
.row .copy .lead { max-width: 440px; }
.row .copy .h-l { font-size: clamp(32px, 4.4vw, 60px); }
.iphone.landscape.lg { width: min(900px, 92vw); margin: 0 auto; }
.row .iphone.landscape { --w: min(620px, 54vw); margin: 0; transform: translateY(calc((1 - var(--p, 0)) * 50px)) perspective(1200px) rotateY(calc((1 - var(--p, 0)) * -10deg)); }
.row.flip .iphone.landscape { transform: translateY(calc((1 - var(--p, 0)) * 50px)) perspective(1200px) rotateY(calc((1 - var(--p, 0)) * 10deg)); }
.row:has(.landscape) { grid-template-columns: 2fr 3fr; }

/* Lámina: una ilustración grande, sin caja */
.sheet { position: relative; text-align: center; padding: 100px 22px 60px; display: grid; gap: 14px; justify-items: center; }
.sheet .lead { max-width: 620px; }
.sheet img { width: min(620px, 80vw); margin-top: 20px; transform: translateY(calc((1 - var(--p, 0)) * 70px)) scale(calc(.92 + var(--p, 0) * .08)); will-change: transform; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .45)); }
.sheet .glow { position: absolute; left: 50%; bottom: 10%; width: 60vw; height: 40vw; max-width: 900px; max-height: 500px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(169, 155, 255, .35), transparent); pointer-events: none; }


/* Páginas legales */
.legal { max-width: 760px; margin: 0 auto; padding: calc(var(--nav) + 56px) 22px 100px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; margin-bottom: 40px; opacity: .8; }
.legal-nav a.here { text-decoration: underline; text-underline-offset: 5px; }
.legal h1 { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 6vw, 64px); line-height: 1.04; letter-spacing: -.035em; }
.legal-lead { font-size: clamp(19px, 2vw, 23px); line-height: 1.4; margin-top: 16px; }
.legal-date { font-size: 14px; opacity: .6; margin: 14px 0 20px; }
.legal h2 { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -.02em; margin: 44px 0 10px; }
.legal p, .legal li { line-height: 1.6; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; display: grid; gap: 8px; }
.theme-night .legal-lead, .theme-night .legal p, .theme-night .legal li { color: #c9c4e6; }
.theme-night .legal a { color: #a99bff; }
.theme-paper .legal p a, .theme-paper .legal li a { color: #e4573b; }
.legal p a, .legal li a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Temas de página */
.theme-paper { background: #fbf5e8; color: #2d2620; }
.theme-paper .lead, .theme-paper .footer, .theme-paper .footer .copy { color: #6b5e52; }
.theme-paper .footer { background: #f3ebd9; } .theme-paper .footer h4 { color: #2d2620; } .theme-paper .footer .cols { border-color: #e2d8c3; }
.theme-paper .link { color: #e4573b; }
.theme-night { background: #07081a; color: #f4f1ff; }
.theme-night .lead { color: #b9b4d8; }
.theme-night .link { color: #a99bff; }
.theme-night .footer { background: #0d0f26; color: #9994b8; } .theme-night .footer h4 { color: #f4f1ff; } .theme-night .footer .cols { border-color: #22254a; }
.theme-night .footer .copy { color: #6f6b8f; }

/* Móvil */
@media (max-width: 820px) {
  .nav .links { gap: 16px; }
  .tile-sec { min-height: auto; }
  .tile-text { padding-top: 44px; }
  .tile-sec.dark .iphone.portrait { --w: min(270px, 66vw); margin-bottom: 48px; }
  .shelf-apps { gap: 36px; }
  .duo { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
  .half { min-height: 0; }
  .half-text { padding: 44px 22px 28px; }
  .half .iphone.landscape { --w: calc(100vw - 64px); }
  .half .ndi-phone.mini { --W: min(420px, calc(100vw - 64px)); }
  .hero-apps img { width: 56px; height: 56px; border-radius: 13px; }
  .tile-sec.light .tile-visual { margin-bottom: 0; padding-bottom: 36px; }
  .story .sticky { grid-template-columns: 1fr; gap: 20px; align-content: center; padding-top: 70px; }
  .paper { width: min(100%, 50vh); }
  .steps { text-align: center; } .steps li { display: none; } .steps li.on { display: grid; }
  .bento { grid-template-columns: 1fr; } .tile.wide { grid-column: auto; }
  .feats { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr !important; min-height: auto; gap: 26px; text-align: center; padding: 40px 0; }
  .row.flip .copy { order: 0; } .row .copy { justify-items: center; }
  .row .iphone.landscape { --w: calc(100vw - 44px); }
  .row .iphone.portrait { --w: min(280px, 70vw); }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], [data-reveal-children] > * { opacity: 1; transform: none; }
}

/* Distintivo oficial de la App Store (apps ya publicadas) */
/* En cápsula blanca, como el resto de botones (la manzana y el texto son los del distintivo oficial, sin su marco). */
.store-badge { display: inline-flex; align-items: center; line-height: 0; height: 50px; padding: 0 18px 0 14px; border-radius: 99px;
  background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06); transition: transform .3s var(--ease), opacity .3s; }
.store-badge img { height: 44px; width: auto; }
.store-badge:hover { transform: translateY(-1px); opacity: .9; }

/* ===== Menú de arriba, estilo Apple: Apps · Juegos · Soporte · Contacto =====
   Escritorio: al pasar el ratón (o con el teclado) baja un panel a todo lo ancho bajo la barra y el resto de la página se
   difumina. Funciona solo con CSS (las páginas legales no cargan site.js). Móvil: hamburguesa → menú a pantalla completa
   con secciones que se despliegan (js/menu.js). */
.nav .menu { display: flex; gap: 0; margin: 0 auto; align-self: stretch; }
.nav .menu .top { display: inline-flex; align-items: center; gap: 4px; height: var(--nav); padding: 0 16px; font: inherit; font-size: 13px;
  color: inherit; background: none; border: 0; cursor: default; opacity: .85; transition: opacity .2s; }
.nav .menu .top .chev { width: 10px; height: 10px; opacity: 0; transform: translateY(-1px); transition: opacity .2s, transform .3s var(--ease); }
.nav .menu .item.activo .top { opacity: 1; }
.nav .menu .item.activo .top .chev { opacity: .6; transform: translateY(0) rotate(180deg); }
/* Un solo fondo para todos los paneles (js/menu.js): se queda abierto mientras el ratón esté en la barra o en el panel,
   y al cambiar de sección solo cambia de altura y se funde el contenido (sin cerrarse y abrirse). */
.nav .fondo { position: absolute; left: 0; right: 0; top: var(--nav); height: 0; z-index: 48; pointer-events: none;
  background: rgba(250, 250, 252, .97); transition: height .42s var(--ease); }
.nav.dark .fondo, .nav.over-film .fondo { background: rgba(22, 22, 26, .97); }
.nav .panel { position: absolute; left: 0; right: 0; top: var(--nav); z-index: 49; visibility: hidden; opacity: 0;
  transition: opacity .18s var(--ease), visibility 0s .18s; }
.nav .item.activo .panel { visibility: visible; opacity: 1; transition: opacity .3s var(--ease) .06s, visibility 0s; }
.nav .panel-in { max-width: 980px; margin: 0 auto; padding: 36px 22px 56px; display: flex; gap: 80px; }
.nav .panel .col { display: flex; flex-direction: column; gap: 12px; min-width: 240px; }
.nav .panel .col.side { min-width: 0; }
.nav .panel .kicker { font-size: 12px; opacity: .55; margin: 0 0 4px; }
.nav .panel .big { display: flex; align-items: center; gap: 14px; font-family: var(--display); }
.nav .panel .big img { width: 44px; height: 44px; border-radius: 11px; }
.nav .panel .big b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.nav .panel .big small { display: block; font-size: 13px; opacity: .6; font-family: var(--text, inherit); }
.nav .panel .big:hover b, .nav .panel .mail:hover { color: var(--blue); }
.nav .panel .big-text { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.nav .panel .note { font-size: 14px; opacity: .65; max-width: 420px; margin: 0; line-height: 1.5; }
.nav .panel .mail { font-size: 15px; font-weight: 500; }
.nav .panel .big-text.mail { font-size: 28px; }
/* El contenido entra escalonado solo al abrir (al cambiar de sección, solo se funde). */
.nav:not(.cambiando) .panel .col > * { opacity: 0; transform: translateY(-6px); transition: opacity .3s var(--ease), transform .4s var(--ease); }
.nav:not(.cambiando) .item.activo .panel .col > * { opacity: 1; transform: none; }
.nav:not(.cambiando) .item.activo .panel .col > *:nth-child(2) { transition-delay: .04s; }
.nav:not(.cambiando) .item.activo .panel .col > *:nth-child(3) { transition-delay: .08s; }
.nav:not(.cambiando) .item.activo .panel .col > *:nth-child(4) { transition-delay: .12s; }
/* El velo que difumina la página mientras hay un panel abierto. */
.velo { position: fixed; inset: var(--nav) 0 0 0; z-index: 47; pointer-events: none; opacity: 0; visibility: hidden;
  background: rgba(232, 232, 237, .4); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: opacity .35s var(--ease), visibility 0s .35s; }
.nav.dark + .velo, .nav.over-film + .velo { background: rgba(0, 0, 0, .35); }
.nav.con-panel + .velo { opacity: 1; visibility: visible; transition: opacity .35s var(--ease), visibility 0s; }
.nav.con-panel { background: rgba(250, 250, 252, .97); }
.nav.dark.con-panel, .nav.over-film.con-panel { background: rgba(22, 22, 26, .97); }
.nav .lang { margin-left: 0; }
.nav .burger { display: none; }

@media (max-width: 760px) {
  /* La barra tiene backdrop-filter: sus hijos «fixed» se colocan respecto a ella, así que la altura va explícita. */
  .nav .menu { position: absolute; top: var(--nav); left: 0; right: 0; height: calc(100dvh - var(--nav)); z-index: 49; display: block; margin: 0; padding: 18px 26px 40px; overflow-y: auto;
    background: rgba(250, 250, 252, .98); visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s .3s; }
  .nav.dark .menu, .nav.over-film .menu { background: rgba(22, 22, 26, .98); }
  .nav.abierto .menu { visibility: visible; opacity: 1; transform: none; transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s; }
  .nav.abierto { background: rgba(250, 250, 252, .98); }
  .nav.abierto.dark, .nav.abierto.over-film { background: rgba(22, 22, 26, .98); }
  .nav .menu .top { height: auto; padding: 14px 0; width: 100%; justify-content: space-between; font-family: var(--display);
    font-size: 28px; font-weight: 600; letter-spacing: -.02em; opacity: 1; cursor: pointer; }
  .nav .menu .top .chev { width: 16px; height: 16px; opacity: .5; transform: rotate(-90deg); }
  .nav .menu .item.abierto .top .chev { transform: rotate(0deg); }
  /* En el móvil no hay hover: las secciones se abren al tocarlas. */
  .nav .fondo { display: none; }
  .nav .panel, .nav .item.activo .panel { position: static; visibility: visible; opacity: 1; clip-path: none;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
  .nav .item.abierto .panel { grid-template-rows: 1fr; }
  .nav .panel-in { overflow: hidden; min-height: 0; padding: 0; display: block; width: 100%; margin: 0; }
  .nav .item.abierto .panel-in { padding: 0 0 16px; }
  .nav .panel .col { min-width: 0; margin-bottom: 14px; }
  .nav .panel .col > *, .nav:not(.cambiando) .panel .col > * { opacity: 1; transform: none; }
  .velo { display: none; }
  .nav .burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 32px; height: 32px; margin-left: 4px;
    background: none; border: 0; color: inherit; cursor: pointer; }
  .nav .burger span { display: block; height: 1.5px; width: 18px; margin: 0 auto; background: currentColor; transition: transform .35s var(--ease); }
  .nav.abierto .burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.abierto .burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav .wrap { gap: 12px; }
  .nav .lang { margin-left: auto; }
}

/* Transición suave entre las páginas de soporte, privacidad y condiciones (Safari 18.2+ y Chrome): la barra se queda quieta y
   el contenido se funde. Solo la activan esas páginas (herramientas/menu.py les pone @view-transition): las de las apps tienen
   su propia animación de entrada y, con las dos, parecía que cargaban dos veces. */
.nav { view-transition-name: barra; }
::view-transition-old(root) { animation: .25s var(--ease) both salir; }
::view-transition-new(root) { animation: .45s var(--ease) both entrar; }
::view-transition-group(barra) { animation-duration: .35s; }
@keyframes salir { to { opacity: 0; } }
@keyframes entrar { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
