/* =============================================================
   Diego Meléndez — estilos (edición oscura ejecutiva)
   1. Variables  2. Base  3. Utilidades  4. Botones  5. Navegación
   6. Auras  7. Portada  8. Secciones  9. Efectos
   10. Pantallas grandes  11. Movimiento reducido
   ============================================================= */

/* =============================================================
   1. Variables
   ============================================================= */
:root {
  color-scheme: dark;

  --bg: #07090f;              /* negro azulado, como el fondo de estudio */
  --surface: #121927;
  --surface-2: #0c111b;
  --text: #f2ead9;            /* crema */
  --text-soft: #b8b0a0;
  --text-mute: #8f897b;
  --line: rgba(214, 177, 106, .18);
  --line-soft: rgba(242, 234, 217, .08);

  --gold: #d6b16a;            /* champaña */
  --gold-light: #f1d99a;
  --gold-deep: #9c7536;
  --gold-grad: linear-gradient(135deg, #f7e7b8 0%, #dcb86f 30%, #b08843 58%, #e6cb8b 82%, #f7e7b8 100%);
  --gold-text: linear-gradient(100deg, #f7e7b8 0%, #e2c27c 35%, #c39a52 65%, #f1d99a 100%);

  --wa: #25d366;
  --wa-dark-bubble: #005c4b;  /* burbuja de WhatsApp en modo oscuro */
  --tick-blue: #53bdeb;

  --card-border: linear-gradient(145deg, rgba(241, 217, 154, .5), rgba(214, 177, 106, .07) 32%, rgba(214, 177, 106, .05) 68%, rgba(241, 217, 154, .32));
  --card-fill: linear-gradient(180deg, #131a28 0%, #0b1019 100%);
  --card-shadow: 0 50px 90px -50px rgba(0, 0, 0, .9), 0 20px 40px -30px rgba(0, 0, 0, .6);

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.25, .46, .45, .94);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);

  --gutter: clamp(1.25rem, 4vw, 2rem);
  --container: 1180px;
  --nav-h: 64px;
  --section-pad: clamp(3.75rem, 2.5rem + 5vw, 7rem);
}

/* =============================================================
   2. Base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Textura fina de papel/película sobre toda la página */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Todas las auras quedan detrás de todo el contenido */
main { overflow-x: clip; isolation: isolate; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
  text-wrap: balance;
}

::selection { background: var(--gold); color: #0a0d14; }

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 10px;
}

/* =============================================================
   3. Utilidades
   ============================================================= */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 100;
  padding: .7rem 1.1rem; border-radius: 12px;
  background: var(--gold); color: #0a0d14; font-weight: 600;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* Palabra destacada: itálica serif en oro */
.gold-i,
.hl {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .06em;
}

/* Vidrio oscuro: fondo sólido primero, desenfoque solo si el navegador lo soporta */
.glass {
  background: rgba(14, 19, 31, .92);
  border: 1px solid rgba(214, 177, 106, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 50px -26px rgba(0, 0, 0, .85);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(14, 19, 31, .62);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
  }
}

/* Tarjeta ejecutiva: relleno oscuro y borde en degradado dorado */
.card-glass {
  border: 1px solid transparent;
  border-radius: 30px;
  background: var(--card-fill) padding-box, var(--card-border) border-box;
  box-shadow: var(--card-shadow);
}

/* Luz dorada que sigue al cursor sobre las tarjetas (main.js pone --mx/--my) */
[data-spot] { position: relative; isolation: isolate; }
[data-spot]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, -30%), rgba(214, 177, 106, .12), transparent 62%);
  opacity: 0;
  transition: opacity .6s var(--ease-out);
}
[data-spot]:hover::before { opacity: 1; }
[data-spot] > * { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .38rem .95rem .38rem .8rem;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--gold-light);
  background: rgba(214, 177, 106, .06);
  border: 1px solid var(--line);
}
.eyebrow::before {
  content: "";
  width: .42rem; height: .42rem; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 177, 106, .15), 0 0 12px rgba(241, 217, 154, .8);
}

/* =============================================================
   4. Botones
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 48px;
  padding: .45rem 1.3rem .45rem .5rem;
  border: 1px solid rgba(255, 244, 214, .35);
  border-radius: 999px;
  background: var(--gold-grad);
  background-size: 220% 100%;
  background-position: 0% 50%;
  color: #0a0d14;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 14px 34px -14px rgba(214, 177, 106, .6),
    0 2px 4px rgba(0, 0, 0, .3);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background-position 1.1s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #0a0d14;
  color: var(--wa);
  box-shadow: 0 0 0 1px rgba(10, 13, 20, .2);
}
.btn-icon svg { width: 19px; height: 19px; }

.btn-arrow { width: 18px; height: 18px; flex: none; transition: transform .45s var(--ease-out); }

.btn--lg { min-height: 60px; gap: .85rem; padding: .55rem 1.55rem .55rem .6rem; font-size: 1.0625rem; }
.btn--lg .btn-icon { width: 46px; height: 46px; }
.btn--lg .btn-icon svg { width: 25px; height: 25px; }

.btn--sm { min-height: 44px; gap: .55rem; padding: .3rem 1rem .3rem .35rem; font-size: .9375rem; }
.btn--sm .btn-icon { width: 32px; height: 32px; }
.btn--sm .btn-icon svg { width: 18px; height: 18px; }

/* Botón secundario (demo): contorno dorado */
.btn--coral {
  padding-inline: 1.7rem 1.4rem;
  background: rgba(214, 177, 106, .06);
  border-color: rgba(214, 177, 106, .6);
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(214, 177, 106, .08), 0 14px 30px -18px rgba(214, 177, 106, .45);
}

.btn--block { width: 100%; }

/* Botón magnético (solo con mouse) */
.has-magnetic { position: relative; isolation: isolate; }
.magnetic-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: inherit;
  will-change: transform;
}

/* =============================================================
   5. Navegación
   ============================================================= */
.site-header {
  position: fixed;
  top: 12px; left: 0; right: 0;
  z-index: 50;
  padding-inline: 12px;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--container);
  height: var(--nav-h);
  margin-inline: auto;
  padding: 0 .5rem 0 .6rem;
  border-radius: 999px;
  transition: box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
}
.site-header.is-scrolled .nav {
  border-color: rgba(214, 177, 106, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 50px -20px rgba(0, 0, 0, .9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  margin-right: auto;
  padding-right: .25rem;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand-mark { width: 36px; height: 36px; flex: none; }

/* Foto en la barra: lo primero que ve el cliente */
.brand-photo {
  position: relative;
  flex: none;
  width: 46px; height: 46px;
}
.brand-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #0d121d;
  box-shadow:
    0 0 0 1.5px rgba(214, 177, 106, .85),
    0 0 0 5px rgba(214, 177, 106, .1),
    0 0 22px -2px rgba(214, 177, 106, .5);
}
.brand-photo .live-dot {
  position: absolute;
  right: -1px; bottom: 0;
  width: 13px; height: 13px;
  border: 2.5px solid #0d121d;
}

.nav-links { display: none; }
.nav-links a {
  position: relative;
  padding: .5rem 0;
  white-space: nowrap;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color .3s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-soft);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav-cta { display: none; }

/* Menú del celular (details/summary) */
.nav-menu { position: static; }
.nav-toggle {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(214, 177, 106, .08);
  border: 1px solid rgba(214, 177, 106, .4);
  color: var(--gold-light);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle-icon { position: relative; width: 18px; height: 12px; }
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .35s var(--ease-out), top .35s var(--ease-out);
}
.nav-toggle-icon::before { top: 2px; }
.nav-toggle-icon::after { top: 9px; }
.nav-menu[open] .nav-toggle-icon::before { top: 5.5px; transform: rotate(45deg); }
.nav-menu[open] .nav-toggle-icon::after { top: 5.5px; transform: rotate(-45deg); }

.nav .nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  padding: .6rem .6rem .75rem;
  border: 1px solid rgba(214, 177, 106, .28);
  border-radius: 28px;
  background: #0d121d; /* sólido: el menú debe leerse sobre cualquier fondo */
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .95);
}
.nav-menu[open] .nav-panel { animation: panel-in .45s var(--ease-out); }
.nav-panel ul { margin-bottom: .6rem; }
.nav-panel li + li { border-top: 1px solid var(--line-soft); }
.nav-panel li a {
  display: block;
  padding: .85rem .9rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -.005em;
  color: var(--text);
}

@keyframes panel-in {
  from { transform: translateY(-10px) scale(.97); clip-path: inset(0 0 100% 0 round 28px); }
  to { clip-path: inset(0 0 0 0 round 28px); }
}

/* =============================================================
   6. Auras (luz dorada y azul noche)
   ============================================================= */
.mesh {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.mesh::before {
  content: "";
  position: absolute;
  inset: -18% -12%;
}

.mesh--hero::before {
  background:
    radial-gradient(30% 36% at 78% 42%, rgba(214, 177, 106, .24), transparent 70%),
    radial-gradient(42% 42% at 14% 10%, rgba(38, 64, 128, .42), transparent 70%),
    radial-gradient(26% 26% at 62% 76%, rgba(214, 177, 106, .1), transparent 70%);
  animation: mesh-drift 30s var(--ease-soft) infinite alternate;
}
.mesh--services::before {
  background:
    radial-gradient(30% 30% at 10% 70%, rgba(38, 64, 128, .32), transparent 70%),
    radial-gradient(30% 28% at 90% 28%, rgba(214, 177, 106, .12), transparent 70%);
}
.mesh--demo::before {
  background:
    radial-gradient(36% 42% at 78% 50%, rgba(214, 177, 106, .18), transparent 70%),
    radial-gradient(34% 40% at 16% 40%, rgba(38, 64, 128, .3), transparent 70%);
}
.mesh--process::before {
  background: radial-gradient(30% 40% at 6% 60%, rgba(38, 64, 128, .3), transparent 70%);
}
.mesh--about::before {
  background:
    radial-gradient(34% 44% at 22% 50%, rgba(214, 177, 106, .16), transparent 70%),
    radial-gradient(30% 40% at 88% 30%, rgba(38, 64, 128, .3), transparent 70%);
}
.mesh--contact::before {
  background:
    radial-gradient(34% 48% at 50% 58%, rgba(214, 177, 106, .2), transparent 70%),
    radial-gradient(30% 44% at 16% 40%, rgba(38, 64, 128, .35), transparent 70%),
    radial-gradient(30% 44% at 86% 42%, rgba(38, 64, 128, .3), transparent 70%);
  animation: mesh-drift 26s var(--ease-soft) infinite alternate;
}

@keyframes mesh-drift {
  to { transform: translate3d(-3%, 2.5%, 0) rotate(7deg) scale(1.08); }
}

/* =============================================================
   7. Portada
   ============================================================= */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 12px + clamp(2.25rem, 1.5rem + 4vw, 4.5rem)) 0 clamp(3rem, 2rem + 5vw, 6rem);
}

/* Retícula fina tipo plano técnico, difuminada hacia los bordes */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(214, 177, 106, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 177, 106, .07) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 72% 45%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 72% 45%, #000 10%, transparent 75%);
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  align-items: center;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 1.55rem + 5.4vw, 5.9rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.012em;
}

/* "24 horas": itálica dorada con un hilo de oro que se dibuja debajo */
.hl {
  position: relative;
  display: inline-block;
  padding-right: .03em;
  margin-right: -.06em;
  white-space: nowrap;
  filter: drop-shadow(0 0 26px rgba(214, 177, 106, .32));
}
.hl::after {
  content: "";
  position: absolute;
  left: .04em; right: .08em; bottom: .04em;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 18%, var(--gold-light) 50%, var(--gold) 82%, transparent);
  animation: swash 1.4s .4s var(--ease-out) both;
}
@keyframes swash {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.hero-sub {
  max-width: 34rem;
  margin: clamp(1.4rem, 1.1rem + 1vw, 2rem) 0 clamp(1.9rem, 1.6rem + 1vw, 2.5rem);
  font-size: clamp(1.075rem, 1rem + .4vw, 1.28rem);
  line-height: 1.6;
  color: var(--text-soft);
}

.hero-visual {
  width: min(100%, 540px);
  margin-inline: auto;
}

.dial-wrap {
  position: relative;
  padding: 8% 6% 10%;
  animation: float 7s var(--ease-soft) infinite alternate;
}
/* Aura dorada detrás del reloj */
.dial-wrap::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 177, 106, .28), transparent 64%);
  filter: blur(30px);
  pointer-events: none;
}

.dial {
  /* Colores del atardecer (valor por defecto sin JavaScript) */
  --sky-a: #f59a86; --sky-b: #ffd9a3;
  --sea-a: #2e7f99; --sea-b: #173c5f;
  --sierra: #8c7ba8; --morro: #34395f;
  --stars: 0; --path: .55; --waves: .45;

  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 24%, #1f2940 0%, #0f1523 52%, #080b12 100%);
  border: 1px solid rgba(214, 177, 106, .45);
  box-shadow:
    0 0 0 9px rgba(214, 177, 106, .035),
    0 0 0 10px rgba(214, 177, 106, .16),
    0 70px 120px -50px rgba(0, 0, 0, .95),
    inset 0 1px 0 rgba(255, 255, 255, .1),
    inset 0 -20px 60px rgba(0, 0, 0, .5);
  animation: dial-in 1.2s var(--ease-out) both;
}
.dial[data-phase="amanecer"] {
  --sky-a: #93a8d8; --sky-b: #ffcaa8; --sea-a: #3d7092; --sea-b: #1b375a;
  --sierra: #6e6f9e; --morro: #2d3558; --stars: .25;
}
.dial[data-phase="dia"] {
  --sky-a: #7ccbee; --sky-b: #e6f7f8; --sea-a: #1aa8ae; --sea-b: #0a6680;
  --sierra: #7f98bb; --morro: #3a5068; --path: .8;
}
.dial[data-phase="noche"] {
  --sky-a: #0c1834; --sky-b: #25386a; --sea-a: #12264b; --sea-b: #071228;
  --sierra: #1d2d55; --morro: #0a1330; --stars: 1; --path: .25; --waves: .22;
}

.dial-svg { width: 100%; height: 100%; }
.dl-sky-a { stop-color: var(--sky-a); }
.dl-sky-b { stop-color: var(--sky-b); }
.dl-sea-a { stop-color: var(--sea-a); }
.dl-sea-b { stop-color: var(--sea-b); }
.dl-sierra { fill: var(--sierra); }
.dl-morro { fill: var(--morro); }
.dl-stars { opacity: var(--stars); transition: opacity 1s; }
.dl-waves { opacity: var(--waves); animation: waves 6s var(--ease-soft) infinite alternate; }
.dl-path { stroke: #fff; stroke-width: 1.6; stroke-dasharray: 1 7; stroke-linecap: round; opacity: var(--path); }
.dl-track { stroke: rgba(214, 177, 106, .2); stroke-width: 1; }
.dl-ticks-min { stroke: rgba(242, 234, 217, .16); stroke-width: 5; }
.dl-ticks { stroke: rgba(241, 217, 154, .55); stroke-width: 10; }
.dl-ticks-major { stroke: var(--gold); stroke-width: 18; }
.dl-labels text { font: italic 400 24px var(--serif); fill: var(--gold-light); }
.dl-rim { stroke: rgba(214, 177, 106, .75); stroke-width: 2.5; }

/* El sol y la luna recorren el cielo en 24 h (--dial-rot); el marcador es la aguja
   de las horas de un reloj de 12 h (--hand-rot). Ambos los pone main.js. */
.dl-rot, .dl-hand {
  transform-box: view-box;
  transform-origin: 50% 50%;
}
.dl-rot { transform: rotate(var(--dial-rot, 82.5deg)); }
.dl-moon { transform: rotate(calc(var(--dial-rot, 82.5deg) + 180deg)); }
.dl-hand { transform: rotate(var(--hand-rot, 165deg)); }

.dl-marker { fill: var(--gold-light); stroke: #0a0d14; stroke-width: 3; }
.dl-marker-halo {
  fill: var(--gold);
  opacity: .3;
  transform-box: fill-box;
  transform-origin: center;
  animation: halo 2.4s ease-out infinite;
}

/* Burbujas de chat alrededor del reloj (WhatsApp en modo oscuro) */
.bubble {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem .85rem;
  border-radius: 20px;
}
.bubble--in {
  top: 2%; left: 0;
  width: 46%;
  border-bottom-left-radius: 6px;
  animation: pop .6s .5s var(--ease-bounce) both;
}
.bubble--typing {
  right: 4%; bottom: 7%;
  border-bottom-right-radius: 6px;
  animation: typing-life 1.9s 1.2s var(--ease-soft) both;
}
.bubble--out {
  right: 0; bottom: 3%;
  width: 48%;
  flex-direction: column;
  align-items: stretch;
  gap: .45rem;
  background: var(--wa-dark-bubble);
  border: 1px solid rgba(255, 255, 255, .08);
  border-bottom-right-radius: 6px;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .9);
  animation: pop .6s 3s var(--ease-bounce) both;
}
.bubble-avatar {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold-grad);
}
.bubble-lines { flex: 1; display: grid; gap: 7px; }
.bubble-lines i {
  display: block;
  width: var(--w, 100%);
  height: 7px;
  border-radius: 4px;
  background: rgba(242, 234, 217, .24);
}
.bubble--out .bubble-lines i { background: rgba(255, 255, 255, .38); }
.bubble-ticks { align-self: flex-end; width: 18px; height: 12px; color: var(--tick-blue); }

.typing { display: inline-flex; gap: 5px; padding: .1rem .15rem; }
.typing i {
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-soft);
  animation: dot 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

/* =============================================================
   8. Secciones
   ============================================================= */
.section {
  position: relative;
  padding-block: var(--section-pad);
}

/* Hilo dorado fino que separa las secciones */
.section::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(62%, 720px);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(214, 177, 106, .35), transparent);
  pointer-events: none;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.25rem, 1.75rem + 2vw, 3.75rem);
}

.section h2 {
  margin-top: 1.2rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 1.6rem + 3.9vw, 4.6rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.01em;
}

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  gap: clamp(1rem, .75rem + 1vw, 1.5rem);
}

.service {
  display: flex;
  flex-direction: column;
  padding: .6rem;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
}

.vignette {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(214, 177, 106, .14);
}
.vignette svg { width: 100%; height: 100%; transition: transform .8s var(--ease-out); }
.vignette--web {
  background:
    radial-gradient(90% 80% at 85% 0%, rgba(214, 177, 106, .26), transparent 60%),
    linear-gradient(160deg, #182238, #0b101a);
}
.vignette--ai {
  background:
    radial-gradient(90% 80% at 15% 0%, rgba(37, 211, 102, .14), transparent 60%),
    linear-gradient(160deg, #15202f, #0b101a);
}
.vignette--auto {
  background:
    radial-gradient(90% 80% at 50% 100%, rgba(214, 177, 106, .18), transparent 60%),
    linear-gradient(160deg, #162036, #0b101a);
}

.service-body { padding: 1.4rem 1rem 1rem; }
.service h3 {
  margin-bottom: .7rem;
  font-size: clamp(1.3rem, 1.15rem + .5vw, 1.5rem);
  letter-spacing: -.015em;
}
.service p { color: var(--text-soft); }

/* Animaciones internas de las ilustraciones */
.v-caret { animation: blink 1.1s steps(1, end) infinite; }

.vignette--ai .msg {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: msg-in .55s var(--ease-out) both;
}
.vignette--ai .msg-1 { animation-delay: .3s; }
.vignette--ai .msg-2 { animation-delay: .95s; }
.vignette--ai .msg-3 { animation-delay: 1.7s; }
.vignette--ai .msg-4 { animation-delay: 2.3s; }

.td {
  transform-box: fill-box;
  transform-origin: center;
  animation: dot 1.2s ease-in-out infinite;
}
.td:nth-of-type(2) { animation-delay: .15s; }
.td:nth-of-type(3) { animation-delay: .3s; }

.flow-dot { opacity: 0; animation: flow-a 4.4s ease-in-out infinite; }
.flow-dot--b { animation-name: flow-b; }

/* ---------- Demo ---------- */
.demo-panel {
  --panel-pad: clamp(1.4rem, 1rem + 3vw, 3.5rem);
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 3rem);
  padding: var(--panel-pad);
  border-radius: clamp(28px, 20px + 2vw, 44px);
}
.demo-copy > p:not(.eyebrow) {
  max-width: 32rem;
  margin: 1.4rem 0 2.1rem;
  font-size: clamp(1.075rem, 1rem + .35vw, 1.25rem);
  color: var(--text-soft);
}

.demo-visual {
  position: relative;
  display: grid;
  place-items: center;
  margin-inline: calc(var(--panel-pad) * -1);
  padding: .5rem 0 1rem;
}
.demo-visual::before {
  content: "";
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 177, 106, .22), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.phone {
  position: relative;
  width: clamp(188px, 52vw, 250px);
  height: auto;
  border-radius: 16.15% / 8.08%;
  box-shadow: 0 60px 100px -40px rgba(0, 0, 0, .95), 0 0 70px -20px rgba(214, 177, 106, .4);
}

.float-card {
  position: absolute;
  z-index: 1;
  padding: .8rem;
  border-radius: 20px;
}
.float-card--tables { left: 0; bottom: 10%; width: clamp(138px, 38%, 200px); }
.float-card--chat {
  right: 0; top: 11%;
  display: grid;
  gap: .5rem;
  width: clamp(130px, 36%, 196px);
}

.fc-head { display: flex; align-items: center; gap: .5rem; }
.fc-line {
  display: block;
  flex: 1;
  max-width: 76px;
  height: 7px;
  border-radius: 4px;
  background: rgba(242, 234, 217, .3);
}
.live-dot {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--wa);
  animation: live 1.8s ease-out infinite;
}

.tables {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: .7rem;
}
.table {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(37, 211, 102, .14);
  border: 1.5px solid #3ddc84;
  transition: background-color .45s, border-color .45s, transform .45s var(--ease-bounce);
}
.table.is-busy { background: rgba(214, 177, 106, .22); border-color: var(--gold); }
.table.is-flip { transform: scale(1.22); }

.fc-msg {
  display: grid;
  gap: 6px;
  padding: .6rem .7rem;
  border-radius: 14px;
}
.fc-msg i {
  display: block;
  width: var(--w, 100%);
  height: 6px;
  border-radius: 3px;
  background: rgba(242, 234, 217, .35);
}
.fc-msg--in { margin-right: 16%; background: rgba(242, 234, 217, .08); border-bottom-left-radius: 5px; }
.fc-msg--out { justify-self: end; background: var(--wa-dark-bubble); border-bottom-right-radius: 5px; }
.fc-msg--out .typing i { width: 6px; height: 6px; background: rgba(255, 255, 255, .75); }

/* ---------- Cómo trabajo ---------- */
.steps { display: grid; gap: 1rem; }

.step {
  position: relative;
  padding: clamp(1.6rem, 1.2rem + 1vw, 2.2rem);
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
}
.step-num {
  display: block;
  width: fit-content;
  margin-bottom: clamp(1rem, .8rem + 1vw, 1.7rem);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(4.25rem, 3.2rem + 3.4vw, 6.5rem);
  font-weight: 400;
  line-height: .8;
  padding-right: .08em;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step h3 {
  margin-bottom: .6rem;
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
}
.step p { color: var(--text-soft); }

/* Conector punteado dorado entre pasos */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: clamp(2.3rem, 2rem + 1vw, 2.9rem);
  bottom: -1rem;
  width: 1px; height: 1rem;
  background: repeating-linear-gradient(to bottom, var(--gold) 0 3px, transparent 3px 7px);
}

/* ---------- Sobre mí ---------- */
.about-panel {
  display: grid;
  gap: clamp(1.25rem, 1rem + 2vw, 3rem);
  align-items: center;
  padding: clamp(.6rem, .4rem + .6vw, .9rem);
  border-radius: clamp(28px, 20px + 2vw, 44px);
}

/* Retrato con un eclipse dorado detrás y el mapa superpuesto */
.about-media {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(1.75rem, 1rem + 3vw, 3rem) clamp(1.5rem, 1rem + 3vw, 3rem) clamp(2.75rem, 2rem + 3vw, 4rem);
}

.about-sun {
  position: absolute;
  top: 0; right: 0;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 55%, rgba(247, 231, 184, .95) 56.5%, rgba(214, 177, 106, .6) 58.5%, rgba(214, 177, 106, .14) 62%, transparent 68%),
    radial-gradient(circle, rgba(214, 177, 106, .2), transparent 60%);
  filter: drop-shadow(0 0 24px rgba(214, 177, 106, .45));
  animation: sun-breathe 9s var(--ease-soft) infinite alternate;
}

.about-photo {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  border-radius: 26px;
  background: #080b12;
  box-shadow:
    0 0 0 1px rgba(214, 177, 106, .55),
    0 0 0 8px rgba(214, 177, 106, .05),
    0 70px 120px -50px rgba(0, 0, 0, .98),
    0 0 90px -30px rgba(214, 177, 106, .35);
  transform: rotate(-2.5deg);
  transition: transform .9s var(--ease-out);
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}
.about-photo::before,
.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
/* El negro del estudio se vuelve azul noche hacia los bordes... */
.about-photo::before {
  background: radial-gradient(ellipse 58% 52% at 50% 46%, rgba(11, 18, 34, 0) 55%, #0d1628 100%);
  mix-blend-mode: lighten;
}
/* ...y una luz dorada entra por la derecha, desde el eclipse */
.about-photo::after {
  background: linear-gradient(235deg, rgba(214, 177, 106, .34) 0%, rgba(214, 177, 106, 0) 38%);
  mix-blend-mode: screen;
}

.about-map {
  position: absolute;
  z-index: 2;
  right: clamp(0rem, -.5rem + 1vw, .5rem);
  bottom: clamp(.5rem, .25rem + 1vw, 1.25rem);
  overflow: hidden;
  width: 42%;
  max-width: 210px;
  aspect-ratio: 4 / 3;
  border: 3px solid #0d121d;
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(214, 177, 106, .6), 0 30px 50px -20px rgba(0, 0, 0, .9);
  transform: rotate(3deg);
  transition: transform .9s var(--ease-out);
}
.about-map svg { width: 100%; height: 100%; }

@media (hover: hover) {
  .about-media:hover .about-photo { transform: rotate(0deg); }
  .about-media:hover .about-photo img { transform: scale(1.045); }
  .about-media:hover .about-map { transform: rotate(0deg) translateY(-4px); }
}

.map-chip {
  position: absolute;
  z-index: 2;
  left: 14px; bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .85rem .45rem .55rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}
.map-chip svg { width: 18px; height: 18px; color: var(--gold); }
@media (max-width: 719.98px) {
  .about-photo .map-chip { top: 14px; bottom: auto; }
}

.pin-pulse {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pin-pulse 2.6s ease-out infinite;
}
.pin-pulse--2 { animation-delay: 1.3s; }

.about-copy { padding: .25rem clamp(.9rem, .5rem + 2vw, 2.5rem) clamp(1.25rem, 1rem + 1vw, 2rem); }
.about-copy > p:not(.eyebrow) {
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 1rem + .45vw, 1.32rem);
  line-height: 1.65;
  color: var(--text-soft);
}

/* ---------- Contacto ---------- */
.contact { padding-bottom: clamp(3rem, 2rem + 4vw, 5rem); }

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 920px;
  margin-inline: auto;
  padding: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) clamp(1.25rem, .5rem + 4vw, 4rem);
  border-radius: clamp(28px, 20px + 2vw, 48px);
  text-align: center;
  overflow: hidden;
}
/* Aura dorada dentro de la tarjeta final */
.contact-card::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -55%;
  z-index: 0;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(214, 177, 106, .2), transparent 62%);
  pointer-events: none;
}
.contact-avatar {
  position: relative;
  width: 92px; height: 92px;
  margin-bottom: 1.3rem;
}
.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #0d121d;
  box-shadow:
    0 0 0 1px rgba(214, 177, 106, .75),
    0 0 0 7px rgba(214, 177, 106, .08),
    0 0 40px -6px rgba(214, 177, 106, .5);
}
.contact-avatar .live-dot {
  position: absolute;
  right: 4px; bottom: 6px;
  width: 18px; height: 18px;
  border: 3px solid #0d121d;
}

.contact-card h2 {
  max-width: 14ch;
  font-size: clamp(2.7rem, 1.4rem + 5.2vw, 5.4rem);
}
.contact-text {
  max-width: 30rem;
  margin: 1.4rem 0 2.4rem;
  font-size: clamp(1.1rem, 1rem + .5vw, 1.32rem);
  color: var(--text-soft);
}

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  margin-top: 1.25rem;
  padding: .5rem;
  font-size: clamp(.95rem, .85rem + .5vw, 1.0625rem);
  font-weight: 500;
  color: var(--text);
}
.contact-mail svg { width: 20px; height: 20px; flex: none; color: var(--gold); }
.contact-mail span {
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat;
  transition: background-size .45s var(--ease-out);
}
.contact-mail:hover span { background-size: 100% 1px; }

/* ---------- Pie de página ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem 0 calc(2.25rem + env(safe-area-inset-bottom));
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: .9375rem;
  color: var(--text-mute);
}
.footer-inner .brand-mark { width: 32px; height: 32px; }
.footer-inner span { display: inline-block; }

/* ---------- Botón fijo de WhatsApp (celular) ---------- */
.sticky-cta { display: none; }

/* =============================================================
   9. Efectos
   ============================================================= */

/* Aparición al hacer scroll (solo si el JavaScript arrancó) */
.js [data-reveal]:not(.is-revealed) { opacity: 0; }
.js [data-reveal].is-revealed { animation: reveal 1s var(--ease-out) var(--delay, 0s) backwards; }
.services-grid > :nth-child(2), .steps > :nth-child(2) { --delay: .1s; }
.services-grid > :nth-child(3), .steps > :nth-child(3) { --delay: .2s; }

/* Las animaciones de cada bloque solo corren mientras se ve en pantalla */
.js [data-play]:not(.in-view),
.js [data-play]:not(.in-view) *,
.js [data-play]:not(.in-view)::before,
.js [data-play]:not(.in-view) *::before,
.js [data-play]:not(.in-view) *::after { animation-play-state: paused !important; }

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-3px);
    background-position: 100% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .6),
      0 26px 50px -18px rgba(214, 177, 106, .7),
      0 2px 4px rgba(0, 0, 0, .3);
  }
  .btn--coral:hover { background: rgba(214, 177, 106, .14); }
  .btn:hover .btn-arrow { transform: translateX(4px); }
  .service:hover, .step:hover {
    transform: translateY(-6px);
    box-shadow: 0 60px 100px -50px rgba(0, 0, 0, .95), 0 0 60px -30px rgba(214, 177, 106, .35);
  }
  .service:hover .vignette svg { transform: scale(1.035); }
}

@keyframes reveal { from { opacity: 0; transform: translateY(28px); } }
@keyframes float { from { transform: translateY(-6px); } to { transform: translateY(8px); } }
@keyframes dial-in { from { opacity: 0; transform: scale(.94) rotate(-6deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.92); } }
@keyframes typing-life {
  0% { opacity: 0; transform: translateY(8px) scale(.9); }
  15%, 82% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: scale(.96); }
}
@keyframes dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-3px); opacity: 1; }
}
@keyframes halo { from { transform: scale(.7); opacity: .45; } to { transform: scale(1.9); opacity: 0; } }
@keyframes waves { to { transform: translateX(10px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.94); } }
@keyframes live {
  from { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); }
  to { box-shadow: 0 0 0 9px rgba(37, 211, 102, 0); }
}
@keyframes sun-breathe {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(8deg) scale(1.035); }
}
@keyframes pin-pulse {
  from { opacity: .45; transform: scale(.5); }
  to { opacity: 0; transform: scale(2.6); }
}
@keyframes flow-a {
  0% { opacity: 0; transform: translate(0, 0); }
  6% { opacity: 1; }
  28% { transform: translate(50px, 0); }
  46% { transform: translate(106px, 0); }
  56% { transform: translate(132px, 0); }
  70% { transform: translate(132px, -46px); }
  80% { opacity: 1; transform: translate(154px, -46px); }
  88%, 100% { opacity: 0; transform: translate(154px, -46px); }
}
@keyframes flow-b {
  0% { opacity: 0; transform: translate(0, 0); }
  6% { opacity: 1; }
  28% { transform: translate(50px, 0); }
  46% { transform: translate(106px, 0); }
  56% { transform: translate(132px, 0); }
  70% { transform: translate(132px, 46px); }
  80% { opacity: 1; transform: translate(154px, 46px); }
  88%, 100% { opacity: 0; transform: translate(154px, 46px); }
}

/* =============================================================
   10. Pantallas más grandes
   ============================================================= */

/* Celular y tablet: botón fijo de WhatsApp */
@media (max-width: 959.98px) {
  .js .sticky-cta {
    display: block;
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 40;
    max-width: 440px;
    margin-inline: auto;
    padding: 6px;
    border-radius: 999px;
    transform: translateY(160%);
    visibility: hidden;
    transition: transform .5s var(--ease-out), visibility 0s .5s;
  }
  .js .sticky-cta.is-visible {
    transform: none;
    visibility: visible;
    transition: transform .5s var(--ease-out), visibility 0s;
  }
  .js .site-footer { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
}

@media (min-width: 540px) {
  .nav { padding-left: .75rem; }
}

@media (min-width: 720px) {
  .service {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
    align-items: center;
    gap: .5rem;
  }
  .service-body { padding: 1rem 1.25rem; }

  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .step:not(:last-child)::after {
    left: auto; right: -1.25rem;
    top: clamp(3.4rem, 2.8rem + 1.6vw, 4.4rem);
    bottom: auto;
    width: 1.25rem; height: 1px;
    background: repeating-linear-gradient(to right, var(--gold) 0 3px, transparent 3px 7px);
  }

  .demo-visual { margin-inline: 0; }
  .float-card--tables { left: 6%; }
  .float-card--chat { right: 6%; }

  .nav .nav-panel { left: auto; width: 340px; }
}

@media (min-width: 960px) {
  .nav { gap: .75rem; padding-left: .9rem; }
  .nav-cta { display: inline-flex; }

  .hero {
    display: flex;
    align-items: center;
    min-height: min(100svh, 940px);
  }
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }

  .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service { display: flex; align-items: stretch; }
  .service-body { padding: 1.4rem 1rem 1rem; }

  .demo-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
  .float-card--tables { left: 0; }
  .float-card--chat { right: 0; }

  .about-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

@media (min-width: 1280px) {
  .nav { gap: 1.25rem; }
  .nav-links { display: flex; gap: 2rem; }
  .nav-menu { display: none; }
  .step-num { margin-bottom: 2rem; }
}

/* =============================================================
   11. Movimiento reducido: solo se apagan los efectos en bucle
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .typing i, .td, .v-caret, .live-dot, .dl-marker-halo { animation: none !important; }
  .pin-pulse, .flow-dot { animation: none !important; opacity: 0; }
  .about-sun { animation: none; }
}
