@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 {
  scroll-behavior: smooth;
  background: var(--bg);
}

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);
}

nav a:first-child {
  position: absolute;
  left: clamp(1rem, 4vw, 2.5rem);
}

nav a img {
  height: 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;
  min-height: 100vh;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 3rem;
  text-align: center;
  position: relative;
}

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: clamp(0.9rem, 2vw, 1rem);
  border-radius: 0.5rem;
  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 ======================== */

.carousel {
  position: relative;
}

.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: 0 2.5rem;
  scroll-behavior: smooth;
}

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

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  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;
}

.video-card {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: var(--bg-secondary);
  flex: 0 0 200px;
  scroll-snap-align: start;
}

@media (max-width: 639px) {
  .video-card {
    flex: 0 0 150px;
  }
}

.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.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.video-card:hover .video-overlay {
  opacity: 1;
}

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

.video-overlay h3 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.video-overlay p {
  color: var(--accent);
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

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

#servicios > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  #servicios > div {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #servicios > div {
    grid-template-columns: repeat(4, 1fr);
  }
}

#servicios article {
  background: var(--bg-secondary);
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

#servicios article:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 0 20px var(--accent-glow);
}

#servicios h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

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

#about > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 50rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  #about > div {
    flex-direction: row;
  }
}

#about > div > div:first-child {
  width: clamp(10rem, 25vw, 15rem);
  height: clamp(10rem, 25vw, 15rem);
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

#about > div > div:last-child {
  text-align: center;
}

@media (min-width: 640px) {
  #about > div > div:last-child {
    text-align: left;
  }
}

#about p {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  margin-bottom: 1rem;
}

/* ======================== CONTACT ======================== */

#contact form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 32rem;
  margin: 0 auto;
}

#contact label {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  font-weight: 500;
  color: var(--text-muted);
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

#contact textarea {
  min-height: 8rem;
  resize: vertical;
}

#contact button {
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--bg);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 0.5rem;
  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);
}

/* ======================== 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);
}
