/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  /* Fondo oscuro cálido, nunca negro puro */
  --bg:      #0b0910;
  --bg-2:    #12101b;
  --panel:   #16131f;

  --ink:     #f4f1f8;
  --ink-2:   #cfc9dd;
  --mute:    #9089a6;

  /* Degradado violeta + coral */
  --grad-1:  #a26bff;   /* violeta */
  --grad-2:  #ff5e8a;   /* coral-rosa */
  --grad-3:  #ff8a5c;   /* coral cálido */
  --grad-4:  #6d5bff;   /* índigo */

  --accent:   #ff6b9d;  /* rosa-coral, CTAs */
  --accent-2: #a78bff;  /* violeta */

  --line:    rgba(244, 241, 248, 0.12);
  --line-2:  rgba(244, 241, 248, 0.06);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 76px;
  --pad: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1280px;
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-weight: 500; }
ol, ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #1a0d13; }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* Defensa: elementos con reveal + split nunca invisibles */
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   3. FONDO — degradado reactivo + grano
   ============================================================= */
.bg-gradient {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(circle 46vw at var(--mx, 30%) var(--my, 20%), rgba(162, 107, 255, 0.30), transparent 62%),
    radial-gradient(circle 42vw at calc(var(--mx, 70%) + 22%) calc(var(--my, 60%) + 8%), rgba(255, 94, 138, 0.24), transparent 62%),
    radial-gradient(circle 38vw at 80% 90%, rgba(255, 138, 92, 0.18), transparent 58%),
    radial-gradient(circle 44vw at 12% 88%, rgba(109, 91, 255, 0.20), transparent 62%),
    var(--bg);
  filter: saturate(122%);
  transition: background 0.5s var(--ease-soft);
}
.bg-grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =============================================================
   4. SPLASH
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .8s var(--ease-out), visibility .8s;
  animation: splashSafety .01s 4s forwards;
}
.splash-mark {
  font-size: 2.4rem; color: var(--accent);
  animation: splashPulse 1.4s var(--ease-soft) infinite;
}
.splash.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes splashPulse {
  0%, 100% { opacity: .4; transform: scale(.9) rotate(0deg); }
  50%      { opacity: 1;  transform: scale(1.1) rotate(180deg); }
}

/* =============================================================
   5. NAV
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-inline: var(--pad);
  transition: background .4s var(--ease-out), backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 9, 16, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line-2);
}
.nav-brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: baseline; gap: .28em;
}
.nav-brand-dot { color: var(--accent); font-size: .7em; }
.nav-links {
  display: none;
  gap: clamp(1rem, 2.2vw, 2.1rem);
  font-size: .92rem;
  color: var(--ink-2);
}
.nav-links a { position: relative; padding: .3rem 0; transition: color .3s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  display: none;
  padding: .62rem 1.2rem; border-radius: 100px;
  font-size: .9rem; font-weight: 500;
  color: #1a0d13;
  background: linear-gradient(120deg, var(--grad-1), var(--grad-2));
  transition: transform .3s var(--ease-out), box-shadow .3s;
  box-shadow: 0 6px 24px -8px rgba(255, 94, 138, 0.6);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(255, 94, 138, 0.7); }

.nav-burger {
  display: inline-flex; flex-direction: column; gap: 6px;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  border-radius: 12px;
}
.nav-burger span {
  display: block; width: 24px; height: 2px; border-radius: 2px;
  background: var(--ink); transition: transform .4s var(--ease-out), opacity .3s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* =============================================================
   6. MENÚ MÓVIL
   ============================================================= */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: center;
  gap: 1.5rem; padding: var(--pad);
  background: rgba(11, 9, 16, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), visibility .45s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu nav { display: flex; flex-direction: column; gap: .4rem; }
.mobile-menu nav a {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  color: var(--ink); padding: .3rem 0;
  transition: color .3s, transform .3s var(--ease-out);
}
.mobile-menu nav a:hover { color: var(--accent); transform: translateX(8px); }
.mobile-menu .btn { align-self: flex-start; margin-top: 1rem; }

/* =============================================================
   7. BOTONES
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: 100px;
  font-size: .98rem; font-weight: 500; line-height: 1;
  transition: transform .3s var(--ease-out), box-shadow .3s, background .3s, color .3s;
  white-space: nowrap;
}
.btn-primary {
  color: #1a0d13;
  background: linear-gradient(120deg, var(--grad-1), var(--grad-2) 55%, var(--grad-3));
  background-size: 160% 160%;
  box-shadow: 0 10px 34px -10px rgba(255, 94, 138, 0.6);
}
.btn-primary:hover {
  transform: translateY(-3px);
  background-position: 100% 100%;
  box-shadow: 0 18px 44px -12px rgba(255, 94, 138, 0.75);
}
.btn-primary:disabled {
  opacity: .6; cursor: default;
  transform: none; box-shadow: none;
}
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(244, 241, 248, 0.02);
}
.btn-ghost:hover { border-color: var(--accent-2); transform: translateY(-3px); color: #fff; }
.btn-full { width: 100%; justify-content: center; }
.btn-big { padding: 1.05rem 2rem; font-size: 1.05rem; }
.btn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #1a0d13;
  box-shadow: 0 0 0 0 rgba(26, 13, 19, .5);
  animation: btnDot 2s infinite;
}
@keyframes btnDot {
  0%   { box-shadow: 0 0 0 0 rgba(26, 13, 19, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(26, 13, 19, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 13, 19, 0); }
}

/* =============================================================
   8. LAYOUT DE SECCIONES
   ============================================================= */
.section {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4.5rem, 11vw, 9rem) var(--pad);
  position: relative;
}
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.kicker {
  font-family: var(--mono);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .22em;
  color: var(--accent-2);
  margin-bottom: 1.1rem;
  display: inline-flex; align-items: center; gap: .6rem;
}
.kicker::before {
  content: ""; width: 26px; height: 1px; background: var(--accent-2); display: inline-block;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 500; line-height: 1.02;
  max-width: 20ch;
}
.section-title em, .hero-title em {
  font-style: italic;
  background: linear-gradient(105deg, var(--grad-1), var(--grad-2), var(--grad-3));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* =============================================================
   9. HERO
   ============================================================= */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--maxw); margin-inline: auto;
  padding: calc(var(--nav-h) + 2rem) var(--pad) 3rem;
  position: relative;
}
.hero-inner { max-width: 18ch; }
.hero .hero-inner { max-width: min(920px, 100%); }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.7rem, 9vw, 6.4rem);
  font-weight: 500; line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 15ch;
  margin-bottom: 1.6rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--ink-2);
  max-width: 46ch; line-height: 1.55;
  margin-bottom: 2.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: var(--pad);
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--mute);
}
.hero-scroll-line {
  width: 54px; height: 1px; background: var(--line); position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: var(--accent); animation: scrollLine 2.2s var(--ease-soft) infinite;
}
@keyframes scrollLine {
  0% { transform: translateX(-100%); } 100% { transform: translateX(260%); }
}

/* =============================================================
   10. CÓMO — pasos
   ============================================================= */
.steps {
  display: grid; gap: 1.2rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}
.step {
  padding: 2rem 1.8rem;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(244,241,248,.03), rgba(244,241,248,.005));
  position: relative; overflow: hidden;
  transition: transform .4s var(--ease-out), border-color .4s, background .4s;
}
.step:hover { transform: translateY(-6px); border-color: var(--line); }
.step-num {
  font-family: var(--mono); font-size: .85rem; color: var(--accent);
  display: block; margin-bottom: 1.4rem; letter-spacing: .1em;
}
.step h3 { font-family: var(--serif); font-size: 1.55rem; margin-bottom: .7rem; }
.step p { color: var(--mute); }
.step::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2), var(--grad-3));
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
.step:hover::before { transform: scaleX(1); }

/* =============================================================
   11. VENTAJAS
   ============================================================= */
.advantages {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
.adv {
  padding: 1.8rem;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: rgba(244, 241, 248, 0.015);
  transition: transform .4s var(--ease-out), border-color .4s, background .4s;
}
.adv:hover { transform: translateY(-5px); border-color: var(--line); background: rgba(244,241,248,.03); }
.adv-icon { font-size: 1.9rem; display: block; margin-bottom: 1rem; }
.adv h3 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: .55rem; }
.adv p { color: var(--mute); font-size: .96rem; }

/* =============================================================
   12. PLACEHOLDERS (nosotras / tarifas)
   ============================================================= */
.placeholder-block {
  border: 1px dashed var(--line);
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 3.5rem);
  max-width: 60ch;
  background: rgba(244, 241, 248, 0.01);
}
.placeholder-block p { color: var(--ink-2); font-size: 1.1rem; margin-bottom: 1rem; }
.placeholder-tag {
  display: inline-block; margin-bottom: 1.3rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-2);
  padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 100px;
}
.placeholder-note {
  font-family: var(--mono); font-size: .8rem !important; color: var(--mute) !important;
  margin-top: .5rem;
}
.placeholder-note code {
  background: rgba(167, 139, 255, .12); color: var(--accent-2);
  padding: .1rem .4rem; border-radius: 5px; font-size: .95em;
}

/* =============================================================
   13. TRABAJOS
   ============================================================= */
.works { border-top: 1px solid var(--line-2); }
.work { border-bottom: 1px solid var(--line-2); }
.work a, .work.work-empty {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 1.2rem;
  padding: 1.5rem .3rem;
  transition: padding .4s var(--ease-out), color .3s;
}
.work a:hover { padding-left: 1.2rem; padding-right: 1.2rem; }
.work-index { font-family: var(--mono); font-size: .82rem; color: var(--mute); }
.work-name {
  font-family: var(--serif); font-size: clamp(1.4rem, 4vw, 2.2rem);
  transition: color .3s;
}
.work a:hover .work-name {
  background: linear-gradient(105deg, var(--grad-1), var(--grad-2), var(--grad-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.work-tag { font-family: var(--mono); font-size: .78rem; color: var(--mute); letter-spacing: .08em; }
.work-arrow { font-size: 1.4rem; color: var(--accent); transform: translateX(-6px); opacity: 0; transition: all .3s var(--ease-out); }
.work a:hover .work-arrow { transform: none; opacity: 1; }
.work-empty { color: var(--mute); opacity: .6; }
.work-empty .work-name { font-style: italic; }

.reviews {
  display: grid; gap: 1.2rem; grid-template-columns: 1fr;
  margin-top: 3rem;
}
.review {
  padding: 1.8rem; border: 1px solid var(--line-2); border-radius: 18px;
  background: rgba(244, 241, 248, 0.015); position: relative;
}
.review blockquote {
  font-family: var(--serif); font-size: 1.2rem; font-style: italic;
  color: var(--ink-2); line-height: 1.4; margin-bottom: 1rem;
}
.review figcaption { font-family: var(--mono); font-size: .8rem; color: var(--accent-2); }

/* =============================================================
   14. CONTACTO
   ============================================================= */
.contact-grid { display: flex; flex-direction: column; gap: 2.2rem; align-items: flex-start; }
.contact-big {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 6.5vw, 3.4rem);
  font-weight: 500; letter-spacing: -0.02em;
  position: relative; display: inline-block; word-break: break-word;
}
.contact-big::after {
  content: ""; position: absolute; left: 0; bottom: -.1em; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2), var(--grad-3));
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
.contact-big:hover::after { transform: scaleX(1); }
.contact-list { display: flex; flex-wrap: wrap; gap: 1rem; }
.contact-item {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.1rem 1.5rem; border: 1px solid var(--line-2); border-radius: 16px;
  background: rgba(244,241,248,.015); min-width: 160px;
  transition: transform .3s var(--ease-out), border-color .3s;
}
.contact-item:hover { transform: translateY(-4px); border-color: var(--accent-2); }
.contact-item-label { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--mute); }
.contact-item-value { font-size: 1.1rem; color: var(--ink); }

/* =============================================================
   15. FOOTER
   ============================================================= */
.footer {
  max-width: var(--maxw); margin-inline: auto;
  padding: 2.5rem var(--pad);
  border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  font-size: .88rem; color: var(--mute);
}
.footer-brand { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }
.footer-top { transition: color .3s; }
.footer-top:hover { color: var(--accent); }

/* =============================================================
   16. MODAL FORMULARIO
   ============================================================= */
.lead-dialog {
  border: 0; padding: 0; background: transparent;
  max-width: 460px; width: calc(100% - 2rem);
  color: var(--ink);
  margin: auto;
}
.lead-dialog::backdrop { background: rgba(6, 4, 10, 0.72); backdrop-filter: blur(6px); }
.lead-dialog[open] { animation: dlgIn .4s var(--ease-out); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.lead-form {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.8rem, 5vw, 2.6rem);
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8);
}
.lead-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--mute);
  border: 1px solid var(--line-2); transition: color .3s, border-color .3s;
}
.lead-close:hover { color: var(--ink); border-color: var(--line); }
.lead-title { font-family: var(--serif); font-size: 2rem; margin-bottom: .1rem; }
.lead-desc { color: var(--mute); font-size: .95rem; margin-bottom: .5rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field span { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.field input {
  font: inherit; color: var(--ink);
  padding: .8rem 1rem; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(244,241,248,.03);
  transition: border-color .3s, background .3s;
}
.field input::placeholder { color: var(--mute); }
.field input:focus { outline: none; border-color: var(--accent-2); background: rgba(244,241,248,.05); }
.lead-form .btn-full { margin-top: .6rem; }
.lead-success {
  font-size: .95rem; color: #7dffb0; text-align: center; margin-top: .3rem;
}

/* =============================================================
   17. REVEAL (animación de entrada)
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* split words */
.split-word { display: inline-block; }
.hero-title .split-word, .section-title .split-word {
  opacity: 0; transform: translateY(0.5em) rotate(2deg);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.is-visible .split-word { opacity: 1; transform: none; }

/* =============================================================
   18. RESPONSIVE
   ============================================================= */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .advantages { grid-template-columns: repeat(2, 1fr); }
  .adv-wide { grid-column: 1 / -1; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }
  .mobile-menu { display: none; }
  .advantages { grid-template-columns: repeat(3, 1fr); }
  .adv-wide { grid-column: span 3; display: flex; align-items: center; gap: 2rem; }
  .adv-wide .adv-icon { margin-bottom: 0; }
  .adv-wide h3 { margin-bottom: .3rem; }
}
@media (min-width: 1280px) {
  .advantages { grid-template-columns: repeat(4, 1fr); }
  .adv-wide { grid-column: span 4; }
}

/* =============================================================
   19. REDUCED MOTION — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .splash-mark { animation: none; }
  .btn-dot { animation: none; }
  .hero-scroll-line::after { animation: none; }
  .bg-gradient { transition: none; }
}
