/* ==========================================================================
   DATRIA STUDIO — LANDING PAGE
   Mobile-first. Sin frameworks de CSS: todo escrito a mano para minimizar
   peso (no hay CSS sin usar, como pasaría con un framework de utilidades).
   ========================================================================== */

/* ---------- 1. TOKENS (paleta / tipografía / espaciados) ---------- */
:root {
  --bg: #0A0E17;
  --bg-alt: #0F1420;
  --surface: #141A2B;
  --border: #232B41;
  --text: #E8EAF0;
  --text-muted: #8B93A7;
  --blue: #4F7CFF;
  --violet: #9B5CFF;
  --whatsapp: #25D366;
  --gradient: linear-gradient(135deg, var(--blue), var(--violet));

  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --container-max: 72rem;      /* 1152px */
  --container-max-narrow: 56rem; /* 896px */
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

/* ---------- 2. RESET BÁSICO ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* evita scroll horizontal por los orbes decorativos */
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

/* Foco visible para accesibilidad (teclado) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

::selection { background: rgba(79, 124, 255, 0.3); }

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

/* ---------- 3. LAYOUT BASE ---------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.container--narrow { max-width: var(--container-max-narrow); }

@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
}

.section { padding: 5rem 0; }
.section--alt {
  background: rgba(15, 20, 32, 0.6);
  border-top: 1px solid rgba(35, 43, 65, 0.7);
  border-bottom: 1px solid rgba(35, 43, 65, 0.7);
}
@media (min-width: 768px) {
  .section { padding: 7rem 0; }
}

/* ---------- 4. FONDO DECORATIVO (grilla técnica + orbes) ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-decor__grid {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(var(--text-muted) 1px, transparent 1px),
    linear-gradient(90deg, var(--text-muted) 1px, transparent 1px);
  background-size: 42px 42px;
}
.bg-decor__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: float-orb 12s ease-in-out infinite;
}
.bg-decor__orb--blue {
  top: -6rem; left: -4rem;
  width: 18rem; height: 18rem;
  background: rgba(79, 124, 255, 0.25);
}
.bg-decor__orb--violet {
  top: 33%; right: -5rem;
  width: 20rem; height: 20rem;
  background: rgba(155, 92, 255, 0.2);
  animation-delay: -6s;
}
@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2%, 3%) scale(1.05); }
}

/* ---------- 5. TEXTOS / ETIQUETAS COMPARTIDAS ---------- */
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-blue { color: var(--blue); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.875rem;
  line-height: 1.2;
  max-width: 34rem;
  margin-top: 0.75rem;
}
@media (min-width: 640px) {
  .section__title { font-size: 2.25rem; }
}

/* ---------- 6. ICONOS ---------- */
.icon { width: 1.1rem; height: 1.1rem; }
.icon--lg { width: 1.75rem; height: 1.75rem; }
.icon--wa-fill { fill: var(--whatsapp); }

/* Dentro de un fondo ya verde (botón grande o flotante), el ícono tiene
   que tomar el color del texto de ese contenedor, si no queda invisible */
.btn--wa .icon--wa-fill,
.float-wa .icon--wa-fill { fill: currentColor; }

/* Espaciador invisible que balancea el ícono del otro lado, para que el
   texto quede ópticamente centrado en botones con ícono + label */
.icon-spacer { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }

/* ---------- 7. BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: filter 0.2s ease, transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.98); }

.btn--wa {
  background: var(--whatsapp);
  color: var(--bg);
  box-shadow: 0 10px 25px -8px rgba(37, 211, 102, 0.35);
}
.btn--wa:hover { filter: brightness(1.1); }

.btn--gradient {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 25px -8px rgba(79, 124, 255, 0.35);
}
.btn--gradient:hover { filter: brightness(1.1); }

.btn--outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn--outline:hover { border-color: rgba(79, 124, 255, 0.6); background: var(--surface); }

.btn--outline-accent {
  border-color: rgba(79, 124, 255, 0.45);
  color: var(--blue);
  background: rgba(79, 124, 255, 0.08);
  transition: filter 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn--outline-accent:hover {
  border-color: var(--blue);
  background: rgba(79, 124, 255, 0.18);
  box-shadow: 0 10px 25px -8px rgba(79, 124, 255, 0.35);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--border);
  background: rgba(20, 26, 43, 0.8);
  backdrop-filter: blur(6px);
  color: var(--text);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}
.btn--ghost:hover { border-color: rgba(79, 124, 255, 0.5); background: var(--surface); }

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

.hide-mobile { display: none; }
@media (min-width: 480px) {
  .hide-mobile { display: inline; }
}

/* ---------- 8. HEADER ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
#site-header.is-scrolled {
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(35, 43, 65, 0.7);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.logo--sm { font-size: 1rem; }

/* ---------- 9. HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
}
.hero__grid {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero__grid { grid-template-columns: 1fr 1fr; }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  font-size: 2.25rem;
  margin-top: 1.25rem;
}
@media (min-width: 640px) { .hero__title { font-size: 3rem; } }
@media (min-width: 1024px) { .hero__title { font-size: 3.4rem; } }

.hero__subtitle {
  margin-top: 1.5rem;
  max-width: 28rem;
  font-size: 1rem;
  color: var(--text-muted);
}
@media (min-width: 640px) { .hero__subtitle { font-size: 1.125rem; } }

.hero__cta-group {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .hero__cta-group { flex-direction: row; }
}

.hero__note {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ----- Mockup de dashboard (elemento de firma, 100% CSS, sin imágenes) ----- */
.hero__visual {
  position: relative;
  margin-inline: auto;
  width: 100%;
  max-width: 28rem;
}
@media (min-width: 768px) { .hero__visual { max-width: none; } }

.mockup {
  border: 1px solid var(--border);
  background: rgba(20, 26, 43, 0.8);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-xl);
  padding: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.mockup__topbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
}
.mockup__dot {
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: rgba(139, 147, 167, 0.4);
}
.mockup__url {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}
.mockup__panel {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.mockup__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mockup__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.badge-pill {
  background: rgba(37, 211, 102, 0.15);
  color: var(--whatsapp);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.chart {
  margin-top: 1.25rem;
  height: 8rem;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.bar {
  flex: 1;
  height: var(--h);
  border-radius: 0.375rem 0.375rem 0 0;
  transform-origin: bottom;
  animation: bar-grow 1.6s ease-out infinite alternate;
  animation-delay: var(--d);
}
.bar--blue { background: linear-gradient(to top, rgba(79,124,255,0.4), var(--blue)); }
.bar--violet { background: linear-gradient(to top, rgba(155,92,255,0.4), var(--violet)); }
@keyframes bar-grow {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}

.stats {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.stat {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}
.stat__value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

/* ---------- 10. SERVICIOS ---------- */
.cards-grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  border: 1px solid var(--border);
  background: rgba(20, 26, 43, 0.6);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.card:hover { border-color: rgba(79, 124, 255, 0.4); background: var(--surface); }

.icon-badge {
  width: 2.75rem; height: 2.75rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.75rem;
  background: var(--gradient);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  margin-top: 1.25rem;
}
.card__text {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.section__more {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

/* ---------- 11. POR QUÉ ELEGIRNOS ---------- */
.why-grid {
  margin-top: 3rem;
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .why-grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

.why-item {
  border-left: 2px solid rgba(79, 124, 255, 0.4);
  padding-left: 1.25rem;
}
.why-item__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue);
}
.why-item__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  margin-top: 0.5rem;
  display: block;
}
.why-item__text {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------- 12. CONTACTO ---------- */
.contact-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(20, 26, 43, 0.7);
  border-radius: 1.75rem;
  padding: 1.75rem;
}
@media (min-width: 640px) { .contact-card { padding: 2.75rem; } }

.contact-card::before {
  content: "";
  position: absolute;
  top: -6rem; right: 0;
  width: 14rem; height: 14rem;
  border-radius: 50%;
  background: rgba(155, 92, 255, 0.2);
  filter: blur(90px);
  pointer-events: none;
}

.contact-card__subtitle {
  margin-top: 0.75rem;
  max-width: 28rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-grid {
  position: relative;
  margin-top: 2rem;
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(139, 147, 167, 0.6); }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--blue); outline: none; }
.form-group textarea { resize: none; }

.form-feedback {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--whatsapp);
}

.whatsapp-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}
.whatsapp-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 0.75rem;
}
.whatsapp-card__text {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.whatsapp-card .btn { margin-top: 1.25rem; }

/* Variante centrada del contact-card, usada en la subpágina "Sobre Nosotros" */
.contact-card--centered { text-align: center; }
.contact-card--centered .contact-card__subtitle { margin-inline: auto; }
.contact-card--centered .btn { margin-top: 2rem; }

.contact-card__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text);
  margin-top: 0.75rem;
}
@media (min-width: 640px) {
  .contact-card__heading { font-size: 1.75rem; }
}

/* ---------- 13. FOOTER ---------- */
.footer {
  border-top: 1px solid rgba(35, 43, 65, 0.7);
  padding-block: 2rem;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
@media (min-width: 640px) {
  .footer__inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.footer__brand p { margin: 0; }
@media (min-width: 640px) {
  .footer__brand { align-items: flex-start; }
}

.footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}
@media (min-width: 640px) {
  .footer__social { justify-content: flex-end; }
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.2s ease;
}
.footer__link:hover { color: var(--blue); }
.footer__link .icon { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ---------- 14. BOTÓN FLOTANTE DE WHATSAPP ---------- */
.float-wa {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 50;
  width: 3.5rem; height: 3.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--whatsapp);
  box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.4);
  animation: pulse-soft 2.4s ease-out infinite;
  transition: transform 0.2s ease;
}
.float-wa:hover { transform: scale(1.06); }
.float-wa:active { transform: scale(0.95); }
@media (min-width: 768px) {
  .float-wa { right: 2rem; bottom: 2rem; }
}
@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* ---------- 14b. TOAST (feedback al copiar el mail) ---------- */
.toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  z-index: 60;
  transform: translate(-50%, -20px);
  max-width: calc(100% - 2.5rem);
  border: 1px solid var(--border);
  background: rgba(20, 26, 43, 0.95);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 15. REVEAL ON SCROLL (progressive enhancement vía JS) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 16. PÁGINA "SOBRE NOSOTROS" ---------- */
.about-hero {
  padding: 9rem 0 3rem;
  text-align: center;
}
.about-hero .eyebrow { display: block; margin-top: 1.5rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}
.back-link .icon { width: 0.9rem; height: 0.9rem; }
.back-link:hover { color: var(--blue); transform: translateX(-2px); }
.about-hero .hero__title { margin-top: 1rem; }
.about-hero .hero__subtitle {
  margin-inline: auto;
  margin-top: 1.25rem;
}
@media (min-width: 768px) {
  .about-hero { padding: 10rem 0 4rem; }
}

.section__subtitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--blue);
  margin-top: 0.75rem;
}
@media (min-width: 640px) {
  .section__subtitle { font-size: 1.3rem; }
}

.section__text {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* Grilla de pasos ("Cómo trabajamos") */
.steps-grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .steps-grid { grid-template-columns: repeat(5, 1fr); gap: 1rem; }
}

.step-card {
  border: 1px solid var(--border);
  background: rgba(20, 26, 43, 0.6);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}
.step-card:hover {
  border-color: rgba(79, 124, 255, 0.4);
  background: var(--surface);
  transform: translateY(-4px);
}

.step-card__index {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--gradient);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.step-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 1.1rem;
}
.step-card__text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Enlaces secundarios de contacto (Instagram / Gmail) en la subpágina */
.contact-links {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
}
@media (min-width: 480px) {
  .contact-links { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; }
}
.contact-links a {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  transition: color 0.2s ease;
}
.contact-links a .icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.contact-links a:hover { color: var(--blue); }
.contact-links__label { word-break: break-word; }
.contact-links__sep { display: none; color: var(--border); }
@media (min-width: 480px) {
  .contact-links__sep { display: inline; }
}
