/* ========================================
   UTOPIA — estilo inspirado en billyboman.com
   ======================================== */

:root {
  --bg: #000;
  --bg-soft: #0a0a0a;
  --bg-marquee: #0d0d0d;
  --cream: #f0ede6;
  --cream-dim: rgba(240, 237, 230, 0.5);
  --cream-border: rgba(240, 237, 230, 0.1);
  --overlay-cream: rgba(245, 243, 238, 0.94);
  --text-dark: #111;
  --nav-bg: rgba(10, 10, 10, 0.18);
  --font: "Oswald", system-ui, sans-serif;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.77, 0, 0.18, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--cream);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

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

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

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

/* ---------- NAV ---------- */

.arc-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.4s ease;
}

.arc-nav.is-scrolled {
  background: rgba(10, 10, 10, 0.72);
}

.arc-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font);
  font-size: clamp(1.35rem, 2.2vh, 1.75rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  z-index: 1;
  transition: opacity 0.2s;
}

.arc-logo:hover {
  opacity: 0.75;
}

.arc-logo-img {
  display: block;
  height: 34px;
  width: auto;
}

.arc-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  z-index: 9999;
  flex-shrink: 0;
}

.arc-burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: #fff;
  transition: transform 0.35s var(--ease), opacity 0.25s ease;
  transform-origin: center;
}

.arc-burger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.arc-burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.arc-burger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Cuando el menú crema está abierto, las barras del burger se ven oscuras */
.arc-burger.open span {
  background: #111;
}

/* ---------- OVERLAY MENU ---------- */

.arc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9001;
  width: 100vw;
  height: 100vh;
  background: var(--overlay-cream);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.arc-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.arc-panel-link {
  display: block;
  font-family: var(--font-ui);
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.05;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
}

.arc-overlay.open .arc-panel-link {
  opacity: 1;
  transform: translateY(0);
}

.arc-overlay.open .arc-panel-link:nth-child(2) { transition-delay: 0.06s; }
.arc-overlay.open .arc-panel-link:nth-child(3) { transition-delay: 0.12s; }
.arc-overlay.open .arc-panel-link:nth-child(4) { transition-delay: 0.18s; }
.arc-overlay.open .arc-panel-link:nth-child(5) { transition-delay: 0.24s; }

.arc-panel-link:hover {
  color: #555;
}

/* Burger y logo por encima del overlay */
.arc-nav {
  z-index: 9002;
}

body.menu-open .arc-nav {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.menu-open .arc-logo {
  color: #111;
}

/* ---------- HERO / WORK ITEMS ---------- */

.work-item {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
  cursor: pointer;
  display: block;
}

.work-item-hero {
  aspect-ratio: auto;
  min-height: 100vh;
  min-height: 100dvh;
  cursor: default;
}

.showcase-video-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #0a0a0a;
}

.showcase-video-bg video,
.showcase-video-bg iframe,
.showcase-video-bg .yt-cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78%;
  transform: translate(-50%, -50%);
  border: 0;
  object-fit: cover;
  pointer-events: none;
}

/* En items 16:9 el cover usa dimensiones del contenedor */
.work-item:not(.work-item-hero) .showcase-video-bg iframe,
.work-item:not(.work-item-hero) .showcase-video-bg .yt-cover {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  width: 177.78%;
  height: 100%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

.work-item-info {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 40px;
  background: transparent;
  transition: background-color 0.4s;
  pointer-events: none;
}

.work-item:not(.work-item-hero):hover .work-item-info {
  background: rgba(0, 0, 0, 0.35);
}

.work-item-info--hero {
  pointer-events: none;
}

.hero-title {
  position: absolute;
  left: 3%;
  bottom: 5%;
  right: auto;
  max-width: 800px;
  color: var(--cream);
  text-align: left;
  letter-spacing: -0.01em;
  font-family: var(--font);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 200;
  line-height: 1.15;
  margin: 0;
}

.work-item-client {
  color: var(--cream);
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 6px;
}

.work-item-title {
  color: var(--cream);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  opacity: 0.9;
}

/* ---------- AS SEEN ON ---------- */

.as-seen-on-section {
  background: #000;
  padding: 60px 5%;
  color: #fff;
}

.as-seen-on-heading {
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 40px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
}

.as-seen-on-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 32px 48px;
}

.as-seen-on-logo {
  font-family: var(--font);
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  opacity: 0.85;
  white-space: nowrap;
}

/* ---------- WORK SECTION ---------- */

.work-section {
  background: var(--bg-soft);
  padding: 0;
}

.section-label {
  display: none;
}

.work-grid {
  display: block;
}

/* ---------- TRABAJOS ---------- */

.trabajos-section {
  background: var(--bg-soft);
  padding: 0 40px 100px;
}

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

@media (max-width: 900px) {
  .trabajos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .trabajos-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- ABOUT BLOCKS ---------- */

.about-block {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 120px 6% 80px;
}

.about-block__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.about-block__video iframe,
.about-block__video .yt-cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.about-block__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.3) 42%,
    rgba(0, 0, 0, 0.3) 58%,
    rgba(0, 0, 0, 0.78) 100%
  );
  pointer-events: none;
}

.about-block__col {
  position: relative;
  z-index: 2;
  width: 50%;
  max-width: 560px;
}

.about-block__col--right {
  text-align: right;
  margin-left: auto;
}

.about-block__title {
  font-family: var(--font);
  font-size: clamp(40px, 5.5vw, 76px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--cream);
  margin-bottom: 8px;
}

.about-block__subtitle {
  font-family: var(--font);
  font-size: clamp(15px, 1.8vw, 20px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(240, 237, 230, 0.65);
  margin-bottom: 24px;
}

.about-block__text p {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(240, 237, 230, 0.88);
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .about-block {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    padding: 140px 24px 80px;
  }

  .about-block__col {
    width: 100%;
    max-width: none;
  }

  .about-block__col--right {
    text-align: left;
    margin-left: 0;
  }
}

/* ---------- LOGO MARQUEE ---------- */

.logo-marquee-wrap {
  z-index: 10;
  background: var(--bg-marquee);
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.logo-marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  width: max-content;
  gap: 64px;
  padding: 0 32px;
  animation: marquee 40s linear infinite;
}

.logo-marquee-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
}

.logo-marquee-img {
  max-height: 18px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.85;
}

.logo-marquee-text {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 237, 230, 0.55);
  white-space: nowrap;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- FOOTER ---------- */

.footer-section {
  z-index: 10;
  background: var(--bg-soft);
  border-top: 1px solid var(--cream-border);
  padding: 0 40px 60px;
  position: relative;
}

.footer-section__inner {
  width: 100%;
}

.footer-studio-link {
  display: block;
}

.footer-studio {
  color: var(--cream);
  letter-spacing: -0.02em;
  margin: 0 0 60px;
  padding-top: 80px;
  font-family: var(--font);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 300;
  line-height: 1;
  transition: opacity 0.25s;
}

.footer-studio-img {
  display: block;
  height: 110px;
  width: auto;
  margin: 0 0 60px;
  padding-top: 80px;
  transition: opacity 0.25s;
}

.footer-studio-link:hover .footer-studio,
.footer-studio-link:hover .footer-studio-img {
  opacity: 0.7;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 32px;
  border-top: 1px solid rgba(240, 237, 230, 0.12);
}

.footer-link {
  opacity: 0.5;
  color: rgba(240, 237, 230, 0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
  transition: color 0.2s, opacity 0.2s;
}

.footer-link:hover {
  opacity: 1;
  color: var(--cream);
}

/* ---------- VIDEO OVERLAY (popup) ---------- */

.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 24px;
}

.video-overlay[hidden] {
  display: none !important;
}

.video-overlay-close {
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 10;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  padding: 8px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

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

.video-overlay-frame {
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.video-overlay-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- PROCESO CREATIVO ---------- */

.proceso-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 4%;
}

.proceso-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.proceso-video-bg iframe,
.proceso-video-bg .yt-cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.proceso-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.proceso-list {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  align-items: start;
}

.proceso-item__title {
  font-family: var(--font);
  font-size: clamp(15px, 1.6vw, 22px);
  font-weight: 500;
  color: var(--cream);
  text-align: center;
  margin-bottom: 14px;
}

.proceso-item__box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(240, 237, 230, 0.18);
  border-radius: 2px;
  padding: 16px;
  color: rgba(240, 237, 230, 0.85);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.proceso-item__box p {
  margin-bottom: 12px;
}

.proceso-item__box p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .proceso-list {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 560px;
    padding: 80px 0;
  }

  .proceso-hero {
    padding: 120px 24px;
  }
}

/* ---------- CONTACT HERO (video bg) ---------- */

.contact-hero {
  position: relative;
  padding: 120px 0 80px;
}

.contact-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.contact-video-bg iframe,
.contact-video-bg .yt-cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.contact-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.contact-hero .page-hero,
.contact-hero .contact-layout {
  position: relative;
  z-index: 2;
}

/* ---------- ABOUT / CONTACT PAGES ---------- */

.page-main {
  padding-top: 120px;
  min-height: 70vh;
  background: #000;
}

.page-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

.page-eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 237, 230, 0.45);
  margin-bottom: 24px;
}

.page-title {
  font-family: var(--font);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--cream);
  margin-bottom: 32px;
}

.page-lead {
  font-family: var(--font);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 200;
  line-height: 1.4;
  color: rgba(240, 237, 230, 0.75);
  max-width: 640px;
}

.about-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px 100px;
  display: grid;
  gap: 64px;
}

@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.about-card h3 {
  font-family: var(--font);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  margin-bottom: 8px;
}

.about-card .role {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 237, 230, 0.45);
  margin-bottom: 20px;
}

.about-card p {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(240, 237, 230, 0.7);
  font-weight: 300;
}

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #1a1a1a;
  border-radius: 2px;
}

.contact-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 100px;
  display: grid;
  gap: 64px;
}

@media (min-width: 800px) {
  .contact-layout {
    grid-template-columns: 1.2fr 1fr;
  }
}

.contact-block h3 {
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 237, 230, 0.4);
  margin-bottom: 16px;
  font-weight: 400;
}

.contact-block a,
.contact-block p {
  font-family: var(--font);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 300;
  color: var(--cream);
  display: block;
  margin-bottom: 8px;
  transition: opacity 0.2s;
}

.contact-block a:hover {
  opacity: 0.6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(240, 237, 230, 0.12);
  border-radius: 2px;
  padding: 14px 16px;
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(240, 237, 230, 0.4);
}

.contact-form textarea {
  min-height: 140px;
}

/* ---------- BOTONES (contact) ---------- */

.btn {
  padding: 0.75rem 1.35rem;
  border-radius: 2px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: var(--cream);
  color: #0a0a0a;
}

.btn--primary:hover {
  filter: brightness(0.95);
}

.auth-success {
  color: #86efac;
  font-size: 0.88rem;
  background: rgba(134, 239, 172, 0.1);
  border: 1px solid rgba(134, 239, 172, 0.25);
  border-radius: 2px;
  padding: 0.65rem 0.85rem;
}

/* En mobile los videos de fondo llenan todo el ancho y alto de la caja (se cortan si es necesario, sin franjas negras) */
@media (max-width: 768px) {
  .showcase-video-bg iframe,
  .showcase-video-bg .yt-cover,
  .about-block__video iframe,
  .about-block__video .yt-cover,
  .contact-video-bg iframe,
  .contact-video-bg .yt-cover,
  .proceso-video-bg iframe,
  .proceso-video-bg .yt-cover {
    width: 177.78% !important;
    height: 100% !important;
    min-width: 177.78%;
    min-height: 100%;
  }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
  .arc-nav {
    padding: 18px 20px;
  }

  .work-item-info {
    padding: 28px;
  }

  .hero-title {
    left: 5%;
    bottom: 8%;
    max-width: 90%;
  }

  .footer-section {
    padding: 0 24px 48px;
  }

  .footer-studio,
  .footer-studio-img {
    padding-top: 56px;
    margin-bottom: 40px;
  }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .page-hero,
  .about-grid,
  .contact-layout {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
