/* Gens Ursonensis Producciones — Landing Page */

:root {
  --bg: #0A0A0A;
  --text: #F5F5F0;
  --accent: #C8A96E;
  --text-muted: #8A8A85;
  --surface: #151515;
  --border: #222222;
  --contact-bg: #111111;

  --font-display: 'Archivo Black', sans-serif;
  --font-body: 'Inter', sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  --max-width: 1200px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Typography */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: var(--space-sm);
}

.section-divider {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto;
}

/* Layout */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-2xl) 0;
  }
}

/* Animation base — elements start hidden, JS adds .visible */

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

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

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

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--space-md);
}

.hero__logo {
  width: min(360px, 70vw);
  height: auto;
  margin: 0 auto var(--space-md);
}

.hero__tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.75rem, 2vw, 1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.9;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text);
  opacity: 0.6;
  animation: bounce 2s ease infinite;
  transition: opacity 0.2s;
}

.hero__scroll:hover {
  opacity: 1;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav__links {
  display: none;
  gap: var(--space-md);
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--accent);
}

.nav__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text);
}

/* Hamburger animation */
.nav__hamburger svg line {
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav__hamburger[aria-expanded="true"] .hamburger-top {
  transform: translateY(6px) rotate(45deg);
}

.nav__hamburger[aria-expanded="true"] .hamburger-mid {
  opacity: 0;
}

.nav__hamburger[aria-expanded="true"] .hamburger-bot {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu open state */
.nav__links.open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  gap: var(--space-lg);
  z-index: 99;
}

.nav__links.open a {
  font-size: 1.25rem;
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }

  .nav__hamburger {
    display: none;
  }
}

/* ========================
   PORTFOLIO
   ======================== */

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.portfolio-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.03);
}

.portfolio-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-item__overlay {
  opacity: 1;
}

.portfolio-item__title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.portfolio-item__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .portfolio-item--large {
    grid-column: span 2;
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-item--large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
  }

  .portfolio-item--small {
    aspect-ratio: 1 / 1;
  }
}

/* ========================
   LIGHTBOX
   ======================== */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.lightbox.active {
  display: flex;
}

.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  color: var(--text);
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 201;
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox__video {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 4px;
}

/* ========================
   SERVICES
   ======================== */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: var(--space-lg) var(--space-md);
  position: relative;
  overflow: hidden;
}

.service-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.service-card__subtitle {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.service-card__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.services-quote {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.section--about {
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 4px;
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-md) 0;
}

.about-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.about-headline em {
  font-style: normal;
  color: var(--accent);
}

.about-claim {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.01em;
}

.about-details p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: var(--space-xs);
}

.about-details strong {
  color: var(--text);
}

.about-gear {
  margin-top: var(--space-lg);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
}

/* Float-in animation — elegant upward drift */
.float-in {
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.float-in.visible {
  animation: floatIdle 4s ease-in-out infinite;
}

.float-delay-1 { transition-delay: 0.15s; }
.float-delay-2 { transition-delay: 0.3s; }
.float-delay-3 { transition-delay: 0.45s; }

@keyframes floatIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 45% 1fr;
    min-height: 70vh;
  }

  .about-content {
    padding: var(--space-lg) 0 var(--space-lg) var(--space-lg);
  }
}

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

.section--contact {
  background: linear-gradient(to bottom, var(--bg), var(--contact-bg));
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-subtitle {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border-radius: 4px;
  transition: background-color 0.2s, transform 0.2s;
}

.contact-cta:hover {
  background: #b8994e;
  transform: translateY(-1px);
}

.contact-email {
  margin-top: var(--space-md);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.contact-email a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}

.contact-email a:hover {
  border-color: var(--accent);
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.contact-social a {
  color: var(--text);
  opacity: 0.6;
  transition: color 0.2s, opacity 0.2s;
}

.contact-social a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ========================
   FOOTER
   ======================== */

.footer {
  padding: var(--space-lg) 0 var(--space-md);
  text-align: center;
}

.footer__divider {
  height: 1px;
  background: var(--border);
  margin-bottom: var(--space-lg);
}

.footer__logo {
  width: 32px;
  height: 32px;
  margin: 0 auto var(--space-sm);
  opacity: 0.5;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
}
