/* ============================================================
   Hourexa · hourexa.com — hoja de estilos de la landing
   Marca: carbón #191b1e–#353535 + verde #00d47e (el punto del
   temporizador), tipografía DM Sans (autoalojada, sin CDN).
   Sin frameworks: esta hoja es todo el sistema visual.
   ============================================================ */

/* ---------- Fuentes ---------- */
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/dm-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/dm-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/dm-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/dm-sans-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Variables ---------- */
:root {
  --ink: #16181a;          /* texto principal sobre claro */
  --ink-2: #55606b;        /* texto secundario sobre claro */
  --carbon: #17191c;       /* fondo oscuro principal */
  --carbon-2: #1f2226;     /* tarjetas sobre oscuro */
  --carbon-3: #2a2e33;     /* bordes sobre oscuro */
  --paper: #ffffff;
  --mist: #f4f6f8;         /* fondo claro alterno */
  --line: #e4e8ec;
  --green: #00d47e;
  --green-hover: #00c273;
  --green-ink: #077a4c;    /* verde legible como texto sobre claro */
  --green-dim: rgba(0, 212, 126, .12);
  --amber: #f0b429;
  --on-green: #06281a;     /* texto sobre botón verde */
  --muted-dark: #9aa4ae;   /* texto secundario sobre oscuro */
  --radius: 16px;
  --radius-s: 10px;
  --w: 1120px;
  --shadow: 0 1px 2px rgba(22,24,26,.05), 0 12px 32px -16px rgba(22,24,26,.18);
  --shadow-lift: 0 2px 4px rgba(22,24,26,.06), 0 24px 48px -20px rgba(22,24,26,.28);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* El atributo hidden manda SIEMPRE, aunque la clase ponga display */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.8vw, 3.35rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
section { padding: clamp(64px, 9vw, 108px) 0; }
.lead { font-size: 1.13rem; color: var(--ink-2); }
.center { text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .82rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--green-ink); margin-bottom: 1.1em;
}
.dark .kicker { color: var(--green); }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: var(--ink-2); }
.dark .section-head p { color: var(--muted-dark); }

/* El punto verde: la marca en movimiento */
.dot {
  width: .62em; height: .62em; border-radius: 50%;
  background: var(--green); display: inline-block; flex: none;
  box-shadow: 0 0 0 0 rgba(0, 212, 126, .45);
  animation: pulso 2.2s infinite;
}
@keyframes pulso {
  0%   { box-shadow: 0 0 0 0 rgba(0, 212, 126, .45); }
  70%  { box-shadow: 0 0 0 .55em rgba(0, 212, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 126, 0); }
}
.dot-static { animation: none; }
.btn-block { width: 100%; }

/* Página 404 */
.page-404 { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.page-404 h1 { color: #fff; }
.page-404 .alt { color: var(--muted-dark); max-width: 36em; }
.page-404 .volver { margin-top: 1.6em; }

/* ---------- Banner de cookies ---------- */
.cc-banner {
  position: fixed; inset: auto 0 0 0; z-index: 70; padding: 16px;
  display: flex; justify-content: center;
}
.cc-caja {
  background: var(--carbon-2); border: 1px solid var(--carbon-3); color: #fff;
  border-radius: var(--radius); box-shadow: 0 24px 64px rgba(0,0,0,.5);
  max-width: 680px; width: 100%; padding: 22px 24px;
}
.cc-titulo { font-weight: 600; font-size: 1.02rem; margin: 0 0 .35em; }
.cc-texto { color: var(--muted-dark); font-size: .9rem; margin: 0 0 1em; }
.cc-enlace { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cc-panel { border-top: 1px solid var(--carbon-3); margin-bottom: 1em; }
.cc-cat {
  display: flex; gap: .7em; padding: .8em 0; align-items: flex-start;
  border-bottom: 1px solid var(--carbon-3); cursor: pointer;
}
.cc-cat input { margin-top: .25em; accent-color: var(--green); width: 16px; height: 16px; flex: none; }
.cc-cat-nombre { display: flex; gap: .6em; align-items: center; font-weight: 600; font-size: .92rem; }
.cc-cat-siempre {
  font-size: .72rem; font-weight: 600; color: var(--green);
  text-transform: uppercase; letter-spacing: .06em;
}
.cc-cat-desc { display: block; color: var(--muted-dark); font-size: .84rem; margin-top: .15em; }
.cc-botones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cc-btn { font-size: .95rem; padding: .7em 1.3em; }
.cc-config {
  background: none; border: none; color: var(--muted-dark); font: inherit;
  font-size: .92rem; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; padding: .5em;
}
.cc-config:hover { color: #fff; }
@media (max-width: 640px) { .cc-botones .cc-btn { flex: 1 1 40%; } }

/* Pie: botón de preferencias con aspecto de enlace */
.cookie-prefs {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--muted-dark); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.cookie-prefs:hover { color: #fff; }

/* ---------- Página legal (política de cookies) ---------- */
.legal-page { padding: clamp(48px, 7vw, 80px) 0; }
.legal-page .wrap { max-width: 760px; }
.legal-page h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.legal-page h2 { font-size: 1.18rem; margin-top: 2.2em; }
.legal-page p, .legal-page li { color: var(--ink-2); font-size: .98rem; }
.legal-page .fecha { font-size: .88rem; color: var(--ink-2); }
.tabla-scroll { overflow-x: auto; margin: 1.2em 0; }
.tabla-cookies { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.tabla-cookies th, .tabla-cookies td {
  text-align: left; padding: .6em .8em; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tabla-cookies th { font-weight: 600; color: var(--ink); background: var(--mist); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .82em 1.5em; border-radius: 12px; border: 1px solid transparent;
  background: transparent; /* los <button> traen fondo gris de serie */
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn-green { background: var(--green); color: var(--on-green); }
.btn-green:hover { background: var(--green-hover); }
.btn-ghost { border-color: var(--carbon-3); color: #fff; }
.btn-ghost:hover { border-color: var(--muted-dark); }
.btn-ghost-light { border-color: var(--line); color: var(--ink); }
.btn-ghost-light:hover { border-color: var(--ink-2); }
.btn-big { padding: .95em 1.9em; font-size: 1.06rem; }

/* ---------- Cabecera ---------- */
/* Opacidad alta a propósito: la cabecera flota también sobre las secciones
   claras, y con .85 el gris de los enlaces se quedaba en 4,37:1 de contraste
   (por debajo del 4,5:1 que exige la WCAG AA). Lo detectó Lighthouse. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 25, 28, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 28px; min-height: 68px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: #353535;
  display: grid; place-items: center; flex: none; }
.logo-mark .dot { width: 12px; height: 12px; }
.logo-name { font-weight: 600; font-size: 1.18rem; color: #fff; letter-spacing: -0.01em; }
.main-nav { display: flex; gap: 26px; margin-left: 12px; }
.main-nav a {
  color: var(--muted-dark); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.main-nav a:hover { color: #fff; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 2px; font-size: .82rem; }
.lang-switch a {
  color: var(--muted-dark); text-decoration: none; padding: .3em .5em; border-radius: 7px;
  font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
}
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current] { color: #fff; background: var(--carbon-3); }
.link-login { color: var(--muted-dark); text-decoration: none; font-size: .95rem; font-weight: 500; }
.link-login:hover { color: #fff; }
.btn-header { padding: .6em 1.2em; font-size: .95rem; }
.nav-toggle { display: none; }
/* Extras del menú móvil (login + idiomas): solo existen dentro del desplegable */
.menu-extras { display: none; }

/* ---------- Bandas oscuras ---------- */
.dark { background: var(--carbon); color: #fff; }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark p { color: var(--muted-dark); }

/* ---------- Héroe ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 8vw, 96px) 0 clamp(72px, 9vw, 116px); }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(640px 420px at 78% 40%, rgba(0, 212, 126, .14), transparent 65%),
    radial-gradient(520px 380px at 12% 82%, rgba(0, 212, 126, .05), transparent 60%);
}
.hero .wrap {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(36px, 5vw, 64px); align-items: center;
}
.hero h1 { margin-bottom: .45em; }
.hero .lead { color: var(--muted-dark); font-size: 1.16rem; max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.8em 0 1.6em; }
.hero-points { display: flex; flex-wrap: wrap; gap: .55em 1.5em; padding: 0; margin: 0; list-style: none; }
.hero-points li {
  display: inline-flex; align-items: center; gap: .5em;
  color: var(--muted-dark); font-size: .93rem; font-weight: 500;
}
.hero-points .tick { color: var(--green); font-weight: 700; }

/* Marco de navegador de las maquetas */
.shot { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,.45)); }
.hero .shot { transform: translateY(6px); }

/* ---------- Franja "la diferencia" ---------- */
.diff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.diff {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
}
.diff .icono {
  width: 46px; height: 46px; border-radius: 13px; background: var(--green-dim);
  display: grid; place-items: center; margin-bottom: 18px; color: var(--green-ink);
}
.diff h3 { margin-bottom: .45em; }
.diff p { color: var(--ink-2); margin: 0; font-size: .98rem; }

/* ---------- Características ---------- */
.features { background: var(--mist); }
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: transform .2s ease, box-shadow .2s ease;
}
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.feat .icono {
  width: 44px; height: 44px; border-radius: 12px; background: var(--carbon);
  color: var(--green); display: grid; place-items: center; margin-bottom: 16px;
}
.feat h3 { margin-bottom: .4em; }
.feat p { color: var(--ink-2); margin: 0; font-size: .96rem; }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; counter-reset: paso; }
.step {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px 26px; box-shadow: var(--shadow);
}
.step::before {
  counter-increment: paso; content: counter(paso);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: var(--on-green); font-weight: 700; font-size: 1.05rem;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: .4em; }
.step p { color: var(--ink-2); margin: 0; font-size: .97rem; }
.reqs {
  margin-top: 30px; padding: 18px 24px; border: 1px dashed var(--line);
  border-radius: var(--radius-s); background: var(--paper);
  color: var(--ink-2); font-size: .92rem; text-align: center;
}
.reqs strong { color: var(--ink); }

/* ---------- Pantallas ---------- */
.screens { background: var(--mist); }
.screens-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.screen-card figure { margin: 0; }
.screen-card figcaption {
  margin-top: 14px; text-align: center; color: var(--ink-2); font-size: .93rem;
}
.screen-card .shot { filter: drop-shadow(0 18px 36px rgba(22,24,26,.16)); }

/* ---------- Para quién ---------- */
.who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.who {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  background: var(--paper);
}
.who h3 { display: flex; align-items: center; gap: .55em; margin-bottom: .35em; }
.who p { color: var(--ink-2); margin: 0; font-size: .96rem; }

/* ---------- Precio ---------- */
.pricing .section-head { margin-bottom: 2.4rem; }
.price-card {
  max-width: 520px; margin: 0 auto; background: var(--paper); color: var(--ink);
  border-radius: 22px; padding: 40px 42px 36px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.55);
}
/* La tarjeta es BLANCA aunque la banda sea oscura: sus párrafos no deben
   heredar el gris de `.dark p`, que dejaba el precio —lo más importante de
   la página— casi ilegible. */
.price-card p { color: var(--ink-2); }
.price-card .price-tag { color: var(--ink); }
.price-tag { display: flex; align-items: baseline; gap: .3em; margin: .2em 0 .1em; }
.price-tag .importe { font-size: 3.6rem; font-weight: 700; letter-spacing: -0.03em; }
.price-tag .divisa { font-size: 1.6rem; font-weight: 600; color: var(--ink-2); }
.price-note { color: var(--ink-2); font-size: .95rem; margin-bottom: 1.4em; }
.price-list { list-style: none; margin: 0 0 1.8em; padding: 0; }
.price-list li {
  display: flex; gap: .65em; align-items: flex-start; padding: .48em 0; font-size: .99rem;
}
.price-list .tick { color: var(--green-ink); font-weight: 700; flex: none; }
.price-fine { font-size: .84rem; color: var(--ink-2); margin: 1.2em 0 0; }
.price-login { text-align: center; margin-top: 1.6em; font-size: .93rem; color: var(--muted-dark); }
.price-login a { color: #fff; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details {
  border-bottom: 1px solid var(--line); padding: 6px 0;
}
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1em;
  cursor: pointer; list-style: none; padding: 16px 4px;
  font-weight: 600; font-size: 1.04rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+'; font-size: 1.5rem; font-weight: 400; color: var(--green-ink);
  transition: transform .2s ease; flex: none; line-height: 1;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .faq-body { padding: 0 4px 18px; color: var(--ink-2); max-width: 62ch; }
.faq-list .faq-body p { margin-bottom: .6em; }
.faq-list .faq-body p:last-child { margin-bottom: 0; }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cta-final p { max-width: 40em; margin: 0 auto 1.8em; }
.cta-final .btn { margin-bottom: 1.2em; }
.cta-mail { font-size: .95rem; color: var(--muted-dark); }
.cta-mail a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Pie ---------- */
.site-footer {
  background: var(--carbon); color: var(--muted-dark);
  border-top: 1px solid rgba(255,255,255,.06); padding: 52px 0 40px; font-size: .92rem;
}
.footer-top {
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between;
  align-items: center; margin-bottom: 34px;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.footer-nav a { color: var(--muted-dark); text-decoration: none; }
.footer-nav a:hover { color: #fff; }
/* «Acceso clientes»: destacado en el pie, como botón de marca */
.btn-footer-login {
  padding: .65em 1.3em; font-size: .95rem;
  border-color: var(--green); color: var(--green);
}
.btn-footer-login:hover {
  background: var(--green); color: var(--on-green); border-color: var(--green);
}
.footer-legal { border-top: 1px solid rgba(255,255,255,.07); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: space-between; }
.footer-legal p { margin: 0; }

/* ---------- Aparición al hacer scroll ----------
   Solo se oculta si el JS está activo (html.js): sin JS, todo visible. */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease; }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .shot { max-width: 620px; margin: 0 auto; }
  .diff-grid, .feat-grid, .steps, .who-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screens-grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin: 0 auto; }
}
@media (max-width: 860px) {
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--carbon);
    border-bottom: 1px solid var(--carbon-3); padding: 8px 24px 16px; margin: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.05); }
  .main-nav a:last-child { border-bottom: none; }
  .nav-toggle {
    display: grid; place-items: center; width: 42px; height: 42px;
    background: none; border: 1px solid var(--carbon-3); border-radius: 10px;
    color: #fff; cursor: pointer;
  }
  /* Con hamburguesa, los idiomas viven DENTRO del menú (no se pierden) */
  .header-actions .lang-switch { display: none; }
  .menu-extras { display: block; }
  .menu-langs { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 6px; }
  .menu-langs a {
    padding: .45em .95em; border: 1px solid var(--carbon-3); border-radius: 999px;
    color: var(--muted-dark); text-decoration: none; font-size: .92rem; font-weight: 500;
  }
  .menu-langs a:hover { color: #fff; border-color: var(--muted-dark); }
  .menu-langs a[aria-current] { color: var(--on-green); background: var(--green); border-color: var(--green); font-weight: 600; }
}
@media (max-width: 640px) {
  .diff-grid, .feat-grid, .steps, .who-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-ctas .btn { flex: 1 1 100%; }
  .price-card { padding: 30px 24px 28px; }
  .price-tag .importe { font-size: 3rem; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
