/* =========================================================================
   Portfólio de Pedro Ragazzo
   Duas peles para o mesmo conteúdo:
   - papel (modo design): tintas de processo CMYK sobre papel
   - filme (modo código): o "fotolito" da página, com medidas e código
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Tintas de processo e as secundárias que nascem da sobreposição */
  --c: #00a0e3;
  --m: #e5007d;
  --y: #ffe100;
  --k: #141417;
  --r: #e8312a; /* M + Y */
  --g: #00a15b; /* C + Y */
  --b: #2b3990; /* C + M */
  --o: #f18a00; /* M60 + Y */
  --v: #7b2a83; /* C60 + M */

  /* Papel */
  --papel: #f2f2ee;
  --papel-2: #e6e6e0;
  --branco: #fbfbf8;
  --tinta: #141417;
  --tinta-2: #55555e;

  /* Filme (modo código) */
  --filme: #0f1013;
  --filme-2: #18191e;
  --luz: #e6e6e1;
  --luz-2: #9a9aa4;
  --c-luz: #3cc6ff;
  --m-luz: #ff5aae;
  --y-luz: #ffe94d;

  --f-display: "Anybody", "Arial Black", sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "Cascadia Mono", monospace;

  --nav-h: 64px;
  --gutter: clamp(24px, 4vw, 48px);
  --max: 1360px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Tokens semânticos: são eles que mudam com o modo */
  --bg: var(--papel);
  --bg-2: var(--papel-2);
  --fg: var(--tinta);
  --muted: var(--tinta-2);
  --line: rgb(20 20 23 / .14);
  --accent: var(--m);
  color-scheme: light;
}

html[data-mode="code"] {
  --bg: var(--filme);
  --bg-2: var(--filme-2);
  --fg: var(--luz);
  --muted: var(--luz-2);
  --line: rgb(230 230 225 / .13);
  --accent: var(--c-luz);
  color-scheme: dark;
}

/* Sem JavaScript: respeita o tema do sistema */
@media (prefers-color-scheme: dark) {
  html:not([data-mode]) {
    --bg: var(--filme);
    --bg-2: var(--filme-2);
    --fg: var(--luz);
    --muted: var(--luz-2);
    --line: rgb(230 230 225 / .13);
    --accent: var(--c-luz);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html[data-mode="code"] body {
  font-family: var(--f-mono);
  font-size: .875rem;
  font-stretch: 87.5%;
  line-height: 1.75;
}

h1, h2, h3, p, figure, pre { margin: 0; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--y); color: var(--tinta); }
html[data-mode="code"] ::selection { background: var(--c-luz); color: var(--filme); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 14px;
  background: var(--fg); color: var(--bg);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s;
}
.skip:focus { transform: none; }

/* ---------- Barra de progresso (animação ligada ao scroll, só CSS) ---------- */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress {
    position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(4, 1fr);
    height: 3px;
    transform-origin: 0 50%;
    animation: progresso linear both;
    animation-timeline: scroll(root block);
  }
  .progress span:nth-child(1) { background: var(--c); }
  .progress span:nth-child(2) { background: var(--m); }
  .progress span:nth-child(3) { background: var(--y); }
  .progress span:nth-child(4) { background: var(--fg); }
}
@keyframes progresso { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Navegação ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 24px;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 120%;
  font-size: 1.125rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.nav__brand svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
}
.nav__brand svg circle { stroke: var(--accent); }
html[data-mode="code"] .nav__brand span::before { content: "<"; color: var(--muted); }
html[data-mode="code"] .nav__brand span::after { content: " />"; color: var(--muted); }

.nav__menu { margin-left: auto; }
.nav__links {
  display: flex; gap: clamp(16px, 2.4vw, 32px);
  margin: 0; padding: 0; list-style: none;
}
.nav__links a {
  position: relative;
  padding-block: 6px;
  font-size: .9375rem;
  text-decoration: none;
}
.nav__links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); }
html[data-mode="code"] .nav__links a::before { content: "#"; color: var(--accent); }

.mode {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--fg);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: 500 .6875rem/1 var(--f-mono);
  font-stretch: 100%;
  cursor: pointer;
}
.mode span { padding: 8px 10px; transition: background-color .25s, color .25s; }
html:not([data-mode="code"]) .mode [data-opt="design"],
html[data-mode="code"] .mode [data-opt="code"],
html[lang="en"] .lang [data-opt="en"],
html:not([lang="en"]) .lang [data-opt="pt"] { background: var(--fg); color: var(--bg); }
/* EN / PT fica colado no Design / Código */
.mode + .lang { margin-left: -14px; }

/* Botão Menu e o EN / PT de dentro do menu só aparecem em telas menores */
.menu-btn,
.lang--menu { display: none; }
.menu-btn {
  align-items: center; gap: 8px;
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid var(--fg);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: 500 .6875rem/1 var(--f-mono);
  font-stretch: 100%;
  cursor: pointer;
}
.menu-btn__icon,
.menu-btn__icon::before {
  display: block;
  width: 14px; height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease);
}
.menu-btn__icon { position: relative; transform: translateY(-3px); }
.menu-btn__icon::before { content: ""; position: absolute; left: 0; top: 6px; }
.nav.is-open .menu-btn__icon { transform: translateY(0) rotate(45deg); }
.nav.is-open .menu-btn__icon::before { transform: translateY(-6px) rotate(-90deg); }

@media (max-width: 959px) {
  .menu-btn { display: inline-flex; }
  .mode:not(.lang) { margin-left: auto; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    margin: 0;
    padding: 12px var(--gutter) 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgb(20 20 23 / .35);
    visibility: hidden;
    opacity: 0;
    translate: 0 -8px;
    transition: opacity .25s var(--ease), translate .35s var(--ease), visibility 0s linear .35s;
  }
  .nav.is-open .nav__menu {
    visibility: visible;
    opacity: 1;
    translate: 0 0;
    transition: opacity .25s var(--ease), translate .35s var(--ease);
  }
  .nav__links { flex-direction: column; gap: 0; }
  .nav__links a {
    display: block;
    padding-block: 12px;
    font-family: var(--f-display);
    font-weight: 800;
    font-stretch: 112%;
    font-size: 1.75rem;
    line-height: 1.1;
  }
  .nav__links a::after { bottom: 8px; right: auto; width: 2.5em; }
}
@media (max-width: 559px) {
  .lang--nav { display: none; }
  .lang--menu { display: inline-flex; margin-top: 20px; }
}
@media (max-width: 480px) {
  .nav { gap: 10px; padding-inline: 16px; }
  .nav__brand { gap: 8px; font-size: .9375rem; font-stretch: 100%; }
  .nav__brand svg { width: 18px; height: 18px; }
  .mode span { padding: 8px 6px; }
  .mode + .lang { margin-left: -4px; }
  .menu-btn { min-height: 33px; padding: 0 8px; }
  html[data-mode="code"] .nav__brand span::before,
  html[data-mode="code"] .nav__brand span::after { content: none; }
}
/* Telas bem estreitas: o nome sai da barra (continua no hero e para leitores de tela) */
@media (max-width: 360px) {
  .nav__brand span {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* =========================================================================
   HERO
   A pele "filme" vale para a camada real no modo código e para a lente
   no modo design. Por isso o seletor longo :is(...) abaixo.
   ========================================================================= */
.hero {
  /* posição de repouso das chapas (o JS atualiza em tempo real) */
  --cx: -3px; --cy: -2px;
  --mx: 3px;  --my: 1px;
  --yx: 0px;  --yy: 3px;
  position: relative;
  isolation: isolate;
  cursor: crosshair;
}

.hero__sheet {
  --s-bg: var(--papel);
  --s-fg: var(--tinta);
  --s-muted: var(--tinta-2);
  --s-mark: var(--tinta);
  --trim: calc(var(--gutter) - 8px);
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--nav-h) + 48px) 0 clamp(64px, 12vh, 128px);
  overflow: hidden;
  background: var(--s-bg);
  color: var(--s-fg);
  font-family: var(--f-body);
  font-size: 1rem;
  font-stretch: 100%;
  line-height: 1.5;
}

.sheet--lens {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  clip-path: circle(var(--lr, 0px) at var(--lx, 70%) var(--ly, 50%));
}

:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) {
  --s-bg: var(--filme);
  --s-fg: var(--luz);
  --s-muted: var(--luz-2);
  --s-mark: var(--c-luz);
  background-image:
    linear-gradient(rgb(60 198 255 / .07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(60 198 255 / .07) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Marcas de corte nos cantos da área de refile */
.trim {
  --mk: min(18px, calc(var(--trim) - 6px));
  --gap: 5px;
  position: absolute;
  inset: calc(var(--nav-h) + 28px) var(--trim) var(--trim);
  pointer-events: none;
}
.trim i { position: absolute; width: 0; height: 0; }
.trim i::before,
.trim i::after { content: ""; position: absolute; background: var(--s-mark); }
.trim i::before { width: var(--mk); height: 1px; top: 0; }
.trim i::after { width: 1px; height: var(--mk); left: 0; }
.trim__tl { top: 0; left: 0; }
.trim__tr { top: 0; right: 0; }
.trim__bl { bottom: 0; left: 0; }
.trim__br { bottom: 0; right: 0; }
.trim__tl::before, .trim__bl::before { right: var(--gap); }
.trim__tr::before, .trim__br::before { left: var(--gap); }
.trim__tl::after, .trim__tr::after { bottom: var(--gap); }
.trim__bl::after, .trim__br::after { top: var(--gap); }

/* Marcas de registro no meio das laterais */
.reg {
  position: absolute; top: 50%;
  width: 18px; height: 18px; margin-top: -9px;
  fill: none; stroke: var(--s-mark); stroke-width: 1;
}
.reg--l { left: calc(var(--trim) / 2 - 9px); }
.reg--r { right: calc(var(--trim) / 2 - 9px); }
@media (max-width: 900px) { .reg { display: none; } }

/* O "P" impresso em três chapas */
.glyph {
  position: absolute; z-index: 1;
  right: -.05em; bottom: -.13em;
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 60%;
  font-size: clamp(300px, min(128vh, 90vw), 1200px);
  line-height: .8;
  isolation: isolate;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.plate {
  display: block;
  mix-blend-mode: multiply;
  transform: translate(var(--px), var(--py));
}
.plate--c { position: relative; color: var(--c); --px: var(--cx); --py: var(--cy); }
.plate--m { position: absolute; left: 0; top: 0; color: var(--m); --px: var(--mx); --py: var(--my); }
.plate--y { position: absolute; left: 0; top: 0; color: var(--y); --px: var(--yx); --py: var(--yy); }

.guide {
  position: absolute; left: -.08em; right: -.04em;
  height: 0;
  border-top: 1px solid rgb(60 198 255 / .55);
  padding: 6px 0 0 8px;
  font: 500 11px/1 var(--f-mono);
  font-stretch: 100%;
  color: var(--c-luz);
}
.guide--cap { top: var(--g-cap, 20%); }
.guide--base { top: var(--g-base, 80%); }

.only-film { display: none; }
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) .only-film { display: block; }

.snippet {
  position: absolute; z-index: 2;
  top: calc(var(--nav-h) + 56px);
  left: max(var(--gutter), (100% - var(--max)) / 2);
  font: 400 12px/1.75 var(--f-mono);
  font-stretch: 100%;
  color: var(--luz);
  white-space: pre;
}
.tk-com { color: var(--luz-2); }
.tk-sel { color: var(--c-luz); }
.tk-val { color: var(--y-luz); }
@media (max-width: 720px), (max-height: 760px) { .snippet { display: none !important; } }

/* Texto do hero */
.hero__inner {
  position: relative; z-index: 2;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.hero__inner [data-spec] { position: relative; }
.hero__file,
.hero__title { width: fit-content; }
.hero__file {
  margin-bottom: 20px;
  font: 500 .75rem/1.4 var(--f-mono);
  color: var(--s-muted);
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 850;
  font-stretch: 118%;
  font-size: clamp(3rem, 7.8vw, 8.5rem);
  line-height: .9;
  letter-spacing: -.035em;
}
.hero__title .l { display: block; }
.hero__lede {
  max-width: 30ch;
  margin: 28px 0 32px;
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  line-height: 1.45;
}

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 22px;
  border: 1.5px solid var(--s-fg);
  background: var(--s-fg);
  color: var(--s-bg);
  font: 600 1rem/1 var(--f-body);
  font-stretch: 100%;
  text-decoration: none;
  transition: background-color .25s, border-color .25s, color .25s, transform .15s;
}
.btn:hover { background: var(--m); border-color: var(--m); color: #fff; }
.btn:active { transform: translateY(1px) scale(.98); }

/* Pele filme: contornos, medidas e etiquetas de código */
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) .hero__title {
  color: transparent;
  -webkit-text-stroke: 1.25px var(--luz);
}
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) .btn {
  background: transparent;
  color: var(--c-luz);
  border-color: var(--c-luz);
  border-style: dashed;
}
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) .btn:hover {
  background: var(--c-luz);
  color: var(--filme);
  border-style: solid;
}
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) [data-spec] {
  outline: 1px dashed rgb(60 198 255 / .5);
  outline-offset: 6px;
}
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) [data-spec]::before {
  content: attr(data-spec);
  position: absolute; left: -6px; bottom: calc(100% + 12px);
  font: 500 11px/1 var(--f-mono);
  font-stretch: 100%;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--c-luz);
  -webkit-text-stroke: 0;
}
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) .hero__title::before {
  bottom: auto; top: calc(100% + 12px);
}
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) :is(.hero__lede, .btn)::before {
  left: calc(100% + 18px); bottom: auto; top: 50%;
  translate: 0 -50%;
}
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) .plate {
  mix-blend-mode: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--stroke);
  outline-color: var(--stroke);
}
:is(html[data-mode="code"] .sheet--real, html:not([data-mode="code"]) .sheet--lens) .plate::before {
  left: 12px; bottom: auto; top: calc(var(--g-cap, 0px) + 40px + var(--row) * 20px);
  color: var(--stroke);
}
.plate--c { --stroke: var(--c-luz); --row: 0; }
.plate--m { --stroke: var(--m-luz); --row: 1; }
.plate--y { --stroke: var(--y-luz); --row: 2; }

/* Anel da lente (criado pelo JS) */
.lens-ring {
  --ring: var(--tinta);
  position: absolute; left: 0; top: 0; z-index: 3;
  width: calc(var(--lr, 0px) * 2);
  height: calc(var(--lr, 0px) * 2);
  translate: calc(var(--lx, 0px) - var(--lr, 0px)) calc(var(--ly, 0px) - var(--lr, 0px));
  border: 1px solid var(--ring);
  border-radius: 50%;
  pointer-events: none;
}
.lens-ring::after {
  content: "código";
  position: absolute; left: 86%; top: 86%;
  padding: 5px 7px;
  background: var(--ring);
  color: var(--papel);
  font: 500 10px/1 var(--f-mono);
  font-stretch: 100%;
  white-space: nowrap;
}
html[data-mode="code"] .lens-ring { --ring: var(--luz); }
html[data-mode="code"] .lens-ring::after { content: "design"; color: var(--filme); }
html[lang="en"]:not([data-mode="code"]) .lens-ring::after { content: "code"; }

@media (max-width: 720px) {
  .hero__sheet {
    /* tamanho do "P": limitado pela largura e pela altura da tela */
    --gs: min(104vw, 40vh);
    padding-top: calc(var(--nav-h) + 32px + var(--gs) * .68);
    padding-bottom: 40px;
  }
  .glyph {
    top: calc(var(--nav-h) + 8px); bottom: auto;
    right: -.04em;
    font-size: var(--gs);
  }
}
/* Celulares altos têm espaço para um "P" maior */
@media (max-width: 720px) and (min-height: 740px) {
  .hero__sheet { --gs: min(104vw, 50vh); }
}

/* Celular deitado e telas baixas: hero mais compacto para o botão caber na tela */
@media (max-height: 520px) and (min-width: 721px) {
  .hero__sheet { padding-top: calc(var(--nav-h) + 20px); padding-bottom: 28px; }
  .hero__file { margin-bottom: 12px; }
  .hero__title { font-size: clamp(2.5rem, 13vh, 8.5rem); }
  .hero__lede { margin: 16px 0 20px; }
}

/* Impressão do hero ao carregar: uma chapa de cada vez, depois o preto */
@media (prefers-reduced-motion: no-preference) {
  .js .hero:not(.is-ready) :is(.plate, .hero__file, .hero__title .l, .hero__lede, .btn, .trim, .reg) { opacity: 0; }
  .hero.is-ready .trim { animation: aparecer .6s var(--ease) backwards; }
  .hero.is-ready .reg { animation: aparecer .6s var(--ease) .1s backwards; }
  .hero.is-ready .plate--c { --de: -16vw 0; animation: chapa 1.1s var(--ease) .15s backwards; }
  .hero.is-ready .plate--m { --de: 16vw 0; animation: chapa 1.1s var(--ease) .32s backwards; }
  .hero.is-ready .plate--y { --de: 0 22vh; animation: chapa 1.1s var(--ease) .49s backwards; }
  .hero.is-ready .hero__file { animation: subir .7s var(--ease) .62s backwards; }
  .hero.is-ready .hero__title .l:nth-child(1) { animation: subir .8s var(--ease) .7s backwards; }
  .hero.is-ready .hero__title .l:nth-child(2) { animation: subir .8s var(--ease) .8s backwards; }
  .hero.is-ready .hero__lede { animation: subir .8s var(--ease) .92s backwards; }
  .hero.is-ready .btn { animation: subir .8s var(--ease) 1.02s backwards; }
}
@keyframes chapa { from { opacity: 0; translate: var(--de); } }
@keyframes subir { from { opacity: 0; translate: 0 .35em; } }
@keyframes aparecer { from { opacity: 0; } }

/* =========================================================================
   SOBRE
   ========================================================================= */
.about { padding-block: clamp(112px, 18vh, 200px) clamp(80px, 12vh, 140px); }
.about__text {
  max-width: 24ch;
  margin-left: clamp(0px, 9vw, 150px);
  font-family: var(--f-display);
  font-weight: 650;
  font-stretch: 108%;
  font-size: clamp(1.75rem, 3.7vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -.022em;
}
html[data-mode="code"] .about__text::before {
  content: "<p>";
  display: block;
  margin-bottom: 18px;
  font: 500 .75rem/1 var(--f-mono);
  letter-spacing: 0;
  color: var(--accent);
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .about__text .w {
      animation: palavra linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 42%;
    }
  }
}
@keyframes palavra { from { opacity: .14; } to { opacity: 1; } }

.about__cols {
  display: grid; gap: 32px;
  max-width: 880px;
  margin: clamp(56px, 8vw, 96px) 0 0 clamp(0px, 9vw, 150px);
}
@media (min-width: 720px) { .about__cols { grid-template-columns: 1fr 1fr; gap: 48px; } }
.about__label {
  margin-bottom: 10px;
  font: 600 .8125rem/1.4 var(--f-mono);
  font-stretch: 100%;
}
.about__label span { font-weight: 400; color: var(--muted); }
.about__cols p { max-width: 40ch; color: var(--muted); }

/* =========================================================================
   Seções: cabeçalho padrão
   ========================================================================= */
.section { padding-block: clamp(96px, 14vh, 160px); }
.section-head h2 {
  max-width: 14ch;
  font-family: var(--f-display);
  font-weight: 850;
  font-stretch: 116%;
  font-size: clamp(2.25rem, 5.2vw, 4.75rem);
  line-height: .95;
  letter-spacing: -.03em;
}
.section-head p {
  max-width: 52ch;
  margin-top: 20px;
  font-size: 1.125rem;
  color: var(--muted);
}
html[data-mode="code"] .section-head p { font-size: .9375rem; }
html[data-mode="code"] .section-head h2::before,
html[data-mode="code"] .section-head h2::after {
  display: block;
  font: 500 .75rem/1 var(--f-mono);
  letter-spacing: 0;
  color: var(--accent);
}
html[data-mode="code"] .section-head h2::before { content: "<h2>"; margin-bottom: 16px; }
html[data-mode="code"] .section-head h2::after { content: "</h2>"; margin-top: 16px; }

/* =========================================================================
   DICIONÁRIO (bento)
   ========================================================================= */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(48px, 6vw, 72px);
}
.term {
  --t-bg: var(--bg-2);
  --t-fg: var(--fg);
  --t-muted: var(--muted);
  grid-column: 1 / -1;
  display: flex; flex-direction: column; gap: 20px;
  min-height: 340px;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--t-bg);
  color: var(--t-fg);
}
@media (min-width: 720px) { .term { grid-column: span 6; } }
@media (min-width: 1100px) {
  .term--track  { grid-column: 1 / span 7; }
  .term--blend  { grid-column: 8 / span 5; grid-row: span 2; }
  .term--grid   { grid-column: 1 / span 4; }
  .term--clip   { grid-column: 5 / span 3; }
  .term--tokens { grid-column: 1 / span 5; }
  .term--layers { grid-column: 6 / span 7; }
}

html:not([data-mode="code"]) .term--track { --t-bg: var(--y); --t-fg: var(--tinta); --t-muted: rgb(20 20 23 / .74); }
html:not([data-mode="code"]) .term--blend { --t-bg: var(--branco); }
html:not([data-mode="code"]) .term--clip { --t-bg: var(--tinta); --t-fg: var(--papel); --t-muted: rgb(242 242 238 / .72); }
html:not([data-mode="code"]) .term--layers { --t-bg: color-mix(in srgb, var(--c) 16%, var(--papel)); }

html[data-mode="code"] .term { border-top: 3px solid var(--edge, var(--line)); }
html[data-mode="code"] .term--track { --edge: var(--y-luz); }
html[data-mode="code"] .term--blend { --edge: var(--m-luz); }
html[data-mode="code"] .term--grid { --edge: var(--luz-2); }
html[data-mode="code"] .term--clip { --edge: var(--c-luz); }
html[data-mode="code"] .term--tokens { --edge: var(--m-luz); }
html[data-mode="code"] .term--layers { --edge: var(--c-luz); }

.term__names {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 8px 12px;
}
.term__design {
  order: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(1.5rem, 2.3vw, 2.125rem);
  line-height: 1;
  letter-spacing: -.02em;
}
.term__arrow { order: 1; font-family: var(--f-mono); color: var(--t-muted); }
.term__code {
  order: 2;
  padding: 6px 8px;
  background: var(--t-fg);
  color: var(--t-bg);
  font: 500 .8125rem/1 var(--f-mono);
  font-stretch: 100%;
}
/* No modo código, o nome do código vira o protagonista */
html[data-mode="code"] .term__code { order: 0; font-size: clamp(1rem, 1.6vw, 1.3rem); padding: 8px 10px; }
html[data-mode="code"] .term__design { order: 2; font-size: 1.125rem; }

.demo {
  flex: 1;
  display: grid; place-items: center;
  min-height: 150px;
}
.demo__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 16px;
}
.demo__code {
  padding: 6px 8px;
  border: 1px dashed currentColor;
  font: 500 .75rem/1.4 var(--f-mono);
  font-stretch: 100%;
}
.term__note {
  max-width: 46ch;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--t-muted);
}
html[data-mode="code"] .term__note { font-size: .8125rem; }

.tool {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: 500 .75rem/1 var(--f-mono);
  font-stretch: 100%;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .15s;
}
.tool:hover,
.tool[aria-pressed="true"] { background: var(--t-fg, var(--fg)); color: var(--t-bg, var(--bg)); }
.tool:active { transform: translateY(1px) scale(.98); }

/* Tracking */
.track-word {
  --ls: 0em;
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 100%;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: var(--ls);
  margin-right: calc(var(--ls) * -1);
}
.range { flex: 1 1 180px; display: flex; align-items: center; }
.range input {
  width: 100%; height: 28px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.range input::-webkit-slider-runnable-track { height: 2px; background: currentColor; }
.range input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; margin-top: -8px;
  background: var(--t-fg);
  border: 3px solid var(--t-bg);
  box-shadow: 0 0 0 1px var(--t-fg);
}
.range input::-moz-range-track { height: 2px; background: currentColor; }
.range input::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 0;
  background: var(--t-fg);
  border: 3px solid var(--t-bg);
  box-shadow: 0 0 0 1px var(--t-fg);
}

/* Multiplicar */
.blend {
  --blend: multiply;
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 1;
  isolation: isolate;
}
.blend__dot {
  position: absolute;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  mix-blend-mode: var(--blend);
  transition: translate .6s var(--ease), background-color .4s;
}
.blend__dot--1 { left: 0; top: 2%; background: var(--c); }
.blend__dot--2 { right: 0; top: 2%; background: var(--m); }
.blend__dot--3 { left: 20%; bottom: 0; background: var(--y); }
.term--blend:hover .blend__dot--1 { translate: -4% -3%; }
.term--blend:hover .blend__dot--2 { translate: 4% -3%; }
.term--blend:hover .blend__dot--3 { translate: 0 4%; }
html[data-mode="code"] .blend__dot--1 { background: #ff4b4b; }
html[data-mode="code"] .blend__dot--2 { background: #3ddc84; }
html[data-mode="code"] .blend__dot--3 { background: #4d7cff; }

/* Grid */
.gdemo {
  width: 100%;
  display: grid; gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}
.gdemo span {
  display: grid; place-items: center;
  height: 44px;
  background: var(--t-fg);
  color: var(--t-bg);
  font: 500 .6875rem/1 var(--f-mono);
  transform-origin: 0 0;
}
.gdemo span:nth-child(2) { background: var(--accent); color: var(--bg); }

/* Máscara de recorte */
.clipdemo {
  width: min(180px, 80%);
  aspect-ratio: 1;
  background:
    radial-gradient(circle, var(--m) 0 32%, transparent 34%) 0 0 / 14px 14px,
    var(--y);
  clip-path: circle(50%);
  transition: clip-path .7s var(--ease);
}

/* Estilos (variáveis CSS) */
.doc {
  --destaque: var(--m);
  --destaque-txt: #fff;
  display: grid; gap: 10px;
  width: min(260px, 100%);
  padding: 20px;
  background: var(--branco);
  color: var(--tinta);
}
html[data-mode="code"] .doc { background: var(--filme); color: var(--luz); }
.doc__bar { width: 40%; height: 10px; background: var(--destaque); transition: background-color .4s; }
.doc__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 110%;
  font-size: 1.375rem;
  line-height: 1.05;
}
.doc__line { height: 6px; background: currentColor; opacity: .18; }
.doc__line--short { width: 70%; }
.doc__btn {
  justify-self: start;
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--destaque);
  color: var(--destaque-txt);
  font: 600 .8125rem/1 var(--f-body);
  font-stretch: 100%;
  transition: background-color .4s, color .4s;
}
.swatches { display: flex; gap: 10px; margin: 0; padding: 0; border: 0; }
.swatch {
  position: relative;
  width: 28px; height: 28px;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}
.swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch:has(input:checked) { outline: 2px solid var(--t-fg); outline-offset: 3px; }
.swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Camadas */
.layers { position: relative; width: 210px; height: 176px; }
.layer {
  position: absolute;
  width: 112px; height: 92px;
  display: grid; place-items: end start;
  padding: 8px;
  font: 500 .75rem/1 var(--f-mono);
  font-stretch: 100%;
  color: var(--tinta);
  box-shadow: 0 12px 22px -14px rgb(20 20 23 / .6);
}
.layer--a { left: 0; top: 0; background: var(--m); color: #fff; }
.layer--b { left: 48px; top: 42px; background: var(--y); }
.layer--c { left: 96px; top: 84px; background: var(--c); }

/* =========================================================================
   PROJETOS: leque de amostras + painel
   ========================================================================= */
.work { overflow: clip; }
.work__layout {
  display: grid; gap: 40px;
  margin-top: clamp(40px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 960px) {
  .work__layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; }
}

html:not(.js) .fan { display: none; }
.fan {
  --sw: 96px;
  --sh: 400px;
  --step: 10deg;
  --pivot: 30px;
  position: relative;
  height: calc(var(--sh) + 64px);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.fan.is-dragging { cursor: grabbing; }
.fan__strips { position: absolute; inset: 0; }

.strip {
  --d: 0;
  position: absolute; left: 50%; bottom: 20px;
  width: var(--sw); height: var(--sh);
  margin-left: calc(var(--sw) / -2);
  display: flex; flex-direction: column;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--branco);
  color: var(--tinta);
  text-align: left;
  box-shadow: 0 0 0 1px rgb(20 20 23 / .07), 0 18px 30px -18px rgb(20 20 23 / .5);
  transform-origin: 50% calc(100% - var(--pivot));
  transform: rotate(calc(var(--d) * var(--step)));
  transition: transform .7s var(--ease);
  cursor: inherit;
}
.strip.is-active { transform: rotate(0deg) translateY(-18px); }
html[data-mode="code"] .strip { background: var(--filme-2); color: var(--luz); box-shadow: 0 0 0 1px var(--line), 0 18px 30px -18px rgb(0 0 0 / .8); }
.strip__chip { flex: 0 0 56%; background: var(--cor); }
html[data-mode="code"] .strip__chip { box-shadow: inset 0 0 0 1px rgb(230 230 225 / .18); }
.strip__label { display: grid; gap: 6px; padding: 12px 10px; }
.strip__name {
  font-family: var(--f-display);
  font-weight: 750;
  font-stretch: 108%;
  font-size: .8125rem;
  line-height: 1.15;
}
.strip__code {
  font: 500 .625rem/1.35 var(--f-mono);
  font-stretch: 75%;
  opacity: .7;
}
.strip__hole {
  position: absolute; left: 50%;
  bottom: calc(var(--pivot) - 8px);
  width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px rgb(20 20 23 / .2);
}
.fan__rivet {
  position: absolute; left: 50%; z-index: 300;
  bottom: calc(20px + var(--pivot) - 9px);
  width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #b8b8b8 45%, #62626a);
  box-shadow: 0 1px 2px rgb(0 0 0 / .45);
  pointer-events: none;
}
@media (max-width: 640px) {
  .fan { --sw: 74px; --sh: 300px; --step: 9deg; --pivot: 24px; }
  .strip__label { padding: 10px 6px; }
  .strip__name { font-size: .6875rem; font-stretch: 88%; overflow-wrap: anywhere; }
}

.projects { display: grid; gap: 72px; margin: 0; padding: 0; list-style: none; }
.js .projects { display: block; }
.project[hidden] { display: none; }
.project.is-entering { animation: entrar .55s var(--ease); }
@keyframes entrar { from { opacity: 0; translate: 0 14px; } }
@media (prefers-reduced-motion: reduce) { .project.is-entering { animation: none; } }

.project__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--branco);
  box-shadow: 0 0 0 1px var(--line);
}
.project__visual:empty { display: none; }
html[data-mode="code"] .project__visual { background: var(--filme-2); }
.project__visual img,
.project__visual canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.project__visual canvas { transition: opacity .45s var(--ease); }
.project__visual:has(img):hover canvas { opacity: 0; }
.project__visual.sem-meio-tom canvas { display: none; }

.project__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-top: 22px;
  font: 500 .75rem/1.4 var(--f-mono);
  font-stretch: 100%;
  color: var(--muted);
}
.project__swatch { width: 14px; height: 14px; background: var(--cor, var(--fg)); }
.project__title {
  margin-top: 12px;
  font-family: var(--f-display);
  font-weight: 850;
  font-stretch: 112%;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1;
  letter-spacing: -.02em;
}
.project__desc { max-width: 48ch; margin-top: 14px; color: var(--muted); }
.project__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 0; padding: 0; list-style: none;
}
.project__tags li {
  padding: 6px 10px;
  border: 1px solid var(--line);
  font: 500 .6875rem/1 var(--f-mono);
  font-stretch: 100%;
}
.project__links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 24px; }
.project__private {
  font: 500 .75rem/1.4 var(--f-mono);
  font-stretch: 100%;
  color: var(--muted);
}
.project__links a,
.contact__links a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
  text-decoration-color: var(--line);
  transition: text-decoration-color .25s;
}
.project__links a:hover,
.contact__links a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* =========================================================================
   HISTÓRICO (git log)
   ========================================================================= */
.timeline {
  position: relative;
  max-width: 920px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-left: 64px;
}
.commits { margin: 0; padding: 0; list-style: none; }
.commits__graph { position: absolute; left: 0; top: 0; overflow: visible; }
.commit {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 24px;
  padding: 16px 0 44px;
}
.commit__hash {
  font: 500 .8125rem/1.6 var(--f-mono);
  font-stretch: 100%;
  color: var(--muted);
}
.commit__refs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ref {
  padding: 5px 8px;
  border: 1px solid var(--line);
  font: 500 .6875rem/1 var(--f-mono);
  font-stretch: 100%;
}
.ref--head { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.ref--eng { border-color: var(--c); box-shadow: inset 3px 0 0 var(--c); }
.ref--tag { border-color: var(--m); box-shadow: inset 3px 0 0 var(--m); }
.commit__msg {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 106%;
  font-size: clamp(1.125rem, 1.9vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.commit__type {
  font: 500 .75em/1 var(--f-mono);
  letter-spacing: 0;
  color: var(--muted);
}
.commit__desc { max-width: 58ch; margin-top: 8px; color: var(--muted); }
@media (max-width: 640px) {
  .timeline { padding-left: 48px; }
  .commit { grid-template-columns: 1fr; }
}

.g-path { fill: none; stroke-width: 2; }
.g-main { stroke: var(--fg); opacity: .35; }
.g-eng { stroke: var(--c); }
html[data-mode="code"] .g-eng { stroke: var(--c-luz); }
.g-dot { fill: var(--bg); stroke: var(--fg); stroke-width: 2; }
.g-dot--eng { stroke: var(--c); }
html[data-mode="code"] .g-dot--eng { stroke: var(--c-luz); }
.g-dot--m { fill: var(--m); stroke: var(--m); }
.g-dot--head { fill: var(--fg); }
.g-dot--merge { stroke-width: 4; }

@media (prefers-reduced-motion: no-preference) {
  .js .timeline .g-path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease); }
  .js .timeline.is-in .g-path { stroke-dashoffset: 0; }
  .js .timeline .g-dot { opacity: 0; transition: opacity .4s; }
  .js .timeline.is-in .g-dot { opacity: 1; transition-delay: calc(var(--i) * 140ms + 200ms); }
}

/* =========================================================================
   CONTATO
   ========================================================================= */
.contact { padding-block: clamp(120px, 20vh, 220px) clamp(72px, 10vh, 120px); }
.contact__title {
  max-width: 30ch;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.3;
}
html[data-mode="code"] .contact__title { font-family: var(--f-mono); font-size: 1.125rem; }

.contact__big {
  --dx: 0;
  --dy: 0;
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 20px 0 56px;
  isolation: isolate;
  color: var(--fg);
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 122%;
  font-size: clamp(3.25rem, 11vw, 11.5rem);
  line-height: .88;
  letter-spacing: -.045em;
  text-decoration: none;
}
.nw { white-space: nowrap; }
.mr {
  position: absolute; inset: 0;
  opacity: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity .3s, transform .5s var(--ease);
}
.mr--c { color: var(--c); transform: translate(calc(var(--dx) * -1px - 4px), calc(var(--dy) * -1px - 2px)); }
.mr--m { color: var(--m); transform: translate(calc(var(--dx) * 1px + 4px), calc(var(--dy) * .6px + 1px)); }
.mr--y { color: var(--y); transform: translate(calc(var(--dx) * .5px), calc(var(--dy) * 1px + 4px)); }
.mr__k { position: relative; mix-blend-mode: multiply; }
.contact__big:hover .mr,
.contact__big:focus-visible .mr { opacity: 1; }
html[data-mode="code"] :is(.mr, .mr__k) { mix-blend-mode: screen; }
html[data-mode="code"] .mr--c { color: var(--c-luz); }
html[data-mode="code"] .mr--m { color: var(--m-luz); }
html[data-mode="code"] .mr--y { color: var(--y-luz); }

.contact__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.contact__mail {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  font: 500 1rem/1.4 var(--f-mono);
  font-stretch: 100%;
}
.contact__links {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin: 0; padding: 0; list-style: none;
}

/* =========================================================================
   RODAPÉ
   ========================================================================= */
.foot { border-top: 1px solid var(--line); }
.foot__row {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 12px 32px;
  padding-block: 28px;
  font-size: .875rem;
  color: var(--muted);
}
kbd {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  color: var(--fg);
  font: 500 .75rem/1 var(--f-mono);
  font-stretch: 100%;
}
.colorbar { display: grid; grid-template-columns: repeat(14, 1fr); height: 20px; }
.colorbar span { background: var(--sw); }

/* ---------- Grid (tecla G) e aviso ---------- */
.grid-overlay {
  position: fixed; inset: 0; z-index: 70;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.grid-overlay.is-on { opacity: 1; }
.grid-overlay .wrap {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.grid-overlay span {
  background: rgb(229 0 125 / .07);
  box-shadow: inset 1px 0 rgb(229 0 125 / .35), inset -1px 0 rgb(229 0 125 / .35);
}
html[data-mode="code"] .grid-overlay span {
  background: rgb(60 198 255 / .07);
  box-shadow: inset 1px 0 rgb(60 198 255 / .35), inset -1px 0 rgb(60 198 255 / .35);
}
@media (max-width: 719px) {
  .grid-overlay .wrap { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .grid-overlay span:nth-child(n + 5) { display: none; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  padding: 12px 16px;
  background: var(--fg);
  color: var(--bg);
  font: 500 .75rem/1.3 var(--f-mono);
  font-stretch: 100%;
  opacity: 0;
  translate: -50% 16px;
  pointer-events: none;
  transition: opacity .25s, translate .35s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- Revelar ao rolar ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not([data-reveal="draw"]) {
    opacity: 0;
    translate: 0 28px;
    transition: opacity .8s var(--ease), translate .8s var(--ease);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js [data-reveal].is-in { opacity: 1; translate: 0 0; }
}

/* ---------- Troca de modo (View Transitions) ---------- */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ---------- Toque: alvos com pelo menos ~40px ---------- */
@media (pointer: coarse), (max-width: 720px) {
  .swatch { width: 36px; height: 36px; }
  .range input { height: 40px; }
  .tool { min-height: 40px; }
  .project__links a,
  .contact__links a { display: inline-block; padding-block: 10px; }
  .nav__brand { min-height: 40px; min-width: 40px; }
}

/* A dica da tecla G não faz sentido sem teclado */
@media (hover: none) and (pointer: coarse) {
  .foot__hint { display: none; }
}

/* Sem mouse não há hover: mostra a captura original direto, sem o meio-tom */
@media (hover: none) {
  .project__visual:has(img) canvas { opacity: 0; }
}
