/* Landing de portl. Colores, tipografía y símbolo del manual de identidad (branding/portl/manual):
   niebla de fondo, franjas noche y petróleo, cielo para lo que se mueve (ondas, punto, avisos).
   Sin dependencias externas: la fuente va en assets/fonts (OFL) y no hay estilos ni scripts en línea
   (cumple la CSP de Caddy: style-src 'self', script-src 'self'). */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --niebla: #f4f6f9;
  --blanco: #ffffff;
  --tinta: #0f1b2a;
  --gris: #5a6b7d;
  --linea: #e1e7ee;
  --petroleo: #1e6b8c;
  --cielo: #4cb2d4;
  --hielo: #bfe6f3;
  --noche: #081117;
  --noche2: #0e1c25;
  --claro: #e7edf3;
  --ok: #14724a; --warn: #915a0c; --bad: #ba2a2a;
  --ok-d: #49c78e; --warn-d: #e6b24c; --bad-d: #f07272;
  --f-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 16px;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--niebla); color: var(--tinta);
  font: 500 16px/1.6 var(--f-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 800; line-height: 1.08; }
h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--petroleo); }
.mono { font-family: var(--f-mono); font-weight: 500; }
.muted { color: var(--gris); }
.small { font-size: 0.85rem; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 3px solid var(--cielo); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--blanco); color: var(--tinta);
  padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gut); }
.eyebrow { font: 600 0.75rem/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--petroleo); }
.lead { font-size: 1.15rem; line-height: 1.65; color: var(--gris); max-width: 62ch; }

/* --- Símbolo (colores por versión, como en el manual) --- */
.mark { display: block; overflow: visible; }
/* Sin ancestro en el selector: las piezas viven en el <symbol> y se dibujan con <use>; los colores
   (--m, --a) los hereda cada uso desde su .on-light / .on-dark. */
.m { stroke: var(--m); }
.mf { fill: var(--m); stroke: var(--m); }
.a { stroke: var(--a); }
.af { fill: var(--a); }
.on-light { --m: var(--petroleo); --a: var(--cielo); --w: var(--tinta); --t: var(--gris); }
.on-dark { --m: var(--claro); --a: var(--cielo); --w: #ffffff; --t: #94a3b4; }
.lockup-h { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; }
.lockup-h .word { font: 600 1.6rem/1 var(--f-sans); letter-spacing: -0.026em; color: var(--w); }
.lockup { display: inline-flex; flex-direction: column; align-items: center; gap: 0.15em; line-height: 1; font-size: 44px; }
.lockup .word { font: 600 1em/0.9 var(--f-sans); letter-spacing: -0.026em; color: var(--w); }
.lockup .tag { font: 500 0.15em/1 var(--f-sans); letter-spacing: 0.43em; margin-right: -0.43em; color: var(--t);
  text-transform: uppercase; margin-top: 0.35em; }

/* --- Botones --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 52px;
  padding: 0 1.4rem; border-radius: 999px; font: 700 1.02rem/1 var(--f-sans); text-decoration: none;
  border: 1.5px solid transparent; transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cielo); color: var(--noche); }
.btn-primary:hover { background: #6cc2df; }
.btn-ghost { color: #ffffff; border-color: rgba(231, 237, 243, 0.35); }
.btn-ghost:hover { border-color: var(--claro); background: rgba(231, 237, 243, 0.06); }
.btn-light { background: var(--claro); color: var(--noche); }
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: 0.92rem; }
.ico { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- Barra superior --- */
.topbar { position: fixed; inset: 0 0 auto; z-index: 20; padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease; }
.topbar.scrolled { background: rgba(8, 17, 23, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(231, 237, 243, 0.08); }
.topbar-in { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.topbar nav { display: flex; gap: 0.25rem; margin-left: auto; }
.topbar nav a { color: #b4c3cc; text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 0.5rem 0.75rem; border-radius: 10px; }
.topbar nav a:hover { color: #ffffff; background: rgba(231, 237, 243, 0.06); }
.topbar-actions { display: flex; gap: 8px; }
.web-note { color: var(--gris); }
.web-note a { font-weight: 700; }
.footer-link { color: var(--cielo); font-weight: 700; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }

/* --- Portada --- */
.hero { position: relative; overflow: hidden; color: #ffffff;
  background: radial-gradient(110% 90% at 15% 0%, #1a5f7c 0%, #123f55 42%, #0c2533 72%, var(--noche) 100%);
  padding: calc(env(safe-area-inset-top, 0px) + 128px) 0 120px; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 50% at 80% 40%, rgba(76, 178, 212, 0.16), transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
.hero .eyebrow { color: var(--cielo); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); font-weight: 800; line-height: 1.0; letter-spacing: -0.04em; margin: 18px 0 22px; }
.hero .lead { color: #cfe3ec; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; color: #b4c3cc; font-size: 0.95rem; }
.hero-facts strong { color: #ffffff; font-weight: 700; }
.hero-fade { position: absolute; inset: auto 0 0; height: 80px; background: linear-gradient(to bottom, transparent, rgba(8, 17, 23, 0.4)); pointer-events: none; }

/* Escena: el símbolo late y emite ondas; el teléfono recibe la llamada. */
.hero-scene { position: relative; min-height: 520px; display: grid; place-items: center; }
.pulse-wrap { position: absolute; left: 0; top: 50%; translate: 0 -50%; width: 230px; height: 230px; display: grid; place-items: center; }
.hero-mark { width: 140px; height: 136px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35)); }
.pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(76, 178, 212, 0.55);
  animation: pulse 3.2s cubic-bezier(.2, .6, .3, 1) infinite; opacity: 0; }
.pulse:nth-child(2) { animation-delay: 1.07s; }
.pulse:nth-child(3) { animation-delay: 2.14s; }
@keyframes pulse { 0% { transform: scale(.55); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }

.phone { position: relative; margin-left: 150px; width: 270px; height: 540px; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #1b2d39, #0b161d); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45), inset 0 0 0 1.5px rgba(231, 237, 243, 0.12);
  animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(-1deg); } }
.phone-notch { position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 86px; height: 24px; border-radius: 99px; background: #000; z-index: 2; }
.phone-screen { position: relative; height: 100%; border-radius: 32px; overflow: hidden; background: var(--noche); }
.call { position: absolute; inset: 0; padding: 70px 20px 24px; display: flex; flex-direction: column; gap: 6px;
  transition: opacity .6s ease, transform .6s ease; }
.call-who { font: 600 0.72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cielo); }
.call-what { font-size: 1.45rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 14px; }
.call-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: var(--noche2);
  border: 1px solid rgba(231, 237, 243, 0.08); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--petroleo); color: #ffffff; font-weight: 700; }
.call-name { font-weight: 700; font-size: 1.02rem; }
.call-unit { color: #94a3b4; font-size: 0.9rem; }
.call-btns { margin-top: auto; display: grid; gap: 10px; }
.cbtn { display: grid; place-items: center; min-height: 48px; border-radius: 999px; font-weight: 700; font-size: 0.98rem; }
.cbtn-yes { background: var(--ok-d); color: var(--noche); position: relative; overflow: hidden; }
.cbtn-no { border: 1.5px solid rgba(231, 237, 243, 0.25); color: var(--claro); }
.phone.tap .cbtn-yes::after { content: ""; position: absolute; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55); animation: tap .7s ease-out forwards; }
@keyframes tap { from { transform: scale(0); opacity: 1; } to { transform: scale(6); opacity: 0; } }
.call-done { align-items: center; justify-content: center; text-align: center; opacity: 0; transform: translateY(16px); }
.phone.done .call[data-step="0"] { opacity: 0; transform: translateY(-16px); }
.phone.done .call-done { opacity: 1; transform: none; }
.check { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(73, 199, 142, 0.14); border: 2px solid var(--ok-d); }
.check svg { width: 38px; height: 38px; fill: none; stroke: var(--ok-d); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24; }
.phone.done .check svg { animation: draw .6s .25s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.log-line { margin-top: 22px; font-size: 0.85rem; color: #94a3b4; padding: 8px 12px; border-radius: 10px; background: var(--noche2); }
.log-line .mono { color: var(--cielo); margin-right: 6px; }

/* --- Bandas --- */
.band { padding: 104px 0; }
.band .wrap { display: grid; gap: 22px; }
.band-white { background: var(--blanco); }
.band-dark { background: var(--noche); color: var(--claro); }
.band-dark .eyebrow { color: var(--cielo); }
.band-dark .muted { color: #94a3b4; }
.band-petrol { background: linear-gradient(135deg, #1e6b8c, #123f55); color: #ffffff; }
.band-petrol .eyebrow { color: var(--hielo); }
.band-petrol .lead { color: #d8edf5; }

.grid { display: grid; gap: 16px; margin-top: 18px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r); padding: 26px; display: grid; gap: 10px; align-content: start;
  transition: transform .25s ease, box-shadow .25s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15, 27, 42, 0.08); }

/* Problemas: antes → con portl */
.before { font: 600 0.72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.after { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--linea); color: var(--tinta); }
.after span { display: block; font: 600 0.72rem/1.6 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--petroleo); }

/* Cómo funciona */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 26px; position: relative; }
.step { display: grid; gap: 12px; align-content: start; padding: 28px; border-radius: var(--r); background: var(--noche2);
  border: 1px solid rgba(231, 237, 243, 0.07); }
.step-n { color: var(--cielo); font-size: 0.85rem; }
.step-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(76, 178, 212, 0.12); }
.step-ico svg, .f-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-ico { color: var(--cielo); }
.step h3 { color: #ffffff; font-size: 1.25rem; }
.track { position: relative; height: 2px; margin-top: 30px; background: rgba(231, 237, 243, 0.1); border-radius: 2px; overflow: hidden; }
.track-dot { position: absolute; top: 0; left: 0; height: 100%; width: 30%;
  background: linear-gradient(90deg, transparent, var(--cielo), transparent); animation: travel 3.6s linear infinite; }
@keyframes travel { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* Funciones */
.f-ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: #e8f3f8; color: var(--petroleo); }
.states { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.st { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 0.8rem; font-weight: 700; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-ok { color: var(--ok); background: #e3f3eb; }
.st-warn { color: var(--warn); background: #fbf0dc; }
.st-bad { color: var(--bad); background: #fbe5e5; }
.code { margin-top: 4px; font-size: 1.6rem; letter-spacing: 0.08em; color: var(--petroleo); font-variant-numeric: tabular-nums; }

/* Roles */
.role { padding: 28px; border-radius: var(--r); background: var(--niebla); display: grid; gap: 14px; align-content: start; }
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 16px; height: 10px;
  border-left: 2.5px solid var(--petroleo); border-bottom: 2.5px solid var(--petroleo); transform: rotate(-45deg) translateY(-3px); }

/* Privacidad */
.privacy { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: 48px; }
.privacy > div, .download > div { display: grid; gap: 18px; align-content: start; }
.privacy-list { display: grid; gap: 14px; }
.privacy-list li { padding: 20px 22px; border-radius: var(--r); background: rgba(8, 17, 23, 0.22); border: 1px solid rgba(191, 230, 243, 0.18); color: #d8edf5; }
.privacy-list strong { display: block; color: #ffffff; margin-bottom: 2px; }

/* Descargar */
.download { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: 48px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 22px; border-radius: 16px; text-decoration: none; font-weight: 700; }
.store small { display: block; font: 600 0.7rem/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.store-apk { background: var(--petroleo); color: #ffffff; box-shadow: 0 14px 30px rgba(30, 107, 140, 0.3); transition: transform .2s ease, background-color .2s ease; }
.store-apk:hover { background: #185a77; transform: translateY(-1px); }
.store-apk .ico { width: 1.5em; height: 1.5em; }
.store-apk.unavailable { background: #c4ced8; color: var(--tinta); box-shadow: none; pointer-events: none; }
.store-soon { border: 1.5px dashed #c4ced8; color: var(--gris); }
.apk-meta { color: var(--gris); font-size: 0.85rem; }
.apk-missing { color: var(--warn); font-weight: 600; }
.install { display: grid; gap: 12px; padding: 26px; border-radius: var(--r); background: var(--blanco); border: 1px solid var(--linea); }
.install li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; }
.install .mono { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #e8f3f8; color: var(--petroleo); font-size: 0.85rem; }

/* Pie */
.footer { background: var(--noche); color: var(--claro); padding: 64px 0 calc(48px + env(safe-area-inset-bottom, 0px)); }
.footer-in { display: grid; justify-items: center; gap: 14px; text-align: center; }
.footer .muted { color: #94a3b4; }

/* Aparición al bajar (main.js añade .js al html y .in a cada elemento visible). */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* --- Pantallas pequeñas --- */
@media (max-width: 960px) {
  .hero-grid, .privacy, .download { grid-template-columns: minmax(0, 1fr); }
  .hero-scene { min-height: 460px; }
  .g3, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar nav { display: none; }
  .topbar-actions { margin-left: auto; }
}
@media (max-width: 620px) {
  .band { padding: 72px 0; }
  .hero { padding-top: calc(env(safe-area-inset-top, 0px) + 104px); padding-bottom: 80px; }
  .g3, .steps { grid-template-columns: minmax(0, 1fr); }
  .hero-scene { min-height: 0; padding-top: 12px; }
  .pulse-wrap { position: absolute; left: 50%; top: 0; translate: -50% 0; width: 150px; height: 150px; }
  .hero-mark { width: 90px; height: 88px; }
  .phone { margin-left: 0; margin-top: 176px; width: 248px; height: 500px; }
  .actions .btn { width: 100%; }
  .store { width: 100%; }
}

/* Sin animaciones si la persona lo pidió en su sistema. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Página 404 del dominio de la landing. */
.notfound-in { min-height: 100vh; display: grid; align-items: center; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #ffffff; }
