/* =========================================================
   Solsticio Estudios – Hoja de estilos
   Basada en el Manual de Identidad v1.0
   ========================================================= */

:root {
  /* Color */
  --se-navy-950: #0A0F33;
  --se-navy-900: #111850;
  --se-navy-800: #1B2566;
  --se-indigo-600: #2D3A8C;
  --se-cyan-400: #5FC3E0;
  --se-cyan-300: #7FD3EA;
  --se-cyan-500: #38B6E8;
  --se-violet-500: #5B4DB3;
  --se-lavender-100: #E6E3F8;
  --se-white: #FFFFFF;
  --se-muted: #C3CBEE;
  --se-line: rgba(255, 255, 255, 0.12);
  --se-panel: rgba(255, 255, 255, 0.05);

  /* Tipografía */
  --se-font: 'Montserrat', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Forma */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --r-pill: 999px;

  /* Efectos */
  --se-glow: 0 0 32px rgba(95, 195, 224, 0.25);
  --se-shadow: 0 16px 40px rgba(5, 8, 30, 0.45);

  --header-h: 88px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--se-font);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--se-white);
  background: linear-gradient(180deg, var(--se-navy-900) 0%, var(--se-navy-800) 45%, var(--se-navy-900) 100%);
  background-color: var(--se-navy-900);
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--se-white);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--se-white);
  color: var(--se-navy-950);
  font-weight: 700;
  border-radius: var(--r-sm);
}
.skip:focus { top: 12px; }

/* Textura de estrellas */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 14%, rgba(255,255,255,.75), transparent),
    radial-gradient(1px 1px at 22% 62%, rgba(95,195,224,.8), transparent),
    radial-gradient(2px 2px at 36% 28%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 47% 84%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 58% 10%, rgba(95,195,224,.7), transparent),
    radial-gradient(1px 1px at 69% 48%, rgba(255,255,255,.55), transparent),
    radial-gradient(2px 2px at 78% 76%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 88% 22%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.5px 1.5px at 94% 58%, rgba(95,195,224,.6), transparent),
    radial-gradient(1px 1px at 14% 90%, rgba(255,255,255,.5), transparent);
}

main, .site-footer { position: relative; z-index: 1; }

/* =========================================================
   Tipografía
   ========================================================= */
.display,
.title {
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.08;
  letter-spacing: -0.005em;
}

.display {
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.08;
  letter-spacing: -0.005em;
  font-size: clamp(1.6rem, 3.6vw, 3.1rem);
  overflow-wrap: normal;
  hyphens: none;
}

.display span {
  display: block;
  text-wrap: balance;
}

.title {
  font-size: clamp(1.7rem, 3.6vw, 2.75rem);
  max-width: 22ch;
}
.title span { display: inline; }

.accent { color: var(--se-cyan-400); }

.lead {
  margin-top: 24px;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 600;
  line-height: 1.55;
  color: var(--se-muted);
}

.intro {
  margin-top: 16px;
  max-width: 56ch;
  color: var(--se-muted);
}

/* =========================================================
   Botones y enlaces
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.btn--primary {
  background: var(--se-cyan-400);
  color: var(--se-navy-950);
}
.btn--primary:hover {
  background: var(--se-cyan-300);
  box-shadow: var(--se-glow);
}
.btn--ghost {
  border-color: var(--se-cyan-400);
  color: var(--se-white);
  background: transparent;
}
.btn--ghost:hover { background: rgba(95, 195, 224, 0.12); }
.btn--block { width: 100%; }

.link {
  display: inline-block;
  margin-top: auto;
  padding-top: 20px;
  font-weight: 700;
  color: var(--se-cyan-400);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.link:hover { border-bottom-color: var(--se-cyan-400); }

/* =========================================================
   Cabecera y navegación
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(10, 15, 51, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-header.is-scrolled {
  background: rgba(10, 15, 51, 0.92);
  border-bottom-color: var(--se-line);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; color: var(--se-white); }
.logo { width: 92px; height: auto; aspect-ratio: 2343 / 1793; display: block; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { display: flex; gap: 28px; }
.nav__list a {
  position: relative;
  padding: 6px 0;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--se-muted);
  transition: color .2s ease;
}
.nav__list a:hover,
.nav__list a[aria-current="true"] { color: var(--se-white); }
.nav__list a[aria-current="true"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--se-cyan-400);
  border-radius: 2px;
}

.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--se-white);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='420' fill='none' stroke='%236F7BD6' stroke-opacity='.4' stroke-width='1.5'%3E%3Cpath d='M0 120h150l40 40h130'/%3E%3Ccircle cx='328' cy='160' r='6'/%3E%3Cpath d='M640 310H450l-50-50h-90'/%3E%3Ccircle cx='302' cy='260' r='6'/%3E%3Cpath d='M90 420v-90l40-40'/%3E%3Ccircle cx='135' cy='284' r='6'/%3E%3C/svg%3E") left bottom / 640px 420px no-repeat,
    radial-gradient(circle at 15% 90%, rgba(95, 195, 224, 0.16), transparent 50%),
    radial-gradient(circle at 90% 10%, rgba(91, 77, 179, 0.28), transparent 45%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}
.hero__copy,
.chat { min-width: 0; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* ---------- Demo de chat ---------- */
.chat {
  display: flex;
  flex-direction: column;
  background: rgba(10, 15, 51, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--se-line);
  border-radius: var(--r-lg);
  box-shadow: var(--se-shadow);
  overflow: hidden;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--se-line);
  background: rgba(255, 255, 255, 0.04);
}
.chat__avatar {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--se-indigo-600);
  overflow: hidden;
}
.chat__avatar { position: relative; }
.chat__avatar img {
  position: absolute;
  left: -5%;
  top: 17.5%;
  width: 115%;
  height: 115%;
  max-width: none;
  display: block;
}
.chat__who { display: flex; flex-direction: column; line-height: 1.3; }
.chat__who strong { font-weight: 700; }
.chat__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--se-muted);
}
.chat__status::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3DDC97;
}

.chat__log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 340px;
  padding: 20px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.msg {
  max-width: 86%;
  padding: 12px 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  border-radius: 18px 18px 18px 4px;
  background: rgba(255, 255, 255, 0.09);
  animation: msg-in .28s ease-out both;
}
.msg--user {
  align-self: flex-end;
  background: var(--se-cyan-400);
  color: var(--se-navy-950);
  font-weight: 600;
  border-radius: 18px 18px 4px 18px;
}
.msg--typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.msg--typing i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--se-muted);
  animation: blink 1s infinite ease-in-out;
}
.msg--typing i:nth-child(2) { animation-delay: .15s; }
.msg--typing i:nth-child(3) { animation-delay: .3s; }

.chat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  padding: 4px 20px 16px;
}
.chip {
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--se-white);
  text-decoration: none;
  background: transparent;
  border: 1.5px solid var(--se-cyan-400);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color .2s ease;
}
.chip:hover { background: rgba(95, 195, 224, 0.15); }
.chip--solid { background: var(--se-cyan-400); color: var(--se-navy-950); }
.chip--solid:hover { background: var(--se-cyan-300); }

.chat__note {
  padding: 12px 20px 16px;
  font-size: 0.8rem;
  color: var(--se-muted);
  border-top: 1px solid var(--se-line);
}
.chat__note a { color: var(--se-cyan-400); font-weight: 700; }

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes blink {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* =========================================================
   Secciones
   ========================================================= */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--deep { background: rgba(10, 15, 51, 0.55); }

.section .title + .intro,
.section .title + .services,
.section .title + .steps { margin-top: 20px; }
.section .intro + .plans { margin-top: 44px; }
.section .title + .services { margin-top: 48px; }
.section .title + .steps { margin-top: 56px; }

/* ---------- Servicios ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--se-panel);
  border: 1px solid var(--se-line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.service {
  display: flex;
  flex-direction: column;
  padding: 40px 36px;
}
.service + .service { border-left: 1px solid var(--se-line); }
.icon {
  width: 52px; height: 52px;
  margin-bottom: 24px;
  fill: none;
  stroke: var(--se-cyan-500);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service h3, .plan h3, .step h3 {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
}
.service > p { margin-top: 12px; color: var(--se-muted); }

.ticks { margin-top: 20px; display: grid; gap: 10px; }
.ticks li {
  position: relative;
  padding-left: 28px;
  font-size: 0.94rem;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px; top: .38em;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--se-cyan-400);
  border-bottom: 2.5px solid var(--se-cyan-400);
  transform: rotate(-45deg);
}

/* ---------- Planes ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 36px 32px 32px;
  background: var(--se-panel);
  border: 1px solid var(--se-line);
  border-radius: var(--r-md);
}
.price { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.price__num { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.price__per, .price__from { font-size: 0.9rem; font-weight: 600; color: var(--se-muted); }
.plan__for { margin-top: 10px; color: var(--se-muted); font-size: 0.94rem; }
.plan .ticks { margin: 24px 0 32px; }
.plan .btn { margin-top: auto; }

/* ---------- Proceso ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.step { position: relative; }
.step__n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 20px;
  font-weight: 800;
  color: var(--se-cyan-400);
  background: var(--se-navy-800);
  border: 2px solid var(--se-cyan-400);
  border-radius: 50%;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 21px;
  left: 56px;
  right: -16px;
  height: 2px;
  background: linear-gradient(90deg, rgba(95,195,224,.6), rgba(95,195,224,.1));
}
.step p { margin-top: 8px; color: var(--se-muted); font-size: 0.95rem; max-width: 26ch; }

/* ---------- Nosotros ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}
.about__art {
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 40%, rgba(95, 195, 224, 0.2), transparent 65%),
    var(--se-panel);
  border: 1px solid var(--se-line);
  border-radius: var(--r-lg);
}
.about__art img {
  display: block;
  width: min(100%, 340px);
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(5, 8, 30, 0.45));
}
.about__copy p { margin-top: 20px; max-width: 58ch; color: var(--se-muted); font-size: 1.05rem; }
.pillars { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.pillars li {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1.5px solid var(--se-cyan-400);
  border-radius: var(--r-pill);
}

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact__list { margin-top: 36px; display: grid; gap: 22px; }
.contact__list dt { font-size: 0.86rem; font-weight: 600; color: var(--se-muted); }
.contact__list dd { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.contact__list a { text-decoration: none; }
.contact__list a:hover { color: var(--se-cyan-400); }

.social { margin-top: 32px; display: flex; gap: 12px; }
.social a {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  color: var(--se-navy-900);
  background: var(--se-white);
  border-radius: 50%;
  transition: background-color .2s ease;
}
.social a:hover { background: var(--se-cyan-400); }
.social svg { width: 24px; height: 24px; fill: currentColor; }

.form {
  padding: clamp(24px, 4vw, 40px);
  background: var(--se-panel);
  border: 1px solid var(--se-line);
  border-radius: var(--r-lg);
  box-shadow: var(--se-shadow);
}
.form__title { font-size: 1.35rem; font-weight: 800; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 700; }
.optional { font-weight: 500; color: var(--se-muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--se-white);
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-sm);
  transition: border-color .2s ease, background-color .2s ease;
}
.field select option { color: var(--se-navy-950); }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--se-cyan-400);
  background: rgba(255, 255, 255, 0.1);
}
.field.has-error input,
.field.has-error select { border-color: #FF6B7A; }
.field__error { min-height: 0; margin-top: 6px; font-size: 0.85rem; font-weight: 600; color: #FF9AA5; }
.form__note { margin-top: 14px; font-size: 0.85rem; color: var(--se-muted); text-align: center; }

/* =========================================================
   Pie y botón flotante
   ========================================================= */
.site-footer {
  padding: 56px 0 40px;
  background: var(--se-navy-950);
  border-top: 1px solid var(--se-line);
}
.footer__inner { display: grid; gap: 20px; justify-items: start; }
.logo--footer { width: 140px; }
.site-footer p { color: var(--se-muted); font-size: 0.92rem; }
.footer__copy { font-size: 0.82rem; }

.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 14px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--se-navy-950);
  background: var(--se-cyan-400);
  border-radius: var(--r-pill);
  box-shadow: var(--se-shadow), var(--se-glow);
  transition: background-color .2s ease, transform .2s ease;
}
.wa-float:hover { background: var(--se-cyan-300); transform: translateY(-2px); }
.wa-float svg { width: 26px; height: 26px; fill: currentColor; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .plans { grid-template-columns: 1fr; max-width: 560px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .step:nth-child(2)::after { display: none; }
}

@media (max-width: 900px) {
  .burger { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 16px 24px 28px;
    background: var(--se-navy-950);
    border-bottom: 1px solid var(--se-line);
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { display: block; padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--se-line); }
  .nav__list a[aria-current="true"]::after { display: none; }
  .nav__list a[aria-current="true"] { color: var(--se-cyan-400); }

  .hero__grid,
  .about,
  .contact { grid-template-columns: 1fr; }

  .services { grid-template-columns: 1fr; }
  .service + .service { border-left: 0; border-top: 1px solid var(--se-line); }

  .about__art { max-width: 320px; }
  .display { font-size: clamp(1.4rem, 7vw, 3.2rem); }
}

@media (max-width: 600px) {
  .container { width: min(1200px, 100% - 32px); }
  .hero__actions .btn { width: 100%; }
  .service { padding: 32px 24px; }
  .chat__log { min-height: 260px; max-height: 300px; }
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .step { padding-bottom: 32px; }
  .step:not(:last-child)::after {
    top: 52px; bottom: 8px; left: 21px; right: auto;
    width: 2px; height: auto;
    background: linear-gradient(180deg, rgba(95,195,224,.6), rgba(95,195,224,.1));
  }
  .step:nth-child(2)::after { display: block; }
  .step__n { margin-bottom: 14px; }
  .step p { max-width: none; }
  .wa-float { padding: 15px; }
  .wa-float span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .chat__log { scroll-behavior: auto; }
}
