/* =============================================================
   0. Reset
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; height: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-y: none;
  background: var(--bg);
  color: var(--ink);
  min-height: 100%;
  width: 100%;
}
.wrap, .nav-inner { min-width: 0; }
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; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; }
ul { list-style: none; padding: 0; }
::selection { background: var(--teal); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--teal);
  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: 600;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #070b12;
  --bg-2: #0b1220;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-border: rgba(255, 255, 255, 0.09);
  --line: rgba(45, 212, 191, 0.18);
  --line-soft: rgba(238, 243, 248, 0.08);
  --ink: #eef3f8;
  --ink-dim: rgba(238, 243, 248, 0.66);
  --ink-faint: rgba(238, 243, 248, 0.62);
  --teal: #2dd4bf;
  --teal-bright: #5eead4;
  --teal-dim: rgba(45, 212, 191, 0.5);
  --blue: #60a5fa;

  --display: "Space Grotesk", "Inter", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;

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

  --gutter: clamp(1.5rem, 6vw, 4rem);
  --nav-h: 76px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { position: relative; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--teal);
  display: inline-block;
}

/* =============================================================
   2. Nav
   ============================================================= */
.masthead {
  position: fixed; inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex; align-items: center;
  background: rgba(7, 11, 18, 0.4);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out);
}
.masthead.is-scrolled {
  background: rgba(7, 11, 18, 0.78);
  border-bottom-color: var(--line-soft);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.brand-mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: .45rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-mark .dot { color: var(--teal); }
.brand-logo { height: 40px; width: auto; }

.nav-links {
  display: none;
  gap: 2rem;
  font-size: .88rem;
  color: var(--ink-dim);
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-links a { transition: color .3s var(--ease-out); position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px;
  background: var(--teal); transition: right .35s var(--ease-out);
}
.nav-links a:hover::after { right: 0; }
.nav-links a.is-active { color: var(--teal-bright); }
.nav-links a.is-active::after { right: 0; }

.nav-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.15rem;
  border: 1px solid var(--teal-dim);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal-bright);
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out);
}
.nav-cta:hover { background: var(--teal); color: var(--bg); border-color: var(--teal); }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  padding: .4rem;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0;
  background: rgba(7, 11, 18, 0.98);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility 0s linear .35s;
}
.mobile-menu.is-open {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.mobile-menu a { font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--ink); }
.mobile-menu .nav-cta { margin-top: 1rem; }
.mobile-menu-logo { height: 56px; width: auto; margin-bottom: .6rem; }

/* =============================================================
   3. Reactive background mesh
   ============================================================= */
.mesh-bg {
  position: fixed; inset: 0; z-index: -1;
  width: 100vw; height: 100vh; height: 100dvh;
  background:
    radial-gradient(circle 640px at var(--mx, 60%) var(--my, 28%),
      rgba(45, 212, 191, 0.14) 0%, transparent 55%),
    radial-gradient(circle 760px at calc(var(--mx, 60%) - 22%) calc(var(--my, 28%) + 16%),
      rgba(96, 165, 250, 0.10) 0%, transparent 55%),
    var(--bg);
  filter: blur(20px);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .03; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =============================================================
   4. Hero
   ============================================================= */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 4rem;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero-copy .eyebrow { margin-bottom: 1.4rem; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.3rem, 6.4vw, 3.6rem);
  color: var(--ink);
}
.hero h1 .accent { color: var(--teal); }
.hero-sub {
  margin-top: 1.2rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--ink-dim);
  max-width: 52ch;
}
.hero-actions {
  margin-top: 2.2rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
}
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-size: .92rem; font-weight: 600;
  transition: transform .3s var(--ease-soft), box-shadow .3s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.btn-primary {
  background: var(--teal);
  color: var(--bg);
  box-shadow: 0 8px 30px -10px rgba(45,212,191,.55);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 14px 34px -10px rgba(45,212,191,.7); }
.btn-ghost {
  border: 1px solid var(--line-soft);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--teal-dim); color: var(--teal-bright); }

.hero-note {
  margin-top: 1.6rem;
  font-size: .82rem;
  color: var(--ink-faint);
  display: flex; align-items: center; gap: .5rem;
}
.hero-note svg { width: 14px; height: 14px; color: var(--teal); flex-shrink: 0; }

/* Hero visual: glass "report card" mockup */
.hero-visual { position: relative; display: flex; justify-content: center; }
.report-card {
  position: relative; z-index: 1;
  width: min(90vw, 420px);
  padding: 1.6rem 1.6rem 1.8rem;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
}
@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.report-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem;
  font-family: var(--mono); font-size: .72rem; color: var(--ink-faint);
}
.report-dots { display: flex; gap: 5px; }
.report-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); opacity: .5; }
.report-row {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line-soft);
}
.report-row:first-of-type { border-top: none; }
.report-check {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(45, 212, 191, .14);
  color: var(--teal-bright);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.report-check svg { width: 11px; height: 11px; }
.report-row span.label { font-size: .88rem; color: var(--ink-dim); }
.report-bar-wrap { margin-top: 1.4rem; }
.report-bar-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: .5rem; }
.report-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--blue)); width: 0%; transition: width 1.4s var(--ease-out); }
.report-bar-label { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-faint); font-family: var(--mono); }

.avatar-glow {
  position: absolute; inset: -15% -10%;
  background:
    radial-gradient(circle at 50% 40%, rgba(45,212,191,.22), transparent 60%),
    radial-gradient(circle at 65% 65%, rgba(96,165,250,.16), transparent 55%);
  filter: blur(34px);
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .report-card { animation: none; }
}

@media (min-width: 960px) {
  .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 2.5rem; }
  .hero-visual { justify-content: flex-end; }
}

/* =============================================================
   5. Services
   ============================================================= */
.services { padding: 6rem 0; }
.services-head { max-width: 56ch; margin-bottom: 3rem; }
.services-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-top: .8rem;
}
.services-head p { margin-top: 1rem; color: var(--ink-dim); }

.service-grid { display: grid; gap: 1.6rem; }
.service-card {
  padding: 2.1rem 2rem 2.3rem;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: transform .5s var(--ease-soft), border-color .4s var(--ease-out);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  overflow: hidden;
}
.service-card:hover { border-color: var(--teal-dim); }
.service-image {
  display: block;
  width: calc(100% + 4rem);
  margin: -2.1rem -2rem 1.4rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  max-width: none;
}
.service-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(45, 212, 191, .12);
  color: var(--teal-bright);
  display: flex; align-items: center; justify-content: center;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  margin-top: 1.1rem;
}
.service-focus {
  margin-top: .3rem;
  font-size: .82rem;
  color: var(--teal);
  font-family: var(--mono);
}
.service-card p.service-desc {
  margin-top: 1rem;
  color: var(--ink-dim);
  font-size: .95rem;
}
.service-card p.service-note {
  margin-top: .8rem;
  color: var(--ink-faint);
  font-size: .84rem;
  font-style: italic;
}
.service-reqs {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
}
.service-reqs-label {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.service-reqs ul { margin-top: .7rem; display: flex; flex-direction: column; gap: .5rem; }
.service-reqs li {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .88rem; color: var(--ink-dim);
}
.service-reqs li svg { width: 14px; height: 14px; color: var(--teal); margin-top: .2rem; flex-shrink: 0; }
.service-card .btn { margin-top: 1.6rem; }

@media (min-width: 700px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1060px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================================
   6. Process
   ============================================================= */
.process { padding: 5rem 0 6rem; }
.process-head { max-width: 46ch; margin-bottom: 3rem; }
.process-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-top: .8rem;
}
.process-grid { display: grid; gap: 1.6rem; }
.process-step {
  padding: 1.8rem 1.6rem;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(255,255,255,.02), transparent);
}
.process-step-num {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--teal);
}
.process-step h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: .8rem;
}
.process-step p {
  margin-top: .7rem;
  color: var(--ink-dim);
  font-size: .92rem;
}
@media (min-width: 820px) {
  .process-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   7. Why / principles
   ============================================================= */
.principles {
  padding: 5rem 0;
}
.principles-head { max-width: 50ch; }
.principles-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  margin-top: .8rem;
}
.principles-head p { margin-top: .8rem; color: var(--ink-dim); }
.principle-row {
  margin-top: 2.2rem;
  display: grid; gap: 1.4rem;
}
.principle-item { display: flex; gap: 1rem; align-items: flex-start; }
.principle-item .service-icon { flex-shrink: 0; }
.principle-item h4 { font-family: var(--display); font-weight: 700; font-size: 1.02rem; }
.principle-item p { margin-top: .35rem; color: var(--ink-dim); font-size: .9rem; }

@media (min-width: 720px) {
  .principle-row { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   8. Contact
   ============================================================= */
.contact {
  padding: 6rem 0 5rem;
  text-align: center;
}
.contact .eyebrow { justify-content: center; }
.contact .eyebrow::before { display: none; }
.contact h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 3rem);
  margin-top: 1rem;
  max-width: 24ch;
  margin-inline: auto;
}
.contact p {
  margin-top: 1rem;
  color: var(--ink-dim);
  max-width: 50ch;
  margin-inline: auto;
}
.contact .hero-actions { justify-content: center; margin-top: 2.2rem; }

/* =============================================================
   9. Footer
   ============================================================= */
footer {
  padding: 2.4rem var(--gutter);
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  font-size: .8rem; color: var(--ink-faint);
}
footer a { color: var(--ink-dim); transition: color .3s var(--ease-out); }
footer a:hover { color: var(--teal); }
.footer-logo { height: 26px; width: auto; }

.social-row { display: flex; align-items: center; gap: .5rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  color: var(--ink-dim);
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out), transform .3s var(--ease-soft), background .3s var(--ease-out);
}
.social-link svg { width: 16px; height: 16px; }
.social-link:hover {
  color: var(--teal-bright);
  border-color: var(--teal-dim);
  background: rgba(45, 212, 191, 0.08);
  transform: translateY(-2px);
}

/* =============================================================
   10. Reveal on scroll
   ============================================================= */
.reveal { opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

.hero-intro { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.hero-intro.is-visible { opacity: 1; transform: none; }

/* =============================================================
   11. Magnetic buttons
   ============================================================= */
.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner { display: inline-flex; align-items: center; gap: .55rem; will-change: transform; }

/* =============================================================
   12. Responsive: nav
   ============================================================= */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; }
}
@media (max-width: 719.98px) {
  .nav-links { display: none; }
}

/* =============================================================
   Contacto alterno, enlaces legales y páginas legales
   ============================================================= */
.contact-alt { margin-top: 1.4rem; color: var(--ink-dim); }
.contact-alt a, .contact-legal a { color: var(--teal-bright); text-decoration: underline; text-underline-offset: 3px; }
.contact-legal { margin-top: .6rem; font-size: .85rem; color: var(--ink-faint); }
.footer-legal { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }

.legal-head { padding: 1.4rem var(--gutter); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.legal-head .back { color: var(--ink-dim); min-height: 44px; display: inline-flex; align-items: center; }
.legal-head .back:hover { color: var(--teal); }
.legal { max-width: 760px; margin: 0 auto; padding: 4rem var(--gutter) 5rem; }
.legal h1 { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; margin-bottom: .6rem; }
.legal .updated { color: var(--ink-faint); font-size: .85rem; margin-bottom: 2.4rem; }
.legal h2 { font-family: var(--display); font-size: 1.25rem; margin: 2.2rem 0 .7rem; }
.legal p, .legal li { color: var(--ink-dim); line-height: 1.7; }
.legal p + p { margin-top: .9rem; }
.legal ul { margin: .7rem 0 0 1.2rem; list-style: disc; }
.legal li + li { margin-top: .4rem; }
.legal a { color: var(--teal-bright); text-decoration: underline; text-underline-offset: 3px; }
.legal mark.pendiente { background: rgba(250, 204, 21, .18); color: #fde68a; padding: .05rem .35rem; border-radius: 4px; }

/* =============================================================
   Informe de muestra
   ============================================================= */
.sample { padding: 5rem 0 5.5rem; }
.sample-head { max-width: 680px; margin-bottom: 2.6rem; }
.sample-head p { margin-top: 1rem; color: var(--ink-dim); }
.sample-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
.sample-page { margin: 0; }
.sample-page img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top;
  border-radius: 14px; border: 1px solid var(--panel-border);
  background: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.sample-page figcaption { margin-top: .8rem; font-size: .88rem; color: var(--ink-dim); text-align: center; }
.sample-actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.sample-meta { font-family: var(--mono); font-size: .78rem; color: var(--ink-faint); }
.service-sample { display: inline-flex; align-items: center; min-height: 44px; margin-top: .6rem; color: var(--teal-bright); text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
@media (min-width: 760px) {
  .sample-grid { grid-template-columns: repeat(3, 1fr); }
}

.free-services { padding-top: 2rem; }
.free-grid { grid-template-columns: 1fr; }
@media (min-width: 760px) { .free-grid { grid-template-columns: repeat(2, 1fr); } }
.free-logo { display: block; width: 72px; height: 72px; border-radius: 16px; object-fit: contain; }
.tools-page { max-width: 1000px; margin: 0 auto; padding: 3rem 1.25rem 5rem; }
.tools-page h1 { margin: .8rem 0 1rem; }
.tools-page > p { color: var(--ink-dim); max-width: 56ch; margin-bottom: 2.4rem; }
.tools-page .free-card { transform: none; }
