/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #0B0B0E;
  color: #FAFAF9;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ===== Utilities ===== */
.accent-indigo { color: #6366F1; }
.accent-coral { color: #E85A4F; }
.accent-green { color: #32D583; }

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -1px;
  color: #FAFAF9;
  line-height: 1.1;
}

/* ===== Header ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 80px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0B0B0Eee;
  backdrop-filter: blur(12px);
}

.header .logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 32px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: #6B6B70;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #FAFAF9;
}

.lang-toggle {
  display: flex;
  background: #1A1A1E;
  border-radius: 100px;
  padding: 4px;
}

.lang-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6B6B70;
  background: none;
  border: none;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s;
}

.lang-btn.active {
  background: #6366F1;
  color: #fff;
  font-weight: 600;
}

.btn-primary-sm {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #6366F1;
  padding: 10px 24px;
  border-radius: 100px;
  transition: background 0.3s;
}

.btn-primary-sm:hover {
  background: #4F46E5;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #FAFAF9;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  padding: 120px 80px 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('assets/hero-image.gif') center/cover no-repeat;
  opacity: 0.6;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid #2A2A2E;
  border-radius: 100px;
  background: #0B0B0ECC;
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #32D583;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.badge span {
  font-size: 13px;
  font-weight: 500;
  color: #6B6B70;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: 80px;
  font-weight: 600;
  letter-spacing: -2px;
  line-height: 1.05;
  max-width: 1000px;
}

.hero-sub {
  font-size: 20px;
  color: #6B6B70;
  line-height: 1.6;
  max-width: 700px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: #FAFAF9;
  color: #0B0B0E;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px #FAFAF933;
}

.btn-primary i, .btn-gradient i {
  width: 18px;
  height: 18px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  border: 1px solid #2A2A2E;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  color: #FAFAF9;
  transition: border-color 0.3s;
}

.btn-outline:hover {
  border-color: #6B6B70;
}

/* ===== Clients ===== */
.clients {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 48px 80px;
}

.clients-label {
  font-size: 12px;
  font-weight: 600;
  color: #4A4A50;
  letter-spacing: 3px;
}

.clients-row {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.clients-row span {
  font-size: 16px;
  font-weight: 700;
  color: #3A3A40;
  letter-spacing: 2px;
  transition: color 0.3s;
}

.clients-row span:hover {
  color: #6B6B70;
}

/* ===== Work ===== */
.work {
  padding: 80px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}

.section-header > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.view-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6B6B70;
  transition: color 0.3s;
}

.view-all:hover {
  color: #FAFAF9;
}

.view-all i {
  width: 16px;
  height: 16px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  background: #16161A;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px #00000040;
  transition: transform 0.4s, box-shadow 0.4s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px #00000060;
}

.project-img {
  width: 100%;
  height: 480px;
  overflow: hidden;
  background: #101014;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s;
}

.project-card:hover .project-img img {
  transform: scale(1.05);
}

.project-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-tags {
  display: flex;
  gap: 8px;
}

.tag {
  font-size: 12px;
  font-weight: 500;
  color: #6B6B70;
  background: #1A1A1E;
  padding: 4px 12px;
  border-radius: 100px;
}

.project-info h3 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.project-info p {
  font-size: 14px;
  color: #6B6B70;
  line-height: 1.5;
}

/* ===== Reels ===== */
.reels {
  padding: 80px;
  background: #16161A;
}

.btn-expand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid #2A2A2E;
  background: none;
  color: #6B6B70;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}

.btn-expand:hover {
  border-color: #6B6B70;
  color: #FAFAF9;
}

.btn-expand i {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.btn-expand.rotated i {
  transform: rotate(180deg);
}

.reels-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.reel-card {
  flex: 0 0 calc(25% - 18px);
  background: #0B0B0E;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px #00000040;
  transition: transform 0.4s;
}

.reel-card:hover {
  transform: translateY(-4px);
}

.reel-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.reel-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.reel-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.reel-card:hover .reel-poster {
  transform: scale(1.05);
}

.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000000CC, transparent);
  pointer-events: none;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: #E85A4FDD;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px #E85A4F55;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

.play-btn i {
  width: 24px;
  height: 24px;
  color: #fff;
}

.reel-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: #E85A4F;
}

.reel-embed.playing .reel-poster,
.reel-embed.playing .reel-overlay,
.reel-embed.playing .play-btn {
  display: none;
}

.reel-info {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-icon {
  width: 14px;
  height: 14px;
  color: #E85A4F;
}

.meta-platform {
  font-size: 12px;
  font-weight: 500;
  color: #E85A4F;
}

.meta-dot {
  font-size: 12px;
  color: #4A4A50;
}

.meta-client {
  font-size: 12px;
  font-weight: 500;
  color: #6B6B70;
}

.reel-info h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.yt-fallback-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  padding: 8px 14px;
  background: #FF0000;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border-radius: 6px;
  text-decoration: none;
  width: fit-content;
  transition: background 0.2s, transform 0.15s;
}
.yt-fallback-link:hover {
  background: #cc0000;
  transform: translateY(-1px);
}
.yt-fallback-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.yt-fallback-label {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  margin-top: 1px;
  letter-spacing: 0;
}
.video-info .yt-fallback-link {
  margin-top: 6px;
}


/* ===== Videos ===== */
.videos {
  padding: 80px;
}

.videos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.video-card {
  flex: 0 0 calc(33.333% - 16px);
  background: #16161A;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px #00000040;
  transition: transform 0.4s;
}

.video-card:hover {
  transform: translateY(-4px);
}

.video-embed {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.video-card.short .video-embed {
  height: 280px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.video-card:hover .video-poster {
  transform: scale(1.05);
}

.video-embed .video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000000CC, transparent);
  pointer-events: none;
}

.video-embed.playing .video-poster,
.video-embed.playing .video-overlay,
.video-embed.playing .play-btn {
  display: none;
}

.video-info {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-info h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.video-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: #E85A4F;
}

/* ===== Skills ===== */
.skills {
  padding: 80px;
}

.skills-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  text-align: center;
}

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

.skill-card {
  padding: 32px;
  border: 1px solid #2A2A2E;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.3s, transform 0.3s;
}

.skill-card:hover {
  border-color: #3A3A40;
  transform: translateY(-4px);
}

.skill-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-icon i {
  width: 28px;
  height: 28px;
  color: #fff;
}

.icon-indigo {
  background: linear-gradient(135deg, #6366F1, #4F46E5);
}

.icon-green {
  background: linear-gradient(135deg, #32D583, #059669);
}

.icon-coral {
  background: linear-gradient(135deg, #E85A4F, #DC2626);
}

.skill-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.skill-card p {
  font-size: 14px;
  color: #6B6B70;
  line-height: 1.6;
}

/* ===== About ===== */
.about {
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 100px 80px;
}

.about-img {
  flex-shrink: 0;
  width: 420px;
  height: 630px;
  border-radius: 20px;
  overflow: hidden;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-text p {
  font-size: 16px;
  color: #6B6B70;
  line-height: 1.7;
}

.stats {
  display: flex;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1.2px;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: #6B6B70;
}

/* ===== CTA ===== */
.cta {
  background: #16161A;
  padding: 120px 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.cta h2 {
  font-family: 'Fraunces', serif;
  font-size: 72px;
  font-weight: 600;
  letter-spacing: -2px;
  line-height: 1.05;
}

.cta p {
  font-size: 18px;
  color: #6B6B70;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 40px;
  background: linear-gradient(135deg, #6366F1, #4F46E5);
  color: #fff;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 8px 24px #6366F133;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px #6366F155;
}

.btn-gradient i {
  width: 18px;
  height: 18px;
}

/* ===== Footer ===== */
.footer {
  padding: 40px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer .logo {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.social-icons {
  display: flex;
  gap: 20px;
}

.social-icons a {
  color: #6B6B70;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #FAFAF9;
}

.social-icons i {
  width: 22px;
  height: 22px;
}

.footer-divider {
  height: 1px;
  background: #2A2A2E;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom span {
  font-size: 13px;
  color: #4A4A50;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: #4A4A50;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #6B6B70;
}

/* ===== Scroll to top ===== */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #6366F1;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
  z-index: 100;
  box-shadow: 0 4px 16px #6366F140;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: #4F46E5;
  transform: translateY(-2px);
}

.scroll-top i {
  width: 20px;
  height: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .header { padding: 20px 40px; }
  .hero { padding: 80px 40px; }
  .hero-title { font-size: 56px; }
  .work, .reels, .videos, .skills, .cta, .footer { padding: 60px 40px; }
  .about { padding: 60px 40px; flex-direction: column; }
  .about-img { width: 100%; height: 500px; }
  .section-title { font-size: 36px; }
  .cta h2 { font-size: 48px; }
  .projects-grid { grid-template-columns: 1fr; }
  .reel-card { flex-basis: calc(50% - 12px); }
  .video-card { flex-basis: calc(50% - 12px); }
  .video-embed { height: 240px; }
  .clients { padding: 40px; }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #16161A;
    flex-direction: column;
    padding: 80px 40px 40px;
    gap: 24px;
    z-index: 200;
  }

  .nav.open { display: flex; }
  .mobile-menu-btn { display: block; z-index: 300; }

  .header { padding: 16px 24px; }
  .hero { padding: 60px 24px; min-height: 80vh; }
  .hero-title { font-size: 40px; letter-spacing: -1px; }
  .hero-sub { font-size: 16px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .btn-primary, .btn-outline, .btn-gradient { width: 100%; justify-content: center; }

  .work, .reels, .videos, .skills, .cta, .footer { padding: 48px 24px; }
  .about { padding: 48px 24px; gap: 40px; }
  .about-img { height: 400px; }
  .section-header { flex-direction: column; gap: 16px; align-items: flex-start; }
  .section-title { font-size: 32px; }

  .clients-row { gap: 24px; }
  .clients-row span { font-size: 13px; }

  .projects-grid, .skills-grid { grid-template-columns: 1fr; }
  .reel-card, .video-card { flex-basis: 100%; }
  .project-img { height: 360px; }

  .stats { gap: 24px; }
  .stat-number { font-size: 28px; }

  .cta h2 { font-size: 36px; }
  .cta p { font-size: 16px; }
  .cta-buttons { flex-direction: column; width: 100%; }

  .footer-top, .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ===== Carrusel en tarjetas de proyecto ===== */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11,11,14,0.72);
  border: 1px solid #2A2A2E;
  color: #FAFAF9;
  font-size: 22px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s, background 0.25s;
  z-index: 10;
}

.carousel-wrapper:hover .carousel-btn {
  opacity: 1;
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-btn:hover {
  background: rgba(11,11,14,0.95);
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(250,250,249,0.35);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.carousel-dot.active {
  background: #FAFAF9;
  transform: scale(1.3);
}
/* ===== Reel card vacío (placeholder) ===== */
.reel-card--empty .reel-embed--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  min-height: 200px;
  cursor: default;
}

.reel-empty-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.3);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.reel-empty-placeholder svg {
  width: 36px;
  height: 36px;
  stroke: rgba(255,255,255,0.2);
}
