/* LIBA — tokens do brand kit */
@font-face { font-family: "Climate Crisis"; src: url("assets/fonts/ClimateCrisis-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("assets/fonts/manrope-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Guia: 3 cores com o mesmo peso — Brown, Red, Peach White */
  --brown: #170602;
  --red: #E43D12;
  --peach: #F6EEEE;
  --surface: var(--peach);
  --surface-2: color-mix(in srgb, var(--brown) 10%, var(--peach));
  --ink: var(--brown);
  --muted: color-mix(in srgb, var(--brown) 70%, var(--peach));
  --muted-dark: color-mix(in srgb, var(--peach) 70%, var(--brown));
  --brand: var(--red);
  --brand-text: var(--red);
  --paper: var(--peach);
  --line-dark: color-mix(in srgb, var(--peach) 18%, var(--brown));
  --font-display: "Climate Crisis", "Arial Black", Impact, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif; /* texto corrido e rótulos (peso regular) */
  --font-sans: "Manrope", "Helvetica Neue", Arial, sans-serif; /* só em negrito: botões e etiquetas de controlo */
  /* Textura: grão como camada de fundo (por baixo do conteúdo, para fotos e capturas ficarem limpas) + tons vizinhos em vez de cor chapada */
  --grain: url("assets/grain.png");
  --grain-light: url("assets/grain-light.png"); /* grão claro em alfa, para superfícies escuras */
  --red-hi: #F4693A;
  --red-lo: #AC2707;
  --grad-red: var(--grain), radial-gradient(75% 95% at 88% 6%, var(--red-hi) 0%, transparent 62%), radial-gradient(85% 95% at 4% 108%, var(--red-lo) 0%, transparent 66%);
  --grad-red-rev: var(--grain), radial-gradient(70% 90% at 6% 4%, var(--red-hi) 0%, transparent 62%), radial-gradient(85% 100% at 96% 106%, var(--red-lo) 0%, transparent 66%);
  --grad-ink: var(--grain-light), radial-gradient(60% 38% at 92% 0%, rgba(228, 61, 18, .24), transparent 70%), radial-gradient(70% 36% at 0% 100%, rgba(228, 61, 18, .14), transparent 70%);
  --pad: clamp(16px, 2.8vw, 40px);
  --section: clamp(64px, 6.7vw, 96px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0;
  background-color: var(--surface);
  background-image: var(--grain), radial-gradient(55% 45% at 12% 18%, rgba(255, 255, 255, .7), transparent 70%), radial-gradient(50% 36% at 92% 66%, rgba(228, 61, 18, .07), transparent 70%);
  background-size: 200px 200px, 100% 1500px, 100% 1500px; background-repeat: repeat, repeat-y, repeat-y; background-blend-mode: overlay, normal, normal;
  color: var(--ink); font: 400 17px/27px var(--font-serif); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure, ul { margin: 0; }


/* Regra: o que não é negrito é serifado (Source Serif 4); negrito = Climate Crisis e Manrope 700 */
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.015em; }
.hero-title em, .work-title em, .footer-title em { font-size: 1.14em; line-height: 1; letter-spacing: -.02em; }
.hero-title em { line-height: 1.07; }
.intro-title em { font-size: 1.14em; line-height: 1; }

.muted { color: var(--muted); }
.body-lg { font-size: 21px; line-height: 32px; }
.caption { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: .07em; text-transform: uppercase; }
.display-lg { font: 400 min(112px, calc((100vw - 2 * var(--pad)) / 7.9))/1 var(--font-display); text-transform: uppercase; letter-spacing: -.01em; }

/* Botão primário em looping (Manrope, sempre dentro de forma arredondada) */
.btn-loop { position: relative; display: inline-flex; align-items: center; width: 220px; height: 52px; border-radius: 999px; border: 2px solid currentColor;
  overflow: hidden; text-decoration: none; font: 700 15px/1 var(--font-sans); letter-spacing: .04em; text-transform: uppercase; }
.btn-loop-win { display: flex; width: 100%; overflow: hidden; margin: 0 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.btn-loop-track { display: flex; flex: none; align-items: center; gap: 14px; padding-right: 14px; white-space: nowrap; animation: loop 7s linear infinite; }
.btn-loop-track i { font-style: normal; font-size: 10px; }
.btn-loop:hover .btn-loop-track { animation-duration: 3s; }
.btn-loop:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.btn-loop--paper { color: var(--peach); }
.btn-loop--ink { color: var(--brown); }
@keyframes loop { to { transform: translateX(-50%); } }

/* Hero */
.hero { position: relative; isolation: isolate; background-image: var(--grad-red); background-color: var(--red); color: var(--paper); padding: 0 var(--pad) 64px; overflow: hidden; }
.nav { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; height: 48px;
  font: 700 13px/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; }
.nav-brand { font: 400 15px/1 var(--font-display); }
/* Botões FAT (só topbar): 5% de espaçamento e hover em modo slanted */
.nav a { display: inline-block; text-decoration: none; transition: transform .2s ease; }
.nav a:hover, .nav a:focus-visible { transform: skewX(-12deg); }
.nav-links { display: flex; gap: 24px; list-style: none; padding: 0; }
.hero-title { position: relative; z-index: 1; margin-top: 24px; font: 400 min(150px, calc((100vw - 2 * var(--pad)) / 10.9), max(14.5vh, 64px))/1.07 var(--font-display);
  letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; }
.hero-title span { display: block; }
.actions { position: relative; z-index: 3; margin-top: 48px; display: flex; flex-wrap: wrap; gap: 16px; }

/* Intro */
.intro { padding: var(--section) var(--pad); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px 64px; align-items: end; }
.intro-title { container-type: inline-size; font: 400 clamp(26px, 3.3vw, 52px)/1.16 var(--font-display); text-transform: uppercase; color: var(--brand-text); }
@media (min-width: 960px) { .intro { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.intro-text { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }

/* Blocos (especialidades, sobre) */
.block { padding: 0 var(--pad) var(--section); display: flex; flex-direction: column; gap: 40px; }
.block-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; border-top: 2px solid var(--ink); padding-top: 24px; }
.block-head p { max-width: 380px; font: italic 400 clamp(19px, 1.8vw, 24px)/1.25 var(--font-serif); letter-spacing: -.01em; }
#especialidades .display-lg { font-size: min(112px, calc((100vw - 2 * var(--pad)) / 14.6)); }
.grid { display: grid; gap: 16px; }

.terms { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; }


/* Trabalho */
.work { position: relative; isolation: isolate; background-image: var(--grad-ink); background-color: var(--brown); color: var(--paper); padding: var(--section) var(--pad); display: flex; flex-direction: column; gap: 64px; overflow: hidden; }
.work-title { position: relative; z-index: 1; font: 400 min(176px, calc((100vw - 2 * var(--pad)) / 8.1))/.95 var(--font-display); text-transform: uppercase; white-space: nowrap; }
.work-title span { display: block; }
.work-grid { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px 24px; }
.work-grid figure { display: flex; flex-direction: column; gap: 12px; }
.work-grid img { width: 100%; aspect-ratio: 4/5; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.work-grid figure:hover img { transform: scale(.98); }
.work-grid figcaption { display: flex; flex-direction: column; gap: 4px; }
.work-client { font: 400 24px/1 var(--font-display); text-transform: uppercase; }
.work-kind { font-size: 13px; line-height: 18px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); }


/* Projetos: mosaicos de fotografia e filme */
.projects { position: relative; z-index: 3; display: flex; flex-direction: column; gap: clamp(88px, 11vw, 168px); }
.proj { display: flex; flex-direction: column; gap: 32px; }
.proj-head { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 34ch); align-items: end; gap: 12px 32px; }
.proj-num { font: 400 clamp(40px, 5vw, 72px)/.9 var(--font-display); color: var(--brand); }
.proj-titles { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.proj-title { font: 400 clamp(32px, 4.6vw, 68px)/1.04 var(--font-display); text-transform: uppercase; }
.proj-title em { font-size: 1.14em; line-height: .84; }
.proj-kind { color: var(--muted-dark); }
.proj-lead { font-size: 16px; line-height: 24px; color: var(--paper); opacity: .86; }

.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(56px, 7.4vw, 112px); gap: clamp(8px, 1vw, 14px); }
.tile { position: relative; grid-area: var(--a); margin: 0; overflow: hidden; background: color-mix(in srgb, var(--peach) 8%, var(--brown)); transition-delay: calc(var(--i, 0) * 60ms); }
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.tile:hover img, .tile:hover video { transform: scale(1.035); }
.tile--video::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to top, rgba(22,8,3,.72), rgba(22,8,3,0)); pointer-events: none; }
.tile-cap { position: absolute; z-index: 1; left: 14px; bottom: 14px; right: 150px; font: 400 15px/18px var(--font-serif); font-style: italic; color: var(--paper); }
.tile-play { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 12px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.tile-play span { font-size: 9px; }
.tile-play:hover, .tile-play:focus-visible { background: var(--brand); color: var(--paper); transform: translateY(-2px); }
.tile-play:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

.case-films { display: flex; flex-wrap: wrap; gap: 10px; }
.tile-play--inline { position: static; background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--paper); min-height: 40px; }

/* Player (filme completo, por embed) */
.player { width: min(1120px, 94vw); max-height: 92vh; padding: 0; border: 0; background: transparent; color: var(--paper); overflow: visible; }
.player::backdrop { background: rgba(16,6,2,.9); }
.player-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); font: 700 24px/1 var(--font-sans); cursor: pointer; }
.player-close:hover, .player-close:focus-visible { background: var(--brand); color: var(--paper); }
.player-frame { aspect-ratio: 16/9; width: 100%; background: var(--ink); display: grid; place-items: center; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }
.player-soon { padding: 24px; text-align: center; font: 400 20px/28px var(--font-serif); font-style: italic; color: var(--muted-dark); }

@media (max-width: 900px) {
  .proj-head { grid-template-columns: auto minmax(0, 1fr); }
  .proj-lead { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .proj-head { grid-template-columns: minmax(0, 1fr); }
  .proj-num { font-size: 40px; }
  .proj-title { font-size: 10.5vw; }
  .mosaic { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .tile { grid-area: auto; aspect-ratio: 4/3; }
  .tile--video { aspect-ratio: 16/10; }
  .tile-cap { right: 124px; font-size: 14px; }
  .player-close { top: -46px; }
}

/* Caso FozTua */
.case { position: relative; z-index: 3; border-top: 1px solid var(--line-dark); padding-top: 48px; display: grid; gap: 24px;
  grid-template-columns: 1fr minmax(220px, 300px); grid-template-areas: "head head" "story story" "shop phone"; align-items: start; }
.case-head { grid-area: head; display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.case-eyebrow { color: var(--muted-dark); }
.case-title { font: 400 clamp(48px, 7.8vw, 112px)/1 var(--font-display); text-transform: uppercase; color: var(--brand); }
.case-lead { font: italic 400 clamp(22px, 2.3vw, 32px)/1.2 var(--font-serif); letter-spacing: -.01em; }
.case-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.case-tags li { border: 1.5px solid var(--paper); border-radius: 999px; padding: 6px 16px; font-size: 13px; line-height: 18px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.case-shop { grid-area: shop; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.case-shop figcaption a { font: 400 20px/1 var(--font-display); text-transform: uppercase; text-decoration: none; color: var(--paper); }
.case-shop figcaption a:hover { color: var(--brand); }
.browser { background: #0d0d0d; border: 1px solid #333; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #1d1d1d; }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; } .browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin-left: 10px; flex: 1; background: #2b2b2b; color: #bbb; border-radius: 6px; padding: 4px 10px; font-size: 11px; line-height: 14px; }
.case-phone { grid-area: phone; display: flex; justify-content: center; align-items: flex-start; }
.phone { position: relative; width: min(100%, 300px); aspect-ratio: 9/18.5; background: #000; border: 3px solid #3a5a3a; border-radius: 40px; padding: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.5); transform: rotate(4deg); }
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 34%; height: 22px; background: #000; border-radius: 12px; z-index: 2; }
.browser img { display: block; width: 100%; height: auto; }
.phone img { display: block; width: 100%; height: auto; border-radius: 28px; }
.case-phone { padding: 12px 16px 0 0; }
.case-phone .phone { aspect-ratio: auto; width: min(100%, 270px); transform: rotate(3deg); }

@media (max-width: 1000px) {
  .case { grid-template-columns: 1fr minmax(180px, 240px); }
}
@media (max-width: 640px) {
  .case { grid-template-columns: 1fr; grid-template-areas: "head" "story" "shop" "phone"; }
  .case-lead { font-size: 22px; }
  .case-phone .phone { transform: none; width: min(100%, 240px); }
  .case-phone { padding: 0; }
}

/* Rodapé / contacto */
.footer { position: relative; isolation: isolate; background-image: var(--grad-red-rev); background-color: var(--red); color: var(--paper); padding: var(--section) var(--pad) 40px; display: flex; flex-direction: column; gap: 64px; overflow: hidden; }
.footer-cta { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 32px; align-items: flex-end; text-align: right; }
.footer-title { font: 400 min(140px, calc((100vw - 2 * var(--pad)) / 8.7))/1 var(--font-display); text-transform: uppercase; white-space: nowrap; }
.footer-title span { display: block; }
.footer-logo { position: relative; z-index: 1; width: 100%; height: auto; }
.footer-meta { position: relative; z-index: 1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font: 400 13px/1 var(--font-serif); letter-spacing: .1em; text-transform: uppercase; }


/* ---------- Ribbons (grafismo decorativo) ----------
   Ficam À FRENTE do texto, mas em modo exclusion (negativo) e com opacidade parcial, para o texto continuar legível.
   No trabalho ficam abaixo da grelha de fotos, para nunca tocarem nas imagens. A posição e a rotação são guiadas pelo scroll (script.js);
   o balanço lento abaixo é só um respirar. Nunca captam cliques. */
.ribbon { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; height: auto; will-change: transform;
  transform: translate3d(var(--x, 60vw), var(--y, 8vh), 0) rotate(var(--r, 0deg));
  mix-blend-mode: exclusion; opacity: .34; animation: breathe 18s ease-in-out infinite alternate; }
.hero-obj { width: clamp(200px, 34vw, 520px); }
/* Legibilidade: no topo e no rodapé o grafismo passa por trás do texto */
.hero .ribbon, .footer .ribbon { z-index: 0; }
.work-obj { z-index: 2; width: clamp(180px, 32vw, 480px); mix-blend-mode: exclusion; opacity: .42; }
.footer-obj { width: clamp(180px, 26vw, 400px); }
@keyframes breathe { from { translate: 0 -10px; rotate: -3deg; } to { translate: 0 14px; rotate: 4deg; } }

/* Marcadores "a preencher" (só enquanto o conteúdo real não existe) */
.todo { outline: 1.5px dashed currentColor; outline-offset: 3px; opacity: .8; }

/* ---------- Especialidades · monte o seu pacote ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.builder-step { display: flex; align-items: center; gap: 10px; }
.builder-step span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 11px; line-height: 1; letter-spacing: 0; }
.builder-pick { display: flex; flex-direction: column; gap: 20px; }
.chip-groups { display: flex; flex-direction: column; gap: 28px; }
.chip-group { display: flex; flex-direction: column; gap: 14px; }
.chip-group-title { color: var(--muted); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 12px; }
.chip-item { position: relative; }
/* "?" pequeno junto das especialidades mais técnicas */
.info { position: absolute; top: -9px; right: -6px; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1.5px solid var(--ink); border-radius: 50%;
  background: var(--surface); color: var(--ink); font: 700 12px/1 var(--font-sans); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.info:hover, .info[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.info:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.tip { position: absolute; left: 0; top: calc(100% + 12px); z-index: 20; width: min(280px, 78vw); padding: 12px 14px; background: var(--ink); color: var(--paper); border: 1px solid var(--line-dark);
  font: 400 15px/21px var(--font-serif); letter-spacing: 0; text-transform: none; box-shadow: 0 14px 30px rgba(23, 6, 2, .3); }
.tip[hidden] { display: none; }
.tip.flip { left: auto; right: 0; }
.chip { appearance: none; display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 22px 12px 16px;
  border: 2px solid var(--ink); border-radius: 28px; background: transparent; color: var(--ink); cursor: pointer; text-align: left;
  font: 700 clamp(14px, 1.4vw, 17px)/1.15 var(--font-sans); letter-spacing: .04em; text-transform: uppercase;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.chip:hover { border-color: var(--red); color: var(--red); }
.chip:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--paper); }
.chip-mark { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; transition: transform .25s ease; }
.chip-mark::before, .chip-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 2px; background: currentColor; transform: translate(-50%, -50%); }
.chip-mark::after { transform: translate(-50%, -50%) rotate(90deg); }
.chip[aria-pressed="true"] .chip-mark { transform: rotate(45deg); }
.builder-note { max-width: 520px; font-size: 16px; line-height: 22px; color: var(--muted); }

.cart { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; padding: 24px; background-image: var(--grain-light), radial-gradient(90% 60% at 100% 0%, rgba(228, 61, 18, .28), transparent 70%); background-color: var(--ink); background-size: 200px 200px, 100% 100%; background-repeat: repeat, no-repeat; color: var(--paper); border: 2px solid var(--surface-2); }
.cart .builder-step span { background: var(--paper); color: var(--ink); }
#cart-count { margin-left: auto; font-weight: 700; }
.cart-empty { font-size: 16px; line-height: 22px; color: var(--muted-dark); }
.cart-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.cart-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-dark); font: 400 17px/22px var(--font-serif); }
.cart-list li:last-child { border-bottom: 1px solid var(--line-dark); }
.cart-remove { appearance: none; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--muted-dark); border-radius: 50%; background: transparent; color: var(--paper); font: 700 16px/1 var(--font-sans); cursor: pointer; }
.cart-remove:hover { border-color: var(--paper); }
.cart-remove:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }
#cart-cta { align-self: flex-start; transition: opacity .2s ease; }
#cart-cta[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.cart-foot { color: var(--muted-dark); }

/* ---------- Barra das páginas interiores ---------- */
.page-bar { background-image: var(--grad-red); background-color: var(--red); background-size: 200px 200px, 100% 100%, 100% 100%; background-repeat: repeat, no-repeat, no-repeat; background-blend-mode: overlay, normal, normal; color: var(--paper); padding: 0 var(--pad); }
.page-bar .nav { height: 56px; }
@media (max-width: 640px) { .page-bar .nav { height: auto; padding: 14px 0; } }
/* Cinco ligações no menu: entre telemóvel e computador passam para uma segunda linha */
@media (min-width: 641px) and (max-width: 900px) {
  .hero .nav, .page-bar .nav { flex-wrap: wrap; height: auto; padding: 16px 0 0; row-gap: 14px; }
  .page-bar .nav { padding-bottom: 16px; }
  .hero .nav-links, .page-bar .nav-links { width: 100%; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; }
}

/* ---------- Categorias de projeto (slider) ---------- */
.cats { gap: 40px; }
.cats-head { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.cats .work-title { font-size: calc((100vw - 2 * var(--pad)) / 9.6); }
.cats .work-title span { display: inline; }
@media (min-width: 861px) { .cats .work-title { font-size: min(104px, calc((100vw - 2 * var(--pad) - 250px) / 9.6)); } }
.cats-nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cats-count { margin-right: 8px; color: var(--paper); }
.cats-btn { display: grid; place-items: center; width: 52px; height: 52px; border: 2px solid var(--paper); border-radius: 50%; background: transparent; color: var(--paper); font: 700 20px/1 var(--font-sans); cursor: pointer; transition: background-color .2s ease, color .2s ease, opacity .2s ease; }
.cats-btn:hover:not(:disabled) { background: var(--paper); color: var(--ink); }
.cats-btn:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.cats-btn:disabled { opacity: .3; cursor: default; }
.cats-track { --gap: clamp(16px, 2vw, 28px); position: relative; z-index: 3; list-style: none; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--gap)) / 2); gap: var(--gap);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cats-track::-webkit-scrollbar { display: none; }
.cat { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.cat:nth-child(odd) { scroll-snap-align: start; }
.cat-media { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: color-mix(in srgb, var(--peach) 8%, var(--brown)); }
.cat-media video, .cat-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-name { margin-top: 6px; font: 400 clamp(20px, 2.6vw, 40px)/1 var(--font-display); text-transform: uppercase; }
.cat-name em { font-size: 1.14em; line-height: .84; }
.cat-desc { max-width: 52ch; opacity: .96; }
.cat-credit { color: var(--brand); }
.cat-credit + .cat-links { margin-top: -8px; }
.cat-links { display: flex; flex-wrap: wrap; column-gap: 20px; }
.cat-links a { padding: 6px 0; text-decoration: none; color: var(--paper); border-bottom: 1px solid var(--muted-dark); }
.cat-links a:hover { color: var(--brand); border-color: var(--brand); }
.cats-all { position: relative; z-index: 3; }
.proj, .case { scroll-margin-top: 24px; }
/* Telemóvel: continuam a ser duas de cada vez, uma por cima da outra */
@media (max-width: 700px) {
  .cats-track { grid-auto-columns: 100%; grid-template-rows: auto auto; row-gap: 32px; }
  .cat-desc { font-size: 16px; line-height: 24px; }
}

/* ---------- Especialidades na página inicial ---------- */
/* Frase por baixo de "Especialidades": numa só linha */
#especialidades .block-head p { max-width: none; white-space: nowrap; font-size: min(24px, calc((100vw - 2 * var(--pad)) / 17.5)); }
.spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.spec-col { display: flex; flex-direction: column; gap: 14px; }
.spec-col h3 { margin: 0; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.spec-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; font: 400 18px/24px var(--font-serif); }
@media (max-width: 860px) { .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .spec-grid { grid-template-columns: 1fr; } }

/* ---------- Caso FozTua · métricas e história ---------- */
.metrics { grid-area: metrics; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.metric { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--paper); }
.metric.todo { outline: none; border-top-style: dashed; }
.metric strong { font: 400 clamp(44px, 6.4vw, 96px)/.9 var(--font-display); color: var(--brand); }
.metric span { font: 400 13px/18px var(--font-serif); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); }
.story { grid-area: story; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; }
.story-col { display: flex; flex-direction: column; gap: 12px; }
.story-col h4 { color: var(--brand); }
.story-col p { font-size: 16px; line-height: 24px; max-width: 46ch; }
.story-col p + p { margin-top: 4px; }
.work-ph { display: grid; place-items: center; width: 100%; aspect-ratio: 4/5; border: 1.5px dashed var(--muted-dark); background: color-mix(in srgb, var(--peach) 7%, var(--brown)); }
.work-ph span { font: 400 13px/18px var(--font-serif); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); }
.work-kind.todo { align-self: flex-start; }

/* ---------- Sobre ---------- */
#sobre { padding-top: var(--section); }
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px 64px; align-items: end; }
.about-copy { display: flex; flex-direction: column; gap: 18px; max-width: 58ch; }
.about-copy p:not(.about-lead) { font-size: 18px; line-height: 28px; }
.about-lead { font: italic 400 clamp(26px, 3vw, 42px)/1.15 var(--font-serif); letter-spacing: -.015em; margin-bottom: 6px; }
.display-lg em { font-size: 1.1em; line-height: .8; }
.about-stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
.about-stats li { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 2px solid var(--ink); }
.about-stats strong { font: 400 clamp(36px, 4.4vw, 64px)/.9 var(--font-display); color: var(--brand-text); }
.about-stats span { font: 400 18px/25px var(--font-serif); color: var(--ink); }

@media (max-width: 860px) {
  .builder { grid-template-columns: 1fr; }
  .cart { position: static; }
  .about { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .metrics { grid-template-columns: 1fr; gap: 16px; }
  .about-stats { grid-template-columns: 1fr; }
  .chip { min-height: 48px; }
  #especialidades .display-lg { font-size: calc((100vw - 2 * var(--pad)) / 14.6); }
}

/* Superfícies com grão: o 1.º layer é o grão, em blend sobre os degradês e a cor de base */
.hero, .footer, .work { background-size: 200px 200px, 100% 100%, 100% 100%; background-repeat: repeat, no-repeat, no-repeat; background-blend-mode: overlay, normal, normal; }
.work { background-blend-mode: normal, normal, normal; }

/* Animação de entrada */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-loop-track, .ribbon { animation: none; }
  .tile img, .tile video, .tile-play { transition: none; }
  .chip, .chip-mark, #cart-cta { transition: none; }
}

/* Mobile */
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; height: auto; padding: 14px 0 0; row-gap: 14px; }
  .nav-links { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 10px 18px; font-size: 11px; }
  .nav-links a { white-space: nowrap; }
  .body-lg { font-size: 18px; line-height: 26px; }
}
@media (max-width: 380px) {
  .nav-links { gap: 10px 14px; }
}

