/* ===== Fonts ===== */
@font-face { font-family: 'Grift'; src: url('../assets/fonts/Grift-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Grift'; src: url('../assets/fonts/Grift-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Grift'; src: url('../assets/fonts/Grift-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Grift'; src: url('../assets/fonts/Grift-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Grift'; src: url('../assets/fonts/Grift-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

/* ===== Tokens ===== */
:root {
  --ink: #17140E;
  --ink-soft: #6B6558;
  --paper: #FFFFFF;
  --cream: #F5F3EE;
  --border: rgba(23, 20, 14, 0.15);
  --border-active: rgba(245, 243, 238, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Grift', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; }

/* ===== Keyframes ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes auroraMove {
  0% { background-position: 0% 50%, 100% 0%, 0% 100%, 100% 100%; }
  50% { background-position: 100% 50%, 0% 100%, 100% 0%, 0% 0%; }
  100% { background-position: 0% 50%, 100% 0%, 0% 100%, 100% 100%; }
}
@keyframes galleryMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Aurora gradient text ===== */
.aurora-text {
  background-image:
    radial-gradient(circle at 20% 30%, var(--a1, #00c2ff) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, var(--a2, #ffc640) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, var(--a3, #33ff8c) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, var(--a4, #e54cff) 0%, transparent 45%);
  background-size: 220% 220%;
  background-color: var(--ink);
  background-blend-mode: multiply;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  will-change: background-position;
  animation: auroraMove 14s ease-in-out infinite;
  transition: background-color 0.5s ease;
}
.aurora-text.aurora-5 {
  background-image:
    radial-gradient(circle at 20% 30%, var(--a1) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, var(--a2) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, var(--a3) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, var(--a4) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, var(--a5) 0%, transparent 50%);
}
.aurora-commercials { --a1:#00C2CB; --a2:#FFE38A; --a3:#7FE0D4; --a4:#FF5D8F; --a5:#FF9A76; }
.aurora-talk { --a1:#7EC8E3; --a2:#3B82C4; --a3:#A9DDF3; --a4:#1E3A6E; --a5:#5AA9DC; }
.aurora-pink { --a1:#E6007E; --a2:#FF4FA3; --a3:#C90067; --a4:#FF80C0; --a5:#F0006B; }

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  row-gap: 6px;
  column-gap: 24px;
  padding: 22px 48px;
  background: rgba(255,255,255,0.9);
  transition: background-color 0.5s ease;
}
.nav.nav--transparent { background: transparent; }
.nav__logo {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.nav__links {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 14px;
  letter-spacing: 0.03em;
}
.nav .lang-switch {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}
/* Home nav: single row, no logo — lang-switch left, links right */
.nav--home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
}
@media (max-width: 700px) {
  .nav { padding: 16px 20px; }
  .nav__logo { font-size: 13px; }
  .nav__links { font-size: 12px; gap: 8px 14px; }
  .nav:not(.nav--home) {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .nav:not(.nav--home) .nav__logo { grid-column: 1; grid-row: 1; justify-self: center; }
  .nav:not(.nav--home) .nav__links { grid-column: 1; grid-row: 2; justify-self: center; justify-content: center; }
  .nav:not(.nav--home) .lang-switch { grid-column: 1; grid-row: 3; justify-self: center; }
}
.nav__links a {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
  padding-bottom: 2px;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { border-bottom-color: currentColor; }

.nav--transparent { color: var(--ink); transition: color 0.5s ease; }
.nav--transparent.on-image { color: var(--cream); }

.lang-switch {
  display: flex;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.05em;
}
.lang-switch button {
  appearance: none;
  background: none;
  border: none;
  font-family: 'Grift', sans-serif;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 2px 3px;
  transition: opacity 0.25s ease;
}
.lang-switch button:hover { opacity: 0.9; }
.lang-switch button[aria-current="true"] {
  opacity: 1;
  border-bottom: 1px solid currentColor;
}

/* Hamburger (Home page uses this instead of link list) */
.nav__burger {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav__burger span { width: 22px; height: 2px; background: currentColor; display: block; transition: background-color 0.5s ease; }
.nav__dropdown {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 8px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 0;
  min-width: 180px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  display: none;
  flex-direction: column;
}
.nav__dropdown.open { display: flex; }
.nav__dropdown a {
  padding: 10px 20px;
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease;
}
.nav__dropdown a:hover { background: rgba(0,0,0,0.04); }
.nav__dropdown .lang-switch { padding: 8px 20px 2px; margin-left: 0; }

/* ===== Footer ===== */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 48px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-top: auto;
}
.footer__credit { justify-self: start; transition: color 0.25s ease; }
.footer__copy { justify-self: center; white-space: nowrap; }
.footer__social { display: flex; gap: 16px; justify-self: end; }
.footer__social a { color: var(--ink-soft); transition: color 0.25s ease; }
.footer__social a:hover { color: var(--ink); }
@media (max-width: 640px) {
  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    padding: 24px 20px;
    text-align: center;
  }
  .footer__credit, .footer__copy, .footer__social { justify-self: center; }
  .footer__copy { white-space: normal; }
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Let's Talk CTA ===== */
.talk-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 48px 80px;
  text-align: center;
}
.talk-cta {
  font-weight: 900;
  font-size: clamp(56px, 9vw, 160px);
  letter-spacing: -0.01em;
  transition: opacity 0.25s ease;
  line-height: 1;
}
.talk-cta:hover { opacity: 0.6; }
.talk-email {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  transition: color 0.25s ease;
  margin-top: 12px;
  display: inline-block;
}
.talk-email:hover { color: var(--ink); }

/* ===== Category grid (Comerciales/Videoclips/Escenografias) ===== */
.category-hero {
  padding: 170px 48px 40px;
  text-align: center;
}
.category-hero h1 {
  font-weight: 700;
  font-size: clamp(52px, 9vw, 120px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}
.category-blurb {
  max-width: 560px;
  margin: 20px auto 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.project-grid {
  padding: 0 18px 50px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px;
}
@media (max-width: 900px) { .project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .project-grid { grid-template-columns: 1fr; } }

.project-card { display: block; color: inherit; }
.project-card__media {
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
  border-radius: 10px;
  height: 215px;
  background: #17140E;
}
.project-card__media iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%) scale(1.4);
  border: 0;
  pointer-events: none;
}
.project-card__media img {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}
.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 10px 14px;
  z-index: 2;
}
.project-card:hover .project-card__overlay { opacity: 1; }
.project-card:hover .project-card__media iframe { transform: translate(-50%, -50%) scale(1.46); }
.project-card:hover .project-card__media img { transform: translate(-50%, -50%) scale(1.12); }
.project-card__media img { transition: transform 0.6s ease; }
.project-card__media iframe { transition: transform 0.6s ease; }
.project-card__overlay span { color: var(--cream); font-size: 11px; letter-spacing: 0.02em; }
.project-card__watch {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--cream);
  border-radius: 100px;
  padding: 8px 22px;
  color: var(--cream);
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 600;
  white-space: nowrap;
}
.project-card__title {
  font-weight: 500;
  font-size: 16px;
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.project-card:hover .project-card__title { border-bottom-color: var(--ink); }

/* ===== Home hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 130px 48px 56px;
  flex: 1;
}
.hero__bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg.active { opacity: 1; }
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero__overlay.active { opacity: 1; }

.hero__name {
  position: relative;
  z-index: 2;
  margin-top: 40px;
}
.hero__name-line {
  font-weight: 700;
  font-size: clamp(52px, 10vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  transition: color 0.5s ease, text-align 0.4s ease;
}
.hero__name-line--andrea {
  text-align: left;
  animation: fadeInLeft 1s ease-out 0.15s both, auroraMove 14s ease-in-out infinite;
}
.hero__name-line--roessner {
  text-align: right;
  animation: fadeInRight 1s ease-out 0.35s both, auroraMove 14s ease-in-out infinite reverse;
}
.hero__name-line--andrea.justify-left { text-align: left; }

.hero__role {
  font-size: 14px;
  letter-spacing: 0.45em;
  margin-top: -12px;
  text-transform: uppercase;
  transition: color 0.5s ease;
  text-align: right;
}
.hero__location {
  font-size: 8px;
  letter-spacing: 0.45em;
  margin-top: 6px;
  text-transform: uppercase;
  transition: color 0.5s ease;
  text-align: right;
}

.hero__row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 60px;
  margin-top: 160px;
  animation: fadeUp 0.9s ease-out 0.3s both;
}
@media (max-width: 760px) {
  .hero__row { grid-template-columns: 1fr; margin-top: 80px; }
  .hero__about { align-items: flex-start !important; text-align: left !important; }
  .hero__about p { text-align: left !important; width: auto !important; }
  .hero__role {
    margin-left: 0 !important;
    margin-top: 14px;
    letter-spacing: 0.25em;
    text-align: left;
  }
  .hero__location { text-align: left; letter-spacing: 0.25em; }
  .hero__name-line { letter-spacing: -0.01em; }
}
.hero__what { font-size: 15px; margin-bottom: 18px; transition: color 0.5s ease; }
.hero__list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.5s ease;
  color: inherit;
  text-decoration: none;
}
.hero__list-item.active { border-top-color: var(--border-active); color: var(--cream); }
.hero__list-item span:first-child { font-size: 15px; letter-spacing: 0.02em; }
.hero__list-item span:last-child { font-size: 13px; color: #5C5648; transition: color 0.5s ease; }
.hero.on-image .hero__list-item span:last-child { color: rgba(245,243,238,0.7); }

.hero__about {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-end;
}
.hero__about p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 480px;
  margin: 30px 0 0;
  transition: color 0.5s ease;
  text-align: right;
  width: 364px;
  max-width: 100%;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 16px 28px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--paper);
  transition: transform 0.4s ease, background-color 0.5s ease, color 0.5s ease;
}
.hero__cta:hover { transform: translateY(-2px); }

/* Hero "on-image" state: hovering a What-We-Do item crossfades in a category
   background image, darkens the whole hero, and flips text to cream. */
.hero.on-image .aurora-text { background-color: var(--cream); }
.hero.on-image .hero__role,
.hero.on-image .hero__location,
.hero.on-image .hero__what { color: var(--cream); }
.hero.on-image .hero__about p { color: rgba(245,243,238,0.7); }
.hero.on-image .hero__cta { background: var(--cream); color: var(--ink); }

/* ===== Project detail ===== */
.detail-title-section { padding: 150px 48px 0; padding-top: 115px; }
.detail-title-section h1 {
  font-weight: 900;
  font-size: clamp(48px, 8vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 40px 0 0;
}
.detail-video {
  position: relative;
  overflow: hidden;
  height: 70vh;
  max-height: 760px;
  background: var(--ink);
  cursor: pointer;
  margin-top: 12px;
}
.detail-video iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%) scale(1.15);
  border: 0;
  pointer-events: none;
}
.detail-video__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-video__overlay[hidden] { display: none; }
.detail-video:hover .detail-video__overlay { opacity: 1; background: rgba(0,0,0,0.75); }
.detail-video__watch {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--cream);
  border-radius: 100px;
  padding: 14px 32px;
}
.detail-video__watch span { color: var(--cream); font-size: 14px; letter-spacing: 0.15em; font-weight: 600; }
.detail-video--stills { cursor: default; }
.detail-hero-carousel { position: absolute; inset: 0; }
.detail-hero-carousel img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
  cursor: pointer;
}
.detail-hero-carousel img.active { opacity: 1; }

.detail-meta {
  padding: 48px 48px 0;
}
.detail-meta__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 60px;
  justify-content: center;
  flex-wrap: wrap;
}
.detail-meta__item { display: flex; flex-direction: column; align-items: center; }
.detail-meta__label { font-size: 13px; letter-spacing: 0.05em; color: var(--ink-soft); text-transform: uppercase; margin-bottom: 8px; }
.detail-meta__value { font-weight: 700; font-size: 18px; }

.detail-gallery { padding: 64px 0 0; overflow: hidden; }
.detail-gallery__track { display: flex; gap: 20px; width: max-content; animation: galleryMarquee 75s linear infinite; }
.detail-gallery__track.paused { animation-play-state: paused; }
.detail-gallery__item { position: relative; flex: 0 0 420px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; cursor: pointer; }
.detail-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(23,20,14,0.92);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.lightbox[hidden] { display: none; }
.lightbox__frame { position: relative; width: 100%; max-width: 1100px; aspect-ratio: 16/9; }
.lightbox__frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; transition: opacity 0.3s ease; }
.lightbox__close, .video-fullscreen__close {
  position: absolute;
  top: 32px; right: 48px;
  color: var(--cream);
  font-size: 14px;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.video-fullscreen {
  position: fixed; inset: 0;
  background: #000;
  z-index: 60;
}
.video-fullscreen[hidden] { display: none; }
.video-fullscreen iframe { width: 100%; height: 100%; border: 0; }

/* ===== Contact ===== */
.contact-hero { padding: 170px 48px 0; }
.contact-hero__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.contact-hero h1 { font-weight: 900; font-size: clamp(52px, 9vw, 120px); line-height: 0.95; letter-spacing: -0.02em; margin: 0; }
.contact-hero__year { font-size: 14px; letter-spacing: 0.03em; color: var(--ink-soft); }

.contact-grid {
  padding: 80px 48px 0;
}
.contact-grid__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  border-top: 1px solid var(--border);
}
@media (max-width: 700px) { .contact-grid__inner { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.contact-grid__cell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 24px 32px 0;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: opacity 0.25s ease;
}
a.contact-grid__cell:hover { opacity: 0.55; }
.contact-grid__label { font-size: 13px; letter-spacing: 0.05em; color: var(--ink-soft); text-transform: uppercase; margin-left: 10px; }
.contact-grid__value { font-weight: 700; font-size: clamp(14px,1.3vw,18px); word-break: break-word; overflow-wrap: break-word; margin-left: 15px; }

.contact-about { padding: 100px 48px 100px; flex: 1; }
.contact-about__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px,320px) 1fr;
  gap: 60px;
}
@media (max-width: 700px) { .contact-about__inner { grid-template-columns: 1fr; } }
.contact-about__label { font-size: 14px; letter-spacing: 0.02em; color: var(--ink-soft); text-transform: uppercase; }
.contact-about__text { font-size: 22px; line-height: 1.5; margin: 0; max-width: 720px; font-weight: 500; }

/* Fade-in on scroll utility */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
