/* ==========================================================================
   VINITI — portfólio editorial
   Layout: coluna editorial única, margem lateral de ~6,4vw (mockup),
   hero centrado e silencioso; projeto em grade 72/28 que empilha no mobile.
   ========================================================================== */

:root {
  /* Cor — identidade única, clara por decisão da marca (fundo uniforme #F6F3ED) */
  --paper: #F6F3ED;          /* fundo de todas as seções */
  --ink: #1D1B18;            /* títulos e texto principal */
  --logo: #2F2C27;           /* preto da logo, amostrado do arquivo original */
  --muted: #5F5951;          /* texto secundário */
  --soft: #8A8378;           /* legendas, rodapé */
  --gold: #A6815F;           /* ponto dourado da marca */

  /* Tipografia */
  --font: "Figtree", "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Grade */
  --edge: max(0px, min(calc(6.4vw - 16px), 104px)); /* soma-se ao gutter de 16px do body */
  --ease: cubic-bezier(.22, .61, .36, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;     /* a retenção das introduções não desloca a largura da página */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
}

::selection { background: rgba(166, 129, 95, .28); color: var(--ink); }

a { color: inherit; }

a:focus-visible {
  outline: 1.5px solid var(--gold);
  outline-offset: 6px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Navegação
   -------------------------------------------------------------------------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: calc(clamp(26px, 3.2vw, 46px) + env(safe-area-inset-top, 0px));
  padding-left: calc(max(16px, env(safe-area-inset-left, 0px)) + var(--edge));
  padding-right: calc(max(16px, env(safe-area-inset-right, 0px)) + var(--edge));
}

.site-nav ul {
  display: flex;
  gap: clamp(22px, 4.6vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 6px;
  font-size: clamp(13px, 1.02vw, 15px);
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--ink), var(--ink)) left calc(100% - 2px) / 0 1px no-repeat;
  transition: background-size .45s var(--ease);
}

.site-nav a:hover { background-size: 100% 1px; }

.site-header__mark {
  width: clamp(22px, 2.7vw, 36px);
  height: 1px;
  background: var(--gold);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  place-items: center;
  min-height: 560px;
  min-height: min(100vh, clamp(560px, 52.4vw, 900px));
  min-height: min(100svh, clamp(560px, 52.4vw, 900px));
  padding-block: clamp(110px, 10vw, 150px) clamp(64px, 6vw, 96px);
  text-align: center;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero__brand { margin: 0; line-height: 0; }

.logo {
  display: block;
  width: clamp(260px, 46.3vw, 800px);
  height: auto;
  overflow: visible;
}

.logo__ink { fill: var(--logo); }
.logo__dot { fill: var(--gold); }

.hero__kicker {
  margin: clamp(26px, 2.9vw, 44px) 0 0;
  font-size: clamp(11px, 1.12vw, 16px);
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  line-height: 1.2;
  /* compensa o espaçamento final do tracking para centralizar opticamente */
  margin-right: -.34em;
  color: var(--ink);
}

.hero__lede {
  margin: clamp(18px, 1.8vw, 28px) 0 0;
  max-width: 36em;
  font-size: clamp(15px, 1.38vw, 20px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}

/* Estado inicial da animação (só com movimento habilitado e JS ativo) */
.motion .logo { opacity: 0; }
.motion .hero__kicker,
.motion .hero__lede { opacity: 0; }

/* --------------------------------------------------------------------------
   Seções editoriais
   -------------------------------------------------------------------------- */

.section {
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.eyebrow {
  display: flex;
  font-family: inherit;
  align-items: center;
  gap: clamp(16px, 2.1vw, 28px);
  margin: 0;
  font-size: clamp(10px, .86vw, 12.5px);
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ink);
}

.eyebrow::after {
  content: "";
  width: clamp(40px, 5.2vw, 76px);
  height: 1px;
  background: var(--gold);
}

/* --------------------------------------------------------------------------
   Projetos
   Grade: imagem (≈ 2/3) | coluna editorial | trilho das gotas (40px, sempre reservado).
   Na coluna, o nome se alinha ao topo da imagem e o propósito à base dela:
   a composição fica ancorada nos dois extremos da captura.
   -------------------------------------------------------------------------- */

.projects {
  padding-top: 0;               /* o prólogo traz o próprio espaço */
  padding-bottom: clamp(24px, 3vw, 48px);
}

/* ---------- Prólogo: "O que criamos." ----------
   Uma frase centrada com espaço próprio; os capítulos começam depois dela. */
.prologue {
  display: grid;
  place-items: center;
  min-height: 56vh;
  min-height: 56svh;            /* respeita as barras dinâmicas do celular */
  padding-block: clamp(48px, 6vw, 96px);
  text-align: center;
}

.prologue__title {
  margin: 0;
  font-size: clamp(34px, 6.4vw, 120px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.045em;
  white-space: nowrap;          /* uma linha só, em qualquer largura */
  color: var(--ink);
}

/* ---------- Capítulos (categorias) ---------- */

.categories {
  display: flex;
  flex-direction: column;
  gap: clamp(120px, 11.5vw, 210px);
  margin-top: clamp(40px, 8vh, 96px);
}

.category { position: relative; min-width: 0; }

/* capítulos: a escrita de maior presença da seção */
.category__title {
  margin: 0;
  font-size: clamp(48px, 5.8vw, 112px);
  font-weight: 400;
  line-height: 1.04;            /* o "g" de uma linha nunca toca a letra da linha de baixo */
  letter-spacing: -.046em;
  color: var(--ink);
}

/* cada linha é uma máscara; o espaço extra embaixo acomoda descendentes (p, g) */
.ch-line {
  display: block;
  overflow: hidden;
  padding-bottom: .2em;         /* a máscara inclui a descendente inteira (g, p) */
  margin-bottom: -.2em;
}

.ch-line__in { display: inline-block; }

/* Transição entre capítulos: cópia de digitação (aria-hidden) e a faixa que a transporta.
   Ambas existem só durante a animação e são posicionadas por transform. */
.ch-ghost {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: max-content;
  pointer-events: none;
  will-change: transform, clip-path;
}

/* retenção temporária durante a introdução de um capítulo (o JS remove ao final) */
html.intro-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

.ch-band {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  background: var(--ink);
  pointer-events: none;
  will-change: transform;
}

.category > .showcase { margin-top: clamp(36px, 3.6vw, 64px); }

/* ---------- Vitrine ---------- */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 66fr) minmax(0, 34fr) 40px;   /* trilho sempre reservado: imagens com a mesma largura */
  grid-template-areas: "media copy rail" "below . .";
  align-items: stretch;
}

.showcase__media {
  grid-area: media;
  align-self: start;
  position: relative;
  display: grid;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;          /* todas as capturas são preparadas em 16:9 */
  overflow: hidden;
  background: #EEE8DF;
  touch-action: pan-y;           /* rolagem vertical continua nativa no toque */
  -webkit-user-select: none;
  user-select: none;
}

.showcase__slide {
  grid-area: 1 / 1;
  margin: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  background: transparent;
}

.showcase__slide.is-active { opacity: 1; visibility: visible; }

.showcase__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}

.showcase__slide--empty {
  display: grid;
  place-items: center;
  font-size: clamp(10px, .82vw, 12px);
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--soft);
}

.showcase__copy {
  grid-area: copy;
  display: grid;
  min-width: 0;
  padding-left: clamp(28px, 3.4vw, 64px);
  padding-right: 8px;
}

.showcase__entry {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;       /* nome e propósito centrados na altura da imagem */
  gap: 0;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
}

.showcase__entry.is-active { opacity: 1; visibility: visible; }

/* O nome real do projeto é a principal escrita da coluna */
.project__name {
  margin: 0;
  font-size: clamp(36px, 4.3vw, 80px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.048em;
  color: var(--ink);
  text-wrap: balance;
}

.project__name .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .2em;
  margin-bottom: -.2em;
}

.project__name .w__in { display: inline-block; }

.project__meta { min-width: 0; margin-top: clamp(20px, 1.8vw, 32px); }

.project__desc {
  margin: 0;
  max-width: 31ch;
  font-size: clamp(15px, 1.06vw, 17px);
  line-height: 1.62;
  letter-spacing: .003em;
  color: var(--muted);
  text-wrap: pretty;
}

/* "Ver projeto ↗": a linha de base existe em tom baixo; no hover, a tinta a percorre */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(22px, 2.2vw, 32px);
  padding-block: 6px;
  font-size: clamp(15px, 1.06vw, 17px);
  color: var(--ink);
  text-decoration: none;
}

.link-arrow__label {
  padding-bottom: 5px;
  background:
    linear-gradient(var(--ink), var(--ink)) left bottom / 0 1px no-repeat,
    linear-gradient(rgba(29, 27, 24, .28), rgba(29, 27, 24, .28)) left bottom / 100% 1px no-repeat;
  transition: background-size .6s var(--ease);
}

.link-arrow__icon {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .45s var(--ease);
}

.link-arrow:hover .link-arrow__label,
.link-arrow:focus-visible .link-arrow__label { background-size: 100% 1px, 100% 1px; }
.link-arrow:hover .link-arrow__icon,
.link-arrow:focus-visible .link-arrow__icon { transform: translate(3px, -3px); }
.link-arrow:focus { outline: none; }
.link-arrow:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 6px; border-radius: 2px; }

/* --------------------------------------------------------------------------
   Navegação dos projetos — gotas
   Desktop: coluna vertical à direita (setas + gotas). ≤960px: linha junto ao nome.
   -------------------------------------------------------------------------- */

.showcase__rail {
  grid-area: rail;
  align-self: center;
  justify-self: end;
}

.rail {
  --dots-axis: y;     /* lido pelo JS */
  --dot-gap: 22;      /* distância entre centros, em px */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rail__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  opacity: .55;
  cursor: pointer;
  transition: opacity .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.rail__arrow svg {
  width: 10px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .45s var(--ease);
}

.rail__arrow:focus { outline: none; }
.rail__arrow:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 2px; opacity: 1; }

@media (hover: hover) {
  .rail__arrow:hover { opacity: 1; }
  .rail__arrow--up:hover svg { transform: translateY(-3px); }
  .rail__arrow--down:hover svg { transform: translateY(3px); }
}

.rail__dots {
  position: relative;
  flex: none;
}

.rail__svg {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.rail__base { fill: var(--ink); }
.rail__base circle {
  opacity: .22;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .3s var(--ease), transform .45s var(--ease);
}
.rail__base circle.is-hover { opacity: .55; transform: scale(1.3); }
.rail__drop { fill: var(--gold); }

.rail__dot {
  position: absolute;
  width: var(--hit-w, 40px);
  height: var(--hit-h, 22px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
}

.rail__dot[aria-current="true"] { cursor: default; }

.rail__dot:focus { outline: none; }
.rail__dot:focus-visible::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
}

/* pausa/retomada da troca automática: mínima, junto às gotas */
.rail__toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  opacity: .32;
  cursor: pointer;
  transition: opacity .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.rail__toggle svg { width: 9px; height: 9px; fill: currentColor; }
.rail__toggle:focus { outline: none; }
.rail__toggle:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 2px; opacity: 1; }
@media (hover: hover) { .rail__toggle:hover { opacity: .85; } }

/* --------------------------------------------------------------------------
   Nossa essência — "Não usamos templates."
   -------------------------------------------------------------------------- */

.essence {
  display: grid;
  align-content: center;
  min-height: 600px;
  min-height: min(100vh, max(600px, 66vw));
  min-height: min(100svh, max(600px, 66vw));
  padding-block: clamp(96px, 9vw, 160px);
  padding-left: calc(var(--edge) + clamp(0px, 9.4vw, 190px));
  padding-right: var(--edge);
}

.essence__title {
  margin: 0;
  font-size: clamp(54px, 10.4vw, 180px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.052em;
  color: var(--ink);
}

.essence__line { display: block; }

.essence__text {
  margin: clamp(30px, 3.6vw, 60px) 0 0;
  max-width: 40ch;
  font-size: clamp(17px, 1.92vw, 31px);
  line-height: 1.45;
  letter-spacing: -.005em;
  color: var(--muted);
  text-wrap: pretty;
}

.gold { color: var(--gold); }

.motion .essence__title,
.motion .essence__text,
.motion .essence__title .gold { opacity: 0; }

/* --------------------------------------------------------------------------
   Carrossel de capturas (só Last Stop): ocupa a área da imagem do projeto
   -------------------------------------------------------------------------- */

.shots {
  --shots-ink: #FFFFFF;        /* controles sobre capturas escuras */
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.shots__stage {
  display: grid;
  width: 100%;
  height: 100%;
  touch-action: pan-y;         /* swipe horizontal no carrossel, rolagem vertical na página */
}

.showcase__slide .shots__img {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
}

.showcase__slide .shots__img.is-active { opacity: 1; visibility: visible; }

.shots__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 72px;
  margin-top: -36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--shots-ink);
  opacity: 0;
  cursor: pointer;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.shots__arrow--prev { left: clamp(4px, 1vw, 16px); }
.shots__arrow--next { right: clamp(4px, 1vw, 16px); }

.shots__arrow svg {
  width: 12px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, .45));
}

.shots:hover .shots__arrow,
.shots__arrow:focus-visible { opacity: .65; }
.shots .shots__arrow:hover { opacity: 1; }
.shots__arrow--prev:hover { transform: translateX(-3px); }
.shots__arrow--next:hover { transform: translateX(3px); }
.shots__arrow:focus { outline: none; }
.shots__arrow:focus-visible { outline: 1.5px solid var(--gold); outline-offset: -6px; }

@media (hover: none) {
  .shots__arrow { opacity: .7; width: 40px; }
}

.showcase__below { grid-area: below; min-width: 0; }

.shots__dashes {
  display: flex;
  margin: 10px 0 0 -8px;
}

.shots__dash {
  position: relative;
  width: 34px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.shots__dash::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 1.5px;
  margin-top: -.75px;
  border-radius: 1px;
  background: var(--ink);
  opacity: .2;
  transform-origin: left center;
  transition: opacity .35s var(--ease), transform .5s var(--ease);
}

.shots__dash[aria-current="true"]::before { transform: scaleX(1.35); }

.shots__dash[aria-current="true"]::before { opacity: .8; }
@media (hover: hover) { .shots__dash:hover::before { opacity: .45; } }
.shots__dash[aria-current="true"] { cursor: default; }
.shots__dash:focus { outline: none; }
.shots__dash:focus-visible { outline: 1.5px solid var(--gold); outline-offset: -4px; }

/* --------------------------------------------------------------------------
   Contato — "O que você tem em mente?"
   -------------------------------------------------------------------------- */

.closing {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 600px;
  min-height: min(100vh, max(600px, 56vw));
  min-height: min(100svh, max(600px, 56vw));
  padding-inline: var(--edge);
  padding-block: clamp(96px, 8vw, 140px) calc(clamp(56px, 4.6vw, 80px) + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.closing__logo {
  display: block;
  width: clamp(150px, 16vw, 280px);
  height: auto;
}

.closing__logo .ink { fill: var(--logo); }
.closing__logo .dot { fill: var(--gold); }

.closing__title {
  margin: clamp(56px, 6.2vw, 104px) 0 0;
  font-size: clamp(40px, 6.1vw, 110px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.04em;
  color: var(--ink);
  text-wrap: balance;
}

.closing__mail {
  margin: clamp(48px, 5.4vw, 92px) 0 0;
  font-size: clamp(20px, 2.85vw, 50px);
  line-height: 1.2;
  letter-spacing: -.01em;
}

.closing__mail a {
  display: inline-flex;
  align-items: center;
  gap: .32em;
  padding-block: 10px;          /* área de toque confortável sem mudar o desenho */
  margin-block: -10px;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.closing__mail a:focus { outline: none; }
.closing__mail a:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 10px; border-radius: 2px; }

.closing__arrow {
  flex: none;
  width: .4em;
  height: .4em;
  margin-top: -.18em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: transform .45s var(--ease);
}

.closing__mail a:hover .closing__arrow,
.closing__mail a:focus-visible .closing__arrow { transform: translate(.1em, -.1em); }

.closing__domain {
  margin: clamp(80px, 8.4vw, 150px) 0 0;
  font-size: clamp(12px, 1vw, 15px);
  letter-spacing: .34em;
  margin-right: -.34em;   /* centraliza opticamente o tracking */
}

.closing__domain a {
  color: var(--ink);
  text-decoration: none;
  opacity: .8;
  transition: opacity .3s var(--ease);
}

.closing__domain a:hover { opacity: 1; }

.motion .closing__logo,
.motion .closing__title,
.motion .closing__mail { opacity: 0; }

/* --------------------------------------------------------------------------
   Tablet (≤960px): a vitrine empilha. Imagem → nome e propósito à esquerda,
   gotas à direita na mesma linha do nome: um só bloco de leitura.
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .showcase {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "media media" "below below" "copy copy";
    column-gap: 20px;
  }

  /* as gotas dividem a linha do nome; o propósito usa a largura toda */
  .showcase__rail { grid-area: auto; grid-row: 3; grid-column: 2; position: relative; z-index: 1; }
  .showcase.has-rail .project__name { padding-right: 104px; }

  .showcase__media { grid-column: 1 / -1; }
  .showcase__copy { padding: 0; margin-top: 28px; }
  .showcase__entry { justify-content: flex-start; gap: 0; }
  .project__name { margin-top: 0; font-size: clamp(34px, 5.4vw, 48px); }
  .project__meta { margin-top: 16px; }
  .project__desc { max-width: 46ch; }

  .showcase__rail { align-self: start; margin-top: 24px; margin-right: -10px; }
  .rail { --dots-axis: x; --dot-gap: 24; flex-direction: row; gap: 0; }
  .rail__arrow { display: none; }
  .rail__dot { --hit-w: 24px; --hit-h: 44px; }
  .rail__toggle { width: 36px; height: 44px; margin: 0 -10px 0 6px; }

  .categories { gap: clamp(96px, 13vw, 120px); }
  .category__title { font-size: clamp(40px, 6.4vw, 58px); }

  .essence { padding-left: calc(var(--edge) + 4vw); }
}

/* --------------------------------------------------------------------------
   Mobile (≤640px) — desenhado para a tela, não reduzido.
   Uma margem só (16px + 8px = 24px) para títulos, textos e controles;
   as capturas sangram até as bordas e ganham recorte próprio (3:2 ou 4:3).
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  :root { --edge: 8px; }

  .site-header { padding-top: calc(22px + env(safe-area-inset-top, 0px)); }
  .site-nav ul { gap: 22px; }

  /* Hero: a altura vem do conteúdo, não da tela — sem vazio artificial */
  .hero {
    min-height: 0;
    padding-block: clamp(112px, 30vw, 136px) clamp(64px, 18vw, 80px);
  }

  .logo { width: min(76vw, 340px); }

  .hero__kicker {
    margin-top: 24px;
    font-size: 10.5px;
    letter-spacing: .28em;
    margin-right: -.28em;
  }

  .hero__lede {
    max-width: 27ch;
    margin-top: 14px;
    font-size: 15px;
  }

  .br-wide { display: none; }

  /* Título da seção: mesma voz, escala de celular, quebras naturais */
  .projects { padding-top: 0; padding-bottom: 8px; }

  /* Capítulos */
  .categories { gap: 88px; margin-top: 32px; }
  .prologue { padding-block: 40px; }
  .prologue__title { font-size: clamp(32px, 10.8vw, 48px); letter-spacing: -.042em; }
  .category__title {
    font-size: clamp(32px, 9.6vw, 44px);
    line-height: 1.06;
    letter-spacing: -.044em;
  }
  .category > .showcase { margin-top: 24px; }

  /* Vitrine */
  .showcase { column-gap: 16px; }

  .showcase__media {
    width: auto;
    justify-self: stretch;   /* itens com aspect-ratio não esticam por padrão */
    max-width: none;         /* sangra até as bordas da tela */
    margin-left: calc(-1 * (max(16px, env(safe-area-inset-left, 0px)) + var(--edge)));
    margin-right: calc(-1 * (max(16px, env(safe-area-inset-right, 0px)) + var(--edge)));
    aspect-ratio: var(--m-ratio, 3 / 2);   /* recorte mais próximo: detalhes legíveis */
  }

  .showcase__slide { background: var(--m-bg, transparent); }
  .showcase__slide img {
    object-fit: var(--m-fit, cover);
    object-position: var(--m-pos, 50% 50%);
  }

  .showcase__copy { margin-top: 20px; }
  .project__name {
    font-size: clamp(27px, 8.1vw, 34px);
    line-height: 1.06;
    letter-spacing: -.042em;
  }
  .project__meta { margin-top: 12px; }
  .project__desc { font-size: 15px; line-height: 1.55; max-width: 34ch; }
  .link-arrow { margin-top: 14px; font-size: 15px; }

  .showcase__rail { margin-top: 13px; }
  .showcase.has-rail .project__name { padding-right: 92px; }

  /* Manifesto: pausa editorial, sem tela vazia em volta */
  .essence {
    min-height: 0;
    padding-block: 104px 112px;
    padding-left: var(--edge);
  }
  .essence__title { font-size: clamp(46px, 14.6vw, 64px); line-height: 1; letter-spacing: -.05em; }
  .essence__text { margin-top: 24px; font-size: 17px; max-width: 30ch; }

  /* Contato: mesma composição, ritmo vertical de celular */
  .closing {
    min-height: 0;
    padding-block: 72px calc(44px + env(safe-area-inset-bottom, 0px));
  }
  .closing__logo { width: 128px; }
  .closing__title { margin-top: 36px; font-size: clamp(36px, 10.6vw, 46px); }
  .closing__mail { margin-top: 28px; font-size: clamp(19px, 5.5vw, 23px); }
  .closing__domain { margin-top: 64px; font-size: 12px; letter-spacing: .3em; margin-right: -.3em; }
}

/* telas muito estreitas (≤360px): a assinatura do estúdio continua em uma linha */
@media (max-width: 360px) {
  .hero__kicker { font-size: 9.5px; letter-spacing: .2em; margin-right: -.2em; }
}

/* --------------------------------------------------------------------------
   Movimento reduzido: tudo no estado final
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion .logo,
  .motion .hero__kicker,
  .motion .hero__lede,
  .motion .prologue__title,
  .motion .essence__title,
  .motion .essence__text,
  .motion .essence__title .gold,
  .motion .closing__logo,
  .motion .closing__title,
  .motion .closing__mail { opacity: 1 !important; transition: none !important; }
  .link-arrow__icon, .link-arrow__label, .site-nav a, .closing__arrow, .rail__toggle,
  .rail__base circle, .shots__arrow, .shots__dash::before { transition: none !important; }
}
