/* Turnex Landing — mobile first, dark theme */
:root {
  --bg: #0b1220;
  --surface: #131c2e;
  --surface-alt: #1b2740;
  --border: #2a3a57;
  --text: #e7ecf5;
  --muted: #94a3b8;
  --primary: #0ea5e9;
  --primary-dim: rgba(14, 165, 233, 0.12);
  --secondary: #f97316;
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --night: #8b5cf6;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(12px);
  background: rgba(11, 18, 32, 0.85);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
}
.nav-desktop { display: none; gap: 1.5rem; align-items: center; }
.nav-desktop a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.nav-desktop a:hover { color: var(--text); text-decoration: none; }

/* Selector de idioma. <details> nativo: abre y cierra sin JavaScript. En movil
   queda junto al boton de descarga; en escritorio, a la derecha del menu. */
.langs { position: relative; margin-left: auto; }
.langs__toggle {
  list-style: none;
  /* el control mas pequeno de la barra: media 35 px */
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.langs__toggle::-webkit-details-marker { display: none; }
.langs__toggle::after { content: " ▾"; font-size: 0.7rem; }
.langs__toggle:hover,
.langs[open] .langs__toggle { color: var(--text); border-color: rgba(14, 165, 233, 0.4); }
.langs__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 120;
  min-width: 10rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.langs__menu a { display: flex; align-items: center; min-height: 44px; padding: 0.35rem 1rem; color: var(--text); font-size: 0.9rem; }
.langs__menu a:hover { background: var(--primary-dim); text-decoration: none; }
.langs__menu a[aria-current="page"] { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0284c7);
  color: #fff;
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.35);
}
.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn[disabled], .btn.is-soon {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse at 30% 20%, rgba(14, 165, 233, 0.18), transparent 60%),
              radial-gradient(ellipse at 70% 10%, rgba(139, 92, 246, 0.1), transparent 50%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--primary-dim);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  font-weight: 800;
}
.hero-lead {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--muted);
  margin: 0 0 0.75rem;
  max-width: 36ch;
}
.hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.hero-note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Sections */
section { padding: 4rem 0; }
section:nth-child(even) { background: rgba(19, 28, 46, 0.5); }
.section-label {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-weight: 800;
  line-height: 1.15;
}
.section-lead {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 2rem;
  font-size: 1.05rem;
}
.section-lead strong { color: var(--text); font-weight: 600; }

/* Cards grid */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-2px);
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}
.card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.shift-cards .card-icon.morning { background: rgba(14,165,233,0.15); }
.shift-cards .card-icon.afternoon { background: rgba(249,115,22,0.15); }
.shift-cards .card-icon.night { background: rgba(139,92,246,0.15); }
.shift-cards .card-icon.special { background: rgba(20,184,166,0.15); }

.punchline {
  margin-top: 2rem;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
}
.punchline em {
  font-style: normal;
  color: var(--primary);
}

/* Feature split */
.feature-split {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* FAQ */
.faq-list { display: grid; gap: 0.75rem; max-width: 720px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-size: 1.25rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* CTA */
.cta {
  text-align: center;
  padding: 5rem 0;
  background: radial-gradient(ellipse at center, rgba(14,165,233,0.12), transparent 70%);
}
.cta h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 1rem; }
.cta p { color: var(--muted); max-width: 42ch; margin: 0 auto 1.75rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
/* 44 px de alto: median entre 15 y 20 y eran casi imposibles de acertar. */
.footer-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}

/* Reveal animation: solo oculta si hay JS capaz de revelar (ver el <head>) */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Privacy page */
.page-legal {
  padding: 3rem 0 4rem;
  max-width: 720px;
}
.page-legal h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-legal h2 { font-size: 1.1rem; margin-top: 2rem; color: var(--primary); }
.page-legal p, .page-legal li { color: var(--muted); }
.page-legal a { color: var(--primary); }

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .shift-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; margin-left: auto; }
  .langs { margin-left: 0.75rem; }
  .header-cta-mobile { display: none; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .feature-split { grid-template-columns: 1fr 1fr; }
  .shift-cards { grid-template-columns: repeat(4, 1fr); }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .shift-cards { grid-template-columns: repeat(7, 1fr); }
}

/* ------------------------------------------------------------------
   Capturas reales de la app (octubre de 2026)
   ------------------------------------------------------------------ */

/* Marco de móvil: solo un borde alrededor de la captura. */
.device {
  position: relative;
  margin: 0;
  width: 280px;
  max-width: 100%;
  padding: 9px;
  border-radius: 38px;
  background: #080e18;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.device img {
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 1385;
  border-radius: 30px;
  background: var(--surface);
}
.device::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 50%;
  z-index: 2;
  width: 9px;
  height: 9px;
  margin-left: -4px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 2px #121c2e;
}

/* Cabecera: dos móviles solapados. Todo en porcentajes del contenedor, para
   que escale entero con el ancho de la pantalla. */
.hero-phones {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 520 / 610;
  margin-inline: auto;
}
.hero-phones::before {
  content: "";
  position: absolute;
  inset: 6% 0 0;
  background:
    radial-gradient(closest-side at 35% 55%, rgba(14, 165, 233, 0.32), transparent 70%),
    radial-gradient(closest-side at 70% 40%, rgba(139, 92, 246, 0.3), transparent 70%);
  filter: blur(28px);
}
.hero-phones .device { position: absolute; }
.hero-phones .device--back {
  left: 1%;
  bottom: 0;
  width: 47%;
  transform: rotate(-5deg);
  opacity: 0.96;
}
.hero-phones .device--front {
  right: 1%;
  top: 0;
  width: 51%;
  transform: rotate(3deg);
}
.device--float { animation: float 7s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-8px); }
}

/* Franja de confianza justo debajo de la cabecera. */
.trust { padding: 0.5rem 0 1rem; }
.trust-list {
  list-style: none;
  margin: 0;
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.75rem 1.5rem;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.trust-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.trust-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 800;
}

/* Bloque de función: texto a un lado, captura al otro. */
.feature {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.feature-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.feature-visual::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  background: radial-gradient(closest-side, var(--glow, rgba(14, 165, 233, 0.3)), transparent 72%);
  filter: blur(30px);
}
.feature-visual > * { position: relative; }
.feature--night { --glow: rgba(139, 92, 246, 0.3); }
.feature--warm { --glow: rgba(249, 115, 22, 0.22); }
.feature .feature-list { margin-bottom: 1.25rem; }
.feature .hero-note { margin: 0.75rem 0 0; }

/* La tarjeta de comparación con la nómina es una captura sin marco de móvil. */
.card-shot {
  margin: 0;
  width: min(100%, 440px);
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-shot img { width: 100%; height: auto; }

/* Asistente: el orbe del icono de la app. */
.ai-heading {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}
.ai-heading .section-label { margin: 0; }
.ai-orb { width: 56px; height: 56px; flex-shrink: 0; }
.device-wrap {
  position: relative;
  width: 280px;
  max-width: 100%;
}
.ai-orb--float {
  position: absolute;
  right: -6px;
  top: -30px;
  width: 72px;
  height: 72px;
  z-index: 3;
  filter: drop-shadow(0 10px 24px rgba(139, 92, 246, 0.45));
}
.pro-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: middle;
  color: #fff;
  background: linear-gradient(135deg, var(--night), var(--primary));
}

@media (min-width: 640px) {
  .trust-list { grid-template-columns: repeat(2, 1fr); }
  .ai-orb--float { right: -42px; top: -40px; width: 92px; height: 92px; }
}

@media (min-width: 900px) {
  .trust-list { grid-template-columns: repeat(4, 1fr); }
  .feature { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .feature--flip .feature-visual { order: -1; }
}

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


/* Volver arriba. La pagina son casi 13 pantallas en movil. Es un enlace a
   #contenido: funciona aunque falle el JavaScript, que solo decide cuando se
   ve. */
.to-top {
  position: fixed;
  right: clamp(1rem, 4vw, 2rem);
  bottom: clamp(1rem, 4vw, 2rem);
  z-index: 180;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, border-color 0.2s;
}

.to-top svg { width: 20px; height: 20px; }
.to-top:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.to-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.to-top.visible { opacity: 1; visibility: visible; transform: none; }

/* Sin JavaScript no hay clase .visible: mejor verlo siempre que quedarse sin el. */
html:not(.js) .to-top { opacity: 1; visibility: visible; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}

/* En movil el boton de descargar de la barra se queda corto al dedo. */
@media (max-width: 767px) {
  .header-cta-mobile { min-height: 40px; }
}
