:root {
  --bg: #07060a;
  --bg-soft: #0e0c14;
  --ink: #f4f1ea;
  --muted: #9a93a6;
  --red: #d83030;
  --green: #18a048;
  --blue: #3078f0;
  --yellow: #f0d800;
  --line: rgba(244, 241, 234, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Sora", system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Video intro / logo ---------- */
.video-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  overflow: hidden;
  background: #000;
  pointer-events: none;
  transition:
    opacity 0.7s ease,
    visibility 0.7s ease;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 0%, transparent 55%, rgba(7,6,10,0.85) 100%),
    linear-gradient(180deg, rgba(7,6,10,0.15), rgba(7,6,10,0.55));
}

/* Al scrollear, el video de intro desaparece (sin recuadro) */
body.scrolled .video-wrap {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Mount de la tarjeta de desarrollador (React) ---------- */
.card-section {
  max-width: none;
  overflow: visible;
}
.id-card-mount {
  margin-top: 3.5rem;
  padding: clamp(3rem, 8vw, 7rem) 1rem;
  display: block;
  width: 100%;
  overflow: visible;
}

/* ---------- Intro: solo el video ---------- */
.hero {
  position: relative;
  height: 100vh;
  z-index: 5;
}

/* Botones flotantes sobre la animación */
.intro-actions {
  position: fixed;
  left: 50%;
  bottom: clamp(1.4rem, 5vh, 3rem);
  transform: translateX(-50%);
  z-index: 999;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  padding: 0 1rem;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
}
body.scrolled .intro-actions {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 20px);
  pointer-events: none;
}
.cta {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 241, 234, 0.45);
  background: rgba(12, 10, 16, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.cta:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  background: rgba(216, 48, 48, 0.15);
}
.cta-solid {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.cta-solid:hover {
  background: #b32626;
  border-color: #b32626;
}
@media (max-width: 520px) {
  .cta { padding: 0.7rem 1.1rem; font-size: 0.82rem; }
}

/* ---------- Contenido ---------- */
.content {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 0 clamp(1.4rem, 6vw, 8rem);
}

.block {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(5rem, 14vh, 11rem) 0;
  border-top: 1px solid var(--line);
}

.index {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.6rem;
}

.block-title {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.block-title.big { font-size: clamp(3rem, 12vw, 8rem); }
.hl { color: var(--red); }

.block-text {
  margin-top: 1.8rem;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 54ch;
}

/* ---------- Stats ---------- */
.stats {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4rem);
}
.stats div { display: flex; flex-direction: column; }
.stats strong {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--ink);
}
.stats span { color: var(--muted); font-size: 0.9rem; letter-spacing: 0.05em; margin-top: 0.3rem; }

/* ---------- Herramientas / logos ---------- */
.tools {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}
.tool {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.tool:hover {
  transform: translateY(-6px);
  border-color: var(--red);
  background: #140f17;
}
.tool img { width: 42px; height: 42px; }
.tool span { font-size: 0.85rem; color: var(--muted); letter-spacing: 0.03em; }

/* ---------- Proyectos ---------- */
.projects { margin-top: 2.6rem; display: flex; flex-direction: column; gap: 0; }
.project {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 1.8rem 0.4rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: padding 0.4s ease, background 0.4s ease;
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project:hover { padding-left: 1.4rem; padding-right: 1.4rem; background: var(--bg-soft); }
.p-num {
  font-family: "Unbounded", sans-serif;
  font-size: 0.9rem;
  color: var(--red);
  min-width: 2.4rem;
}
.p-body { flex: 1; }
.p-body h3 {
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: -0.01em;
}
.p-body p { color: var(--muted); margin-top: 0.4rem; font-size: 0.98rem; line-height: 1.5; max-width: 60ch; }
.p-arrow {
  font-size: 1.6rem;
  color: var(--muted);
  transition: transform 0.4s ease, color 0.4s ease;
}
.project:hover .p-arrow { transform: translate(4px, -4px); color: var(--red); }

/* ---------- Servicios ---------- */
.services {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.service {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.service:hover {
  transform: translateY(-5px);
  border-color: var(--red);
  background: #140f17;
}
.s-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(216, 48, 48, 0.15);
  color: var(--red);
  font-weight: 700;
  font-size: 1.1rem;
}
.s-body h3 {
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  letter-spacing: -0.01em;
}
.s-body p { color: var(--muted); margin-top: 0.35rem; font-size: 0.98rem; line-height: 1.45; }

/* ---------- Proceso de trabajo ---------- */
.process {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.step {
  position: relative;
  padding: 1.6rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.step:hover {
  transform: translateY(-5px);
  border-color: var(--red);
  background: #140f17;
}
.step-num {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--red);
  display: block;
  margin-bottom: 0.8rem;
}
.step h3 {
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  letter-spacing: -0.01em;
}
.step p { color: var(--muted); margin-top: 0.4rem; font-size: 0.98rem; line-height: 1.45; }

/* ---------- Contacto / redes ---------- */
.socials-grid {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.social-card:hover {
  transform: translateY(-5px);
  border-color: var(--red);
  background: #140f17;
}
.social-card img { width: 30px; height: 30px; }
.social-card .si { width: 30px; height: 30px; flex: none; }

.foot {
  margin-top: 4rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

@media (max-width: 640px) {
  .video-wrap { height: 100vh; }
}
