/* Layout: galeria de arte branca; cada secção é uma sala com uma peça central, numa coluna de 1240px. */
:root {
  --bg: #fcfcfa;
  --wall-shade: #eeede8;
  --panel: #ffffff;
  --ink: #121211;
  --ink-hover: #3a3833;
  --muted: #67645d;
  --soft: #8d887e;
  --line: rgba(18, 18, 17, .12);
  --line-2: rgba(18, 18, 17, .28);
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 76px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; scrollbar-color: #c9c6be var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--bg); }
em { font-style: normal; color: var(--soft); }
.mono { font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -64px; z-index: 200; padding: 10px 16px; background: var(--ink); color: var(--bg); font-weight: 600; transition: top .2s; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- Textura de papel e piscar do obturador ---------- */
.grain {
  position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.flash { position: fixed; inset: 0; z-index: 100; pointer-events: none; background: var(--ink); opacity: 0; }
.flash.on { animation: flash .4s ease-out; }
@keyframes flash { from { opacity: .16; } to { opacity: 0; } }

/* ---------- Navegação ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gutter) 16px;
  border-bottom: 1px solid transparent; transition: background .4s, border-color .4s;
}
.nav.scrolled { background: rgba(252, 252, 250, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-color: var(--line); }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: .04em; text-transform: uppercase; }
.nav__logo {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--ink); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: uppercase;
}
.nav__links { display: flex; align-items: center; gap: 26px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.nav__links a { color: var(--muted); transition: color .25s; }
.nav__links a:hover, .nav__links a.active { color: var(--ink); }
.nav__links a.active:not(.nav__cta) { box-shadow: 0 1.5px 0 var(--ink); }
.nav__cta { color: var(--ink) !important; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px; transition: border-color .25s, background .25s, color .25s !important; }
.nav__cta:hover, .nav__cta.active { border-color: var(--ink); background: var(--ink); color: var(--bg) !important; }
.nav__toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s; }
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Comum ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(100px, 13vw, 170px) 0; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(44px, 6.4vw, 96px); line-height: .92; letter-spacing: .005em; text-transform: uppercase; }
.dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ink); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18,18,17,.35); } 70% { box-shadow: 0 0 0 9px rgba(18,18,17,0); } 100% { box-shadow: 0 0 0 0 rgba(18,18,17,0); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; border-radius: 999px; white-space: nowrap;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  transition: background .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--ink-hover); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--ink); background: rgba(252, 252, 250, .7); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--handle { text-transform: none; letter-spacing: .02em; }
.round { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); transition: border-color .25s, background .25s, color .25s; }
.round:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.round svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.js .reveal { transition: transform .9s var(--ease); }
.js .reveal:not(.in) { transform: translateY(26px); }

/* ---------- Topo: uma parede de galeria iluminada ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; }
.hero__stage {
  position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(55% 70% at 50% 42%, #ffffff 0%, var(--bg) 45%, var(--wall-shade) 100%);
}
.hero__stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 26%; pointer-events: none; background: linear-gradient(rgba(252, 252, 250, 0), rgba(252, 252, 250, .94)); }
.hero__word {
  position: absolute; left: 50%; top: 13svh; z-index: 1; margin: 0;
  font-family: var(--display); font-weight: 900; font-size: min(21vw, 40svh); line-height: .8; letter-spacing: .005em;
  text-transform: uppercase; white-space: nowrap; color: var(--soft); transform: translateX(-50%); will-change: filter;
}
.js .hero__word { opacity: 0; }
.fonts-ready .hero__word { opacity: 1; animation: word-in 1.6s var(--ease) both; }
@keyframes word-in { from { opacity: 0; filter: blur(26px); transform: translateX(-50%) scale(1.05); } }
.hero__shot {
  position: absolute; left: 50%; bottom: 0; z-index: 2; height: min(90svh, 1450px); aspect-ratio: 666 / 1450; transform: translateX(-50%);
  touch-action: pan-y; cursor: ew-resize; -webkit-tap-highlight-color: transparent;
}
.hero__shot:focus-visible { outline: 1.5px dashed var(--ink); outline-offset: -6px; border-radius: 0; }
.hero__photo { width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: blur(14.8px); will-change: filter; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.hero__hint { position: absolute; left: 50%; bottom: 28px; z-index: 4; margin: 0; transform: translateX(-50%); white-space: nowrap; color: var(--muted); font-size: 9.5px; transition: color .3s; }
.hero__hint b { color: var(--ink); font-weight: 500; }
.hero__hint.is-done { color: var(--ink); }

/* Quadrado de foco da câmara do iPhone, sobre a cara, com o @ do Instagram */
.ios-af { --ios: #ffd60a; position: absolute; left: 50%; bottom: 0; z-index: 4; height: min(90svh, 1450px); aspect-ratio: 666 / 1450; transform: translateX(-50%); pointer-events: none; }
.ios-af__box { position: absolute; left: 32%; top: 14%; width: 36%; aspect-ratio: 1; border: 1.5px solid var(--ios); opacity: .7; animation: ios-in .5s var(--ease) both, ios-hunt 2.4s ease-in-out .6s infinite; }
.ios-af__box i { position: absolute; background: var(--ios); }
.ios-af__box i:nth-child(1) { left: 50%; top: 0; width: 1.5px; height: 8px; margin-left: -.75px; }
.ios-af__box i:nth-child(2) { left: 50%; bottom: 0; width: 1.5px; height: 8px; margin-left: -.75px; }
.ios-af__box i:nth-child(3) { top: 50%; left: 0; height: 1.5px; width: 8px; margin-top: -.75px; }
.ios-af__box i:nth-child(4) { top: 50%; right: 0; height: 1.5px; width: 8px; margin-top: -.75px; }
.ios-af__sun { position: absolute; left: calc(68% + 10px); top: 22.3%; width: 20px; height: 20px; margin-top: -10px; opacity: .7; transition: opacity .3s; }
.ios-af__sun svg { width: 100%; height: 100%; fill: none; stroke: var(--ios); stroke-width: 1.8; stroke-linecap: round; }
.ios-af__tag {
  position: absolute; left: 50%; top: calc(30.6% + 10px); transform: translateX(-50%); pointer-events: auto; white-space: nowrap;
  padding: 3px 8px; border-radius: 6px; background: rgba(18, 18, 17, .35); color: var(--ios);
  font-family: -apple-system, "SF Pro Text", system-ui, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: background .25s;
}
.ios-af__tag:hover { background: rgba(18, 18, 17, .6); }
.ios-af.is-locked .ios-af__box { opacity: 1; animation: ios-lock .9s var(--ease) both; }
.ios-af.is-locked .ios-af__sun { opacity: 1; }
@keyframes ios-in { from { opacity: 0; transform: scale(1.35); } }
@keyframes ios-hunt { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
/* Ao focar: encolhe como no iPhone e pisca duas vezes */
@keyframes ios-lock { 0% { transform: scale(1.28); opacity: 1; } 30% { transform: scale(1); opacity: 1; } 45% { opacity: .35; } 60% { opacity: 1; } 75% { opacity: .35; } 100% { opacity: 1; transform: scale(1); } }

.hero__intro { position: absolute; left: var(--gutter); bottom: 96px; z-index: 4; width: min(340px, 27vw); }
.hero__name { margin: 0 0 12px; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 3.4vw, 52px); line-height: .9; letter-spacing: .02em; text-transform: uppercase; }
.hero__roles { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--ink); }
.hero__lead { margin: 0 0 24px; color: var(--muted); font-size: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Sobre: a foto como uma obra emoldurada, com legenda de museu ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
/* A moldura tem o formato da foto (2:3) e, enquanto acompanha o texto, cabe sempre inteira no ecrã */
.vf { position: sticky; top: calc(var(--nav-h) + 20px); width: min(100%, max(300px, calc((100svh - var(--nav-h) - 130px) * 2 / 3))); margin: 0 auto; }
.vf__frame {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden;
  border: 16px solid #fff; outline: 1.5px solid var(--ink);
  background: #6c7f82;
  box-shadow: 0 2px 4px rgba(18, 18, 17, .06), 0 38px 60px -30px rgba(18, 18, 17, .4);
}
.vf__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: filter, transform; }
/* Desfocada, a foto fica um pouco maior, para a orla desfocada ficar fora da moldura */
.js .vf__photo { filter: blur(20px); transform: scale(1.12); }
.vf__label { display: grid; gap: 2px; margin-top: 22px; padding-left: 14px; border-left: 1.5px solid var(--ink); }
.vf__label b { font-weight: 600; font-size: 15px; }
.vf__label span { color: var(--muted); font-size: 14px; }

.about__text { padding-top: 8px; }
.about__text .h2 { margin-bottom: 30px; }
.about__text p { margin: 0 0 18px; color: var(--muted); max-width: 60ch; }
.about__text .about__lead { color: var(--ink); font-size: 21px; line-height: 1.45; }
/* Ficha de modelo, no estilo de uma tabela de museu */
.comp { margin: 40px 0 0; }
.comp__title { margin: 0 0 12px; color: var(--muted); }
.comp__grid { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); border-left: 1px solid var(--line); }
.comp__cell { min-width: 0; padding: 14px 16px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.comp__cell dt { margin-bottom: 8px; color: var(--muted); }
.comp__cell dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(24px, 2.4vw, 34px); line-height: 1; letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere; }
.facts { margin: 40px 0 0; border-top: 1px solid var(--line-2); }
.facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); padding-top: 4px; }
.facts dd { margin: 0; }

/* ---------- Book: as fotos passam por trás de Malik, como um comboio ---------- */
.works__stage {
  position: relative; height: 100svh; min-height: 620px; overflow: hidden; transition: filter .6s var(--ease), opacity .6s;
  background: radial-gradient(55% 65% at 50% 55%, #ffffff 0%, var(--bg) 50%, var(--wall-shade) 100%);
}
.works.is-dimmed .works__stage { filter: blur(12px); opacity: .35; }
.works__head { position: absolute; z-index: 3; left: var(--gutter); top: calc(var(--nav-h) + 6px); max-width: 440px; pointer-events: none; }
/* Em ecrãs baixos o título encolhe um pouco, para deixar espaço ao comboio por baixo */
.works__head .h2 { font-size: clamp(40px, min(5vw, 8.5svh), 76px); }
.works__hint { margin: 16px 0 0; color: var(--muted); }
.works__credit { margin: 10px 0 0; color: var(--muted); pointer-events: auto; }
.works__credit a, .wd__meta dd a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: break-word; }
.works__credit a:hover, .wd__meta dd a:hover { text-decoration-thickness: 2px; }
.works__now {
  position: absolute; z-index: 3; left: 50%; bottom: 30px; transform: translateX(-50%); margin: 0; display: inline-flex; gap: 10px; align-items: center; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; background: rgba(252, 252, 250, .9); box-shadow: 0 0 0 1px var(--line); color: var(--muted);
}
.works__now b { color: var(--ink); font-weight: 400; }
.works__now span::before { content: "▸ "; color: var(--ink); }
.works__me { position: absolute; left: 50%; bottom: 0; z-index: 2; height: 72svh; width: auto; transform: translateX(-50%); pointer-events: none; user-select: none; }
/* A linha do comboio fica à altura do peito, por trás de Malik */
.train { position: absolute; z-index: 1; left: 0; right: 0; top: 62%; transform: translateY(-50%); }
/* Os carris seguem o mesmo arco das fotos (desenhados pelo JavaScript à medida do ecrã) */
.train__rails { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.train__rails path { fill: none; stroke: rgba(18, 18, 17, .22); stroke-width: 1; }
.train__track { display: flex; gap: 30px; width: max-content; margin: 0; padding: 0 0 0 30px; list-style: none; will-change: transform; }
.car { flex: none; width: 170px; transform-origin: 50% 50%; will-change: transform; }
.car.is-lifted { visibility: hidden; }
.card {
  display: block; width: 100%; padding: 8px 8px 0; text-align: left;
  background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink), 0 22px 36px -18px rgba(18, 18, 17, .5);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.card:hover, .card:focus-visible { transform: translateY(-8px) scale(1.05); box-shadow: 0 0 0 2.5px var(--ink), 0 30px 50px -18px rgba(18, 18, 17, .6); }
.card:focus-visible { outline: none; }
.card__photo { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #ecebe6; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card__caption { display: block; padding: 8px 1px 10px; font-family: var(--mono); font-size: 7.5px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
/* Sem animações: o comboio para e desliza-se à mão */
.train.is-static { overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }

/* Foto aberta: a obra à esquerda e a sua tabela de museu à direita */
.wd { position: fixed; inset: 0; z-index: 90; }
.wd__backdrop { position: absolute; inset: 0; background: rgba(252, 252, 250, .55); opacity: 0; transition: opacity .5s; }
.wd.is-open .wd__backdrop { opacity: 1; }
.wd__media {
  position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 2; padding: 8px 8px 26px; background: #fff;
  box-shadow: 0 0 0 1.5px var(--ink), 0 40px 80px -30px rgba(18, 18, 17, .55);
  transition: left .75s var(--ease), top .75s var(--ease), width .75s var(--ease), height .75s var(--ease), padding .75s var(--ease);
}
.wd__media.is-flat { padding: 14px; }
.wd__frame { position: relative; width: 100%; height: 100%; overflow: hidden; background: #ecebe6; transition: opacity .18s; }
.wd__media.is-swapping .wd__frame { opacity: 0; }
.wd__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.wd__full { opacity: 0; transition: opacity .45s; }
.wd__full.is-loaded { opacity: 1; }
.wd__panel {
  position: fixed; z-index: 3; top: 50%; right: var(--gutter); width: min(440px, 36vw); max-height: calc(100svh - 120px); overflow: auto;
  padding: 26px 28px 24px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 30px 60px -36px rgba(18, 18, 17, .35);
  opacity: 0; transform: translate(48px, -50%); transition: opacity .45s .12s, transform .6s var(--ease) .12s;
}
.wd.is-open .wd__panel { opacity: 1; transform: translate(0, -50%); }
.wd__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.wd__count { color: var(--muted); font-variant-numeric: tabular-nums; }
.wd__close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); transition: border-color .25s, background .25s, color .25s; }
.wd__close:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.wd__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.wd__body .wd__type { margin: 0 0 10px; color: var(--muted); }
.wd__body h3 { margin: 0 0 14px; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 3.2vw, 48px); line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
.wd__body p { margin: 0 0 20px; color: var(--muted); }
.wd__meta { margin: 0 0 24px; display: grid; border-top: 1px solid var(--line-2); }
.wd__meta div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wd__meta dt { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wd__meta dd { margin: 0; text-align: right; font-size: 15px; }
.wd__nav { display: flex; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- Galeria em azulejo: fotos lado a lado, com tamanhos diferentes ---------- */
.gallery__intro { margin: 24px 0 0; max-width: 58ch; color: var(--muted); }
.gallery__credit { margin: 14px 0 0; color: var(--muted); }
.gallery__credit a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.gallery__head, .tiles-wrap { transition: filter .6s var(--ease), opacity .6s; }
.gallery.is-dimmed .gallery__head, .gallery.is-dimmed .tiles-wrap { filter: blur(10px); opacity: .35; }
.tiles-wrap { max-width: 1320px; margin: 64px auto 0; padding: 0 var(--gutter); container-type: inline-size; }
.tiles {
  --cols: 6; --gap: 8px;
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--gap); grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-flow: dense;
  grid-auto-rows: 190px;
  grid-auto-rows: calc((100cqw - (var(--cols) - 1) * var(--gap)) / var(--cols)); /* células quadradas, como azulejos */
}
.tile { min-width: 0; grid-column: span var(--w, 1); grid-row: span var(--h, 1); }
.tile__btn { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 4px; background: #e9e7e1; }
.tile__btn img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .8s var(--ease); }
.tile--wide .tile__btn img { object-position: 50% 50%; }
.tile__btn::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(18, 18, 17, 0) 55%, rgba(18, 18, 17, .6)); opacity: 0; transition: opacity .35s; }
.tile__cap {
  position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 1; color: #fff; font-size: 9.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease);
}
.tile__btn:hover img, .tile__btn:focus-visible img { transform: scale(1.05); }
.tile__btn:hover::after, .tile__btn:focus-visible::after, .tile__btn:hover .tile__cap, .tile__btn:focus-visible .tile__cap { opacity: 1; }
.tile__btn:hover .tile__cap, .tile__btn:focus-visible .tile__cap { transform: none; }
.tile__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* Foto aberta: o lugar dela no mosaico fica vazio */
.tile.is-lifted .tile__btn { visibility: hidden; }
@media (min-width: 1000px) {
  /* No computador cada azulejo tem o seu lugar fixo no mosaico de 6 x 8. */
  .tile { grid-column: var(--c) / span var(--w, 1); grid-row: var(--r) / span var(--h, 1); }
}
@media (max-width: 999px) { .tiles { --cols: 4; } }

/* ---------- Contacto ---------- */
.contact { padding-bottom: clamp(120px, 14vw, 180px); }
.contact__title { margin: 0 0 26px; max-width: 11ch; font-family: var(--display); font-weight: 900; font-size: clamp(60px, 11vw, 176px); line-height: .84; letter-spacing: .005em; text-transform: uppercase; }
.contact__lead { margin: 0 0 46px; max-width: 520px; color: var(--muted); font-size: 19px; }
.contact__big {
  display: inline-block; max-width: 100%; margin-bottom: 30px; padding-bottom: 6px; border-bottom: 2px solid var(--line-2);
  font-family: var(--display); font-weight: 800; font-size: clamp(30px, 5.4vw, 72px); line-height: 1; letter-spacing: .01em; overflow-wrap: anywhere;
  transition: border-color .25s;
}
.contact__big:hover { border-color: var(--ink); }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.contact__phone { display: inline-flex; flex-direction: column; gap: 2px; margin-left: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.contact__phone .mono { color: var(--muted); font-size: 9.5px; font-weight: 400; }
.contact__phone:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Rodapé e aviso ---------- */
.footer { border-top: 1px solid var(--line-2); color: var(--muted); }
.footer__inner { max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer__brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__links a:hover { color: var(--ink); }
.footer__meta { margin: 0; }
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); z-index: 110; max-width: calc(100% - 32px);
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; text-align: center;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .hero__intro { width: min(300px, 30vw); }
}
@media (max-width: 1000px) {
  .about__grid { grid-template-columns: 1fr; }
  .vf { position: relative; top: 0; width: 100%; max-width: 440px; margin: 0; }
}
@media (max-width: 860px) {
  .wd__panel { top: auto; right: var(--gutter); left: var(--gutter); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 52svh; transform: translateY(40px); }
  .wd.is-open .wd__panel { transform: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  :root { --nav-h: 68px; }
  .nav__toggle { display: block; }
  .nav__name { display: none; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 28px;
    background: rgba(252, 252, 250, .98); font-size: 13px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav__links.open { opacity: 1; visibility: visible; }
  .hero { height: auto; min-height: 0; overflow: visible; }
  .hero__stage { position: relative; height: 100svh; min-height: 560px; }
  .hero__word { top: 16svh; font-size: 21vw; }
  .hero__shot { height: 76svh; }
  .hero__hint { bottom: 20px; font-size: 9px; }
  .hero__intro { position: relative; left: auto; bottom: auto; width: auto; padding: 34px var(--gutter) 0; }
  .about__text .about__lead { font-size: 19px; }
  .vf__frame { border-width: 12px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .comp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-wrap { margin-top: 44px; }
  .tiles { --cols: 2; --gap: 6px; }
  .wd__meta div { display: block; }
  .wd__meta dd { margin-top: 3px; text-align: left; }
  .works__head { top: calc(var(--nav-h) + 8px); right: var(--gutter); }
  .works__head .h2 { font-size: 40px; }
  .works__me { height: 56svh; }
  .train { top: 64%; }
  .train__track { gap: 16px; padding-left: 16px; }
  .car { width: 108px; }
  .card { padding: 5px 5px 0; }
  .card__caption { padding: 6px 0 7px; font-size: 6px; }
  .works__now { bottom: 22px; }
  .ios-af { height: 76svh; }
  .ios-af__tag { font-size: 12px; }
  .contact__phone { margin-left: 0; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal:not(.in) { transform: none; }
  .js .hero__word, .fonts-ready .hero__word { opacity: 1; }
  .ios-af__box { opacity: 1; }
}
