/* ═══════════════════════════════════════════════════════════════════════════
   Lucas Alessandro — portfólio

   Direção "one motif": um único formato, tirado do assunto, rege a página.
   O formato é a pasta com aba — o sistema de arquivos, onde um back-end vive.
   Ela aparece em quatro escalas: as pastas gigantes do hero (que viram os
   capítulos da página), a máscara da foto e o palco da prévia, o botão com
   o desenho da aba e o marcador das listas. Fora dela, cantos retos.

   Cor: o violeta é o único acento e vai em campo chapado, grande. O resto é
   fundo e tinta. Cada pasta do hero empresta a sua cor ao capítulo dela.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  --ground: #0c0b10;
  --ink: #f4f1f8;
  --ink-soft: #b8b0c8;

  --violet: #7c3aed;
  --violet-deep: #5b21b6;
  --violet-light: #b69cff;
  --lilac: #dcd0ff;
  --plum: #2a2140;
  --dusk: #1f1a2b;
  --paper: #f3f0f8;
  --tile: #e6e0f0;

  --ink-dark: #16121e;
  --soft-dark: #4a4358;
  --on-violet-soft: #ece4ff;

  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);

  --wrap: 1200px;
  /* viewport-fit=cover: no celular deitado, o recorte da tela entra na margem. */
  --pad: max(clamp(20px, 4vw, 56px), env(safe-area-inset-left), env(safe-area-inset-right));
  --section: clamp(88px, 9vw, 136px);
  /* Margem de "mesa" em volta das pastas no desktop. */
  --desk: 7vw;

  /* A aba: altura e inclinação das laterais. */
  --tab-h: 40px;
  --slant: 14px;
  --strip: clamp(48px, 7svh, 64px);
  --topbar: 56px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 699px) {
  :root {
    --desk: 0px;
    --tab-h: 32px;
    --slant: 11px;
    --strip: clamp(44px, 6.5svh, 52px);
  }
}

/* ── Base ───────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + var(--tab-h) + 8px);
  -webkit-tap-highlight-color: rgb(124 58 237 / 0.2);
}

a,
button,
summary,
label {
  touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-body);
  line-height: 1.4;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2 {
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.92;
  text-wrap: balance;
}

h2 {
  font-size: var(--step-head);
}

h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--violet);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--focus, var(--violet-light));
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── Campos de cor ──────────────────────────────────────────────────────────
   Cada campo define o fundo, a tinta, a tinta suave e o acento legível sobre
   ele. Pastas, placas e o palco da prévia usam os mesmos. */

.is-violet {
  --f-bg: var(--violet);
  --f-ink: #fff;
  --f-soft: var(--on-violet-soft);
  --f-accent: #fff;
  --focus: #fff;
}

.is-plum {
  --f-bg: var(--plum);
  --f-ink: var(--ink);
  --f-soft: var(--ink-soft);
  --f-accent: var(--violet-light);
  --focus: var(--violet-light);
}

.is-dusk {
  --f-bg: var(--dusk);
  --f-ink: var(--ink);
  --f-soft: var(--ink-soft);
  --f-accent: var(--violet-light);
  --focus: var(--violet-light);
}

.is-lilac {
  --f-bg: var(--lilac);
  --f-ink: var(--ink-dark);
  --f-soft: var(--soft-dark);
  --f-accent: var(--violet-deep);
  --focus: var(--violet-deep);
}

.is-paper {
  --f-bg: var(--paper);
  --f-ink: var(--ink-dark);
  --f-soft: var(--soft-dark);
  --f-accent: var(--violet-deep);
  --focus: var(--violet-deep);
}

.is-light {
  --f-bg: var(--violet-light);
  --f-ink: var(--ink-dark);
  --f-soft: #2c2440;
  --f-accent: var(--ink-dark);
  --focus: var(--ink-dark);
}

/* ── A pasta ────────────────────────────────────────────────────────────────
   Um bloco de cor com uma aba trapezoidal saindo da borda de cima. A aba é
   um elemento próprio (não um clip-path no bloco), para que o conteúdo e os
   contornos de foco nunca sejam cortados. `--x` posiciona a aba: 0% encosta
   à esquerda, 50% centraliza, 100% encosta à direita. */

.folder {
  --x: var(--x-d, 0%);
  position: relative;
  background: var(--f-bg);
  color: var(--f-ink);
}

@media (max-width: 699px) {
  .folder {
    --x: var(--x-m, var(--x-d, 0%));
  }
}

.folder__tab {
  position: absolute;
  bottom: calc(100% - 1px);
  left: var(--x);
  transform: translateX(calc(var(--x) * -1));
  display: flex;
  align-items: center;
  height: calc(var(--tab-h) + 1px);
  padding: 0 calc(var(--slant) + 18px);
  background: var(--f-bg);
  color: var(--f-ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  clip-path: polygon(var(--slant) 0, calc(100% - var(--slant)) 0, 100% 100%, 0 100%);
}

@media (max-width: 699px) {
  .folder__tab {
    font-size: 15px;
  }
}

/* ── Botões: a aba em escala pequena ───────────────────────────────────── */

.btn {
  --btn-bg: var(--violet);
  --btn-hover: var(--violet-deep);
  --btn-ink: #fff;
  --bs: 12px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 calc(var(--bs) + 20px);
  border: 0;
  background: none;
  color: var(--btn-ink);
  font: 600 17px/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-bg);
  clip-path: polygon(var(--bs) 0, calc(100% - var(--bs)) 0, 100% 100%, 0 100%);
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}

.btn:hover::before {
  background: var(--btn-hover, var(--btn-bg));
}

.btn:active::before {
  transform: translateY(2px);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn--ground {
  --btn-bg: var(--ground);
  --btn-hover: var(--plum);
}

.btn--ink {
  --btn-bg: var(--ink-dark);
  --btn-hover: var(--plum);
}

.btn--block {
  display: flex;
  width: 100%;
  min-height: 56px;
}

.btn--small {
  --bs: 9px;
  min-height: 40px;
  padding-inline: 26px;
  font-size: 15px;
}

/* ── Barra do topo ──────────────────────────────────────────────────────── */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--topbar);
  padding-inline: var(--pad);
  background: var(--ground);
  border-bottom: 1px solid transparent;
  transition: border-color 240ms var(--ease);
}

.topbar.is-scrolled {
  border-bottom-color: rgb(244 241 248 / 0.1);
}

.topbar__nav {
  display: flex;
  gap: 28px;
}

.topbar__nav a,
.lang button,
.topbar__menu {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.topbar__nav a:hover,
.lang button:hover,
.topbar__menu:hover {
  color: var(--ink);
}

.topbar__menu {
  display: none;
  justify-self: start;
  padding: 12px 0;
  border: 0;
  background: none;
  font-family: var(--sans);
  cursor: pointer;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.wordmark svg {
  width: 20px;
  height: 17px;
  fill: var(--violet);
}

.lang {
  justify-self: end;
  display: flex;
  gap: 4px;
}

.lang button {
  min-width: 40px;
  padding: 10px 6px;
  border: 0;
  background: none;
  font-family: var(--sans);
  cursor: pointer;
}

.lang button[aria-pressed='true'] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--violet);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.menu {
  position: fixed;
  inset: var(--topbar) 0 auto;
  z-index: 49;
  display: grid;
  padding: 8px var(--pad) 28px;
  background: var(--ground);
  border-bottom: 1px solid rgb(244 241 248 / 0.1);
  overscroll-behavior: contain;
}

.menu[hidden] {
  display: none;
}

.menu a {
  padding: 12px 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.menu a:hover {
  color: var(--violet-light);
}

@media (max-width: 1023px) {
  .topbar__nav {
    display: none;
  }

  .topbar__menu {
    display: block;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding-top: var(--topbar);
}

.hero__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(51svh - var(--topbar));
  padding: 32px var(--pad) calc(var(--tab-h) + 36px);
  text-align: center;
}

.hero__title {
  font-size: clamp(56px, 9.4vw, 172px);
  line-height: 0.88;
  white-space: nowrap;
}

.hero__sub {
  max-width: 46ch;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1.4;
}

.stack {
  margin-inline: var(--desk);
}

.stack .folder {
  display: block;
  height: var(--strip);
  text-decoration: none;
  transition: transform 180ms var(--ease), filter 180ms var(--ease);
}

.stack .folder:hover {
  transform: translateY(-8px);
}

.stack:has(.folder:hover) .folder:not(:hover) {
  filter: brightness(0.72) saturate(0.85);
}

.stack .folder:focus-visible {
  outline-offset: -6px;
}

@media (prefers-reduced-motion: reduce) {
  .stack .folder {
    transition: none;
  }

  .stack .folder:hover {
    transform: none;
  }
}

@media (max-width: 699px) {
  .hero__head {
    justify-content: flex-start;
    min-height: calc(48svh - var(--topbar));
    padding-top: 40px;
  }

  .hero__title {
    font-size: 15vw;
    white-space: normal;
  }

  .hero__title span {
    display: block;
  }

  .hero__sub {
    margin-top: 20px;
    font-size: 16px;
  }
}

/* ── Capítulos ──────────────────────────────────────────────────────────── */

.chapter {
  margin-inline: var(--desk);
  padding-block: var(--section);
}

.chapter__head {
  display: grid;
  gap: 18px;
  max-width: 40ch;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.chapter__head p {
  color: var(--f-soft);
}

/* ── Sobre: a pasta da frente ───────────────────────────────────────────── */

.sobre {
  padding: 0;
}

.sobre__action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding: 32px;
}

.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 16px;
}

.status svg {
  width: 16px;
  height: 14px;
  fill: currentColor;
}

.status span {
  color: var(--f-soft);
}

.sobre__body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 63fr) minmax(0, 37fr);
  min-height: min(110svh, 1040px);
  padding: 56px 56px 0;
  overflow: hidden;
}

.sobre__lead {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.sobre__title {
  max-width: 14ch;
  font-size: clamp(40px, 4.4vw, 72px);
}

.sobre__photo {
  position: relative;
  width: min(38vw, 600px);
  margin-top: auto;
  /* A borda de baixo da pasta corta o quinto inferior da foto. */
  margin-bottom: calc(min(38vw, 600px) * -4 / 3 * 0.2);
  aspect-ratio: 3 / 4;
  /* A foto vive dentro da pasta: corpo com a aba à esquerda. */
  clip-path: polygon(0 7%, 3% 0, 38% 0, 41% 7%, 100% 7%, 100% 100%, 0 100%);
  background: var(--ground);
}

.sobre__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.sobre__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  max-width: 340px;
  padding-bottom: 72px;
}

.sobre__block {
  display: grid;
  gap: 12px;
}

.sobre__block h3 {
  font-size: 22px;
}

.sobre__block p {
  color: var(--f-soft);
  font-size: 16px;
  line-height: 1.5;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 24px;
}

.stats div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats dd {
  order: -1;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.stats dt {
  color: var(--f-soft);
  font-size: 14px;
  line-height: 1.25;
}

@media (max-width: 899px) {
  .sobre__body {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 40px 24px 0;
  }

  .sobre__lead {
    display: contents;
  }

  .sobre__title {
    font-size: max(34px, 8.5vw);
  }

  .sobre__text {
    max-width: none;
    margin-top: 40px;
    padding-bottom: 56px;
  }

  .sobre__photo {
    order: 3;
    width: 86vw;
    max-width: 520px;
    margin: 0 auto calc(min(86vw, 520px) * -4 / 3 * 0.25);
  }
}

@media (max-width: 699px) {
  .sobre__action {
    padding: 24px;
  }

  .sobre__action .btn {
    width: 100%;
  }

  .stats dd {
    font-size: 34px;
  }
}

/* ── Trabalho: índice com prévia ────────────────────────────────────────────
   As linhas de texto são a navegação. Apontar uma linha mostra a prévia dela
   num quadro fixo e apaga as outras (240ms). Sem ponteiro fino, ou estreito,
   cada linha mostra o seu conteúdo embaixo dela mesma. */

.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
}

.work__row {
  border-top: 1px solid rgb(244 241 248 / 0.14);
  transition: opacity 240ms var(--ease);
}

.work__row:last-child {
  border-bottom: 1px solid rgb(244 241 248 / 0.14);
}

.work__link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 24px;
  align-items: baseline;
  gap: 16px;
  padding: 26px 0;
  text-decoration: none;
}

.work__num,
.work__meta {
  color: var(--f-soft);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.work__name {
  font-size: clamp(32px, 4.2vw, 64px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.work__out {
  width: 22px;
  height: 22px;
  align-self: center;
  color: var(--f-accent);
  transition: transform 180ms var(--ease);
}

.work__link:hover .work__out,
.work__link:focus-visible .work__out {
  transform: translate(3px, -3px);
}

.work__detail {
  display: grid;
  gap: 12px;
  max-width: 62ch;
  padding: 0 0 28px 56px;
}

.work__kind {
  color: var(--f-accent);
  font-size: 18px;
  font-weight: 600;
}

.work__desc {
  color: var(--f-soft);
  font-size: 16px;
  line-height: 1.5;
}

.work__tags {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.work__frame {
  display: none;
}

/* Modo índice: só com ponteiro fino e tela larga (o JS liga). */
.work.is-indexed {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
}

.work.is-indexed .work__list .work__detail {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.work.is-indexed .work__list.is-pointing .work__row:not(.is-active) {
  opacity: 0.4;
}

.work.is-indexed .work__frame {
  position: sticky;
  top: calc(var(--topbar) + var(--tab-h) + 32px);
  display: block;
  margin-top: var(--tab-h);
  aspect-ratio: 4 / 5;
}

.frame__panel {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transition: opacity 240ms var(--ease);
}

.frame__panel.is-active {
  opacity: 1;
}

.frame__panel .folder__tab {
  font-variant-numeric: tabular-nums;
}

.frame__panel .work__detail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: none;
  padding: clamp(28px, 3vw, 44px);
}

.frame__panel .work__kind {
  max-width: 14ch;
  color: var(--f-ink);
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.frame__panel .work__tags {
  margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
  .frame__panel,
  .work__row {
    transition: none;
  }
}

@media (max-width: 699px) {
  .work__link {
    grid-template-columns: minmax(0, 1fr) 22px;
    gap: 6px 12px;
    padding: 22px 0 14px;
  }

  .work__num {
    display: none;
  }

  .work__meta {
    grid-row: 2;
  }

  .work__out {
    grid-column: 2;
    grid-row: 1;
  }

  .work__detail {
    padding-left: 0;
  }
}

/* ── Como eu trabalho: muitos em um ─────────────────────────────────────── */

.method {
  margin-top: clamp(96px, 10vw, 160px);
}

.method__head {
  display: grid;
  gap: 20px;
  max-width: 34ch;
}

.method__head h2 {
  max-width: 8ch;
  font-size: clamp(36px, 4vw, 60px);
}

.method__head p {
  color: var(--f-soft);
  font-size: 17px;
  line-height: 1.5;
}

.method__body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
  margin-top: 56px;
}

.method__diagram {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
}

.method__diagram--v {
  display: none;
}

.method__steps {
  display: contents;
}

.method__steps li {
  display: grid;
  align-content: start;
  gap: 10px;
  margin-top: 32px;
}

.method__steps h3 {
  font-size: 20px;
  font-weight: 800;
}

.method__steps p {
  max-width: 32ch;
  color: var(--f-soft);
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 699px) {
  .method__body {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    grid-template-rows: repeat(3, auto);
    column-gap: 20px;
    margin-top: 40px;
  }

  .method__diagram--h {
    display: none;
  }

  .method__diagram--v {
    display: block;
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
  }

  .method__steps li {
    grid-column: 2;
    align-self: center;
    margin-top: 0;
    padding-block: 12px;
  }

  .method__steps h3 {
    font-size: 18px;
  }

  .method__steps p {
    font-size: 15px;
  }
}

/* ── Stack: espécimes sobre placas de cor ───────────────────────────────── */

.stackc__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.stackc__head {
  grid-column: 1 / 4;
  align-self: start;
  display: grid;
  gap: 18px;
}

.stackc__head h2 {
  font-size: clamp(40px, 3.6vw, 52px);
}

.stackc__head p {
  max-width: 30ch;
  color: var(--f-soft);
}

.tiles {
  grid-column: 4 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 10px;
  container-type: inline-size;
}

.tile--wide {
  grid-column: span 2;
}

.tile__face {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background: var(--f-bg);
  color: var(--f-ink);
  container-type: inline-size;
}

.tile--wide .tile__face {
  aspect-ratio: 8 / 5;
}

/* A placa dupla ocupa duas colunas e o vão entre elas: pelo aspect-ratio
   ela sairia 6px mais alta que a vizinha. Igualamos pela altura. */
@media (min-width: 700px) {
  .tile--wide .tile__face {
    aspect-ratio: auto;
    height: calc((100cqi - 20px) / 3 * 1.25);
  }
}

.tile__face span {
  font-size: var(--s, 28cqi);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}

.tile__name {
  margin-top: 14px;
  font-size: 20px;
}

.tile__fact {
  margin-top: 4px;
  color: var(--f-soft);
  font-size: 16px;
  line-height: 1.4;
}

.toolbox {
  grid-column: 4 / -1;
  display: grid;
  gap: 16px;
  margin-top: 64px;
}

.toolbox h3 {
  font-size: 20px;
}

.toolbox ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.toolbox li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.toolbox li::before {
  content: '';
  width: 12px;
  height: 10px;
  background: var(--violet-deep);
  clip-path: polygon(0 25%, 8% 0, 45% 0, 53% 25%, 100% 25%, 100% 100%, 0 100%);
}

@media (max-width: 1023px) {
  .stackc__head,
  .tiles,
  .toolbox {
    grid-column: 1 / -1;
  }

  .stackc__head {
    margin-bottom: 48px;
  }
}

@media (max-width: 699px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 8px;
  }

  .tile--wide {
    order: -1;
  }

  .tile__name {
    font-size: 17px;
  }

  .tile__fact {
    font-size: 15px;
  }
}

/* ── Trajetória: menu em duas colunas ───────────────────────────────────── */

.cat + .cat {
  margin-top: 96px;
}

.cat__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.cat__head h2 {
  font-size: clamp(32px, 3.4vw, 50px);
}

.cat__count {
  color: var(--f-soft);
  font-size: 16px;
}

.items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 64px;
}

.item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  column-gap: 20px;
}

.item__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.item h3 {
  font-size: 18px;
  font-weight: 800;
}

.item__date {
  flex-shrink: 0;
  color: var(--f-soft);
  font-size: 15px;
  white-space: nowrap;
}

.item__org {
  margin-top: 6px;
  color: var(--f-accent);
  font-size: 15px;
  font-weight: 600;
}

.item__desc {
  max-width: 46ch;
  margin-top: 8px;
  color: var(--f-soft);
  font-size: 15px;
  line-height: 1.5;
}

.items--compact {
  row-gap: 20px;
}

.items--compact .item {
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 14px;
}

.items--compact h3 {
  font-size: 17px;
  font-weight: 600;
}

/* O marcador: a pasta em tamanho de texto, com a inicial vazada. */
.glyph {
  position: relative;
  display: grid;
  place-items: center;
  height: 44px;
  margin-top: 10px;
  background: var(--violet-light);
  color: var(--dusk);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.glyph::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  left: 0;
  width: 48%;
  height: 9px;
  background: inherit;
  clip-path: polygon(0 100%, 12% 0, 84% 0, 100% 100%);
}

.glyph--now {
  background: var(--violet);
  color: #fff;
}

.glyph--small {
  height: 18px;
  margin-top: 6px;
}

.glyph--small::before {
  height: 5px;
}

@media (max-width: 899px) {
  .items {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 699px) {
  .cat + .cat {
    margin-top: 72px;
  }

  .cat__head h2 {
    font-size: 8.5vw;
  }

  .item {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 16px;
  }

  .glyph {
    height: 36px;
    font-size: 17px;
  }

  .item__line {
    flex-direction: column;
    gap: 4px;
  }
}

/* ── Perguntas rápidas: sanfona de placas ───────────────────────────────── */

.faq {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.faq__title {
  grid-column: 1 / 5;
  align-self: start;
  position: sticky;
  top: calc(var(--topbar) + 40px);
  max-width: 8ch;
  font-size: clamp(40px, 4vw, 60px);
}

.faq__list {
  grid-column: 5 / -1;
  display: grid;
  gap: 8px;
}

.faq__item {
  background: var(--tile);
  color: var(--ink-dark);
  transition: background-color 240ms var(--ease), color 240ms var(--ease);
}

.faq__item[open] {
  --focus: #fff;
  background: var(--violet);
  color: #fff;
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 18px 24px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item:not([open]):hover {
  background: #d9d0e8;
}

.faq__item summary:focus-visible {
  outline-offset: -6px;
}

.faq__item p {
  max-width: 52ch;
  padding: 0 24px 26px;
  font-size: 17px;
  line-height: 1.5;
}

.plus {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.plus::before,
.plus::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 3px;
  margin-top: -1.5px;
  background: currentColor;
  transition: transform 240ms var(--ease);
}

.plus::after {
  transform: rotate(90deg);
}

.faq__item[open] .plus::after {
  transform: rotate(0deg);
}

@media (max-width: 1023px) {
  .faq__title,
  .faq__list {
    grid-column: 1 / -1;
  }

  .faq__title {
    position: static;
    max-width: none;
    margin-bottom: 32px;
  }
}

@media (max-width: 699px) {
  .faq__title {
    font-size: 9vw;
  }

  .faq__list {
    gap: 6px;
  }

  .faq__item summary {
    min-height: 64px;
    padding: 16px 20px;
    font-size: 18px;
  }

  .faq__item p {
    padding: 0 20px 22px;
    font-size: 16px;
  }
}

/* ── Contato: a pasta da mensagem ───────────────────────────────────────── */

.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 64px;
  max-width: 1000px;
  margin: calc(var(--section) + var(--tab-h)) auto 0;
  padding: clamp(28px, 4vw, 56px);
}

.card__intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card__intro h2 {
  font-size: clamp(36px, 4vw, 60px);
}

.card__intro > p {
  color: var(--f-soft);
  font-size: 17px;
  line-height: 1.5;
}

.channels {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 12px;
}

.channels li {
  display: grid;
  gap: 2px;
}

.channels span {
  color: var(--f-soft);
  font-size: 13px;
  font-weight: 600;
}

.channels a {
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.channels a:hover {
  text-decoration-thickness: 3px;
}

.card__form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: var(--violet-deep);
  color: #fff;
  font: 400 16px/1.4 var(--sans);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.card__form .btn {
  margin-top: 8px;
}

.linkbtn {
  justify-self: center;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: #fff;
  font: 600 16px/1.2 var(--sans);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.card__note {
  color: var(--f-soft);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 899px) {
  .card {
    grid-template-columns: minmax(0, 1fr);
  }

  .channels {
    margin-top: 8px;
  }
}

/* ── Rodapé: a marca construída com as pastas ───────────────────────────── */

.footer {
  padding: clamp(96px, 10vw, 152px) var(--pad) max(32px, env(safe-area-inset-bottom));
}

.mark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  max-width: var(--wrap);
  height: 34svh;
  min-height: 200px;
  margin-inline: auto;
}

.mark__block {
  position: relative;
  flex: 1;
  height: var(--h);
  background: var(--c);
  container-type: inline-size;
}

.mark__block::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  left: var(--x);
  width: 38%;
  height: clamp(10px, 1.6vw, 22px);
  background: inherit;
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}

.mark__block b {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 0 5cqi 6cqi;
  color: var(--ground);
  font-size: 96cqi;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.74;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
  max-width: var(--wrap);
  margin: 56px auto 0;
}

.footer__cols h2 {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.footer__cols ul {
  display: grid;
  gap: 8px;
}

.footer__cols li,
.footer__cols a {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.footer__cols a {
  text-decoration: none;
}

.footer__cols a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wrap);
  margin: 72px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgb(244 241 248 / 0.1);
  color: var(--ink-soft);
  font-size: 14px;
}

.footer__end .btn {
  --btn-bg: var(--violet);
}

@media (max-width: 899px) {
  .footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .mark {
    height: 22svh;
    min-height: 140px;
  }

  .footer__cols > :nth-child(3) {
    grid-column: 1 / -1;
  }
}

/* ── Entradas por rolagem ───────────────────────────────────────────────────
   Só com JS, só a partir do tablet e só se a pessoa não pediu menos
   movimento. Sem isso, tudo já está no lugar. */

@media (prefers-reduced-motion: no-preference) and (min-width: 700px) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

/* A foto abre como um obturador, de baixo para cima. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-shutter] img {
    clip-path: inset(100% 0 0 0);
    transform: scale(1.06);
    transition: clip-path 1100ms var(--ease), transform 1400ms var(--ease);
  }

  .js [data-shutter].is-in img {
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}
