/* ============================================================
   Spiral Development Group — estilos
   Base: DESIGN.md (negro puro, bordes hairline, sin sombras)
   Acento: azul del logo en lugar de violeta
   ============================================================ */

:root {
  --bg: #000000;
  --line: #292d30;
  --line-strong: #3a3f44;
  --white: #ffffff;
  --text: #f0f0f0;
  --muted: #a1a4a5;
  --dim: #6e727a;
  --accent: #3b9eff;        /* Signal Blue */
  --accent-soft: #70b8ff;   /* Sky Blue */
  --accent-deep: #1a4fd6;   /* azul del logo, para degradados sutiles */
  --ok: #3ad389;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Instrument Serif', 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r-lg: 16px;
  --max: 1200px;
  --gutter: 24px;
  --section: 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

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

/* ---------- Tipografía ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--white);
}
.display em { font-style: italic; color: var(--accent-soft); }
.heading {
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--white);
  max-width: 20ch;
}
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 56ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.mono { font-family: var(--font-mono); font-size: 13px; }
.accent { color: var(--accent); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(58, 211, 137, 0.18); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; line-height: 1;
  border: 1px solid var(--line); color: var(--white); background: transparent;
  transition: border-color .15s ease-out, background .15s ease-out, color .15s ease-out;
  cursor: pointer; font-family: inherit;
}
.btn--ghost:hover { border-color: var(--white); }
.btn--primary { background: var(--white); color: #000; border-color: var(--white); }
.btn--primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn--block { width: 100%; padding: 14px; }
.link-chevron { color: var(--text); font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.link-chevron:hover { color: var(--white); }
.link-chevron span { transition: transform .15s ease-out; }
.link-chevron:hover span { transform: translateX(3px); }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); }
.brand__mark { width: 24px; height: 32px; color: var(--white); }
.brand__name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.brand__name span { font-weight: 400; color: var(--muted); }
.brand--sm .brand__mark { width: 18px; height: 24px; }
.brand--sm .brand__name { font-size: 14px; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav__links a:not(.btn) { color: var(--text); transition: color .15s; }
.nav__links a:not(.btn):hover { color: var(--white); }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 22px; height: 1.5px; background: var(--white); margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.nav__mobile { display: none; flex-direction: column; border-top: 1px solid var(--line); }
.nav__mobile a { padding: 16px var(--gutter); border-bottom: 1px solid var(--line); font-size: 16px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 var(--section); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero__copy { display: grid; gap: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }

.spiral-stage {
  position: relative; aspect-ratio: 1; max-width: 440px; margin-inline: auto;
  display: grid; place-items: center;
}
.spiral-stage__mark {
  width: 46%; color: var(--white); position: relative; z-index: 2;
  animation: float 7s ease-in-out infinite;
}
.spiral-stage__ring {
  position: absolute; inset: 8%; border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, rgba(59, 158, 255, 0.12), transparent 60%);
  animation: spin 40s linear infinite;
}
.spiral-stage__ring::before {
  content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-left: -3px;
}
.spiral-stage__ring--2 { inset: 22%; animation-duration: 26s; animation-direction: reverse; background: none; border-color: var(--line-strong); }
.spiral-stage__ring--2::before { background: var(--accent-soft); width: 4px; height: 4px; top: -2px; margin-left: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Secciones ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section--tight { padding: 64px 0; }
.section__head { display: grid; gap: 16px; margin-bottom: 56px; }
.section__head--center { text-align: center; justify-items: center; margin-bottom: 32px; }

.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* Tarjetas de servicio */
.card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px;
  display: grid; gap: 14px; align-content: start;
  transition: border-color .15s ease-out;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { font-size: 18px; font-weight: 500; color: var(--white); letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15px; }
.card__icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line); background: linear-gradient(145deg, rgba(59, 158, 255, 0.14), rgba(26, 79, 214, 0.04));
  margin-bottom: 6px;
}
.card__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Portafolio */
.project { display: grid; gap: 10px; align-content: start; }
.project__window {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 10px;
  transition: border-color .15s;
}
.project:hover .project__window { border-color: var(--line-strong); }
.project__bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.project__bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.project__code {
  margin: 0; padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
  color: var(--text); white-space: pre-wrap; min-height: 128px;
}
.project__code .k { color: var(--accent); }
.project__code .c { color: var(--dim); }
.project__code .s { color: var(--accent-soft); }
.project__code .ok { color: var(--ok); }
.project__tag { color: var(--accent); letter-spacing: 0.02em; }
.project h3 { font-size: 18px; font-weight: 500; color: var(--white); letter-spacing: -0.01em; }
.project p { color: var(--muted); font-size: 15px; }

/* Socios */
.logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.logos__item {
  position: relative; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #f4f5f6;
  height: 120px; overflow: hidden;
  filter: grayscale(1) contrast(1.05); opacity: 0.85;
  transition: filter .2s ease-out, opacity .2s ease-out;
}
.logos__item:hover { filter: none; opacity: 1; }
.logos__item img { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); object-fit: contain; }

/* Quiénes somos */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about .section__head { margin-bottom: 0; }
.about__body { display: grid; gap: 28px; }
.about__points { display: grid; gap: 0; border-top: 1px solid var(--line); }
.about__points li { padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.about__points strong { color: var(--white); font-weight: 500; display: block; margin-bottom: 2px; }

/* Demo presencial */
.demo { padding: 0 0 var(--section); scroll-margin-top: 96px; }
.demo__card {
  display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 48px; align-items: center;
  border: 1px solid var(--line); border-radius: 24px; padding: 48px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(59, 158, 255, 0.14), transparent 55%),
    var(--bg);
}
.demo__copy { display: grid; gap: 18px; }
.demo__points { display: grid; gap: 10px; margin-top: 4px; }
.demo__points li { position: relative; padding-left: 26px; color: var(--text); font-size: 15px; }
.demo__points li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 7px;
  border-left: 1.5px solid var(--accent-soft); border-bottom: 1.5px solid var(--accent-soft);
  transform: rotate(-45deg);
}
.demo__actions { display: grid; gap: 12px; }
.demo__note { color: var(--dim); text-align: center; font-size: 12px; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact .section__head { margin-bottom: 0; }
.contact__list { display: grid; gap: 14px; margin-top: 16px; }
.contact__list li { display: grid; gap: 4px; font-size: 17px; color: var(--white); }
.contact__list a:hover { color: var(--accent-soft); }
.contact__label { color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.social { display: flex; gap: 10px; margin-top: 8px; }
.social a {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--muted); transition: border-color .15s, color .15s;
}
.social a:hover { border-color: var(--white); color: var(--white); }
.social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }

.form { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; background: transparent; color: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px;
  font: inherit; font-size: 15px; outline: none; transition: border-color .15s;
}
.form select { background: #000; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
.form textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status { font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form__status.ok { color: var(--ok); }
.form__status.error { color: #ff9592; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__copy, .footer__links a { font-size: 13px; color: var(--muted); }
.footer__links a:hover { color: var(--white); }

/* Botón flotante WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: #000; border: 1px solid var(--line); color: var(--white);
  transition: border-color .15s, transform .15s;
}
.wa-float:hover { border-color: var(--ok); transform: translateY(-2px); }
.wa-float svg { width: 24px; height: 24px; fill: currentColor; }

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .spiral-stage__ring, .spiral-stage__mark { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .spiral-stage { max-width: 260px; }
  .about, .contact { grid-template-columns: 1fr; gap: 40px; }
  .demo__card { grid-template-columns: 1fr; gap: 32px; padding: 32px; }
}
@media (max-width: 720px) {
  :root { --section: 72px; --gutter: 16px; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__mobile:not([hidden]) { display: flex; }
  .brand__name span { display: none; }
  .grid--3 { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 24px; }
  .form { padding: 20px; }
  .demo__card { padding: 24px; border-radius: var(--r-lg); }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
