/* =====================================================================
   home.css — neurosigna.es · diseño "Premium Medical Night" (Google Stitch)
   Azul medianoche + oro champán. Display: Playfair Display · Texto: Inter.
   Efectos: cielo estrellado fijo (parallax), ondas del sueño y luna con
   parallax. Animaciones solo opacity/transform (GPU). Sin Tailwind ni
   fuentes de iconos: todo CSS a mano + SVG inline en las plantillas.
   ===================================================================== */

:root {
  /* Azul medianoche (base) */
  --deep: #060e1a;        /* fondo más profundo */
  --navy: #0a192f;        /* contenedor */
  --navy-2: #0b1f3d;
  --card: #112240;        /* tarjetas / superficies elevadas */
  --card-2: #0e1c36;

  /* Oro champán */
  --gold: #e6c463;        /* acento principal / relleno CTA */
  --gold-bright: #f1d484;
  --gold-deep: #c9a24e;   /* bordes, acentos suaves */
  --gold-pale: #ecd9a3;

  /* Cremas / texto sobre oscuro */
  --cream: #fdfcfb;
  --text: #e4e7ee;
  --text-2: #c5cad6;
  --text-3: #a7b2c4;
  --muted: #8593a8;

  --line: rgba(230, 196, 99, 0.16);
  --line-2: rgba(255, 255, 255, 0.08);
  --wa: #25d366;

  --maxw: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.ns-site {
  background: var(--deep);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--deep); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: "Playfair Display", Georgia, serif; }

/* Capas: cielo fijo detrás, contenido delante */
#ns-sky { z-index: 0; }
.ns-site > header,
.ns-site > main,
.ns-site > footer { position: relative; z-index: 1; }

.ns-container { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }

/* Salto al contenido */
.ns-skip { position: absolute; left: -999px; }
.ns-skip:focus {
  left: 1rem; top: 1rem; z-index: 200;
  background: var(--gold); color: var(--deep);
  padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700;
}

/* ---------------------------------------------------------------------
   Cielo estrellado FIJO (parallax) + estrellas
   --------------------------------------------------------------------- */
#ns-sky {
  position: fixed;
  inset: -10vh 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(16, 40, 78, 0.55), transparent 60%),
    radial-gradient(120% 90% at 0% 110%, rgba(12, 28, 56, 0.5), transparent 55%),
    var(--deep);
  will-change: transform;
}
.ns-star {
  position: absolute;
  border-radius: 999px;
  background: #eef3ff;
  opacity: var(--o, 0.6);
  box-shadow: 0 0 4px rgba(220, 232, 255, 0.5);
  animation: twinkle 5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: calc(var(--o, 0.6) * 0.35); transform: scale(0.85); }
  50%      { opacity: var(--o, 0.6);               transform: scale(1.15); }
}

/* Motivo de marca: ondas de señal / sueño */
@keyframes waveSlide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------------
   Botones
   --------------------------------------------------------------------- */
.ns-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ns-btn--gold {
  background: var(--gold); color: var(--deep); font-weight: 800;
  box-shadow: 0 14px 32px -10px rgba(230, 196, 99, 0.5);
}
.ns-btn--gold:hover { background: var(--gold-bright); transform: translateY(-2px); }
.ns-btn--ghost {
  background: rgba(255, 255, 255, 0.04); color: var(--cream);
  border: 1.5px solid rgba(236, 217, 163, 0.38);
}
.ns-btn--ghost:hover { background: rgba(230, 196, 99, 0.1); border-color: var(--gold); }
.ns-btn--wa {
  background: var(--wa); color: #06231a; font-weight: 800;
  box-shadow: 0 14px 32px -10px rgba(37, 211, 102, 0.45);
}
.ns-btn--wa:hover { transform: translateY(-2px); filter: brightness(1.03); }

/* Eyebrow / antetítulo con filete dorado */
.ns-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.ns-eyebrow::before {
  content: ""; width: 30px; height: 1.5px; background: var(--gold); display: inline-block;
}
.ns-eyebrow--pill {
  background: rgba(230, 196, 99, 0.1); border: 1px solid rgba(230, 196, 99, 0.3);
  padding: 7px 15px; border-radius: 999px; letter-spacing: 0.1em;
}
.ns-eyebrow--pill::before { display: none; }

/* ---------------------------------------------------------------------
   HERO (full-bleed con foto del dormitorio)
   --------------------------------------------------------------------- */
.ns-hero {
  position: relative; overflow: hidden;
  min-height: min(92vh, 760px);
  display: flex; align-items: center;
  padding: clamp(110px, 16vh, 170px) 0 clamp(90px, 12vh, 130px);
}
.ns-hero__bg { position: absolute; inset: 0; z-index: 0; }
.ns-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0.42; }
.ns-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--deep) 4%, rgba(6, 14, 26, 0.82) 38%, rgba(6, 14, 26, 0.35) 75%, transparent),
    linear-gradient(0deg, var(--deep), transparent 38%);
}
.ns-hero__inner { position: relative; z-index: 2; width: 100%; }
.ns-hero h1 {
  font-weight: 700; font-size: clamp(38px, 6vw, 62px); line-height: 1.05;
  letter-spacing: -0.02em; color: var(--cream); text-wrap: balance; max-width: 16ch;
}
.ns-hero h1 em { font-style: italic; font-weight: 600; color: var(--gold); }
.ns-hero__lead {
  margin-top: 22px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6;
  color: var(--text-2); max-width: 40ch;
}
.ns-hero__cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.ns-hero__trust {
  margin-top: 30px;
  display: flex; gap: clamp(16px, 2.6vw, 30px); flex-wrap: wrap; list-style: none;
}
.ns-hero__trust li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
/* En móvil, sube el contenido del hero para que el bloque de confianza no
   se superponga con la banda de ondas del pie (ancladas a bottom). */
@media (max-width: 640px) { .ns-hero { padding-bottom: 150px; } }

/* Ondas del pie del hero: ECG arriba + respiratoria abajo (sin solaparse).
   Ancho máximo = contenedor en escritorio; bucle sin costuras (translateX -50%
   sobre un trazo cuya mitad [0,960] es idéntica a [960,1920]). */
.ns-waves { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: 1; pointer-events: none; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.ns-waves__inner { position: relative; height: 100%; overflow: hidden; }
.ns-waves svg { position: absolute; left: 0; width: 200%; display: block; }
.ns-wave-ecg { bottom: 58px; height: 52px; opacity: 0.62; animation: waveSlide 16s linear infinite; }
.ns-wave-resp { bottom: 0; height: 70px; opacity: 0.3; animation: waveSlide 30s linear infinite; }

/* ---------------------------------------------------------------------
   Secciones translúcidas (dejan ver el cielo fijo por detrás)
   --------------------------------------------------------------------- */
.ns-section { position: relative; padding: clamp(56px, 8vw, 104px) 0; }
.ns-section--features { background: linear-gradient(180deg, rgba(10, 25, 47, 0.72), rgba(6, 14, 26, 0.6)); }
.ns-section--how { background: rgba(6, 14, 26, 0.35); padding-top: clamp(170px, 19vw, 230px); }
.ns-section--services { background: linear-gradient(180deg, rgba(6, 14, 26, 0.55), rgba(11, 31, 61, 0.5)); }
.ns-section--faq { background: rgba(6, 14, 26, 0.4); }
.ns-section__head { text-align: center; max-width: 60ch; margin: 0 auto clamp(36px, 5vw, 60px); }
.ns-section__head h2,
.ns-h2 { font-weight: 600; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -0.01em; color: var(--cream); text-wrap: balance; }

/* Tarjetas de características */
.ns-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.ns-card {
  background: rgba(17, 34, 64, 0.8); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(26px, 3vw, 34px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.ns-card:hover { border-color: rgba(230, 196, 99, 0.4); transform: translateY(-3px); }
.ns-card__ico {
  width: 50px; height: 50px; border-radius: 999px;
  background: rgba(230, 196, 99, 0.1); border: 1px solid rgba(230, 196, 99, 0.28);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--gold);
}
.ns-card h3 { font-weight: 600; font-size: clamp(19px, 2vw, 23px); color: var(--cream); margin-bottom: 9px; }
.ns-card p { font-size: 15px; line-height: 1.6; color: var(--text-3); }

/* ---------------------------------------------------------------------
   CÓMO FUNCIONA (timeline + luna en la esquina con parallax)
   --------------------------------------------------------------------- */
.ns-moon-wrap {
  position: absolute; top: clamp(8px, 1.6vw, 26px); left: clamp(12px, 6vw, 90px);
  width: clamp(116px, 13vw, 168px); aspect-ratio: 1; z-index: 0; pointer-events: none;
}
.ns-moon-wrap::before {
  content: ""; position: absolute; inset: -40%;
  background: radial-gradient(circle, rgba(214, 227, 255, 0.16), rgba(230, 196, 99, 0.07) 42%, transparent 68%);
}
#ns-moon {
  width: 100%; height: 100%; will-change: transform;
  filter: drop-shadow(0 0 34px rgba(230, 196, 99, 0.16)) drop-shadow(0 0 10px rgba(214, 227, 255, 0.22));
}
.ns-how__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: clamp(28px, 4vw, 56px); align-items: start; }
.ns-how__intro p { font-size: clamp(15px, 1.4vw, 17.5px); line-height: 1.65; color: var(--text-2); margin-top: 8px; }
.ns-checks { margin-top: 22px; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ns-checks li { display: flex; align-items: flex-start; gap: 11px; font-size: 14.5px; font-weight: 500; color: var(--text-2); }
.ns-checks svg { flex: none; margin-top: 1px; }

.ns-steps { position: relative; display: flex; flex-direction: column; gap: 26px; }
.ns-steps::before {
  content: ""; position: absolute; left: 31px; top: 24px; bottom: 24px; width: 1px;
  background: linear-gradient(180deg, rgba(230, 196, 99, 0.5), rgba(230, 196, 99, 0.12), transparent);
}
.ns-step { position: relative; display: flex; gap: 22px; align-items: flex-start; }
.ns-step__num {
  position: relative; z-index: 1; flex: none;
  width: 64px; height: 64px; border-radius: 999px;
  background: var(--deep); border: 1px solid var(--gold-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: "Playfair Display", serif; font-weight: 600; font-size: 24px; color: var(--gold);
  box-shadow: 0 0 18px -4px rgba(230, 196, 99, 0.35);
}
.ns-step__card {
  flex: 1; background: rgba(17, 34, 64, 0.82); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 22px 24px; transition: border-color 0.25s ease;
}
.ns-step:hover .ns-step__card { border-color: rgba(230, 196, 99, 0.32); }
.ns-step__card h3 { font-weight: 600; font-size: 19px; color: var(--cream); margin-bottom: 6px; }
.ns-step__card p { font-size: 14.5px; line-height: 1.55; color: var(--text-3); }

/* ---------------------------------------------------------------------
   SERVICIOS (01 / 02 / 03)
   --------------------------------------------------------------------- */
.ns-service {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: clamp(28px, 3vw, 36px); transition: border-color 0.28s ease, transform 0.28s ease;
}
.ns-service:hover { border-color: rgba(230, 196, 99, 0.4); transform: translateY(-3px); }
.ns-service__n {
  position: absolute; top: 14px; right: 20px;
  font-family: "Playfair Display", serif; font-weight: 700; font-size: clamp(40px, 5vw, 58px);
  color: var(--gold); line-height: 1;
}
.ns-service h3 { position: relative; font-weight: 600; font-size: clamp(20px, 2.2vw, 25px); color: var(--cream); margin: 6px 0 12px; }
.ns-service p { position: relative; font-size: 15px; line-height: 1.62; color: var(--text-3); }

/* ---------------------------------------------------------------------
   FAQ (acordeón nativo <details>)
   --------------------------------------------------------------------- */
.ns-faq { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-inline: auto; }
.ns-faq details {
  background: rgba(17, 34, 64, 0.82); border: 1px solid var(--line-2);
  border-radius: var(--radius); overflow: hidden; transition: border-color 0.25s ease;
}
.ns-faq details[open] { border-color: rgba(230, 196, 99, 0.3); }
.ns-faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px clamp(18px, 2.5vw, 26px);
  font-family: "Playfair Display", serif; font-size: clamp(17px, 1.7vw, 21px); font-weight: 600; color: var(--cream);
}
.ns-faq summary:hover { color: var(--gold); }
.ns-faq details[open] summary { color: var(--gold); }
.ns-faq summary::-webkit-details-marker { display: none; }
.ns-faq summary::after {
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 999px;
  background: rgba(230, 196, 99, 0.14)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23E6C463' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    center / 15px no-repeat;
  transition: transform 0.25s ease;
}
.ns-faq details[open] summary::after { transform: rotate(180deg); }
.ns-faq__a { padding: 0 clamp(18px, 2.5vw, 26px) 22px; font-size: 15px; line-height: 1.66; color: var(--text-3); }
.ns-faq__a a { color: var(--gold); }

/* ---------------------------------------------------------------------
   CTA final
   --------------------------------------------------------------------- */
.ns-cta { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 96px); }
.ns-cta__card {
  position: relative; overflow: hidden; text-align: center;
  max-width: 900px; margin-inline: auto;
  background: radial-gradient(120% 140% at 50% 0%, rgba(22, 51, 91, 0.7), rgba(11, 31, 61, 0.5) 55%, rgba(6, 14, 26, 0.6));
  border: 1px solid rgba(230, 196, 99, 0.22); border-radius: 28px;
  padding: clamp(40px, 5.5vw, 72px) clamp(26px, 5vw, 64px); backdrop-filter: blur(4px);
}
.ns-cta__card h2 { font-weight: 600; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.06; letter-spacing: -0.01em; color: var(--cream); }
.ns-cta__card p { margin: 16px auto 0; max-width: 50ch; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.6; color: var(--text-2); }
.ns-cta__actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ns-cta__tel { margin-top: 24px; font-size: 14.5px; color: var(--text-3); }
.ns-cta__tel a { color: var(--gold); font-weight: 700; }

/* ---------------------------------------------------------------------
   Banner de consentimiento de cookies
   --------------------------------------------------------------------- */
.ns-cookie {
  display: none;
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 1000; width: min(960px, calc(100% - 2rem));
  background: rgba(11, 31, 61, 0.96); backdrop-filter: blur(8px);
  border: 1px solid rgba(230, 196, 99, 0.3); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  padding: 16px 20px; align-items: center; gap: 14px 20px; flex-wrap: wrap;
}
.ns-cookie__text { margin: 0; font-size: 14px; color: var(--text-2); flex: 1 1 280px; }
.ns-cookie__text a { color: var(--gold); }
.ns-cookie__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.ns-cbtn { padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.ns-cbtn--accept { background: var(--gold); color: var(--deep); }
.ns-cbtn--reject { background: rgba(255, 255, 255, 0.05); color: var(--text); border: 1.5px solid rgba(236, 217, 163, 0.4); }
@media (max-width: 560px) {
  .ns-cookie { flex-direction: column; align-items: stretch; }
  .ns-cookie__actions .ns-cbtn { flex: 1; }
}

/* ---------------------------------------------------------------------
   Páginas internas (contacto / legales / 404)
   --------------------------------------------------------------------- */
.ns-page { padding: clamp(56px, 8vw, 96px) 0; min-height: 60vh; position: relative; }
.ns-legal { max-width: 820px; margin-inline: auto; }
.ns-legal h1 { font-weight: 600; font-size: clamp(30px, 4vw, 44px); color: var(--cream); letter-spacing: -0.01em; margin-bottom: 0.4rem; }
.ns-legal h2 { font-weight: 600; font-size: 1.3rem; color: var(--gold-pale); margin: 1.9rem 0 0.5rem; }
.ns-legal__updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.8rem; }
.ns-legal p, .ns-legal li { color: var(--text-2); margin-bottom: 0.4rem; }
.ns-legal a { color: var(--gold); text-decoration: underline; }
.ns-legal ul { margin: 0.3rem 0 0.9rem; padding-left: 1.2rem; }

.ns-404 { text-align: center; }
.ns-404__card {
  max-width: 620px; margin-inline: auto;
  background: rgba(17, 34, 64, 0.82); border: 1px solid var(--line);
  border-radius: 24px; padding: clamp(1.8rem, 4vw, 3rem);
}
.ns-404__card h1 { font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--cream); margin-bottom: 0.6rem; }
.ns-404__card p { color: var(--text-3); margin-bottom: 1.6rem; }

.ns-btn-gold {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--gold); color: var(--deep);
  padding: 14px 26px; border-radius: 999px; font-size: 15px; font-weight: 800;
  box-shadow: 0 14px 32px -10px rgba(230, 196, 99, 0.5);
}
.ns-btn-gold:hover { background: var(--gold-bright); }

/* ---------------------------------------------------------------------
   Movimiento reducido: desactiva animaciones y parallax
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #ns-sky, #ns-moon { transform: none !important; }
  .ns-star { opacity: var(--o, 0.55); }
}
