/* LOKKO MONKEYS, modelo Cinema.
   Preto de sala de cinema, letras Anton enormes, o ponto vermelho do REC como único acento. */

:root {
  --black: #000;          /* fundo */
  --panel: #0d0d0d;
  --white: #f7f5f2;        /* texto */
  --fg-rgb: 247, 245, 242;
  --bg-rgb: 0, 0, 0;
  --dim: rgba(var(--fg-rgb), 0.62);
  --faint: rgba(var(--fg-rgb), 0.14);
  --logo-filter: invert(1);
  --red: #e63323;
  --gutter: clamp(20px, 3vw, 40px);
  --section: clamp(96px, 12vw, 180px);
  --display: "Anton", "Impact", sans-serif;
  --text: "Inter", system-ui, -apple-system, sans-serif;
}

/* Fundo branco: o topo com o filme, os cartões dos filmes e o leitor continuam escuros. */
html.theme-light {
  --black: #f7f5f2;
  --panel: #e9e7e2;
  --white: #111111;
  --fg-rgb: 17, 17, 17;
  --bg-rgb: 247, 245, 242;
  --logo-filter: none;
}
html.theme-light .hero,
html.theme-light .film,
html.theme-light .viewer,
html.theme-light .nav:not(.is-solid) {
  --black: #000;
  --panel: #0d0d0d;
  --white: #f7f5f2;
  --fg-rgb: 247, 245, 242;
  --bg-rgb: 0, 0, 0;
  --logo-filter: invert(1);
  color: var(--white);
}
html.theme-light .nav:not(.is-solid) { --dim: rgba(247, 245, 242, 0.62); --faint: rgba(247, 245, 242, 0.14); }
html.theme-light .hero, html.theme-light .film, html.theme-light .viewer { --dim: rgba(247, 245, 242, 0.62); --faint: rgba(247, 245, 242, 0.14); }
html.theme-light .marquee__row img { filter: brightness(0); opacity: 0.6; }
body { transition: background-color 0.3s, color 0.3s; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--black); color: var(--white); font-family: var(--text); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* Títulos: Anton, maiúsculas, muito apertado */
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1.08; letter-spacing: -0.005em; }
h2 { font-size: clamp(56px, 9vw, 150px); }

.skip { position: absolute; left: var(--gutter); top: -80px; z-index: 100; padding: 10px 16px; background: var(--white); color: var(--black); font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 24px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: none;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }
.btn--lg { min-height: 60px; padding: 0 30px; font-size: 1rem; }
.btn--light { background: var(--white); color: var(--black); }
.btn--light:hover { background: var(--red); color: var(--white); }
.btn--whatsapp { background: #25d366; color: #04210f; }
.btn--whatsapp:hover { background: #1ebe5b; }
.btn--whatsapp svg { width: 20px; height: 20px; fill: currentColor; }
.btn--outline { border-color: var(--faint); }
.btn--outline:hover { border-color: var(--white); }
.btn--play { padding-left: 8px; background: var(--white); color: var(--black); }
.btn--play:hover { background: var(--red); color: var(--white); }
.btn__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--black); }
.btn__icon::after { content: ""; margin-left: 3px; border-left: 11px solid var(--white); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; text-decoration-color: var(--red); }
.link:hover { color: var(--red); }

/* ---------- Navegação ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  transition: background-color 0.3s;
}
.nav.is-solid { background: rgba(var(--bg-rgb), 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav { align-items: flex-start; }
.nav__links { margin-top: 22px; }
/* Logótipo maior, com uma sombra leve para se ler por cima de qualquer vídeo */
.nav__logo img { width: 168px; height: 168px; filter: var(--logo-filter) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55)); transition: width 0.3s, height 0.3s; }
.nav.is-solid { align-items: center; }
.nav.is-solid .nav__links { margin-top: 0; }
.nav.is-solid .nav__logo img { width: 84px; height: 84px; filter: var(--logo-filter); }
/* O logótipo nunca encolhe por falta de espaço no cabeçalho */
.nav__logo { flex: none; }
.nav__links .lang--menu { display: none; }
/* Ecrãs estreitos: só logótipo, botão do fundo e Menu; PT/EN/FR passam para dentro do menu */
@media (max-width: 980px) {
  .nav > .lang { display: none; }
  .nav > .theme { margin: 18px 0 0 auto; }
  .nav.is-solid > .theme { margin-top: 0; }
  .nav > .nav__toggle { margin: 18px 0 0 8px; }
  .nav.is-solid > .nav__toggle { margin-top: 0; }
  .nav__links .lang--menu { display: flex; gap: 8px; margin: 22px 0 0; }
  .lang--menu button { min-width: 56px; min-height: 46px; border: 1.5px solid var(--faint); font-size: 0.9375rem; }
}
@media (max-width: 760px) {
  .nav__logo img { width: 128px; height: 128px; }
  .nav.is-solid .nav__logo img { width: 68px; height: 68px; }
}
.nav__links { display: flex; gap: 34px; font-size: 0.9375rem; font-weight: 500; }
.nav__links a { text-decoration: none; opacity: 0.85; }
.nav__links a:hover { opacity: 1; color: var(--red); }
.nav__links { margin-left: auto; }
/* Seletor de língua: PT · EN · FR */
.lang { display: flex; gap: 2px; margin: 14px 0 0 28px; }
.nav.is-solid .lang { margin-top: 0; }
.lang button {
  min-width: 40px;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--dim);
  cursor: pointer;
}
.lang button:hover { color: var(--white); }
.lang button[aria-pressed="true"] { background: var(--white); color: var(--black); }
.theme {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 14px 0 0 6px;
  border: 1.5px solid var(--faint);
  border-radius: 50%;
  background: none;
  color: var(--white);
  cursor: pointer;
}
.nav.is-solid .theme { margin-top: 0; }
.theme:hover { border-color: var(--white); }
.theme svg { width: 18px; height: 18px; fill: currentColor; }
.theme .theme__sun { display: none; }
html.theme-light .theme .theme__sun { display: block; }
html.theme-light .theme .theme__moon { display: none; }
.nav__toggle { display: none; }
@media (max-width: 980px) {
  .nav__toggle { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border: 1.5px solid var(--faint); border-radius: 999px; background: rgba(var(--bg-rgb), 0.5); font-weight: 600; cursor: pointer; }
  .nav__links { margin-top: 0; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px; background: var(--black); display: none; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--faint); font-family: var(--display); font-size: 2rem; text-transform: uppercase; opacity: 1; }
  .menu-open .nav__links { display: flex; }
  .menu-open .nav { background: var(--black); }
}

/* ---------- 1. Topo ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; }
.hero__film { position: absolute; inset: 0; }
.hero__still, .hero__video, .hero__clip {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  border: 0;
  object-fit: cover;
  transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__still { animation: push 8s linear both; }
}
@keyframes push { from { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-50%, -50%) scale(1.07); } }
/* O vídeo só aparece quando o YouTube confirma que está a tocar; até lá vê-se a imagem. */
.hero__video { transform: translate(-50%, -50%) scale(1.2); opacity: 0; transition: opacity 0.8s; pointer-events: none; }
.hero__video iframe { width: 100%; height: 100%; border: 0; }
.hero__film.is-playing .hero__video { opacity: 1; }
.hero__clip { opacity: 0; transition: opacity 0.6s; pointer-events: none; }
.hero__film.is-clip .hero__clip { opacity: 1; }
.hero__film.is-clip .hero__video { opacity: 0; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.25) 48%, rgba(0, 0, 0, 0.4) 100%); }
/* Bloco do topo, à esquerda: o filme que está a passar e, por baixo, o nome e as profissões. */
.hero__copy {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 96px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.hero h1 { font-size: clamp(64px, 10vw, 160px); line-height: 1.04; }
.now { display: grid; justify-items: start; gap: 6px; max-width: 520px; }
.now__label { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--dim); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
@media (prefers-reduced-motion: no-preference) { .rec { animation: blink 1.6s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0.2; } }
.now__client { font-family: var(--display); font-size: 2.125rem; line-height: 1; text-transform: uppercase; }
.now__title { font-size: 0.9375rem; color: var(--dim); }
.now .btn { margin-top: 14px; }
.chapters { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 34px; display: grid; grid-template-columns: repeat(var(--count, 8), minmax(0, 1fr)); gap: 12px; }
.chapters button { all: unset; display: grid; gap: 10px; min-width: 0; font-size: 0.8125rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.chapters button:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.chapters button::before {
  content: "";
  height: 2px;
  background: var(--faint) linear-gradient(var(--white), var(--white)) no-repeat;
  background-size: 0 100%;
}
.chapters button.is-on { color: var(--white); }
.chapters button.is-on::before { animation: fill var(--chapter, 7s) linear forwards; }
/* À espera que o vídeo arranque: a barra fica parada e pisca devagar. */
.chapters button.is-on.is-waiting::before { animation: wait 1.2s ease-in-out infinite alternate; background-size: 0 100%; }
@keyframes wait { from { opacity: 1; } to { opacity: 0.4; } }
@keyframes fill { to { background-size: 100% 100%; } }
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise 1s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
  .hero__copy > :nth-child(2) { animation-delay: 0.15s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
@media (max-width: 760px) {
  .hero__copy { gap: 22px; bottom: 76px; }
  .hero h1 { font-size: clamp(50px, 14.5vw, 78px); line-height: 1.05; }
  .now { width: auto; }
  .now__client { font-size: 1.75rem; }
  .chapters { gap: 6px; bottom: 28px; }
  .chapters button { font-size: 0; gap: 0; }
}

/* ---------- 3. Trabalhos ---------- */
.work { padding: calc(var(--section) * 0.6) var(--gutter) var(--section); }
.work__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px 48px; margin-bottom: 30px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.tabs button {
  padding: 0 0 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--display);
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1;
  text-transform: uppercase;
  color: rgba(var(--fg-rgb), 0.4);
  cursor: pointer;
}
.tabs button sup { font-family: var(--text); font-size: 0.8125rem; font-weight: 600; vertical-align: top; position: relative; top: 2px; }
.tabs button:hover { color: var(--white); }
.tabs button[aria-selected="true"] { color: var(--white); border-bottom-color: var(--red); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filters button {
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--faint);
  border-radius: 999px;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}
.filters button span { margin-left: 6px; color: var(--dim); font-variant-numeric: tabular-nums; }
.filters button:hover { border-color: var(--white); }
.filters button[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--black); }
.filters button[aria-pressed="true"] span { color: rgba(var(--bg-rgb), 0.55); }
@media (max-width: 640px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 24px; padding: 0 var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
}

/* Filmes: duas colunas de imagens grandes, o primeiro em largura total */
.films { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); }
.film { position: relative; display: block; overflow: hidden; background: var(--panel); text-decoration: none; }
.film__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.film__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.1, 1), filter 0.5s; filter: brightness(0.82); }
.film:hover .film__img img, .film:focus-visible .film__img img { transform: scale(1.07); filter: brightness(1); }
.film::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0) 55%); pointer-events: none; }
.film__info { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: grid; gap: 3px; }
.film__client { font-family: var(--display); font-size: clamp(20px, 1.7vw, 28px); line-height: 1.05; text-transform: uppercase; }
.film__title { font-size: 0.8125rem; line-height: 1.35; color: var(--dim); }
.film__new { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--red); color: #fff; font-family: var(--text); font-size: 0.75rem; font-weight: 600; text-transform: none; white-space: nowrap; vertical-align: 2px; }
.film__play {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -22px 0 0 -22px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.3s;
}
.film__play::after { content: ""; margin-left: 4px; border-left: 14px solid var(--black); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.film:hover .film__play, .film:focus-visible .film__play { opacity: 1; transform: none; }
@media (hover: none) { .film__play { opacity: 1; transform: none; } }
@media (max-width: 1100px) { .films { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .films { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .films { grid-template-columns: 1fr; }
  .film__client { font-size: 26px; }
}

/* Design gráfico: mosaico */
.masonry { display: flex; align-items: flex-start; gap: 12px; }
.masonry__col { flex: 1 1 0; min-width: 0; display: grid; gap: 12px; }
.piece { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; }
.piece img { width: 100%; height: auto; background: var(--panel); transition: opacity 0.3s; }
.piece:hover img { opacity: 0.85; }
.piece span { display: block; padding-top: 6px; font-size: 0.75rem; line-height: 1.35; color: var(--dim); }
.piece b { color: var(--white); font-weight: 600; }

/* Web: lista de texto */
.sites { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--faint); }
.site-row {
  display: grid;
  grid-template-columns: 136px minmax(0, 1.1fr) minmax(0, 1fr) 260px;
  align-items: center;
  gap: 8px 32px;
  padding: 16px 0;
  border-top: 1px solid var(--faint);
  text-decoration: none;
}
/* Pequeno cartão de cada site: o logótipo sobre a cor da marca */
.site-row__tile { width: 136px; height: 85px; object-fit: cover; border-radius: 4px; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.1, 1); }
.site-row:hover .site-row__tile { transform: scale(1.05); }
.site-row__name { font-family: var(--display); font-size: clamp(28px, 2.8vw, 46px); line-height: 1.1; text-transform: uppercase; transition: color 0.25s; }
.site-row__desc { font-size: 1.0625rem; color: var(--dim); }
.site-row__end { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.site-row__url { font-size: 0.9375rem; font-weight: 600; white-space: nowrap; }
.site-row:hover .site-row__name, .site-row:focus-visible .site-row__name { color: var(--red); }
.site-row:hover .site-row__url { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 5px; }
@media (max-width: 820px) {
  .site-row { grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "tile name" "tile desc" "tile end"; column-gap: 16px; row-gap: 2px; padding: 16px 0; }
  .site-row__tile { grid-area: tile; width: 112px; height: 70px; align-self: start; }
  .site-row__name { grid-area: name; font-size: 26px; }
  .site-row__desc { grid-area: desc; font-size: 0.9375rem; }
  .site-row__end { grid-area: end; justify-content: flex-start; margin-top: 4px; }
  .site-row__end .film__new { order: 2; }
}
.work__more { display: flex; justify-content: center; margin-top: 44px; }

/* ---------- 4. O que faço: três colunas de texto ---------- */
.services { padding: var(--section) var(--gutter); border-top: 1px solid var(--faint); }
.services > h2 { margin-bottom: clamp(40px, 5vw, 72px); }
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px clamp(24px, 4vw, 64px); }
.skill { display: flex; flex-direction: column; padding-top: 22px; border-top: 2px solid var(--white); }
.skill h3 { margin-bottom: 22px; font-size: clamp(40px, 4.2vw, 72px); }
.skill ul { margin-bottom: 26px; }
.skill li { padding: 12px 0; border-bottom: 1px solid var(--faint); font-size: 1.125rem; }
.skill .link { margin-top: auto; align-self: flex-start; }
@media (max-width: 900px) { .skills { grid-template-columns: 1fr; } }

/* ---------- 5. Clientes ---------- */
.clients { padding: calc(var(--section) * 0.6) 0; border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
.clients__title { padding: 0 var(--gutter); margin-bottom: 44px; font-size: clamp(36px, 4.4vw, 72px); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee { display: grid; gap: clamp(28px, 3vw, 44px); }
.marquee__row { display: flex; align-items: center; gap: 72px; width: max-content; padding-right: 72px; }
.marquee__row img { max-width: 150px; max-height: 52px; width: auto; height: auto; filter: brightness(0) invert(1); opacity: 0.7; transition: opacity 0.25s, filter 0.25s; }
.marquee__row a:hover img { filter: none; opacity: 1; }
/* O movimento e o arrastar (rato e dedo) estão em main.js. */
@media (prefers-reduced-motion: no-preference) {
  .marquee { touch-action: pan-y; }
  .marquee__row { cursor: grab; user-select: none; -webkit-user-select: none; will-change: transform; }
  .marquee__row.is-dragging { cursor: grabbing; }
  .marquee__row.is-dragging a { pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__row { flex-wrap: wrap; justify-content: center; width: auto; gap: 24px 48px; padding: 0 var(--gutter); }
  .marquee__row li[aria-hidden] { display: none; }
}

/* ---------- 6. Marko Lopes ---------- */
.marko {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 4vw, 72px);
  padding: var(--section) var(--gutter);
  border-top: 1px solid var(--faint);
}
.marko__photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.marko__body { display: grid; align-content: end; justify-items: start; gap: 18px; }
.marko__role { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--dim); }
.marko__role::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.marko h2 { font-size: clamp(80px, 11vw, 190px); line-height: 1; }
.marko__jobs { font-size: 1rem; font-weight: 600; letter-spacing: 0.01em; }
.marko__lead { max-width: 52ch; font-size: 1.125rem; color: rgba(var(--fg-rgb), 0.85); }
.marko__facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 64px);
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--faint);
}
.fact h3 { margin-bottom: 18px; font-size: clamp(32px, 3vw, 48px); }
.fact__sub { margin-top: 28px; }
.fact__text { color: rgba(var(--fg-rgb), 0.85); }
.timeline, .awards { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.timeline li, .awards li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--faint); }
.timeline b, .awards b { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; color: var(--red); }
.timeline small { font-size: 0.875rem; color: var(--dim); }
.awards span { font-size: 0.9375rem; color: rgba(var(--fg-rgb), 0.85); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tools li { padding: 8px 14px; border: 1.5px solid var(--faint); border-radius: 999px; font-size: 0.875rem; }
@media (max-width: 900px) {
  .marko { grid-template-columns: 1fr; }
  .marko__facts { grid-template-columns: 1fr; }
    }

/* ---------- 7. Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px 64px; padding: var(--section) var(--gutter); border-top: 1px solid var(--faint); }
.contact h2 { font-size: clamp(88px, 15vw, 260px); }
.contact__body { align-self: end; }
.contact__label { margin-bottom: 14px; color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chips button { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--faint); border-radius: 999px; background: none; font-weight: 500; cursor: pointer; }
.chips button:hover { border-color: var(--white); }
.chips button[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__email { margin-top: 16px; color: var(--dim); font-size: 0.9375rem; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Rodapé ---------- */
.footer { padding: 56px var(--gutter) 32px; border-top: 1px solid var(--faint); }
.footer__top { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer__logo { width: clamp(120px, 12vw, 170px); height: auto; filter: var(--logo-filter); }
.footer__col { display: grid; align-content: start; gap: 8px; }
.footer__col p { margin-bottom: 6px; font-size: 0.875rem; color: var(--dim); }
.footer__col a { text-decoration: none; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--red); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--faint); font-size: 0.875rem; color: var(--dim); }
.footer__bottom a { text-underline-offset: 4px; }
@media (max-width: 760px) {
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__logo { grid-column: 1 / -1; }
}

/* ---------- Visualizador ---------- */
.viewer { width: min(1200px, calc(100vw - 2 * var(--gutter))); max-width: none; max-height: none; padding: 0; border: 0; background: transparent; color: var(--white); overflow: visible; }
.viewer::backdrop { background: rgba(0, 0, 0, 0.94); }
/* O leitor abre a partir do trabalho clicado (a origem é definida em main.js) */
.viewer[open] { animation: pop 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes pop { from { opacity: 0; transform: scale(0.82); } }
@media (prefers-reduced-motion: reduce) { .viewer[open] { animation: fade 0.2s ease; } @keyframes fade { from { opacity: 0; } } }
.viewer__inner { position: relative; }
.viewer__close { position: absolute; top: -54px; right: 0; min-height: 42px; padding: 0 18px; border: 1.5px solid var(--faint); border-radius: 999px; background: none; font-weight: 600; cursor: pointer; }
.viewer__close:hover { border-color: var(--white); }
.viewer__media.is-video { aspect-ratio: 16 / 9; max-height: calc(100svh - 220px); margin: 0 auto; background: #000; }
.viewer__media.is-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.viewer__media.is-image { display: grid; place-items: center; }
.viewer__media.is-image img { max-height: calc(100svh - 220px); width: auto; }
.viewer__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px 24px; padding-top: 18px; }
.viewer__client { font-size: 0.875rem; color: var(--dim); }
.viewer h2 { font-size: clamp(32px, 3.6vw, 56px); }
.viewer__meta { margin-top: 6px; font-size: 0.875rem; color: var(--dim); }
.viewer__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.viewer__pos { margin-right: 6px; font-size: 0.8125rem; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---------- Apresentação pessoal ---------- */
.hero .hero__who { display: flex; align-items: center; gap: 12px; margin: 0; padding-bottom: 10px; font-family: var(--text); font-size: 1rem; font-weight: 600; line-height: 1.3; letter-spacing: 0.01em; text-transform: none; }
.hero .hero__who::before { content: ""; flex: none; width: 28px; height: 2px; background: var(--red); }
.marko__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.contact__sub { max-width: 34ch; margin-top: 24px; font-size: 1.125rem; color: rgba(var(--fg-rgb), 0.8); }
@media (max-width: 760px) { .hero .hero__who { font-size: 0.875rem; } }

/* Texto só para leitores de ecrã e motores de busca */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Línguas com nível (como no CV) */
.langs { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.langs li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--faint); }
.langs__level { font-size: 0.875rem; color: var(--dim); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dots i.on { background: var(--red); }

/* Identidade LOKKO MONKEYS: a evolução do macaco ao criativo, sobre o logótipo */
.identity {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 24px clamp(32px, 4vw, 72px);
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--faint);
}
.identity__mark { width: 100%; max-width: 560px; height: auto; justify-self: center; }
html.theme-light .identity__mark { filter: invert(1); }
.identity__body { display: grid; gap: 16px; }
.identity h3 { font-size: clamp(40px, 4.4vw, 72px); }
.identity__text { max-width: 46ch; font-size: 1.1875rem; color: rgba(var(--fg-rgb), 0.85); }
@media (max-width: 900px) {
  .identity { grid-template-columns: 1fr; }
  .identity__mark { max-width: 420px; }
}

/* "Novo" no canto superior direito dos cartões de filmes; o play fica ao centro */
.film > .film__new { position: absolute; top: 12px; right: 12px; z-index: 2; }

/* ---------- Toque e resposta (princípios da Apple) ---------- */
/* Resposta imediata ao premir: o elemento "afunda" um pouco no momento do toque, não depois. */
.btn, .film, .piece, .site-row__tile, .chips button, .filters button, .tabs button, .lang button, .theme, .chapters button {
  -webkit-tap-highlight-color: transparent;
}
.btn:active, .chips button:active, .filters button:active, .lang button:active, .theme:active { transform: scale(0.96); transition: transform 90ms ease-out; }
.film:active, .piece:active { transform: scale(0.985); transition: transform 90ms ease-out; }
.site-row:active .site-row__tile { transform: scale(0.96); transition: transform 90ms ease-out; }

/* Mudança de fundo preto/branco suave, sem saltos bruscos de luz */
html.theme-anim, html.theme-anim body, html.theme-anim section, html.theme-anim .nav, html.theme-anim .footer {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  html.theme-anim, html.theme-anim body, html.theme-anim section, html.theme-anim .nav, html.theme-anim .footer { transition: none !important; }
  .btn:active, .film:active, .piece:active { transform: none; }
}

/* Quem pede menos transparência no sistema recebe um menu opaco */
@media (prefers-reduced-transparency: reduce) {
  .nav.is-solid { background: var(--black); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

html.theme-light .nav.is-solid .nav__logo img { filter: none; }

/* Grafismo com vídeo: botão de play por cima da imagem */
.piece { position: relative; }
.piece__play { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(247, 245, 242, 0.95); }
.piece__play::after { content: ""; position: absolute; left: 14px; top: 11px; border-left: 11px solid #000; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
/* Site com vídeo */
.site-row__video { padding: 4px 10px; border: 1.5px solid var(--faint); border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }

/* Capa do leitor em pausa / no fim: tapa as sugestões do YouTube, que abririam fora do site */
.viewer__media.is-video { position: relative; }
.viewer__cover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: #000 center / cover no-repeat; }
.viewer__cover::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.viewer__cover[hidden] { display: none; }
.viewer__cover > * { position: relative; }
.viewer__resume { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 26px 0 8px; border: 0; border-radius: 999px; background: #f7f5f2; color: #000; font-weight: 600; cursor: pointer; }
.viewer__resume .btn__icon { width: 42px; height: 42px; }
.viewer__ended { display: none; gap: 10px; }
.viewer__cover[data-state="ended"] .viewer__resume { display: none; }
.viewer__cover[data-state="ended"] .viewer__ended { display: flex; }
/* Fim da lista de sites: "Quero um site assim" (os sites abrem fora, sem o leitor e o seu botão) */
.sites__cta { margin: 36px 0 0; text-align: center; }
