/* =========================================================
   Walkiverso · base: paleta, tipografía, temas, botones, formularios y piezas de interfaz
   Prefijos: ns- (firma NS) · wk- (Walkiverso)
   Rangos: < 750px celular · 750–1099px tablet · ≥ 1100px escritorio
   ========================================================= */

:root {
  /* ---- Paleta: azul profundo + blanco ---- */
  --blue-night: #040F26;   /* azul casi negro */
  --blue-deep: #071A3D;
  --blue-dark: #0B2554;
  --blue: #123B78;
  --blue-mid: #1C5AA6;
  --blue-light: #4C8ED9;
  --blue-glow: #8FC5FF;
  --white: #FFFFFF;
  --white-soft: #F4F8FC;
  --white-muted: #DCE7F3;

  /* ---- Tipografía ---- */
  --wk-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --wk-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* ---- Forma y ritmo ---- */
  --wk-ancho: 1240px;
  --wk-x: clamp(18px, 4vw, 56px);
  --wk-seccion: clamp(56px, 7.5vw, 104px);
  --wk-radio: 20px;
  --wk-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* ---- Firma NS adaptada a la marca ---- */
  --ns-accent: var(--blue-glow);
  --ns-on-accent: var(--blue-deep);
  --ns-bar: var(--blue-deep);
  --ns-panel-bg: var(--blue-deep);
  --ns-top-bg: var(--blue-dark);
  --ns-font-display: var(--wk-display);
  --ns-font-body: var(--wk-body);
  --ns-z: 50;
}

/* ---- Temas: cada sección elige su luz. Los componentes solo usan estas variables. ---- */
.wk-noche, .wk-azul {
  --fg: var(--white-soft);
  --fg-2: rgb(220 231 243 / 0.74);
  --linea: rgb(143 197 255 / 0.18);
  --sup: rgb(143 197 255 / 0.06);
  --sup-2: rgb(143 197 255 / 0.1);
  --acento: var(--blue-glow);
  --sobre-acento: var(--blue-deep);
  color: var(--fg);
  background-color: var(--blue-deep);
}
.wk-azul { background: linear-gradient(180deg, var(--blue-dark), var(--blue) 140%); }
.wk-papel {
  --fg: var(--blue-deep);
  --fg-2: #41587E;
  --linea: rgb(7 26 61 / 0.13);
  --sup: var(--white);
  --sup-2: var(--white-muted);
  --acento: var(--blue-mid);
  --sobre-acento: var(--white);
  color: var(--fg);
  background-color: var(--white-soft);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--wk-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
main { display: block; min-height: 70svh; outline: none; }
::selection { background: var(--blue-light); color: var(--white); }

/* ---- Tipografía ---- */
.wk-titulo {
  font-family: var(--wk-display);
  font-weight: 340;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.wk-titulo em, .wk-display em { font-style: italic; font-weight: 300; color: var(--acento); }
.wk-titulo--m { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
.wk-titulo--s { font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.1; }
.wk-display { font-family: var(--wk-display); font-weight: 340; letter-spacing: -0.015em; }
.wk-sobre {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acento);
}
.wk-sobre::before { content: ''; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }
.wk-bajada { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--fg-2); max-width: 56ch; text-wrap: pretty; }
.wk-nota { font-size: 0.88rem; color: var(--fg-2); }

/* ---- Estructura ---- */
.wk-cont { width: min(100%, var(--wk-ancho)); margin-inline: auto; padding-inline: var(--wk-x); }
.wk-cont--angosto { --wk-ancho: 860px; }
.wk-seccion { position: relative; padding-block: var(--wk-seccion); }
.wk-seccion--corta { padding-block: clamp(48px, 6vw, 80px); }
.wk-cab { display: grid; gap: 16px; margin-bottom: clamp(28px, 4vw, 52px); }
.wk-cab--fila { grid-template-columns: 1fr auto; align-items: end; }
.wk-cab--centro { justify-items: center; text-align: center; }
.wk-pagina { padding-top: clamp(112px, 12vw, 150px); }
@media (max-width: 749px) { .wk-cab--fila { grid-template-columns: 1fr; } }

/* ---- Botones ---- */
.wk-btn {
  --b-bg: var(--acento);
  --b-fg: var(--sobre-acento);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--b-bg);
  color: var(--b-fg);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.4s var(--wk-ease), box-shadow 0.4s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.wk-btn .wk-flecha { display: inline-block; transition: transform 0.4s var(--wk-ease); }
.wk-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--b-bg) 80%, transparent); }
.wk-btn:hover .wk-flecha { transform: translateX(5px); }
.wk-btn:active { transform: translateY(0) scale(0.985); }
.wk-btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.wk-btn--luz { --b-bg: var(--white); --b-fg: var(--blue-deep); box-shadow: 0 0 0 1px rgb(143 197 255 / 0.5), 0 0 42px -6px rgb(143 197 255 / 0.65); }
.wk-btn--luz:hover { box-shadow: 0 0 0 1px var(--blue-glow), 0 0 60px -4px rgb(143 197 255 / 0.9); }
.wk-btn--linea { --b-bg: transparent; --b-fg: var(--fg); border-color: var(--linea); }
.wk-btn--linea:hover { border-color: var(--acento); box-shadow: none; background: var(--sup); }
.wk-btn--tinta { --b-bg: var(--blue-deep); --b-fg: var(--white); }
.wk-btn--ancho { width: 100%; }
.wk-btn--grande { min-height: 58px; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }

.wk-enlace {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--fg);
  padding-block: 6px;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: color 0.3s, gap 0.4s var(--wk-ease);
}
.wk-enlace:hover { color: var(--acento); gap: 13px; }

/* Botones de ícono redondos (buscador en la barra, cerrar) */
.wk-icono-btn, .wk-cerrar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.wk-icono-btn svg, .wk-cerrar svg { width: 20px; height: 20px; }
.wk-icono-btn:hover { background: rgb(255 255 255 / 0.08); color: var(--ns-accent); }
.wk-cerrar { border-color: var(--linea); }
.wk-cerrar:hover { border-color: var(--acento); color: var(--acento); }
.ns-nav + .wk-icono-btn { margin-left: 0; }
.ns-bar .wk-icono-btn { margin-left: auto; margin-right: -14px; }
.ns-bar .ns-cta { margin-left: 0; }
.wk-contador {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--blue-deep);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
}
.wk-contador.is-nuevo { animation: wk-pulso 0.6s var(--wk-ease); }
@keyframes wk-pulso { 40% { transform: scale(1.35); } }
@media (max-width: 1099px) { .ns-bar .wk-icono-btn { margin-left: auto; } }
@media (max-width: 749px) { .ns-bar .wk-icono-btn { margin-right: -8px; } .ns-brand img { height: 24px; } }

/* ---- Insignias ---- */
.wk-insignia {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  background: var(--white);
  color: var(--blue-deep);
  box-shadow: 0 6px 18px -8px rgb(4 15 38 / 0.6);
}
.wk-insignia::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-mid); box-shadow: 0 0 0 3px rgb(76 142 217 / 0.25); }
.wk-insignia--promo { background: var(--acento); color: var(--sobre-acento, #fff); }
.wk-insignia--promo::before { background: currentColor; box-shadow: none; }
.wk-ficha__promo { flex-basis: 100%; margin: 4px 0 0; font-size: 0.9rem; }
.wk-insignia--wk { background: rgb(7 26 61 / 0.72); color: var(--white); border: 1px solid rgb(143 197 255 / 0.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wk-insignia--wk::before { background: var(--blue-glow); }
.wk-insignia--hogar { background: rgb(4 15 38 / 0.78); color: var(--white-muted); }
.wk-insignia--hogar::before { background: var(--white-muted); box-shadow: none; opacity: 0.6; }

/* ---- Formularios ---- */
.wk-form { display: grid; gap: 14px; }
.wk-campo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: var(--fg-2); }
.wk-campo > input, .wk-campo > select, .wk-campo > textarea, .wk-campo > .wk-pegado { flex: 1 0 100%; }
.wk-campo > input ~ small { flex-basis: 100%; }
.wk-campo small { font-weight: 400; }
.wk-form input:not([type=radio], [type=checkbox]), .wk-form select, .wk-form textarea, .wk-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--linea);
  border-radius: 14px;
  background: var(--sup);
  color: var(--fg);
  font-size: 1rem;
  font-weight: 400;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.wk-form textarea { min-height: 120px; resize: vertical; }
.wk-form input::placeholder, .wk-form textarea::placeholder { color: var(--fg-2); opacity: 0.7; }
.wk-form input:focus, .wk-form select:focus, .wk-form textarea:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 22%, transparent); }
.wk-form select option { color: var(--blue-deep); }
.wk-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wk-error { min-height: 1.2em; font-size: 0.9rem; font-weight: 600; color: #B4231F; }
.wk-noche .wk-error, .wk-azul .wk-error { color: #FFB4A8; }
.wk-ok { font-weight: 600; color: var(--acento); }
@media (max-width: 599px) { .wk-fila { grid-template-columns: 1fr; } }

/* ---- Aparición suave al entrar en pantalla ---- */
.js [data-ver] { opacity: 0; transform: translateY(22px); transition: opacity 0.9s ease, transform 1s var(--wk-ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-ver].is-visto { opacity: 1; transform: none; }

/* ---- Ramas: esencia de la marca, usadas como máscara para poder teñirlas ---- */
.wk-ramas {
  position: absolute;
  aspect-ratio: 227 / 491;
  pointer-events: none;
  background: linear-gradient(180deg, var(--blue-glow), var(--blue-mid) 70%, transparent);
  -webkit-mask: url('../img/ramas.svg') left top / contain no-repeat;
  mask: url('../img/ramas.svg') left top / contain no-repeat;
  opacity: 0.34;
}
.wk-ramas--der { scale: -1 1; }
.wk-papel .wk-ramas { background: linear-gradient(180deg, var(--blue-mid), var(--blue-light)); opacity: 0.14; }

/* ---- Aviso del panel (barra o cartel flotante) ---- */
.aviso { position: relative; z-index: 60; padding: 9px 16px; background: var(--blue-mid); color: var(--white); text-align: center; font-size: 0.9rem; }
.aviso a { color: inherit; font-weight: 600; margin-left: 6px; }
.aviso--bar ~ .ns-header { top: calc(var(--ns-gap) + 40px); }
.aviso--bar ~ .ns-header.is-scrolled { top: var(--ns-gap); }
.aviso--floating { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 45; max-width: 560px; margin-inline: auto; border-radius: 16px; box-shadow: 0 16px 40px -16px rgb(0 0 0 / 0.5); }

/* ---- Cookies ---- */
.wk-cookies { position: fixed; z-index: 65; left: 16px; bottom: 16px; width: min(440px, calc(100% - 32px)); display: grid; gap: 14px; padding: 20px; border-radius: 20px; background: var(--blue-night); color: var(--white-soft); border: 1px solid rgb(143 197 255 / 0.2); font-size: 0.9rem; box-shadow: 0 20px 40px -18px rgb(0 0 0 / 0.6); }
.wk-cookies div { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.wk-cookies .wk-btn { min-height: 44px; padding-inline: 18px; --b-bg: var(--blue-glow); --b-fg: var(--blue-deep); }
.wk-cookies .wk-btn--linea { --b-bg: transparent; --b-fg: var(--white-soft); border-color: rgb(143 197 255 / 0.3); }

/* ---- Velo con desenfoque (carrito, buscador, modal) ---- */
.wk-velo { position: fixed; inset: 0; z-index: 70; background: rgb(4 15 38 / 0.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: wk-aparecer 0.3s ease; }
@keyframes wk-aparecer { from { opacity: 0; } }

/* ---- Modal ---- */
.wk-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgb(4 15 38 / 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: wk-aparecer 0.3s ease; }
.wk-modal__caja { position: relative; width: min(560px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; padding: clamp(26px, 5vw, 44px); border-radius: 26px; animation: wk-subir 0.5s var(--wk-ease); }
.wk-modal__caja > .wk-cerrar { position: absolute; top: 14px; right: 14px; }
@keyframes wk-subir { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

/* ---- Pie ---- */
.wk-pie { position: relative; overflow: hidden; background: var(--blue-night); padding: clamp(56px, 8vw, 96px) 0 28px; }
.wk-pie__grilla { position: relative; display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.wk-pie__lema { margin-top: 14px; font-family: var(--wk-display); font-style: italic; font-size: 1.25rem; color: var(--blue-glow); }
.wk-pie__col strong { display: block; margin-bottom: 14px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue-glow); }
.wk-pie__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wk-pie__col a { display: inline-block; padding-block: 6px; color: var(--fg-2); text-decoration: none; transition: color 0.25s, transform 0.4s var(--wk-ease); }
.wk-pie__col a:hover { color: var(--white); transform: translateX(4px); }
.wk-redes { display: flex; gap: 10px; margin-top: 22px; }
.wk-redes a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--linea); border-radius: 50%; color: var(--fg); transition: border-color 0.25s, background-color 0.25s, transform 0.4s var(--wk-ease); }
.wk-redes a:hover { border-color: var(--blue-glow); background: var(--sup); transform: translateY(-3px); }
.wk-redes svg { width: 19px; height: 19px; }
.wk-pie__base { position: relative; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin-top: clamp(40px, 6vw, 72px); padding-top: 22px; border-top: 1px solid var(--linea); font-size: 0.82rem; color: var(--fg-2); }
.wk-pie__base a { text-decoration: none; margin-left: 18px; }
.wk-pie__base a:hover { color: var(--white); }
@media (max-width: 479px) { .wk-pie__base a { margin: 0 18px 0 0; } }

/* ---- Estados vacíos y de carga ---- */
.wk-vacio { display: grid; justify-items: center; gap: 18px; padding: clamp(40px, 8vw, 90px) 0; text-align: center; }
.wk-cargando { display: grid; place-items: center; min-height: 60svh; }
.wk-cargando::after { content: ''; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--linea); border-top-color: var(--acento); animation: wk-girar 0.9s linear infinite; }
@keyframes wk-girar { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-ver] { opacity: 1; transform: none; }
}

.wk-cab > .wk-enlace { justify-self: start; }
.wk-cab--fila > .wk-enlace { justify-self: end; }
@media (max-width: 749px) { .wk-cab--fila > .wk-enlace { justify-self: start; } }
