/* ---------- tokens ---------- */
:root {
  --blue: #1F3BFF;
  --white: #FFFFFF;
  --display: 'Archivo', 'Arial Black', Impact, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --text: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 3vw, 44px);
}
.theme-b { --paper: var(--white); --ink: var(--blue); }
.theme-c { --paper: var(--blue); --ink: var(--white); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; }
img, video, iframe { display: block; max-width: 100%; }
main { flex: 1; isolation: isolate; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* small type (mono) */
.nav, .line, .side, .pager, .foot, figcaption, .aw, .credits, .label, .next span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ---------- header / footer ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px var(--gutter); }
.home { display: block; line-height: 0; }
.logo { width: clamp(112px, 11vw, 160px); height: auto; overflow: visible; }
.logo-ext use { fill: var(--ink); stroke: var(--ink); stroke-width: 6; stroke-linejoin: miter; }
.logo-face { fill: var(--paper); stroke: var(--ink); stroke-width: 6; stroke-linejoin: miter; paint-order: stroke; }
.nav { display: flex; gap: clamp(14px, 2vw, 28px); }
.nav a, .foot a, .pager a { text-decoration: none; }
.nav a:hover, .foot a:hover, .pager a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px var(--gutter) 26px; }

/* ---------- home ---------- */
.line { margin: 0; text-align: center; padding: 26px var(--gutter) 6px; }
.sq { display: inline-block; margin: 0 0.9em; }
main:has(> .index) { display: flex; flex-direction: column; }
.index {
  position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 3vh var(--gutter);
  /* títulos do índice: o maior tamanho que cabe na largura e na altura da tela (--n = número de cases) */
  --fs: clamp(26px, min(calc((100vw - 2 * var(--gutter)) / 24), calc((100svh - 250px) / (var(--n, 13) * 1.02 + 0.4))), 120px);
}
.list { list-style: none; margin: 0; padding: 0; }
.item { text-align: center; }
.item a { position: relative; display: inline-block; text-decoration: none; }
.ttl {
  display: block;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: var(--fs);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: font-size 0.18s ease;
}
.item.on .ttl { font-size: min(calc(var(--fs) * 1.33), var(--fit, 999px)); }
.item .side { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; visibility: hidden; }
.item .side-l { right: 100%; margin-right: 22px; }
.item .side-r { left: 100%; margin-left: 22px; }
.item.on .side { visibility: visible; }

.peeks { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.peek { position: absolute; right: var(--gutter); margin: 0; width: var(--w); display: none; }
.peek[data-pos="down"] { top: 40%; }
.peek[data-pos="up"] { top: 4%; }
.peek.on { display: block; }
.peek video { width: 100%; aspect-ratio: var(--r); object-fit: cover; background: var(--ink); }
.peek::after, .framed::after {
  content: '';
  position: absolute;
  left: 12px; top: 12px; right: -12px;
  height: var(--frame-h, 100%);
  border: 2px solid var(--ink);
  z-index: -1;
}
.peek::after { height: calc(var(--w) / var(--r)); }
.peek figcaption { margin-top: 18px; text-align: right; }

/* ---------- case ---------- */
.pager { display: flex; justify-content: space-between; padding: 8px var(--gutter); }
.case-head { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 22px; row-gap: 10px; padding: 8vh var(--gutter) 6vh; text-align: center; }
.case-title {
  margin: 0;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(40px, 6vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 16ch;
}
.case-sub { flex-basis: 100%; margin: 6px 0 0; font-size: 19px; }
.framed { position: relative; }
.hero { width: min(1200px, calc(100% - 2 * var(--gutter) - 12px)); margin: 0 auto; }
.hero img { width: 100%; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.awards { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8vh auto 0; padding: 0 var(--gutter); max-width: 1000px; }
.aw { background: var(--ink); color: var(--paper); padding: 7px 11px; }
.aw-line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 5.5px 9.5px; }
.text { max-width: 62ch; margin: 8vh auto 0; padding: 0 var(--gutter); font-size: clamp(17px, 1.35vw, 20px); }
.text p { margin: 0 0 1em; font-stretch: 106%; font-weight: 420; line-height: 1.46; letter-spacing: -0.005em; }
.more-videos, .films { display: grid; gap: 6vh; width: min(1100px, calc(100% - 2 * var(--gutter))); margin: 9vh auto 0; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); width: min(1200px, calc(100% - 2 * var(--gutter))); margin: 9vh auto 0; align-items: start; }
/* abertura da galeria, quando o case tem galleryLabel / galleryIntro */
.gallery-head { text-align: center; margin: 14vh auto 0; padding: 0 var(--gutter); }
.gallery-label { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.gallery-intro { margin: 0 auto; max-width: 30ch; font-family: var(--text); font-stretch: 112%; font-weight: 600; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.25; }
.gallery-head + .gallery { margin-top: 5vh; }
.g { margin: 0; }
.g img { width: 100%; height: auto; }
.g-wide { grid-column: 1 / -1; }
.credits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; max-width: 900px; margin: 10vh auto 0; padding: 16px var(--gutter) 0; border-top: 2px solid var(--ink); }
.credits div { display: flex; gap: 10px; }
.credits dt { opacity: 0.6; }
.credits dd { margin: 0; }
.next { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; text-decoration: none; margin-top: 12vh; padding: 7vh var(--gutter) 9vh; border-top: 2px solid var(--ink); }
.next strong { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(30px, 5vw, 88px); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; text-wrap: balance; }
.next:hover strong { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }

/* ---------- about ---------- */
.about-head { text-align: center; padding: 9vh var(--gutter) 7vh; }
.about-statement { margin: 0 auto; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(40px, 6vw, 104px); line-height: 0.96; letter-spacing: -0.02em; text-transform: uppercase; text-wrap: balance; max-width: 14ch; }
.about-intro { display: grid; grid-template-columns: minmax(0, 56ch) clamp(240px, 21vw, 360px); justify-content: center; align-items: start; column-gap: clamp(48px, 5vw, 96px); width: calc(100% - 2 * var(--gutter)); margin: 0 auto; }
.about-intro .text { order: 1; margin: 0; padding: 0; max-width: 56ch; }
/* abertura em destaque */
.about-intro .text p:first-child { font-stretch: 118%; font-weight: 700; font-size: clamp(22px, 1.9vw, 27px); line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.about-intro.no-portrait { display: block; }
.about-intro.no-portrait .text { margin: 0 auto; }
.portrait { order: 2; width: 100%; margin: 0.35em 12px 0 0; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.label { margin: 0 0 22px; text-align: center; font-weight: 400; opacity: 0.7; }
.exp { margin-top: 13vh; }
.job summary { list-style: none; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 22px; padding: 4px var(--gutter); text-align: center; }
.job summary::-webkit-details-marker { display: none; }
.job-name { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(28px, 4.2vw, 76px); line-height: 1.04; letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap; transition: font-size 0.18s ease; }
.job[open] .job-name { font-size: clamp(28px, 5vw, 92px); }
.job .side { visibility: hidden; flex: 1; }
.job .side-l { text-align: right; }
.job .side-r { text-align: left; }
.job[open] .side, .job summary:hover .side { visibility: visible; }
.job .text { margin: 3vh auto 6vh; }
/* abre e fecha a descrição suavemente (nos navegadores que suportam) */
:root { interpolate-size: allow-keywords; }
/* na lista de experiências a página fica parada quando uma agência recolhe (sem a rolagem automática do navegador) */
html:has(.exp) { overflow-anchor: none; }
.job::details-content { block-size: 0; overflow: hidden; transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete; }
.job[open]::details-content { block-size: auto; }
.aw-all { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; width: min(1000px, calc(100% - 2 * var(--gutter))); margin: 13vh auto 0; }
.aw-all .label { grid-column: 1 / -1; margin: 0; }
.aw-group h3 { margin: 0 0 20px; padding-bottom: 9px; border-bottom: 2px solid var(--ink); font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(18px, 1.6vw, 22px); text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; }
.aw-group ul { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.aw-group li { padding: 2px 0; }
.aw-case { display: block; margin: 0 0 4px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--white); text-decoration: none; }
.aw-group ul + .aw-case { margin-top: 14px; }
a.aw-case:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.aw-metal { font-weight: 700; }
.aw-cat { font-weight: 420; color: var(--white); opacity: 1; }
.marquee { margin-top: 14vh; overflow: hidden; background: var(--ink); color: var(--paper); }
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee span { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(24px, 2.6vw, 40px); text-transform: uppercase; letter-spacing: -0.01em; padding: 14px 0; white-space: nowrap; }
.marquee i { font-style: normal; margin: 0 0.6em; }
@keyframes marquee { to { transform: translateX(-50%); } }
.contact { text-align: center; padding: 12vh var(--gutter) 8vh; }
.contact-big { margin: 0 0 20px; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(36px, 5vw, 88px); line-height: 1; text-transform: uppercase; letter-spacing: -0.02em; }
.contact a { font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; text-underline-offset: 5px; margin: 0 10px; }

/* ---------- mobile / touch ---------- */
@media (max-width: 760px), (hover: none) {
  .ttl { white-space: normal; text-wrap: balance; }
  .item a { display: inline-flex; flex-direction: column; align-items: center; padding: 2px 0; }
  .item .side { position: static; transform: none; display: none; margin: 2px 0 0; }
  .item .side-l { order: 2; margin-right: 0; }
  .item .side-r { order: 3; margin-left: 0; }
  .item.on .side { display: block; }
  .peeks { position: fixed; inset: auto var(--gutter) 96px auto; width: 0; height: 0; }
  .peek, .peek[data-pos] { top: auto; bottom: 0; right: 0; width: min(calc(var(--w) * 1.6), 38vw); }
  .peek::after { height: calc(min(calc(var(--w) * 1.6), 38vw) / var(--r)); left: 8px; top: 8px; right: -8px; }
  .peek figcaption { display: none; }
}
@media (max-width: 760px) {
  .about-intro { grid-template-columns: minmax(0, 1fr); }
  .portrait { order: 0; width: min(72%, 300px); margin: 0 auto 48px; transform: translateX(-6px); }
  .aw-all { grid-template-columns: 1fr; }
  .credits { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .job summary { flex-direction: column; gap: 4px; }
  .job-name, .job[open] .job-name { white-space: normal; font-size: clamp(28px, 4.2vw, 76px); }
  .job .side { flex: none; text-align: center; display: none; }
  .job[open] .side { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .ttl, .job-name { transition: none; }
  .job::details-content { transition: none; }
  .marquee-track { animation: none; }
}
