/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Colores oficiales del Manual de Marca FIABLE: azul PANTONE 2191C #009FE3, morado PANTONE 3125C #5C2483 */
  --navy:        #5C2483;
  --navy-deep:   #45195F;
  --lavender:    #009FE3;
  --lavender-deep: #0080BD;
  --sky:         #CDEBFB;
  --bone:        #F7F9FC;

  --bg:          var(--bone);
  --card:        #FFFFFF;
  --card-tint:   #EAF6FD;
  --ink:         #2A2438;
  --ink-soft:    #4F4860;
  --ink-mute:    #837C93;
  --line:        rgba(92, 36, 131, 0.14);

  --accent:      var(--lavender);
  --accent-deep: var(--lavender-deep);

  --glass:       rgba(255, 255, 255, 0.55);
  --glass-2:     rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.65);

  --sans:        "Inter", -apple-system, "Segoe UI", sans-serif;
  --display:     "Poppins", var(--sans);

  --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);

  --radius-lg:   28px;
  --radius-md:   18px;
  --radius-sm:   12px;

  --nav-h: 76px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  text-wrap: balance;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
}
::selection { background: var(--lavender); color: #fff; }
:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  margin-bottom: 10px;
}
.section-title { font-size: clamp(1.7rem, 4vw, 2.5rem); max-width: 20ch; }
.section-sub { color: var(--ink-soft); max-width: 60ch; margin-top: 14px; font-size: 1.05rem; }
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--navy-deep); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 600; transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .3s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy); color: #fff;
  box-shadow: 0 10px 24px -8px rgba(43,76,126,0.55);
}
.btn-primary:hover { background: var(--navy-deep); transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(43,76,126,0.6); }
.btn-ghost {
  background: var(--glass); color: var(--navy-deep); border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
}
@supports not (backdrop-filter: blur(1px)) { .btn-ghost { background: rgba(255,255,255,0.85); } }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255,255,255,0.75); }
.btn-sm { padding: 10px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(247, 249, 252, 0.72);
  backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-brand { font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--navy-deep); display: flex; align-items: center; }
.nav-brand img { height: 34px; width: auto; display: block; }
.nav-links { display: none; align-items: center; gap: 30px; }
.nav-links a {
  position: relative; font-weight: 500; font-size: 0.94rem; color: var(--ink-soft);
  padding-block: 4px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--accent-deep); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a:hover { color: var(--navy-deep); }
.nav-cta { display: none; }
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; align-items: center;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--navy-deep);
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.nav-toggle[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
  background: var(--bone); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-10px); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.nav-mobile.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-mobile a { padding: 12px 4px; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.nav-mobile .btn { margin-top: 14px; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none; }
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  padding-block: clamp(56px, 10vw, 96px) clamp(64px, 9vw, 110px);
  overflow: clip;
}
.hero-mesh {
  position: absolute; inset: -10% -10% -20% -10%; z-index: -1;
  background:
    radial-gradient(at 18% 22%, rgba(201,221,242,0.9) 0%, transparent 55%),
    radial-gradient(at 82% 18%, rgba(139,133,214,0.55) 0%, transparent 55%),
    radial-gradient(at 50% 92%, rgba(43,76,126,0.28) 0%, transparent 60%),
    var(--bone);
  filter: blur(60px) saturate(140%);
  animation: meshDrift 34s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.18) rotate(6deg); }
}
.hero-inner { display: grid; gap: 48px; align-items: center; }
.hero-title { font-size: clamp(2.3rem, 6vw, 3.7rem); max-width: 14ch; }
.hero-title em { font-style: normal; color: var(--accent-deep); }
.hero-sub { margin-top: 20px; font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-emblem { display: flex; justify-content: center; }
.emblem-photo {
  width: clamp(240px, 34vw, 380px); aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 70px -24px rgba(43,76,126,0.5);
  animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
}

/* =============================================================
   7. Glass cards / Servicios
   ============================================================= */
.servicios { padding-block: clamp(64px, 9vw, 110px); }
.servicios-grid {
  margin-top: 40px; display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.servicio-card {
  position: relative; padding: 26px 22px; border-radius: var(--radius-md);
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), background .3s var(--ease-out);
  display: flex; flex-direction: column; gap: 12px; height: 100%;
}
@supports not (backdrop-filter: blur(1px)) { .servicio-card { background: rgba(255,255,255,0.82); } }
.servicio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 44px -20px rgba(43,76,126,0.35);
  background: rgba(255,255,255,0.72);
}
.servicio-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(150deg, var(--lavender), var(--navy));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.servicio-icon svg { width: 24px; height: 24px; }
.servicio-card h3 { font-size: 1.08rem; color: var(--navy-deep); }
.servicio-card p { color: var(--ink-soft); font-size: 0.92rem; flex: 1; }
.servicio-link { font-weight: 700; font-size: 0.88rem; color: var(--accent-deep); display: inline-flex; align-items: center; gap: 6px; }
.servicio-link svg { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.servicio-card:hover .servicio-link svg { transform: translateX(4px); }

/* =============================================================
   8. Sobre mí
   ============================================================= */
.sobre-mi { padding-block: clamp(64px, 9vw, 110px); background: var(--card-tint); }
.sobre-mi-grid { display: grid; gap: 40px; margin-top: 36px; }
.sobre-mi-text p { color: var(--ink-soft); margin-top: 16px; font-size: 1.02rem; }
.trayectoria-list { margin-top: 26px; display: grid; gap: 14px; }
.trayectoria-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: var(--radius-sm); background: var(--card);
  border: 1px solid var(--line);
}
.trayectoria-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-deep); margin-top: 8px; flex-shrink: 0; }
.trayectoria-item strong { display: block; color: var(--navy-deep); }
.trayectoria-item span { color: var(--ink-mute); font-size: 0.9rem; }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 32px; }
.stat-card {
  padding: 22px; border-radius: var(--radius-md); background: var(--card);
  border: 1px solid var(--line); text-align: center;
}
.stat-num { font-family: var(--display); font-weight: 800; font-size: 2.1rem; color: var(--navy); }
.stat-label { font-size: 0.82rem; color: var(--ink-mute); margin-top: 4px; }

@media (min-width: 960px) {
  .sobre-mi-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* =============================================================
   8.5 Galería
   ============================================================= */
.galeria { padding-block: clamp(64px, 9vw, 110px); background: var(--card-tint); }
.galeria-grid { margin-top: 36px; display: grid; gap: 18px; }
.galeria-photo {
  border-radius: var(--radius-md); overflow: clip; border: 1px solid var(--line);
  margin: 0;
}
.galeria-photo-main { aspect-ratio: 4/3; }
.galeria-photo-main img { width: 100%; height: 100%; object-fit: cover; }
.galeria-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.galeria-photo-pending {
  aspect-ratio: 1; background: var(--card); border-style: dashed;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--ink-mute); font-size: 0.8rem; text-align: center; padding: 16px;
}
.galeria-photo-pending svg { width: 30px; height: 30px; opacity: 0.6; }

@media (min-width: 960px) {
  .galeria-grid { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
  .galeria-photo-main { aspect-ratio: auto; }
  .galeria-secondary { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .galeria-photo-pending { aspect-ratio: auto; }
}

/* =============================================================
   9. Proceso
   ============================================================= */
.proceso { padding-block: clamp(64px, 9vw, 110px); }
.proceso-grid { margin-top: 40px; display: grid; gap: 22px; }
.proceso-step {
  padding: 26px; border-radius: var(--radius-md); background: var(--card);
  border: 1px solid var(--line); position: relative;
}
.proceso-num {
  font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--sky);
  -webkit-text-stroke: 1.5px var(--navy); display: block; margin-bottom: 10px;
}
.proceso-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.proceso-step p { color: var(--ink-soft); font-size: 0.92rem; }
@media (min-width: 720px) { .proceso-grid { grid-template-columns: repeat(3, 1fr); } }

/* =============================================================
   10. Testimonios
   ============================================================= */
.testimonios { padding-block: clamp(64px, 9vw, 110px); background: var(--card-tint); }
.testimonio-card {
  margin-top: 40px; max-width: 720px;
  padding: 36px clamp(24px, 4vw, 44px); border-radius: var(--radius-lg);
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
}
@supports not (backdrop-filter: blur(1px)) { .testimonio-card { background: rgba(255,255,255,0.85); } }
.testimonio-quote { font-size: 1.2rem; color: var(--navy-deep); line-height: 1.5; }
.testimonio-author { margin-top: 20px; display: flex; align-items: center; gap: 12px; }
.testimonio-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(150deg, var(--lavender), var(--navy));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-family: var(--display);
}
.testimonio-author strong { display: block; color: var(--navy-deep); font-size: 0.95rem; }
.testimonio-author span { font-size: 0.85rem; color: var(--ink-mute); }
.testimonio-note {
  margin-top: 22px; padding: 18px 20px; border-radius: var(--radius-sm);
  border: 1px dashed var(--line); color: var(--ink-mute); font-size: 0.88rem;
}

/* =============================================================
   11. FAQ
   ============================================================= */
.faq { padding-block: clamp(64px, 9vw, 110px); }
.faq-list { margin-top: 36px; max-width: 780px; display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
  overflow: clip;
}
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--navy-deep);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.4rem; color: var(--accent-deep); font-weight: 400; flex-shrink: 0;
  transition: transform .3s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; color: var(--ink-soft); }

/* =============================================================
   12. Contacto
   ============================================================= */
.contacto { padding-block: clamp(64px, 9vw, 110px); background: var(--card-tint); }
.contacto-grid { margin-top: 40px; display: grid; gap: 22px; }
.contacto-card {
  padding: 28px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--line);
}
.contacto-card h3 { font-size: 1rem; margin-bottom: 14px; color: var(--navy-deep); }
.contacto-row { display: flex; align-items: center; gap: 12px; padding-block: 8px; font-size: 0.95rem; color: var(--ink-soft); }
.contacto-row svg { width: 18px; height: 18px; color: var(--accent-deep); flex-shrink: 0; }
.contacto-socials { display: flex; gap: 10px; margin-top: 18px; }
.social-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--card-tint);
  display: flex; align-items: center; justify-content: center; color: var(--navy-deep);
  transition: background .3s var(--ease-out), transform .3s var(--ease-out);
}
.social-btn:hover { background: var(--sky); transform: translateY(-2px); }
.social-btn svg { width: 18px; height: 18px; }
.map-embed { border-radius: var(--radius-md); overflow: clip; border: 1px solid var(--line); min-height: 260px; }
.map-embed iframe { width: 100%; height: 100%; min-height: 260px; border: 0; }
.map-embed-wide { margin-top: 22px; border-radius: var(--radius-md); overflow: clip; border: 1px solid var(--line); min-height: 300px; }
.map-embed-wide iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }

.form-hint { color: var(--ink-mute); font-size: 0.85rem; margin-bottom: 18px; }
.contact-form { display: grid; gap: 16px; }
.contact-form .field { display: grid; gap: 6px; font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.contact-form input, .contact-form select, .contact-form textarea {
  font-family: inherit; font-size: 0.95rem; font-weight: 400; color: var(--ink);
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); resize: vertical;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent-deep); box-shadow: 0 0 0 3px rgba(139,133,214,0.18);
}
.contact-form input.is-invalid, .contact-form textarea.is-invalid { border-color: #c0392b; }
.field-error { color: #c0392b; font-size: 0.85rem; margin-top: -6px; }

@media (min-width: 960px) { .contacto-grid { grid-template-columns: 1fr 1fr; } }

/* =============================================================
   13. Footer
   ============================================================= */
.footer { padding-block: 40px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.footer-brand { font-family: var(--display); font-weight: 800; color: var(--navy-deep); display: flex; align-items: center; }
.footer-brand img { height: 26px; width: auto; display: block; }
.footer-note { font-size: 0.85rem; color: var(--ink-mute); }

/* =============================================================
   14. WhatsApp float
   ============================================================= */
.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -10px rgba(37,211,102,0.6);
  transition: transform .3s var(--ease-bounce);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; }

/* =============================================================
   15. Service detail page
   ============================================================= */
.service-hero { padding-block: clamp(50px, 8vw, 80px) clamp(40px, 6vw, 64px); position: relative; overflow: clip; }
.service-hero .hero-mesh { animation-duration: 40s; }
.breadcrumb { font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--accent-deep); font-weight: 600; }
.service-icon-lg {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(150deg, var(--lavender), var(--navy));
  display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 20px;
}
.service-icon-lg svg { width: 32px; height: 32px; }
.service-hero h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: 16ch; }
.service-hero .lede { margin-top: 18px; font-size: 1.1rem; color: var(--ink-soft); max-width: 56ch; }

.service-body { padding-block: clamp(20px, 5vw, 40px) clamp(64px, 9vw, 100px); }
.service-cols { display: grid; gap: 32px; }
.service-main h2 { font-size: 1.4rem; margin-bottom: 14px; }
.service-main p { color: var(--ink-soft); margin-bottom: 16px; }
.service-list { margin-top: 10px; display: grid; gap: 10px; }
.service-list li {
  display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 0.98rem;
}
.service-list svg { width: 18px; height: 18px; color: var(--accent-deep); flex-shrink: 0; margin-top: 2px; }

.service-cta-card {
  padding: 28px; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  height: max-content; position: sticky; top: calc(var(--nav-h) + 20px);
}
@supports not (backdrop-filter: blur(1px)) { .service-cta-card { background: rgba(255,255,255,0.88); } }
.service-cta-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.service-cta-card p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 18px; }

.otros-servicios { padding-block: clamp(50px, 8vw, 90px); background: var(--card-tint); }
.otros-servicios-list { margin-top: 30px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); }
.otro-servicio-chip {
  padding: 14px 18px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line);
  font-weight: 600; font-size: 0.92rem; color: var(--navy-deep); transition: transform .3s var(--ease-out), border-color .3s var(--ease-out);
}
.otro-servicio-chip:hover { transform: translateY(-3px); border-color: var(--accent-deep); }

@media (min-width: 960px) {
  .service-cols { grid-template-columns: 1.5fr 1fr; }
}

/* =============================================================
   16. Responsive nudges
   ============================================================= */
@media (min-width: 540px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 720px) { .container { padding-inline: 32px; } }
