@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

html {
  scroll-behavior: smooth;
}

html, body {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #0d0d0d;
  color: #f0f0f0;
  line-height: 1.6;
  overflow-x: hidden;
}

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

.main-wrapper {
  flex: 1 0 auto;
}

/* ==========================================================================
   Navbar Fixed
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(13, 13, 13, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #222;
  padding: 14px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.nav-logo {
  display: flex;
  flex-direction: column;
}

.nav-logo h2 {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  font-weight: 500;
  line-height: 1.2;
}

.nav-logo span {
  font-size: 0.75rem;
  color: #888;
  font-weight: 400;
  margin-top: 2px;
}

.nav-links a {
  margin-left: 25px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #888;
  transition: color 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

/* ==========================================================================
   Secciones Single Page
   ========================================================================== */
.page-section {
  padding-top: 70px;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.full-width-container {
  max-width: 100% !important;
  padding: 60px 0 !important;
}

.home-container {
  padding-top: 40px;
}

.section-container {
  padding: 80px 5% 60px 5%;
  max-width: 800px;
  margin: 0 auto;
}

.section-title-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-title, .section-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 12px;
  text-transform: uppercase;
}

.section-title::after, .page-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: #fff;
}

/* ==========================================================================
   Hero & Showreel (1920 / 640)
   ========================================================================== */
.hero-section,
.showreel-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-top: 10px;
  overflow: hidden;
  background-color: #000;
}

.hero-video-wrapper,
.showreel-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 640;
}

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

.hero-caption {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 0 16px;
  font-weight: 300;
}

.sound-btn {
  position: absolute;
  bottom: 16px;
  right: 20px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background-color 0.2s, border-color 0.2s;
  z-index: 10;
}

.sound-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: #fff;
}

/* ==========================================================================
   Bio Intro & Grids
   ========================================================================== */
.bio-section {
  text-align: center;
}

.bio-section h1 {
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.hero-subtitle {
  max-width: 920px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: #ccc;
  font-weight: 300;
  line-height: 1.5;
  text-align: center;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.hero-btn {
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #ffffff;
  border-radius: 4px;
  color: #fff;
  transition: background-color 0.2s, color 0.2s;
}

.hero-btn:hover {
  background-color: #fff;
  color: #0d0d0d;
}

.films-grid-seamless {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-top: 20px;
}

.motion-grid-5col {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-top: 40px;
}

.project-card.seamless-card {
  background-color: #000;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.card-thumbnail-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.project-card.seamless-card:hover .card-thumbnail-wrapper img {
  transform: scale(1.05);
  filter: brightness(1.15);
}

.bio-content p {
  font-size: 1.05rem;
  color: #ccc;
  font-weight: 300;
  margin-bottom: 25px;
  line-height: 1.8;
}

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

.contact-container .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.contact-content p {
  font-size: 1.05rem;
  color: #aaa;
  font-weight: 300;
  margin-bottom: 20px;
}

.email-link {
  display: inline-block;
  text-align: center;
  width: 100%;
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.5px;
  transition: color 0.2s;
  font-size: clamp(1.2rem, 4.5vw, 1.8rem);
  word-wrap: break-word;
  word-break: break-all;
}

.email-link:hover {
  color: #888;
}

/* ==========================================================================
   Modal Overlay & Ajuste Proporcional
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content.fullscreen-modal {
  width: 98vw;
  max-width: 1700px;
  height: auto;
  max-height: 92vh;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  background: #141414;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
}

.modal-body {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 28px;
  padding: 32px;
  align-items: start;
  overflow-y: auto;
}

.modal-details h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 14px;
  color: #fff;
}

.modal-text-content p {
  font-size: 0.92rem;
  color: #ccc;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 12px;
}

.modal-text-content p:last-child {
  margin-bottom: 0;
}

.modal-text-content strong {
  color: #fff;
  font-weight: 500;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2005;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

.prev-btn {
  left: 12px;
}

.next-btn {
  right: 12px;
}

/* ==========================================================================
   Footer & Responsividad
   ========================================================================== */
footer {
  flex-shrink: 0;
  background: #080808;
  border-top: 1px solid #1a1a1a;
  color: #777;
  text-align: center;
  padding: 30px 20px;
}

footer p {
  font-size: 0.85rem;
  font-weight: 300;
}

@media (max-width: 1200px) {
  .motion-grid-5col {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 850px) {
  .modal-body {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 15px;
  }
  
  /* Ajuste de margen superior para evitar que la navbar tape el video del Hero */
  #home {
    padding-top: 110px;
  }

  .nav-links a {
    margin: 0 10px;
  }
  .hero-section, .showreel-section {
    margin-top: 0;
  }
  .films-grid-seamless {
    grid-template-columns: 1fr;
  }
  .motion-grid-5col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #home {
    padding-top: 125px;
  }
  .motion-grid-5col {
    grid-template-columns: 1fr;
  }
}