/* ==========================================================================
   igormarques.art — estilos principais
   Breakpoint mobile: até 768px. Valores vêm de tokens.css.
   ========================================================================== */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; font-family: var(--font); color: var(--text-primary); background: var(--surface-page);
  line-height: normal; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, figure, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface-inverse); color: var(--text-inverse);
  padding: 10px 16px; border-radius: var(--radius-full); font-size: var(--fs-body-sm); }
.skip-link:focus { top: 12px; }

.page { max-width: 1440px; margin: 0 auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
main { display: flex; flex-direction: column; gap: 10px; }

/* ---------- imagens (lazyload + fade) ---------- */
.img { width: 100%; height: 100%; object-fit: cover; background: var(--surface-subtle); }
.img--pending { display: block; background: var(--surface-subtle)
  repeating-linear-gradient(45deg, transparent 0 12px, rgba(0,0,0,.025) 12px 24px); }
.js video.img { opacity: 1; }
.js img.img { opacity: 0; transition: opacity .5s var(--ease-out); }
.js img.img.is-loaded { opacity: 1; }

/* ---------- revelar ao rolar ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- logo ---------- */
.logo { width: 100%; height: auto; color: currentColor; }

/* ---------- tag ---------- */
.tag { display: inline-flex; align-items: center; justify-content: center; padding: 4px 12px; border-radius: var(--radius-full);
  font-size: var(--fs-body-sm); white-space: nowrap; border: 1px solid transparent; }
.tag--white { background: var(--surface-page); color: var(--text-primary); border-color: var(--border-default); }
.tag--black { background: var(--surface-inverse); color: var(--text-inverse); }
.tag--glass { color: var(--text-inverse); background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* ---------- redes sociais (pílula) ---------- */
.socials { display: inline-flex; align-items: center; gap: 16px; padding: 12px 24px; border-radius: var(--radius-full); }
.socials--white { background: var(--surface-page); color: var(--text-primary); }
.socials--black { background: var(--surface-inverse); color: var(--text-inverse); }
.socials a { display: block; transition: opacity var(--dur-fast); }
.socials a:hover { opacity: .6; }
.socials .icon { width: 16px; height: 16px; }

/* ---------- botões ---------- */
.botao-seta { display: inline-block; width: 62px; height: 62px; color: var(--text-inverse); transition: opacity var(--dur-fast); }
.botao-seta .icon { width: 100%; height: 100%; }
.botao-seta--link:hover { opacity: .6; }
.botao-primario { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 24px; border-radius: 999px; background: var(--surface-inverse); color: var(--text-inverse);
  font-size: var(--fs-body-lg); transition: background var(--dur-fast); }
.botao-primario:hover { background: var(--color-gray-800); }
.botao-primario .icon { width: 40px; height: 40px; flex: none; transition: transform var(--dur-base) var(--ease-out); }
.botao-primario:hover .icon { transform: translateX(3px); }

/* ---------- navbar ---------- */
.navbar { position: sticky; top: 12px; z-index: 50; display: flex; justify-content: center; }
.navbar__inner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px 48px; background: var(--surface-page); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  transition: width .45s var(--ease-out), padding .45s var(--ease-out); }
.navbar.is-scrolled .navbar__inner { width: max-content; min-width: 692px; padding: 12px 24px; }
.navbar__logo { width: 62px; flex: none; color: var(--text-primary); }
.navbar__links { flex: 1; display: flex; justify-content: center; gap: 24px; }
.navbar.is-scrolled .navbar__links { flex: none; }
.nav-item { font-size: var(--fs-body-lg); color: var(--text-secondary); transition: color var(--dur-fast); white-space: nowrap; }
.nav-item:hover, .nav-item.is-current { color: var(--text-primary); }
.nav-item--white { color: var(--text-inverse-secondary); }
.nav-item--white:hover { color: var(--text-inverse); }
.navbar__actions { display: flex; align-items: center; gap: 24px; flex: none; }
.lang { display: flex; gap: 12px; font-size: var(--fs-body-sm); }
.lang a { color: var(--text-muted); transition: color var(--dur-fast); }
.lang a:hover, .lang a.is-active { color: var(--text-primary); }

/* ---------- menu (hambúrguer + redes) ----------
   A pílula cresce de verdade (não sobrepõe nada): a área das redes abre de 0 até a largura do conteúdo,
   e a navbar compacta acompanha essa largura. */
.menu { display: flex; flex-direction: row-reverse; align-items: center; border-radius: var(--radius-full); }
.menu--black { background: var(--surface-inverse); color: var(--text-inverse); }
.menu--white { background: var(--surface-page); color: var(--text-primary); }
.menu__toggle { flex: none; width: 40px; height: 40px; border-radius: var(--radius-full); display: grid; place-items: center; color: inherit; }
.menu__bars { position: relative; width: 18px; height: 12px; }
.menu__bars i { position: absolute; left: 0; width: 18px; height: 4px; background: currentColor; transition: transform var(--dur-base) var(--ease-out), top var(--dur-base) var(--ease-out); }
.menu__bars i:first-child { top: 0; }
.menu__bars i:last-child { top: 8px; }
.menu.is-open .menu__bars i:first-child { top: 4px; transform: rotate(45deg); }
.menu.is-open .menu__bars i:last-child { top: 4px; transform: rotate(-45deg); }
.menu__panel { display: grid; grid-template-columns: 0fr; transition: grid-template-columns .4s var(--ease-out); }
.menu.is-open .menu__panel { grid-template-columns: 1fr; }
.menu__panel-inner { min-width: 0; overflow: hidden; display: flex; align-items: center; visibility: hidden; transition: visibility 0s .4s; }
.menu.is-open .menu__panel-inner { visibility: visible; transition: visibility 0s; }
.menu__socials { padding: 12px 8px 12px 24px; background: none !important; color: inherit !important; }
.menu__links { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: 800px; border-radius: var(--radius-lg); overflow: hidden; }
/* enquanto o showreel não fica pronto, a animação da logo roda em loop no primeiro painel */
.hero--reel { background: var(--surface-inverse); }
.hero__logo { position: absolute; inset: 0; transition: opacity .3s; }
.hero__logo svg { position: absolute; left: 50%; top: 50%; height: 86%; width: auto; aspect-ratio: 1; transform: translate(-50%, -50%); }
/* showreel: o fundo do vídeo é preto, então "contain" não corta os quadros e as sobras somem no painel preto */
.hero--video { background: var(--color-black); }
.hero__video { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- página 404 ---------- */
.notfound { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center;
  height: 800px; padding: 48px 24px; border-radius: var(--radius-lg); background: var(--surface-inverse); color: var(--text-inverse); }
.notfound__logo { width: 160px; height: auto; }
.notfound h1 { margin: 16px 0 0; font-size: var(--fs-card); font-weight: 600; }
.notfound p { margin: 0; max-width: 460px; color: var(--text-inverse-secondary); }
.notfound__en { font-size: var(--fs-body-sm); }
.notfound__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 16px; }
.notfound .botao-primario { background: var(--surface-page); color: var(--text-primary); }
.notfound .botao-primario:hover { background: var(--color-gray-50); }
.notfound .botao-primario--ghost { background: transparent; color: var(--text-inverse); border: 1px solid currentColor; }
.notfound .botao-primario--ghost:hover { background: rgba(255,255,255,.08); }

/* ---------- cards de projeto ---------- */
.projects { padding: 48px 24px; }
.projects__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.project-card { position: relative; height: 400px; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--space-xl); color: var(--text-inverse); background: var(--surface-inverse); }
.project-card__media { position: absolute; inset: 0; z-index: -2; }
.project-card__media .img { transition: transform .8s var(--ease-out), opacity .5s var(--ease-out); }
.project-card__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.project-card__top { display: flex; justify-content: flex-end; }
.project-card__info { display: flex; flex-direction: column; gap: var(--space-sm); }
.project-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.project-card__title { font-size: var(--fs-card); font-weight: 600; }
.project-card__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 6px; border-radius: var(--radius-md);
  height: 0; opacity: 0; transform: translateY(12px); padding-block: 0; overflow: hidden;
  transition: height var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), padding var(--dur-base) var(--ease-out); }
.project-card__thumb { height: 73px; border-radius: var(--radius-md); overflow: hidden; }
.project-card .botao-seta { transition: opacity var(--dur-fast); }
@media (hover: hover) and (min-width: 769px) {
  .project-card:hover .project-card__overlay { opacity: 1; }
  .project-card:hover .project-card__thumbs { height: 85px; padding-block: 6px; opacity: 1; transform: none; }
  .project-card:hover .project-card__media .img { transform: scale(1.03); }
  .project-card:hover .botao-seta { opacity: .6; }
}

/* ---------- sobre mim (home) ---------- */
.about { padding: 48px 24px; display: flex; gap: 12px; }
.about__photo { flex: 1; max-width: 600px; border-radius: var(--radius-lg); overflow: hidden; }
.about__photo { position: relative; min-height: 560px; }
/* a foto acompanha a altura do bloco de texto e corta só a parte de baixo */
.about__photo .img { position: absolute; inset: 0; object-position: center 50%; }
.about__card { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 48px;
  background: var(--surface-inverse); color: var(--text-inverse-secondary); border-radius: var(--radius-lg); }
.about__content { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; font-size: var(--fs-body-sm); }
.about__wordmark { width: 420px; max-width: 100%; aspect-ratio: 2250 / 1500; }
.about__wordmark .img { object-fit: contain; background: none; }
.about__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- CTA + formulário ---------- */
.cta { padding: 48px 24px; display: flex; gap: 12px; align-items: stretch; }
.cta__text { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; padding: 48px;
  background: var(--surface-inverse); color: var(--text-subtle); border-radius: var(--radius-lg); font-size: var(--fs-body-md); }
.cta__title { font-size: var(--fs-display); font-weight: 600; color: var(--text-inverse); }
.cta__form { width: 550px; flex: none; }

/* ---------- form ---------- */
.form { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--surface-page);
  border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__step { border: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form__step[hidden] { display: none; }
.form__title { font-size: var(--fs-heading-sm); font-weight: 500; padding: 0; float: left; width: 100%; }
.form__title + * { clear: both; }
.divisor { border: 0; height: 1px; margin: 0; background: var(--border-default); }
.form__row { display: flex; flex-wrap: wrap; gap: 12px; }
.form__row > * { flex: 1 1 200px; min-width: 0; }
.form__back { align-self: center; font-size: var(--fs-body-sm); color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.form__back:hover { color: var(--text-primary); }
.form__privacy { font-size: var(--fs-caption); color: var(--text-muted); }
.form__error { font-size: var(--fs-body-sm); color: var(--feedback-error); }
.form__progress { display: flex; gap: 12px; }
.form__progress i { position: relative; flex: 1; height: 4px; border-radius: var(--radius-full); background: var(--border-default); overflow: hidden; }
/* a barra preta "enche" da esquerda para a direita ao avançar e esvazia ao voltar */
.form__progress i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--surface-inverse);
  transform: scaleX(0); transform-origin: left center; transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.form[data-current="1"] .form__progress i:nth-child(-n+1)::after,
.form[data-current="2"] .form__progress i:nth-child(-n+2)::after,
.form[data-current="3"] .form__progress i:nth-child(-n+3)::after { transform: scaleX(1); }
.form.is-sent .form__progress, .form.is-sending-anim .form__progress { display: none; }
.form__sent { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 0; }
.form__sent[hidden] { display: none; }
.form__sent-icon { width: 120px; height: 120px; color: var(--feedback-success); }
.form__sent-icon svg { width: 100%; height: 100%; display: block; overflow: visible; }
.form__sent-icon polyline { stroke-dasharray: 1; stroke-dashoffset: 0; }

/* envio: a logo se forma (versão preta), depois o círculo verde surge e o check se desenha */
.form__sending { display: grid; place-items: center; min-height: 420px; }
.form__sending[hidden] { display: none; }
.form__sending-logo { position: relative; width: 340px; height: 340px; transition: opacity .4s var(--ease-out); }
.form__sending-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.form.is-revealing .form__sent > * { opacity: 0; transform: translateY(12px); }
.form.is-revealing .form__sent-icon { transform: scale(.4); }
.form.is-revealing .form__sent-icon polyline { stroke-dashoffset: 1; }
.form.is-revealed .form__sent > * { opacity: 1; transform: none;
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.form.is-revealed .form__sent-icon { transition: opacity .25s ease-out, transform .55s cubic-bezier(.34, 1.56, .64, 1); }
.form.is-revealed .form__sent-icon polyline { transition: stroke-dashoffset .4s var(--ease-out) .35s; }
.form.is-revealed .form__sent > :nth-child(2) { transition-delay: .45s; }
.form.is-revealed .form__sent > :nth-child(3) { transition-delay: .53s; }
.form.is-revealed .form__sent > :nth-child(4) { transition-delay: .61s; }
.form.is-revealed .form__sent > :nth-child(5) { transition-delay: .69s; }
.form__sent-title { font-size: var(--fs-heading-sm); font-weight: 500; color: var(--text-primary); }
.form__sent-text { font-size: var(--fs-body-sm); color: var(--text-secondary); }
.form__again { font-size: var(--fs-caption); color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; margin-top: 8px; }
.form.is-sending .botao-primario { opacity: .6; pointer-events: none; }

/* campo (componente Input) */
.input { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.input__head { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.input__label { font-size: var(--fs-body-md); color: var(--text-secondary); }
.input__optional { font-size: var(--fs-body-sm); color: var(--text-subtle); }
.input__control { position: relative; display: flex; align-items: center; height: 40px; padding: 0 var(--space-md);
  background: var(--surface-page); border: 1px solid var(--border-default); border-radius: var(--radius-full); transition: border-color var(--dur-fast); }
.input__control:focus-within { border-color: var(--text-secondary); }
.input input, .input select, .input textarea { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: none; padding: 0;
  font-size: var(--fs-body-sm); color: var(--text-primary); }
.input input::placeholder, .input textarea::placeholder { color: var(--text-muted); opacity: 1; }
.input select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 28px; }
.input select:invalid, .input select.is-empty { color: var(--text-muted); }
.input__icon { display: none; width: 20px; height: 20px; flex: none; }
.input__icon .icon { width: 20px; height: 20px; }
.input__icon--select { display: block; position: absolute; right: var(--space-md); pointer-events: none; color: var(--text-primary); }
.input__icon--ok { color: var(--feedback-success); }
.input__icon--error { color: var(--feedback-error); }
.input.is-valid .input__icon--ok { display: block; }
.input.is-invalid .input__icon--error { display: block; }
.input.is-invalid .input__control { border-color: var(--feedback-error); }
.input--textarea .input__control { height: 200px; align-items: flex-start; padding: var(--space-md); border-radius: var(--radius-md); }
.input--textarea textarea { resize: none; height: 100%; }
.input__help { font-size: var(--fs-caption); color: var(--text-muted); min-height: 0; }
.input__help:empty { display: none; }
.is-invalid > .input__help, .choices.is-invalid .input__help { color: var(--feedback-error); }

/* opções (Tag: branca = selecionada, preta = não selecionada) */
.choices { border: 0; display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.choices legend { padding: 0; margin-bottom: var(--space-sm); float: left; width: 100%; }
.choices__opts { clear: both; display: flex; flex-wrap: wrap; gap: 6px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .tag { transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.choice:hover .tag--white { border-color: var(--text-secondary); }
.choice input:checked + .tag { background: var(--surface-inverse); color: var(--text-inverse); border-color: var(--surface-inverse); }
.choice input:focus-visible + .tag { outline: 2px solid var(--text-primary); outline-offset: 2px; }


/* ---------- tipografia de página ---------- */
.display { font-size: var(--fs-display); font-weight: 600; line-height: 1.2; color: var(--text-primary); }
.subtitle { font-size: var(--fs-subtitle); font-weight: 400; line-height: 1.25; color: var(--text-primary); }
.lead { font-size: var(--fs-body-lg); color: var(--text-muted); line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 12px; }
.divisor--page { width: 1000px; max-width: 100%; align-self: center; }

/* ---------- cabeçalho da página Projetos + filtros ---------- */
.page-head { padding: 48px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.page-head__title { font-size: var(--fs-display); font-weight: 600; padding: 24px 24px 0; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-bottom: 24px; }
.filters .tag { cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.filters .tag--white:hover { border-color: var(--text-secondary); }
.project-card.is-hidden { display: none; }

/* ---------- blocos em duas colunas (sobre mim, case) ---------- */
.split { display: flex; gap: 48px; padding: 48px; align-items: stretch; }
.split--center { align-items: center; }
.split > * { flex: 1 1 0; min-width: 0; }
.split__info { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 24px; }
.split__text { display: flex; flex-direction: column; justify-content: center; }
.split__wordmark { display: block; width: 380px; max-width: 100%; aspect-ratio: 3 / 2; }
.split__wordmark .img { object-fit: contain; background: none; }

.photo-card { position: relative; min-height: 699px; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-subtle); }
.photo-card--short { min-height: 453px; }
.photo-card > .img { position: absolute; inset: 0; object-position: center 30%; }
/* recorte igual ao do Figma: --cx/--cy = canto do recorte, --cw/--ch = tamanho do recorte (fração da foto) */
.photo-card--crop { --cx: var(--dx); --cy: var(--dy); --cw: var(--dw); --ch: var(--dh); }
.photo-card--crop > .img { inset: auto; object-fit: cover; object-position: center;
  width: calc(100% / var(--cw)); height: calc(100% / var(--ch));
  left: calc(-100% * var(--cx) / var(--cw)); top: calc(-100% * var(--cy) / var(--ch)); }
.photo-card__bar { position: absolute; left: 24px; right: 24px; bottom: 24px; display: flex; align-items: center; justify-content: space-between; }
.botao-seta--sm { width: 52px; height: 52px; }

/* ficha técnica do projeto */
.facts { display: flex; flex-direction: column; justify-content: center; gap: 12px; margin: 0; }
.fact { display: flex; justify-content: space-between; gap: 24px; padding: 24px 48px; background: var(--surface-subtle); border-radius: var(--radius-md); }
.fact dt { flex: 1; font-size: var(--fs-heading-sm); font-weight: 500; color: var(--text-primary); }
.fact dd { flex: 1; margin: 0; display: flex; flex-direction: column; gap: 12px; justify-content: center; font-size: var(--fs-body-md); color: var(--text-secondary); }

/* imagens do case: proporção original, sem corte */
.case-img { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-subtle); }
.case-img .img { height: auto; }
.case-row { display: flex; gap: 10px; }
.case-img--frame { background: var(--surface-inverse); padding: 48px 24px; display: flex; justify-content: center; }
.case-img__inner { display: block; width: 100%; border-radius: var(--radius-md); overflow: hidden; }
.case-row .case-img { min-width: 0; }

/* ---------- "Vamos construir algo juntos?" + projetos ---------- */
.build { padding: 48px; display: flex; flex-direction: column; gap: 8px; }
.build__info { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; }
.build__title { font-size: var(--fs-display); font-weight: 600; }
.botao-primario--auto { width: auto; gap: 24px; }
.cta--small .cta__text { font-size: var(--fs-body-sm); }

/* ---------- popup do formulário ---------- */
.dialog { width: min(1416px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); margin: auto; padding: 0; border: 0;
  border-radius: var(--radius-lg); background: var(--surface-page); color: var(--text-primary); overflow: auto; overscroll-behavior: contain; }
.dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dialog[open] { animation: dialog-in .3s var(--ease-out); }
.dialog[open]::backdrop { animation: fade-in .3s var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.has-dialog body { overflow: hidden; }
.dialog__inner { display: flex; flex-direction: column; gap: 12px; padding: 48px 24px; }
.dialog__top { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.dialog__logo { width: 120px; padding-left: 12px; color: var(--text-primary); }
.dialog__close { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--surface-inverse); color: var(--text-inverse);
  display: grid; place-items: center; margin-right: 24px; transition: background var(--dur-fast); }
.dialog__close:hover { background: var(--color-gray-800); }
.dialog__close span { position: relative; width: 18px; height: 18px; }
.dialog__close i { position: absolute; left: 0; top: 7px; width: 18px; height: 4px; background: currentColor; transform: rotate(45deg); }
.dialog__close i + i { transform: rotate(-45deg); }
.dialog__body { display: flex; gap: 12px; align-items: stretch; }
.dialog__intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center;
  background: var(--surface-inverse); color: var(--text-inverse-secondary); border-radius: var(--radius-lg); font-size: var(--fs-body-sm); }
.dialog__symbol { display: block; width: 336px; max-width: 70%; margin-bottom: 24px; color: var(--text-inverse); }
.dialog__title { font-size: var(--fs-display); font-weight: 600; color: var(--text-inverse); }
.dialog__intro p { max-width: 758px; }
.dialog__form { width: 550px; flex: none; }
.dialog__rights { text-align: center; font-size: var(--fs-body-sm); color: var(--text-secondary); }

/* ---------- footer ---------- */
.footer { min-height: 312px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 48px;
  background: var(--surface-inverse); border-radius: var(--radius-lg); color: var(--text-inverse); }
.footer__top { display: flex; justify-content: space-between; align-items: flex-start; }
.footer__logo { width: 200px; color: var(--text-inverse); }
.footer__links { display: flex; flex-direction: column; gap: 24px; }
.footer__bottom { text-align: center; font-size: var(--fs-caption); color: var(--text-inverse-muted); }
.footer__year { color: var(--text-inverse-subtle); }

/* ---------- loadscreen ---------- */
.loader { position: fixed; inset: 0; z-index: 1000; background: var(--surface-page); padding: 12px; }
.loader__panel { width: 100%; height: 100%; background: var(--surface-inverse); border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.loader svg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(690px, 136vw, 84vh); height: auto; aspect-ratio: 1; overflow: visible; }
.no-loader .loader { display: none; }
.is-loading body { overflow: hidden; }

/* ==========================================================================
   mobile
   ========================================================================== */
@media (max-width: 768px) {
  .navbar__inner, .navbar.is-scrolled .navbar__inner { width: 100%; min-width: 0; padding: 12px 24px; }
  .navbar__links { display: none; }
  .navbar .menu { background: none; }
  .navbar .menu__toggle { background: var(--surface-inverse); color: var(--text-inverse); }
  .navbar .menu__panel { display: block; position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    border-radius: var(--radius-md); border: 1px solid var(--border-default); background: var(--surface-page);
    clip-path: inset(0 0 100% 0 round 12px); opacity: 0; transition: clip-path .4s var(--ease-out), opacity .3s; }
  .navbar .menu.is-open .menu__panel { clip-path: inset(0 0 0 0 round 12px); opacity: 1; }
  .navbar .menu__panel-inner { flex-direction: column; align-items: flex-start; gap: 24px; padding: 24px; overflow: visible; }
  .navbar .menu__links { display: flex; flex-direction: column; gap: 16px; font-size: var(--fs-body-lg); color: var(--text-secondary); }
  .navbar .menu__socials { padding: 12px 24px; background: var(--surface-inverse) !important; color: var(--text-inverse) !important; }
  .navbar__inner { position: relative; }

  .hero { height: 479px; }
  .hero--video { height: auto; aspect-ratio: 9 / 16; }   /* showreel vertical ocupa o painel inteiro */
  .notfound { height: auto; min-height: 479px; padding: 48px 24px; }
  .notfound__logo { width: 120px; }
  .projects { padding: 12px; }
  .projects__grid { grid-template-columns: 1fr; }
  .project-card__thumbs { display: none; }

  .about { padding: 12px; flex-direction: column-reverse; }
  .about__photo { max-width: none; height: 348px; flex: none; }
  .about__card { padding: 24px; }
  .about__wordmark { width: 100%; }

  .cta { flex-direction: column; padding: 48px 0; }
  .cta__text { padding: 24px; align-items: center; text-align: center; font-size: var(--fs-body-sm); color: var(--text-inverse-secondary); }
  .cta__title { font-size: var(--fs-card); }
  .cta__form { width: 100%; }


  .display, .build__title, .page-head__title { font-size: var(--fs-card); }
  .subtitle { font-size: var(--fs-heading-sm); font-weight: 500; }
  .lead { font-size: var(--fs-body-md); }
  .page-head { padding: 12px; }
  .page-head__title { font-size: var(--fs-display); }
  .split { flex-direction: column; gap: 8px; padding: 12px; }
  .split__info { padding: 24px; }
  .split--reverse-mobile { flex-direction: column; }
  .split > * { flex: none; }
  .photo-card, .photo-card--short { min-height: 0; height: 200px; }
  .photo-card--crop { --cx: var(--mcx); --cy: var(--mcy); --cw: var(--mcw); --ch: var(--mch); }
  .photo-card__bar { left: 24px; right: 24px; bottom: 24px; }
  .fact { padding: 24px; }
  .case-row { flex-direction: column; }
  .case-img--frame { padding: 12px; }
  .fact dt { font-size: var(--fs-body-lg); }
  .build { padding: 12px; }
  .build__info { padding: 24px; }
  .botao-primario--auto { font-size: var(--fs-body-md); }
  .dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .dialog__inner { padding: 24px 12px; }
  .dialog__body { flex-direction: column; }
  .dialog__intro { padding: 24px; }
  .dialog__title { font-size: var(--fs-card); }
  .dialog__symbol { width: 220px; margin-bottom: 8px; }
  .dialog__form { width: 100%; }
  .dialog__close { margin-right: 12px; }
  .footer { padding: 48px; }
  .footer__top { flex-direction: column; gap: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
