/* ==========================================================================
   Raylen Lof — sistema de diseño
   Paleta: azul #002eff (kallfü, lo sagrado) · fuego #ff3d00 · verde #41e8b4
   Tipografía: Barlow / Barlow Condensed (self-hosted)
   ========================================================================== */

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-condensed-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-condensed-700.woff2') format('woff2');
}

:root {
  --azul: #002eff;
  --azul-claro: #5c7cff;   /* tinte del primario para texto sobre oscuro */
  --fuego: #ff3d00;
  --fuego-claro: #ff7a52;
  --verde: #41e8b4;

  --noche: #04060f;        /* casi negro con matiz kallfü */
  --noche-2: #070b1a;
  --bruma: rgba(255, 255, 255, 0.06);
  --linea: rgba(255, 255, 255, 0.10);
  --tinta: #f4f6ff;
  --tinta-2: rgba(244, 246, 255, 0.72);
  --tinta-3: rgba(244, 246, 255, 0.5);

  --display: 'Barlow Condensed', 'Barlow', sans-serif;
  --body: 'Barlow', sans-serif;

  --ancho: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-weight: 400;
  background: var(--noche);
  color: var(--tinta);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--azul); color: #fff; }

em { font-style: normal; color: var(--verde); }

/* --------------------------------------------------------------------------
   Lienzo Three.js + viñeta
   -------------------------------------------------------------------------- */
#cosmos {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 20%, transparent 40%, rgba(4, 6, 15, 0.55) 100%),
    linear-gradient(to bottom, rgba(4, 6, 15, 0.25), transparent 30%);
}

/* Cielo estático cuando no hay WebGL */
.no-webgl {
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, rgba(0, 46, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 35% 25% at 50% 40%, rgba(65, 232, 180, 0.10), transparent 70%),
    radial-gradient(circle 2px at 18% 22%, rgba(244,246,255,.7) 50%, transparent 51%),
    radial-gradient(circle 1.5px at 78% 14%, rgba(244,246,255,.5) 50%, transparent 51%),
    radial-gradient(circle 1.5px at 64% 66%, rgba(92,124,255,.6) 50%, transparent 51%),
    radial-gradient(circle 2px at 32% 78%, rgba(244,246,255,.4) 50%, transparent 51%),
    radial-gradient(circle 1.5px at 88% 52%, rgba(244,246,255,.55) 50%, transparent 51%),
    var(--noche);
  background-attachment: fixed;
}

.nav, main, .footer { position: relative; z-index: 2; }

/* --------------------------------------------------------------------------
   Navegación
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(4, 6, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--linea);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--tinta);
}
.nav__mark { width: 34px; height: 34px; color: var(--verde); }
.nav__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .22em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.nav__links a {
  color: var(--tinta-2);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .04em;
  transition: color .25s ease;
}
.nav__links a:hover { color: var(--tinta); }

.nav__cta {
  padding: .5rem 1.1rem;
  border: 1px solid var(--azul-claro);
  border-radius: 999px;
  color: var(--tinta) !important;
  transition: background .25s ease, border-color .25s ease;
}
.nav__cta:hover { background: var(--azul); border-color: var(--azul); }

/* Hamburguesa: solo visible en mobile */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--tinta);
  transition: transform .3s ease, opacity .3s ease;
}
.menu-open .nav__burger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-open .nav__burger span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

.kicker {
  font-family: var(--body);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 1.4rem;
}

.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 10.5rem);
  line-height: .92;
  letter-spacing: .02em;
  text-shadow: 0 0 80px rgba(0, 46, 255, 0.45);
}
.hero__title-accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--azul-claro);
}

.hero__sub {
  max-width: 40rem;
  margin: 1.8rem auto 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--tinta-2);
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.6rem;
}

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .03em;
  text-decoration: none;
  padding: .85rem 2rem;
  border-radius: 999px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn--primary {
  background: var(--azul);
  color: #fff;
  box-shadow: 0 0 32px rgba(0, 46, 255, 0.4);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 48px rgba(0, 46, 255, 0.65);
}
.btn--ghost {
  color: var(--tinta);
  border: 1px solid var(--linea);
  background: rgba(255, 255, 255, 0.03);
}
.btn--ghost:hover { border-color: var(--verde); color: var(--verde); }
.btn--big { font-size: 1.2rem; padding: 1.05rem 2.6rem; }

.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid var(--tinta-3);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--verde);
  animation: scrollhint 2.2s ease-in-out infinite;
}
@keyframes scrollhint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(6rem, 12vh, 9rem) 1.5rem;
}
.section__inner {
  max-width: var(--ancho);
  margin: 0 auto;
}

.section__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}

.section__lead {
  max-width: 44rem;
  color: var(--tinta-2);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
}
.section__lead p + p { margin-top: 1rem; }

/* Banda guemil entre secciones */
.guemil {
  height: 40px;
  color: var(--azul-claro);
  opacity: .28;
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.guemil svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   Pilares del lof
   -------------------------------------------------------------------------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 4rem;
}

.pillar {
  position: relative;
  padding: 2.2rem 1.9rem;
  border: 1px solid var(--linea);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.pillar:hover { transform: translateY(-6px); }

.pillar[data-tone="azul"]  { --tone: var(--azul-claro); }
.pillar[data-tone="verde"] { --tone: var(--verde); }
.pillar[data-tone="fuego"] { --tone: var(--fuego-claro); }

.pillar:hover {
  border-color: var(--tone);
  box-shadow: 0 18px 50px -18px color-mix(in srgb, var(--tone) 45%, transparent);
}

.pillar__icon {
  width: 52px; height: 52px;
  color: var(--tone);
  margin-bottom: 1.4rem;
}
.pillar__icon svg { width: 100%; height: 100%; }

.pillar__word {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--tone);
  margin-bottom: .5rem;
}

.pillar__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.8rem;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.pillar__tag {
  font-size: .92rem;
  font-weight: 500;
  color: var(--tinta-3);
  margin: .35rem 0 1rem;
}

.pillar__body {
  color: var(--tinta-2);
  font-size: .98rem;
  margin-bottom: 1.4rem;
}

.pillar__list {
  list-style: none;
  border-top: 1px solid var(--linea);
  padding-top: 1.1rem;
  display: grid;
  gap: .55rem;
}
.pillar__list li {
  position: relative;
  padding-left: 1.2rem;
  font-size: .92rem;
  color: var(--tinta-2);
}
.pillar__list li::before {
  content: '';
  position: absolute;
  left: 0; top: .52em;
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--tone);
}

/* --------------------------------------------------------------------------
   Servicios
   -------------------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 3.5rem;
}

.service {
  padding: 1.9rem 1.8rem;
  border: 1px solid var(--linea);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.service:hover {
  border-color: var(--azul-claro);
  background: rgba(0, 46, 255, 0.07);
  transform: translateY(-4px);
}

.service__num {
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .18em;
  color: var(--fuego-claro);
}

.service h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.55rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: .5rem 0 .55rem;
}

.service p {
  color: var(--tinta-2);
  font-size: .95rem;
}
.service__link { color: var(--verde); text-decoration: none; }
.service__link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   El camino (pasos)
   -------------------------------------------------------------------------- */
.steps {
  list-style: none;
  margin-top: 3.5rem;
  display: grid;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1.6rem;
  padding: 2.1rem 0;
  border-top: 1px solid var(--linea);
}
.step:last-child { border-bottom: 1px solid var(--linea); }

.step__num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--azul-claro);
  padding-top: .2rem;
}

.step__word {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: .3rem;
}

.step h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: .4rem;
}

.step p:last-child {
  color: var(--tinta-2);
  max-width: 38rem;
  font-size: .98rem;
}

/* --------------------------------------------------------------------------
   Contacto
   -------------------------------------------------------------------------- */
.section--contact {
  text-align: center;
  padding-bottom: clamp(7rem, 14vh, 11rem);
}
.section--contact .section__lead { margin: 0 auto; }
.contact__actions { margin-top: 2.6rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--linea);
  background: rgba(4, 6, 15, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.footer__inner {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 3.2rem 1.5rem 2.6rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--tinta-2);
  font-size: .95rem;
}
.footer__mark { width: 30px; height: 30px; color: var(--verde); flex: none; }

.footer__glossary {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2rem;
  margin: 1.8rem 0;
}
.footer__glossary div { display: flex; gap: .45rem; font-size: .88rem; }
.footer__glossary dt { color: var(--verde); font-weight: 600; }
.footer__glossary dt::after { content: ':'; color: var(--tinta-3); }
.footer__glossary dd { color: var(--tinta-3); }

.footer__note {
  font-size: .82rem;
  color: var(--tinta-3);
  max-width: 40rem;
}

/* --------------------------------------------------------------------------
   Página producto (/reservas-barberias)
   -------------------------------------------------------------------------- */
.hero__title--page {
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  line-height: .96;
}

.faq {
  margin-top: 3rem;
  display: grid;
  gap: .9rem;
  max-width: 52rem;
}
.faq details {
  border: 1px solid var(--linea);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 0;
  overflow: hidden;
  transition: border-color .3s ease;
}
.faq details[open] { border-color: var(--azul-claro); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 3rem 1.15rem 1.4rem;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--verde);
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p {
  padding: 0 1.4rem 1.3rem;
  color: var(--tinta-2);
  font-size: .97rem;
  max-width: 46rem;
}
.faq a { color: var(--verde); }

.contact__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer__link { color: var(--verde); text-decoration: none; }
.footer__link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.2, .7, .3, 1), transform .8s cubic-bezier(.2, .7, .3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* stagger dentro de grillas */
.pillars .reveal:nth-child(2), .services .reveal:nth-child(2) { transition-delay: .1s; }
.pillars .reveal:nth-child(3), .services .reveal:nth-child(3) { transition-delay: .2s; }
.services .reveal:nth-child(4) { transition-delay: .05s; }
.services .reveal:nth-child(5) { transition-delay: .15s; }
.services .reveal:nth-child(6) { transition-delay: .25s; }

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .pillars { grid-template-columns: 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav__burger { display: flex; }

  /* Panel desplegable bajo la barra */
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .6rem 1.25rem 1.4rem;
    background: rgba(4, 6, 15, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--linea);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
  }
  .menu-open .nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__links a {
    font-size: 1.1rem;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav__links a.nav__cta {
    margin-top: 1rem;
    text-align: center;
    border-bottom: none;
  }
  .nav.menu-open {
    background: rgba(4, 6, 15, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .services { grid-template-columns: 1fr; }
  .step { grid-template-columns: 56px 1fr; gap: 1.1rem; }
  .step__num { font-size: 2rem; }
  .hero__title { letter-spacing: .01em; }
}
