/* Tiago Borges — v3. Wordmark gigante, tiles de foto de ponta a ponta, menu em tela cheia. */
:root {
  --ground: #161616;
  --ink: #f2f1ee;
  --ink-soft: #a9a7a2;
  --line: rgba(242, 241, 238, 0.16);
  --accent: #ff5a1f;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --edge: clamp(16px, 3.2vw, 48px);
  --gap: clamp(6px, 0.8vw, 12px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 clamp(1rem, 0.95rem + 0.2vw, 1.1rem)/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
video, canvas { max-width: 100%; height: auto; }
iframe, embed, object { max-width: 100%; }
a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #111; }
h1, h2, p, dl, dd, ul { margin: 0; padding: 0; }
p { text-wrap: pretty; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #111; padding: 8px 14px; min-height: 44px; display: flex; align-items: center; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { font-size: 0.95rem; color: var(--ink); }
.big { font-weight: 700; font-size: clamp(3.6rem, 1rem + 13vw, 15rem); line-height: 0.9; letter-spacing: -0.055em; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.06em; }
.big .arrow { width: 0.62em; height: 0.62em; flex: none; margin-bottom: 0.04em; color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .big .arrow { animation: nudge 2.4s var(--ease-out) 1.2s 2; } @keyframes nudge { 40% { transform: translateY(8%); } } }

/* ---------- header + menu ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 40; height: 72px; display: flex; align-items: center; justify-content: space-between; padding-inline: var(--edge); pointer-events: none; mix-blend-mode: normal; }
.site-header > * { pointer-events: auto; }
.wordmark { transition: opacity 240ms var(--ease-out); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.03em; text-decoration: none; padding: 14px 0; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.menu-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: #111; display: grid; place-content: center; gap: 6px; cursor: pointer; transition: transform 160ms var(--ease-out); }
.menu-btn:active { transform: scale(0.94); }
.menu-btn span { display: block; width: 20px; height: 2px; background: currentColor; transition: transform 260ms var(--ease-out); }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 30; background: var(--ground); padding: 96px var(--edge) calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; overflow-y: auto; overscroll-behavior: contain; }
.menu ul { list-style: none; }
.menu li a { display: block; font-weight: 700; font-size: clamp(2.8rem, 1rem + 9vw, 8rem); line-height: 1.02; letter-spacing: -0.05em; text-decoration: none; padding: 0.04em 0; }
.menu__foot { display: flex; flex-wrap: wrap; gap: 8px 32px; color: var(--ink-soft); font-size: 1rem; }
.menu__foot a { padding: 10px 0; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .menu li a:hover { color: var(--accent); } }
.js .menu { visibility: hidden; opacity: 0; transition: opacity 240ms var(--ease-out), visibility 0s 240ms; }
.js .menu-open .menu { visibility: visible; opacity: 1; transition: opacity 240ms var(--ease-out), visibility 0s; }
html:not(.js) .site-header { position: static; height: auto; padding-block: 16px; }
html:not(.js) .menu-btn { display: none; }
html:not(.js) .menu { position: static; padding: 0 var(--edge) 16px; }
html:not(.js) .menu ul { display: flex; gap: 20px; flex-wrap: wrap; }
html:not(.js) .menu li a { font-size: 1rem; letter-spacing: 0; font-weight: 500; }
html:not(.js) .menu__foot { display: none; }

/* ---------- hero: foto em tela cheia, troca sozinha ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; padding: 104px var(--edge) clamp(20px, 3vw, 36px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; color: #fff; background: #0c0c0d; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.62) 0%, rgba(0,0,0,.18) 34%, rgba(0,0,0,.05) 52%, rgba(0,0,0,.72) 100%); }
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1400ms ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__name { font-weight: 700; font-size: 15.8vw; line-height: 0.86; letter-spacing: -0.065em; white-space: nowrap; margin-left: -0.04em; }
.hero__name .w { display: inline-block; white-space: nowrap; }
.hero__name .w span { display: inline-block; }
.hero__name .dot { color: var(--accent); }
.hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 64px; flex-wrap: wrap; }
.hero__line { font-size: clamp(1.4rem, 1rem + 1.8vw, 2.7rem); line-height: 1.12; letter-spacing: -0.03em; max-width: 20ch; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.hero__links { display: grid; gap: 4px; font-size: 1.05rem; }
.hero__links a, .contact__links a { text-decoration: none; padding: 8px 0; width: fit-content; max-width: 100%; overflow-wrap: anywhere; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .hero__links a:hover, .contact__links a:hover { background-size: 100% 1px; } }
.hero__meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: clamp(16px, 2.4vw, 32px); border-top: 1px solid rgba(255,255,255,.28); padding-top: 4px; font-size: 0.85rem; min-height: 48px; }
.hero__cap { opacity: .9; }
.hero__dots { display: flex; }
.hero__dots button { position: relative; width: 44px; height: 44px; border: 0; padding: 0; background: none; cursor: pointer; }
.hero__dots button::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: rgba(255,255,255,.32); }
.hero__dots button::after { content: ""; position: absolute; left: 6px; top: 50%; height: 2px; width: 0; background: var(--accent); }
.hero__dots button.is-active::after { width: calc(100% - 12px); }
.hero__dots button.is-running::after { animation: fill var(--dur, 6s) linear both; }
@keyframes fill { from { width: 0; } to { width: calc(100% - 12px); } }
@media (prefers-reduced-motion: no-preference) {
  .slide.is-active img, .slide.is-leaving img { animation: kb 9s linear both; }
  @keyframes kb { from { transform: scale(1.12); } to { transform: scale(1.01); } }
  .js .hero__name .w span { animation: letter 900ms var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + 150ms); }
  @keyframes letter { from { opacity: 0; transform: translateY(0.35em); } }
  .js .hero__bottom { animation: rise 900ms var(--ease-out) 700ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- faixa em movimento ---------- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); padding: clamp(14px, 2vw, 26px) 0; }
.marquee__track { display: flex; width: max-content; align-items: center; gap: clamp(24px, 3vw, 48px); font-weight: 700; font-size: clamp(1.8rem, 1rem + 3.6vw, 4.6rem); letter-spacing: -0.045em; line-height: 1; padding-left: clamp(24px, 3vw, 48px); white-space: nowrap; }
.marquee__track i { width: 0.34em; height: 0.34em; border-radius: 50%; background: var(--accent); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 48s linear infinite; }
  @keyframes marquee { to { transform: translateX(-50%); } }
  @media (hover: hover) { .marquee:hover .marquee__track { animation-play-state: paused; } }
}

/* ---------- entrada ao rolar ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- works: tiles ---------- */
.works { padding: clamp(40px, 8vw, 120px) 0 0; }
.works .big { padding-inline: var(--edge); margin-bottom: clamp(24px, 4vw, 56px); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--gap); }
.tile { position: relative; display: block; overflow: hidden; background: var(--bg); aspect-ratio: 4 / 3; color: #fff; text-decoration: none; isolation: isolate; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.tile--portrait img { object-position: 50% 35%; }
.tile::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.72)); z-index: 1; pointer-events: none; }
.tile__cap { position: absolute; left: clamp(14px, 2vw, 28px); right: 14px; bottom: clamp(14px, 2vw, 26px); z-index: 2; display: grid; gap: 2px; }
.tile__meta { font-size: 0.85rem; opacity: .85; }
.tile__title { font-size: clamp(1.15rem, 0.9rem + 1vw, 1.9rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 500; max-width: 22ch; }
@media (hover: hover) and (pointer: fine) { .tile:hover img { transform: scale(1.035); } }
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (max-width: 700px) { .tiles { grid-template-columns: 1fr; } .tile:last-child:nth-child(odd) { aspect-ratio: 4 / 3; } }

/* ---------- about ---------- */
.about { padding: clamp(72px, 12vw, 180px) var(--edge) clamp(56px, 8vw, 120px); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.about h2 { font-weight: 400; font-size: clamp(2rem, 1rem + 3.2vw, 4.4rem); line-height: 1.04; letter-spacing: -0.04em; max-width: 14ch; margin-bottom: 28px; }
.about__main > p { max-width: 46ch; color: var(--ink-soft); }
.values { margin-top: 32px; max-width: 52ch; }
.values div { border-top: 1px solid var(--line); padding: 16px 0; display: grid; grid-template-columns: 8.5rem 1fr; gap: 16px; }
.values dt { font-weight: 600; letter-spacing: -0.01em; }
.values dd { color: var(--ink-soft); }
.about__photo { background: #2a2825; aspect-ratio: 768 / 1364; max-width: 300px; justify-self: end; width: 100%; overflow: hidden; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .about { grid-template-columns: 1fr; } .about__photo { justify-self: start; max-width: 260px; order: 3; } }
@media (max-width: 520px) { .values div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- clients ---------- */
.clients { padding: clamp(48px, 8vw, 120px) 0 clamp(64px, 10vw, 160px); }
.clients .big { padding-inline: var(--edge); margin-bottom: clamp(24px, 4vw, 56px); }
.logos { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 var(--gap); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logos li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logos a { display: grid; place-items: center; min-height: clamp(110px, 16vw, 220px); padding: 24px; }
.logos img { height: clamp(44px, 5vw, 72px); width: auto; max-width: 75%; object-fit: contain; opacity: .85; transition: opacity 200ms ease, transform 400ms var(--ease-out); }
.logos img.mono { filter: brightness(0) invert(1); }
@media (hover: hover) and (pointer: fine) { .logos a:hover img { opacity: 1; transform: scale(1.05); } }
@media (max-width: 700px) { .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logos img { height: 44px; } }

/* ---------- contact + footer ---------- */
.contact { padding: clamp(48px, 8vw, 120px) var(--edge) clamp(64px, 10vw, 140px); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 4vw, 64px); border-top: 1px solid var(--line); }
.contact h2 { font-weight: 400; font-size: clamp(2.2rem, 1rem + 4.6vw, 6rem); line-height: 1.02; letter-spacing: -0.045em; max-width: 14ch; }
.contact__lead { margin-top: 24px; color: var(--ink-soft); max-width: 46ch; }
.contact__links { display: grid; gap: 2px; margin-top: 24px; font-size: 1.15rem; }
form { display: grid; gap: 14px; max-width: 560px; margin-top: clamp(40px, 6vw, 72px); }
label { display: grid; gap: 6px; font-size: 0.85rem; color: var(--ink-soft); }
input, textarea { font: inherit; font-size: 16px; color: var(--ink); background: transparent; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; min-height: 44px; border-radius: 0; }
input:focus-visible, textarea:focus-visible { border-color: var(--accent); outline: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.note { font-size: 0.8rem; color: var(--ink-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #111; font: 600 0.95rem/1 var(--font); cursor: pointer; transition: transform 140ms var(--ease-out), background-color 160ms, color 160ms; }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #fff; border-color: #fff; } .btn--ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); } }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.site-footer { border-top: 1px solid var(--line); padding: 28px var(--edge); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- lightbox ---------- */
dialog.lightbox {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%;
  background: color-mix(in oklab, #0b0b0c 96%, transparent); color: #ecebe8; overscroll-behavior: contain;
}
dialog.lightbox::backdrop { background: #0b0b0c; }
dialog.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: lb-in 240ms var(--ease-out) both; }
@keyframes lb-in { from { opacity: 0; } }
.lb-stage { position: relative; display: grid; place-items: center; padding: 56px 64px 8px; min-height: 0; touch-action: pan-y pinch-zoom; }
.lb-stage img { max-width: 100%; max-height: calc(100svh - 150px); width: auto; height: auto; object-fit: contain; transition: opacity 180ms var(--ease-out); }
.lb-stage img.is-loading { opacity: 0.0; }
.lb-bar { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); font-size: 0.85rem; color: #b9b6b0; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0;
  color: #ecebe8; cursor: pointer; font-size: 28px; line-height: 1; transition: transform 140ms var(--ease-out);
}
.lb-btn:active { transform: scale(0.94); }
.lb-close { top: max(8px, env(safe-area-inset-top)); right: 8px; }
.lb-prev { left: 4px; top: 50%; translate: 0 -50%; }
.lb-next { right: 4px; top: 50%; translate: 0 -50%; }
@media (max-width: 640px) { .lb-stage { padding: 56px 0 8px; } .lb-prev, .lb-next { display: none; } }
.lb-single .lb-prev, .lb-single .lb-next { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.past-hero .wordmark { opacity: 0; pointer-events: none; }

/* ---------- telas pequenas e toque (o desktop continua igual) ---------- */
@media (max-width: 700px), (pointer: coarse) {
  .hero__links a { padding-block: 9px; }
}
@media (max-width: 700px) {
  .eyebrow, label, .note, .btn, .tile__meta, .hero__cap, .site-footer, .lb-bar { font-size: 1rem; }
  .hero__meta { flex-wrap: wrap; gap: 0 16px; padding-top: 10px; }
  .hero__cap { flex: 1 1 100%; }
  .hero__dots { margin-inline: -6px; }
}
@media (max-width: 480px) {
  .two { grid-template-columns: 1fr; gap: 14px; }
  .form__actions .btn { flex: 1 1 100%; }
}
