/* ==========================================================
   Hugo Gama — Director
   Stylesheet
   ========================================================== */

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

:root {
  --bg:        #0a0a0a;
  --bg-soft:   #131313;
  --fg:        #f3f1ec;
  --fg-soft:   #aaa6a0;
  --muted:     #66625c;
  --line:      #1f1f1f;
  --transition: 600ms cubic-bezier(.2,.7,.2,1);
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--fg); color: var(--bg); }

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  mix-blend-mode: difference;
  color: #fff;
}

.brand {
  font-family: 'Anton', sans-serif;
  font-size: 26px;
  letter-spacing: 3px;
}

.site-nav {
  display: flex;
  gap: 36px;
}

.site-nav a {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width var(--transition);
}

.site-nav a:hover::after { width: 100%; }

/* ==========================================================
   HERO — masking effect
   ========================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #000;
  cursor: none;  /* hide native cursor over hero */
}

.hero-videos {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-videos iframe {
  position: absolute;
  top: 50%; left: 50%;
  /* 16:9 cover */
  width: 100vw;
  height: 56.25vw;        /* 16:9 of width */
  min-height: 100vh;
  min-width: 177.78vh;    /* 16:9 of height */
  transform: translate(-50%, -50%);
  border: 0;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

.hero-videos iframe.active { opacity: 1; }

.hero-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Marquee */
.marquee {
  position: absolute;
  bottom: 32px;
  left: 0; right: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}

.marquee-track {
  display: inline-block;
  animation: marquee 60s linear infinite;
  color: var(--fg);
  mix-blend-mode: difference;
  font-size: 12px;
  letter-spacing: 6px;
  font-weight: 500;
  text-transform: uppercase;
}

.marquee-track span {
  padding: 0 28px;
  display: inline-block;
}

.marquee-track span::after {
  content: '◦';
  margin-left: 56px;
  opacity: .4;
}

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

/* Scroll cue */
.scroll-cue {
  position: absolute;
  top: 50%;
  right: 32px;
  transform: translateY(-50%) rotate(180deg);
  z-index: 5;
  writing-mode: vertical-rl;
  color: var(--fg);
  mix-blend-mode: difference;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 500;
}
.scroll-cue svg { transform: rotate(180deg); }

/* Custom cursor dot for hero */
.hero-cursor {
  position: absolute;
  top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  z-index: 10;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width .3s, height .3s, opacity .3s;
}
.hero-cursor.hidden { opacity: 0; }

/* ==========================================================
   SECTION HEAD
   ========================================================== */
.section-title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(48px, 9vw, 140px);
  line-height: .95;
  letter-spacing: -1px;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0 40px;
  margin-bottom: 60px;
}

/* ==========================================================
   WORK GRID + TABS
   ========================================================== */
.work {
  padding: 140px 0 120px;
}

.work-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tab {
  background: transparent;
  border: 0;
  color: var(--fg-soft);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 10px 22px;
  cursor: pointer;
  border-radius: 999px;
  transition: color .25s ease, background .25s ease;
}

.tab:hover { color: var(--fg); }

.tab.active {
  background: var(--fg);
  color: var(--bg);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 0 4px;
}

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

.work-item .thumb {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .5s ease;
}

.work-item:hover .thumb { transform: scale(1.05); }

.work-item .preview {
  position: absolute;
  top: 50%; left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78%;
  transform: translate(-50%, -50%);
  border: 0;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}

.work-item.playing .preview { opacity: 1; }
.work-item.playing .thumb   { opacity: 0; }

.work-item .info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 32px 28px 24px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  z-index: 2;
  pointer-events: none;
}

.work-item .title {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(13px, 1.1vw, 16px);
  letter-spacing: 0.3px;
  line-height: 1.3;
  text-transform: none;
  color: rgba(255, 255, 255, 0.92);
}

.work-item .sector {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--fg-soft);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 10px;
  border-radius: 999px;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.work-item .play-icon {
  position: absolute;
  top: 50%; left: 50%;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(.85);
  opacity: 0;
  transition: opacity .4s ease, transform .4s ease;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,.2);
}
.work-item:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.work-item .play-icon::before {
  content: '';
  width: 0; height: 0;
  border-left: 14px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}

/* ==========================================================
   ABOUT
   ========================================================== */
.about {
  padding: 160px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.about-body {
  max-width: 720px;
  margin-top: 60px;
}

.about-body p {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.65;
  color: var(--fg-soft);
  margin-bottom: 24px;
}

.about-body .lead {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.4;
  color: var(--fg);
  font-weight: 400;
  margin-bottom: 36px;
}

/* ==========================================================
   CONTACT
   ========================================================== */
.contact {
  padding: 120px 40px;
  border-top: 1px solid var(--line);
}

.contact-title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(60px, 12vw, 200px);
  line-height: .9;
  letter-spacing: -2px;
  text-transform: uppercase;
  margin-bottom: 80px;
}

.contact-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}

.contact-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.label {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.big-link {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 500;
  color: var(--fg);
  position: relative;
  width: fit-content;
  word-break: break-word;
}

.big-link:not(.static)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--fg);
  transition: width var(--transition);
}
.big-link:not(.static):hover::after { width: 100%; }

.socials {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.socials a {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--fg-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color .25s ease, border-color .25s ease;
}
.socials a:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.site-footer a:hover { color: var(--fg); }

/* ==========================================================
   HERO mask text — desktop default, mobile stacked
   ========================================================== */
.hero-mask .hero-narrow { display: none; }

/* Switch to stacked layout when window is mobile-narrow OR
   when aspect ratio is less than 16:10 (wide single-line text
   would otherwise get cropped by the SVG slice behavior) */
@media (max-width: 768px), (max-aspect-ratio: 16 / 10) {
  .hero-mask .hero-wide   { display: none; }
  .hero-mask .hero-narrow { display: inline; }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 900px) {
  .site-header { padding: 20px 24px; }
  .site-nav { gap: 22px; }
  .site-nav a { font-size: 11px; }

  .work { padding: 100px 0 80px; }
  .section-head { padding: 0 24px; }
  .work-grid { grid-template-columns: 1fr; }

  .scroll-cue { display: none; }
  .marquee-track { font-size: 11px; letter-spacing: 4px; }
  .marquee-track span { padding: 0 16px; }
  .marquee-track span::after { margin-left: 32px; }

  .about, .contact { padding: 100px 24px; }
  .contact-cols { grid-template-columns: 1fr; gap: 32px; }

  .site-footer { padding: 24px; flex-direction: column; }

  /* on mobile, restore native cursor */
  .hero { cursor: default; }
  .hero-cursor { display: none; }
}


/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
