/* Faro Público: paleta tomada de la app (negro, blanco y rojo #F53D33) */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  /* Color */
  --primary: #f53d33;          /* rojo de la app: fondos grandes y sobre negro (5.3:1) */
  --primary-dark: #d92d23;     /* botones y texto rojo sobre blanco (4.8:1) */
  --primary-darker: #c9271e;   /* hover y texto rojo sobre gris (5.5:1 con blanco) */
  --primary-light: #feeceb;
  --ink: #0a0a0b;
  --background: #ffffff;
  --surface: #f4f4f5;          /* gris de fondo de la app */
  --text-primary: #0a0a0b;
  --text-body: #33353b;
  --text-secondary: #5b5e66;   /* 6.5:1 sobre blanco, 5.9:1 sobre gris */
  --text-on-dark: #ffffff;
  --text-on-dark-secondary: #a6a8ae; /* 8.3:1 sobre negro */
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --border-on-dark: #2a2a2e;
  --bezel: #1c1c1f;
  --focus: var(--primary-dark);

  /* Espaciado */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --section-pad: clamp(4rem, 9vw, 7.5rem);
  --container: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --header-h: 4rem;

  /* Radios (los mismos de la app) */
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-sheet: 1.75rem;
  --radius-phone: 2.5rem;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgb(10 10 11 / 0.05);
  --shadow: 0 10px 30px -12px rgb(10 10 11 / 0.18);
  --shadow-phone: 0 30px 60px -24px rgb(0 0 0 / 0.55);

  /* Tipografía */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-h3: 1.0625rem;
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --fs-h1: clamp(2.375rem, 1.6rem + 3.6vw, 4.25rem);
  --fs-display: clamp(2rem, 1.2rem + 3.6vw, 4rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  scrollbar-color: var(--text-secondary) var(--surface);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 { font-size: var(--fs-h2); font-weight: 750; }
h3 { font-size: var(--fs-h3); font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--primary-dark); text-underline-offset: 0.2em; }

::selection { background: var(--primary); color: var(--text-on-dark); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--ink);
  color: var(--text-on-dark);
  border-radius: var(--radius);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3.25rem;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 2.5rem; padding: 0 var(--space-4); font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.btn-lg { min-height: 3.5rem; padding: 0 var(--space-6); font-size: 1.0625rem; }

.btn-primary { background: var(--primary-dark); color: var(--text-on-dark); }
.btn-primary:hover { background: var(--primary-darker); }

.btn-ghost { color: var(--text-on-dark); border-color: var(--border-on-dark); }
.btn-ghost:hover { border-color: var(--text-on-dark-secondary); background: rgb(255 255 255 / 0.04); }

/* Marca (logo + nombre como en la app) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
  text-decoration: none;
}
.brand img { width: auto; height: 2.25rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-text span {
  margin-top: 0.2rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--primary-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.96);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: rgb(255 255 255 / 0.85); backdrop-filter: saturate(1.4) blur(12px); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: var(--header-h);
  gap: var(--space-2) var(--space-4);
}

.menu-toggle { display: none; }

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.nav-list { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.nav-list a {
  display: inline-block;
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-list a:hover { color: var(--text-primary); }

/* Menú móvil (solo con JS; sin JS el menú queda visible) */
@media (max-width: 47.99rem) {
  .js .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: calc(var(--space-2) * -1);
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--text-primary);
    cursor: pointer;
  }
  .menu-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .menu-toggle[aria-expanded="true"] svg path { d: path("M6 6l12 12M18 6 6 18"); }

  .js .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: var(--space-5);
  }
  .js .nav.is-open { display: flex; animation: drop 0.3s var(--ease-out); }
  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list a {
    display: block;
    padding: var(--space-3) 0;
    font-size: var(--fs-base);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
  }
  .js .nav .btn { min-height: 3rem; font-size: var(--fs-base); }
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-6px); }
}

/* Hero: la cabecera negra del login */
.hero {
  background: var(--ink);
  color: var(--text-on-dark);
  --focus: var(--primary);
  padding-top: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: var(--space-7);
  justify-items: center;
}

.hero-copy { max-width: 36rem; }

.hero h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero-lead {
  margin-top: var(--space-5);
  font-size: var(--fs-lead);
  color: var(--text-on-dark-secondary);
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-on-dark-secondary);
}
.hero-note svg { fill: var(--primary); }

/* Teléfono */
.phone {
  margin: 0;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  padding: 0.5rem;
  background: var(--bezel);
  border-radius: var(--radius-phone);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), var(--shadow-phone);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: calc(var(--radius-phone) - 0.5rem);
  background: var(--surface);
}

.hero-phone {
  width: min(17.5rem, 72vw);
  margin-bottom: calc(var(--radius-sheet) * -1 - 4rem); /* la hoja blanca tapa la base del teléfono */
}

@media (prefers-reduced-motion: no-preference) {
  .hero-phone { animation: rise 1s 0.1s var(--ease-out) backwards; }
  .hero-copy { animation: rise 0.8s var(--ease-out) backwards; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(2.5rem); }
}

@media (min-width: 56rem) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    justify-items: stretch;
  }
  .hero-copy { padding-bottom: calc(var(--radius-sheet) + 2rem); }
  .hero-phone { justify-self: center; width: min(19rem, 100%); }
}

/* Hoja blanca, como la tarjeta del login */
.sheet {
  position: relative;
  z-index: 1;
  margin-top: calc(var(--radius-sheet) * -1);
  background: var(--background);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
}
.sheet-handle { margin: 0 auto; padding-top: var(--space-5); width: 70px; }

.section { padding-block: var(--section-pad); }
.about { padding-top: clamp(3rem, 7vw, 5.5rem); }

.about-inner {
  display: grid;
  gap: var(--space-5);
}
.about h2 { max-width: 14ch; }
.about-text {
  font-size: var(--fs-lead);
  color: var(--text-secondary);
  max-width: 38rem;
}

@media (min-width: 56rem) {
  .about-inner { grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
  .about-text { padding-top: var(--space-2); }
}

/* Funcionalidades: filas como el menú de la app */
.features { padding-top: 0; }
.features-inner {
  display: grid;
  gap: var(--space-6);
  padding-top: var(--section-pad);
  border-top: 1px solid var(--border);
}
.features-head p { margin-top: var(--space-4); color: var(--text-secondary); max-width: 26rem; }

.feature-list { display: grid; gap: var(--space-3); }

.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-5);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.3s var(--ease-out);
}
.feature:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.feature p { margin-top: var(--space-1); color: var(--text-secondary); font-size: 0.9375rem; }

.feature-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--surface);
}
.feature-icon svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-soon { background: var(--surface); border-style: dashed; box-shadow: none; }
.feature-soon:hover { box-shadow: none; border-color: var(--border); }
.feature-soon .feature-icon { background: var(--background); }

.tag {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 0.125rem 0.5rem;
  vertical-align: 0.15em;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--primary-darker);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (min-width: 56rem) {
  .features-inner { grid-template-columns: 0.8fr 1.2fr; gap: var(--space-8); }
  .features-head { position: sticky; top: calc(var(--header-h) + var(--space-6)); align-self: start; }
}

/* Capturas */
.screens { background: var(--surface); }
.screens h2, .screens-lead { text-align: center; }
.screens-lead { margin-top: var(--space-3); color: var(--text-secondary); }

.screens-track {
  margin-top: var(--space-7);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: var(--space-4);
}
.screens-track:focus-visible { outline-offset: -3px; }

.screens-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(15rem, 68vw);
  gap: var(--space-5);
  width: max-content;
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.screens-list li { scroll-snap-align: center; }
.screens-list figure { margin: 0; }
.screens .phone { box-shadow: 0 0 0 1px rgb(10 10 11 / 0.06), var(--shadow); }
.screens figcaption {
  margin-top: var(--space-4);
  text-align: center;
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Aparición escalonada: solo con JS y si el usuario acepta movimiento */
@media (prefers-reduced-motion: no-preference) {
  .js .screens-list li {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .screens-list.is-visible li { opacity: 1; transform: none; }
}

/* Propuesta de valor */
.value-inner { text-align: center; }
.value-mark { margin: 0 auto var(--space-6); width: 70px; }
.value h2 {
  font-size: var(--fs-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin-inline: auto;
}
.value p {
  margin: var(--space-5) auto 0;
  max-width: 36rem;
  font-size: var(--fs-lead);
  color: var(--text-secondary);
}

/* CTA final: vuelve al negro del inicio */
.cta {
  background: var(--ink);
  color: var(--text-on-dark);
  --focus: var(--primary);
  padding-block: var(--section-pad);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
}
.cta-inner { text-align: center; }
.cta h2 { max-width: 18ch; margin-inline: auto; }
.cta-text { margin: var(--space-4) auto 0; max-width: 30rem; color: var(--text-on-dark-secondary); }

.store-soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius);
  text-align: left;
  color: var(--text-on-dark);
}
.store-soon svg { fill: var(--primary); flex: none; }
.store-soon span { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 1.0625rem; }
.store-soon small { font-size: 0.75rem; font-weight: 500; color: var(--text-on-dark-secondary); }

/* Footer */
.site-footer {
  padding-block: var(--space-8) var(--space-6);
  background: var(--background);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.footer-inner { display: grid; gap: var(--space-6); }
.footer-brand p { margin-top: var(--space-3); }
.footer-links { display: grid; gap: var(--space-2); }
.footer-links a { color: var(--text-primary); text-decoration: none; }
.footer-links a:hover { color: var(--primary-dark); text-decoration: underline; }
.footer-legal {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
}

@media (min-width: 48rem) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer-legal { grid-column: 1 / -1; grid-template-columns: 1fr auto; gap: var(--space-6); }
}

@media (min-width: 64rem) {
  .screens-list { grid-auto-columns: 15rem; }
}

/* Páginas legales */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section-pad); }
.legal .container { max-width: 46rem; }
.legal-back { display: inline-block; margin-bottom: var(--space-6); font-size: var(--fs-sm); font-weight: 500; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); font-weight: 800; }
.legal h2 { margin-top: var(--space-7); font-size: 1.375rem; font-weight: 700; }
.legal h3 { margin-top: var(--space-5); }
.legal p, .legal ul { margin-top: var(--space-4); color: var(--text-body); }
.legal ul { padding-left: 1.25rem; list-style: disc; }
.legal li + li { margin-top: var(--space-1); }
.legal li::marker { color: var(--primary-dark); }
.legal .updated { color: var(--text-secondary); font-size: var(--fs-sm); }
