@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ======================== VARIABLES ======================== */

:root {
  --bg: #000000;
  --bg-secondary: #060606;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.15);
  --transition: 0.3s ease;
  --nav-height: 4rem;
}

/* ======================== RESET ======================== */

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

html {
  background: var(--bg);
  /* anclas (#videos, #contacto...) sin quedar debajo del nav fijo */
  scroll-padding-top: calc(var(--nav-height) + 0.5rem);
}

body {
  font-family: "Satoshi", sans-serif;
  font-weight: 400;
  background: transparent;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background:
    radial-gradient(ellipse 100% 25% at 50% 11%, rgba(139, 92, 246, 0.15), transparent 45%),
    radial-gradient(ellipse 90% 30% at 50% 50%, rgba(124, 58, 237, 0.1), transparent 50%),
    radial-gradient(ellipse 120% 25% at 50% 84%, rgba(167, 139, 250, 0.12), transparent 40%);
  pointer-events: none;
  z-index: -1;
  animation: section-gradient 8s ease-in-out infinite alternate;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: var(--bg);
}

body::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ======================== NAVBAR ======================== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  background: transparent;
  z-index: 100;
  padding: 0 1rem;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

nav.scrolled {
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(12px);
}

.main-nav .nav-logo {
  position: absolute;
  left: clamp(1rem, 4vw, 2.5rem);
}

nav a img {
  height: clamp(2.5rem, 8vw, 3.5rem);
  width: auto;
}

nav a {
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

nav a:hover {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ======================== HERO ======================== */

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* mobile: hero más corto que desktop; 70svh escala proporcional en cada resolución */
  min-height: 70vh;
  min-height: 70svh;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 3rem;
  text-align: center;
  position: relative;
}

@media (min-width: 640px) {
  header {
    min-height: 100vh;
    min-height: 100svh; /* sin el corte de la barra de URL en mobile */
  }
}

header h1 {
  font-size: clamp(2.5rem, 10vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  animation: hero-text-in 0.8s ease-out both;
}

header h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 1.2rem auto 0;
  border-radius: 2px;
  animation: hero-divider 1s ease-out 0.4s both;
}

header h2 {
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 40rem;
  animation: hero-text-in 0.8s ease-out 0.2s both;
}

header a {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 100rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: hero-text-in 0.8s ease-out 0.4s both;
}

header a:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
}

/* ======================== SECTIONS ======================== */

section {
  padding: clamp(4rem, 10vw, 7rem) clamp(1rem, 5vw, 4rem);
  position: relative;
  z-index: 2;
}

section h2 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 900;
  margin-bottom: 2.5rem;
  text-align: center;
  display: inline-block;
  width: 100%;
  position: relative;
}

section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* ======================== VIDEOS CAROUSEL ======================== */

/* mobile: menos aire entre el hero y esta sección (las demás no se tocan) */
#videos {
  padding-top: 2.5rem;
  /* gap inferior = token compartido (2.5rem+2.5rem) con #servicios */
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

@media (min-width: 640px) {
  #videos {
    padding-top: clamp(4rem, 10vw, 7rem);
  }
}

.carousel {
  position: relative;
  isolation: isolate;
  --card-w: 150px;
  --track-py: 1.25rem;
  --focus-scale: 1.08;
}

.carousel::before,
.carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 5;
  pointer-events: none;
}

.carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: var(--track-py) 2.5rem;
  scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 0.5rem;
}

.carousel-next {
  right: 0.5rem;
}

@media (max-width: 639px) {
  /* solo mobile: botón < > a 24px = mínimo WCAG 2.2 AA (2.5.8) */
  .carousel-btn {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.6rem;
  }
}

.video-card {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: var(--bg-secondary);
  flex: 0 0 var(--card-w);
  scroll-snap-align: center;
  opacity: 0.6;
  transition: opacity var(--transition), transform var(--transition);
}

.video-card.is-active {
  opacity: 1;
  transform: scale(var(--focus-scale));
}

.video-card:hover {
  opacity: 1;
  transform: translateY(-4px) scale(1.04);
}

.video-card.is-active:hover {
  transform: translateY(-4px) scale(var(--focus-scale));
}

/* slot central fijo: glow de fondo detrás del video, sin borde */
.carousel-slot {
  position: absolute;
  top: var(--track-py);
  left: 50%;
  transform: translateX(-50%) scale(var(--focus-scale));
  width: var(--card-w);
  aspect-ratio: 9 / 16;
  border-radius: 0.75rem;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.14);
  pointer-events: none;
  z-index: -1;
}

@media (min-width: 640px) {
  .carousel {
    --card-w: 200px;
  }
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 35%,
    transparent 65%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(0.75rem, 3vw, 1.5rem);
}

.video-card:hover video {
  transform: scale(1.05);
  transition: transform 0.4s ease;
}

/* mobile (<640): texto de la card más chico; ≥640 conserva el tamaño original */
.video-overlay h3 {
  font-size: 0.63rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.video-overlay p {
  color: var(--accent);
  font-size: 0.52rem;
}

@media (min-width: 640px) {
  .video-overlay h3 {
    font-size: clamp(0.72rem, 1.3vw, 0.88rem);
  }

  .video-overlay p {
    font-size: clamp(0.6rem, 1vw, 0.66rem);
  }
}

.carousel-empty {
  width: 100%;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

/* ======================== SERVICIOS ======================== */

#servicios {
  min-height: auto;
  /* padding vertical = token compartido: gaps de sección uniformes en cada resolución */
  padding: clamp(2.5rem, 5vw, 4.5rem) 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.services-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  max-width: 70rem;
  width: 100%;
}

/* Dial */

.dial-wrapper {
  flex-shrink: 0;
}

.dial {
  --dial: clamp(16rem, 40vw, 28rem);
  --aspa: 4rem;
  --aspa-gap: 1.5rem;
  width: var(--dial);
  height: var(--dial);
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.15);
  position: relative;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dial-aspa {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--aspa);
  height: var(--aspa);
  margin: calc(var(--aspa) / -2);
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.dial-aspa svg {
  width: 2rem;
  height: 2rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.dial-aspa:nth-child(1) { --r: 180deg; }
.dial-aspa:nth-child(2) { --r: 300deg; }
.dial-aspa:nth-child(3) { --r: 60deg; }

.dial-aspa { transform: rotate(var(--r)) translateY(calc(var(--dial) / 2 - var(--aspa) / 2 - var(--aspa-gap))) rotate(calc(-1 * var(--r))); }

.dial-aspa.active {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.2);
  box-shadow: 0 0 16px var(--accent-glow), 0 0 32px var(--accent-glow);
}

.dial-aspa.active svg {
  color: var(--accent);
}

.dial-aspa:hover:not(.active) {
  border-color: var(--accent-hover);
  background: rgba(139, 92, 246, 0.15);
}

/* Service Info */

.service-info {
  max-width: 100%;
  padding: 0 1rem;
}

.service-info h3 {
  text-align: center;
  display: block;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
  min-height: 4rem;
}

.service-info ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.service-info li {
  color: var(--text-muted);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  text-align: center;
  max-width: 22rem;
}

.service-info li::before {
  content: none;
}

/* Servicios — desktop */

@media (min-width: 768px) {
  .services-container {
    flex-direction: row;
    gap: clamp(3rem, 6vw, 6rem);
  }

  .dial {
    --aspa: 5rem;
    --aspa-gap: 2.5rem;
  }

  .dial-aspa svg {
    width: 3rem;
    height: 3rem;
  }

  .service-info {
    max-width: 20rem;
    padding: 0;
  }

  .service-info h3 {
    text-align: left;
    display: flex;
    align-items: center;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1rem;
  }

  .service-info ul {
    align-items: flex-start;
  }

  .service-info li {
    text-align: left;
    max-width: none;
    padding-left: 1.2rem;
    position: relative;
  }

  .service-info li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
  }
}

/* ======================== ABOUT ======================== */

#about {
  text-align: center;
  /* gaps de sección uniformes: mismo token que #videos/#servicios/#contacto */
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  /* menos aire con la sección Contacto (fluid: escala en cada resolución) */
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.about-content {
  max-width: 40rem;
  margin: 0 auto;
}

.about-highlight {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.about-body {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  line-height: 1.7;
}

.about-body strong {
  color: var(--accent);
  font-weight: 700;
}



/* ======================== CONTACTO ======================== */

.contact-heading {
  text-align: center;
}

.contact-heading h2 {
  font-family: "Satoshi", sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 900;
}

.contact-heading h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.contact-wrapper {
  max-width: 70rem;
  margin: 0 auto;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

/* stacked (mobile/tablet): columna única centrada, medida de línea legible */
.contact-info {
  max-width: 30rem;
  margin-inline: auto;
}

.contact-form {
  margin-inline: auto;
}

/* fila de dos columnas solo cuando entra de verdad (convención: ≥1024):
   con gap 5rem + info 22rem + form 30rem haría overflow por debajo */
@media (min-width: 1024px) {
  .contact-row {
    flex-direction: row;
    /* el texto arranca a la par del borde superior de la card (no centrado) */
    align-items: flex-start;
    justify-content: center;
    gap: 5rem;
  }

  .contact-info {
    max-width: 22rem;
    margin-inline: 0;
  }

  .contact-info p {
    font-size: 1rem;
    line-height: 1.8;
  }

  .contact-form {
    zoom: 0.95;
    margin-inline: 0;
  }
}

.contact-info h3 {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.contact-line {
  width: 40px;
  height: 3px;
  margin-bottom: 1.25rem;
  background: var(--accent);
  border-radius: 2px;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  /* ninguna línea queda colgada (ej. "detalles." solo), en ningún ancho */
  text-wrap: balance;
}

.contact-form {
  flex: none;
  width: 100%;
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(139, 92, 246, 0.05);
border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: "Satoshi", sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(161, 161, 170, 0.45);
}

.form-group select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: #111;
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.05);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-button {
  align-self: flex-start;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--bg);
  font-family: "Satoshi", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 100rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.contact-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
}

.contact-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.form-status {
  font-size: 0.9rem;
  color: var(--accent-hover);
}

.form-status.is-error {
  color: #f87171;
}

/* ponytail: honeypot — off-screen y no display:none (eso los bots lo esquivan).
   left negativo no genera scroll horizontal en LTR. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-button {
    width: 100%;
  }
}

#contacto {
  /* menos aire con About (fluid), el inferior se mantiene para el footer */
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: 4rem;
}
/* ======================== FOOTER ======================== */

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

footer div {
  display: flex;
  gap: 1.5rem;
}

footer a {
  color: var(--text-muted);
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  transition: color var(--transition);
}

footer a:hover {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ======================== ANIMATIONS ======================== */

@keyframes section-gradient {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes hero-text-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-divider {
  from {
    opacity: 0;
    width: 0;
  }
  to {
    opacity: 1;
    width: 80px;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======================== NAV MOBILE ======================== */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.75rem; /* 24px icon + 24px = 48px de target táctil */
  z-index: 101;
}

.nav-links {
  display: contents;
}

@media (max-width: 767px) {
  .main-nav {
    justify-content: space-between;
    padding: 0 1rem;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 5, 5, 0.97);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }

}

/* ======================== SHORT VIEWPORTS (landscape) ======================== */

@media (max-height: 500px) {
  header {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 1.5rem);
    padding-bottom: 2rem;
  }

  header a {
    margin-top: 1.5rem;
  }

  .nav-links {
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }
}

/* ======================== REDUCED MOTION ======================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::before {
    animation: none;
  }

  header h1,
  header h2,
  header a,
  header h1::after {
    animation: none;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .carousel-track {
    scroll-behavior: auto;
  }

  .video-card {
    transition: none;
  }

  .dial {
    transition: none;
  }
}
