/* ========================================
   Site ROD - Estilos principais
   Fonte: Melbourne (local)
   ======================================== */

@font-face {
  font-family: 'Melbourne';
  src: url('../fonts/Melbourne-Bold.otf') format('opentype'),
       local('Melbourne-Bold'),
       local('Melbourne Bold');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Melbourne';
  src: url('../fonts/Melbourne-Regular.otf') format('opentype'),
       local('Melbourne'),
       local('Melbourne Regular');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Melbourne';
  src: url('../fonts/Melbourne-Light.otf') format('opentype'),
       local('Melbourne Light');
  font-weight: 300;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Melbourne', sans-serif;
  line-height: calc(1em + 2px);
}

button, input, textarea, select {
  font-family: inherit;
}

/* ========================================
   Loading
   ======================================== */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s;
}

.loading-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.snake-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#snake-canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.loading-overlay__text {
  font-family: 'Melbourne', sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 1;
}

body:not(.content-loaded) .site-header,
body:not(.content-loaded) main {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

body.content-loaded .site-header,
body.content-loaded main {
  opacity: 1;
  pointer-events: auto;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Melbourne', sans-serif;
  font-weight: bold;
  overflow-x: hidden;
  text-shadow:
    0 0 2px currentColor,
    0 0 4px currentColor;
}

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

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

/* ========================================
   Vídeo de fundo (cover)
   ======================================== */

.video-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* ========================================
   Header (About e Works)
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 100;
}

.site-header > a {
  flex-shrink: 0;
}

.site-header__logo {
  height: 39px;
  width: 64px;
  object-fit: contain;
}

.site-header__nav {
  display: flex;
  flex-shrink: 0;
  gap: 40px;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
}

.site-header__nav a {
  color: #fff !important;
  text-shadow: none;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Esconder header na home */
body.page-home .site-header {
  display: none;
}

/* ========================================
   HOME (Figma 1:2 — logo acima, work/reel lado a lado abaixo)
   ======================================== */

.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 45px 20px 60px;
  position: relative;
  box-sizing: border-box;
}

.home__frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.home__logo-link {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  max-width: 474px;
  margin-bottom: 40px;
  line-height: 0;
}

.home__logo {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

.home__nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 278px;
  margin: -50px 0 0;
  padding: 0;
  border: none;
  position: relative;
  z-index: 1;
}

.home__nav a {
  font-size: 50px;
  font-weight: bold;
  color: #fff;
  text-transform: lowercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.home__nav a:first-child {
  transform: translateX(-8px);
}

.home__nav a:last-child {
  transform: translateX(8px);
}

@media (min-width: 901px) {
  .home__nav a:first-child {
    transform: translateX(49px);
  }

  .home__nav a:last-child {
    transform: translateX(-49px);
  }
}

/* ========================================
   ABOUT (Figma node 2:2 — frame 1280px)
   Foto: left 304px · Texto: left 611px · top texto 212px
   ======================================== */

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 40px 0 48px;
  position: relative;
  box-sizing: border-box;
}

.about__center {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.about__content {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 717px;
  padding-bottom: 48px;
  box-sizing: border-box;
}

.about__video-wrap {
  position: absolute;
  left: calc(100% * 304 / 1280);
  top: 212px;
  width: 273px;
  height: 405px;
  overflow: hidden;
}

.about__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text {
  position: absolute;
  left: calc(100% * 611 / 1280 + 15px);
  top: 212px;
  width: min(420px, calc(100% - 100% * 611 / 1280 - 24px - 15px));
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  text-align: left;
  line-height: normal;
}

/* Anula o entrelinhas global nesta coluna para manter a posição original do bloco de contacto */
.about__text * {
  line-height: normal;
}

.about__text p {
  margin-bottom: 3px;
}

.about__text .about__contact-title {
  font-size: 30px;
  margin-top: 14px;
  margin-bottom: 8px;
}

.about__contact-links {
  display: flex;
  justify-content: flex-start;
  gap: 26px;
  font-size: 30px;
  font-weight: bold;
}

/* ========================================
   WORKS
   ======================================== */

.works {
  padding-top: 40px;
  background: #000;
}

.work-item {
  position: relative;
  width: 100%;
  height: 396px;
  overflow: hidden;
}

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

.work-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.work-item--left .work-item__overlay {
  justify-content: flex-start;
  padding: 0 28px;
}

.work-item--right .work-item__overlay {
  justify-content: flex-end;
  padding: 0 50px;
}

.work-item__info {
  color: #fff;
  font-size: 22px;
  font-weight: bold;
}

.work-item--left .work-item__info {
  text-align: left;
}

.work-item--right .work-item__info {
  text-align: right;
}

.work-item__info p {
  margin-bottom: 3px;
}

.work-item__title {
  font-size: 22px;
}

.work-item[data-vimeo-id]:not([data-vimeo-id=""]) {
  cursor: pointer;
}

/* ========================================
   Lightbox vídeo (Works)
   ======================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Controles ocultos durante fullscreen nativo (iframe em tela cheia) */
.lightbox.lightbox--fullscreen-ui-hidden .lightbox__controls,
.lightbox.lightbox--fullscreen-ui-hidden .lightbox__close {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: #000;
}

.lightbox__container {
  position: relative;
  flex: 1;
  min-width: 0;
  background: #000;
  z-index: 1;
}

.lightbox__close {
  position: absolute;
  top: 29px;
  right: 12px;
  background: none;
  border: none;
  font-family: 'Melbourne', sans-serif;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  z-index: 10;
  text-shadow: none;
}

.lightbox__player-wrap {
  position: absolute;
  inset: 0;
}

#vimeo-player-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lightbox__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 28px;
}

.lightbox__btn {
  background: none;
  border: none;
  font-family: 'Melbourne', sans-serif;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.lightbox__timeline {
  flex: 1;
  height: 6px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.lightbox__timeline::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  bottom: -12px;
}

.lightbox__timeline-track {
  position: absolute;
  inset: 0;
}

.lightbox__timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: #ff7b7b;
}

.lightbox__timeline-progress::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff7b7b;
}

/* ========================================
   Responsividade
   ======================================== */

@media (max-width: 900px) {
  .home__nav {
    gap: 120px;
  }

  .home__nav a {
    font-size: 36px;
  }

  .about__content {
    position: relative;
    min-height: 0;
    padding: 80px 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about__video-wrap {
    position: relative;
    left: auto;
    top: auto;
    width: 240px;
    height: 356px;
    margin-bottom: 32px;
  }

  .about__text {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 420px;
    padding-left: 55px;
    box-sizing: border-box;
  }

  .work-item {
    height: 320px;
  }

  .work-item--left .work-item__overlay,
  .work-item--right .work-item__overlay {
    padding: 0 24px;
  }

  .work-item__info {
    font-size: 14px;
  }

  .work-item__title {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 0 24px;
  }

  .site-header__nav {
    font-size: 16px;
    gap: 24px;
  }

  /* Home: mesmo arranjo que desktop — logo ao centro, work | reel por baixo */
  .home__logo-link {
    max-width: 251px;
    margin-bottom: 40px;
  }

  .home__nav {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: min(72px, 16vw);
    margin-top: -50px;
  }

  .home__nav a {
    font-size: clamp(26px, 7.5vw, 36px);
  }

  .home__nav a:first-child {
    transform: translateX(-8px);
  }

  .home__nav a:last-child {
    transform: translateX(8px);
  }

  .about__text {
    font-size: 18px;
  }

  .about__contact-title,
  .about__contact-links {
    font-size: 22px;
  }

  .work-item__info {
    font-size: 14px;
  }

  .work-item__title {
    font-size: 14px;
  }

  .lightbox__close {
    font-size: 14px;
  }

  .lightbox__btn {
    font-size: 14px;
  }
}
