/* ==========================================================================
   PR7 LAB — Design system
   Monocromático · Space Grotesk (títulos) · Inter (interface e textos)
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Cores base */
  --c-black: #111111;
  --c-white: #ffffff;
  --c-surface: #f4f4f4;
  --c-muted-on-light: #666666;
  --c-muted-on-dark: #bdbdbd;
  --c-line-on-light: #e2e2e2;
  --c-line-on-dark: #2c2c2c;
  --c-ink-2: #1c1c1c;
  --c-ink-3: #262626;

  /* Tipografia */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-hero: clamp(2.5rem, 1rem + 4.85vw, 5.5rem);    /* 40 → 88 (cabe em 2 linhas ao lado da composição) */
  --fs-section: clamp(1.75rem, 1.05rem + 2.9vw, 4rem); /* 28 → 64 */
  --fs-h3: clamp(1.25rem, 1.05rem + 0.7vw, 1.75rem);
  --fs-body: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);  /* 16 → 18 */
  --fs-small: 0.9375rem;
  --fs-label: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);

  /* Espaçamento (4, 8, 12, 16, 24, 32, 48, 64, 96, 128) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section-y: clamp(56px, 4rem + 5vw, 128px);
  --gutter: clamp(20px, 1rem + 2vw, 48px);
  --container: 1280px;

  /* Formas */
  --r-frame: 20px;
  --r-frame-sm: 14px;
  --r-control: 8px;
  --border: 1px solid var(--line);

  /* Movimento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-med: 380ms;
  --t-slow: 800ms;

  --header-h: 72px;

  /* Tema padrão (claro) */
  --bg: var(--c-white);
  --fg: var(--c-black);
  --muted: var(--c-muted-on-light);
  --line: var(--c-line-on-light);
  --soft: var(--c-surface);
}

[data-theme="dark"] {
  --bg: var(--c-black);
  --fg: var(--c-white);
  --muted: var(--c-muted-on-dark);
  --line: var(--c-line-on-dark);
  --soft: var(--c-ink-2);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
/* Sem scroll-behavior: smooth no html — atrapalha as medições do ScrollTrigger; a suavidade vem do Lenis */
body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-black);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--c-black); color: var(--c-white); }
[data-theme="dark"] ::selection { background: var(--c-white); color: var(--c-black); }

[data-theme] { background: var(--bg); color: var(--fg); }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

.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;
}
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  padding: 10px 16px; border-radius: var(--r-control);
  background: var(--c-black); color: var(--c-white);
  transform: translateY(-160%);
  transition: transform var(--t-fast) var(--ease-out);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: calc(760px + var(--gutter) * 2); }

/* ---------- Tipografia utilitária ---------- */
.label {
  font-family: var(--font-text);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}
.label-index { color: var(--fg); font-feature-settings: "tnum"; }

.section-title, .hero-title, .case-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.section-title { font-size: var(--fs-section); }
.section-lead {
  color: var(--muted);
  max-width: 34ch;
  font-size: var(--fs-body);
}
.section-head { display: grid; gap: var(--s-4); margin-bottom: clamp(32px, 2rem + 2vw, 64px); }
.section-head-row {
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 900px) {
  .section-head-row { grid-template-columns: 1fr auto; gap: var(--s-6); }
}

/* Linhas com máscara: título entra por recorte + deslocamento curto (≤ 24px) */
.line { display: block; padding-bottom: 0.06em; }
.line-inner { display: inline-block; }

.motion [data-reveal]:not(.is-in) .line-inner {
  clip-path: inset(0 0 100% 0);
  transform: translateY(24px);
}
.motion [data-reveal] .line-inner {
  transition:
    clip-path 760ms var(--ease-out),
    transform 760ms var(--ease-out);
  transition-delay: calc(var(--li, 0) * 90ms);
}
.motion [data-reveal] .line:nth-child(2) .line-inner { --li: 1; }
.motion [data-reveal] .line:nth-child(3) .line-inner { --li: 2; }
.motion-ready [data-reveal] .line-inner { clip-path: none !important; transform: none !important; }

[data-fade] { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.motion [data-fade]:not(.is-in) { opacity: 0; transform: translateY(20px); }
.motion-ready [data-fade] { opacity: 1 !important; transform: none !important; }

/* ---------- Links ---------- */
.link-line {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--t-med) var(--ease-out);
  padding-bottom: 2px;
}
.link-line:hover { background-size: 100% 1px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-small); font-weight: 500;
}
.link-arrow .arrow, .btn .arrow { transition: transform var(--t-fast) var(--ease-out); flex: none; }
a:hover .link-arrow .arrow, .btn:hover .arrow { transform: translateX(4px); }
.arrow-up { transform: rotate(-90deg); }
a:hover .arrow-up { transform: rotate(-90deg) translateX(4px) !important; }
.arrow-back { transform: rotate(180deg); }
a:hover .arrow-back { transform: rotate(180deg) translateX(4px); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  color: var(--h-fg, var(--c-black));
  transition: transform 420ms var(--ease-out), color var(--t-med) ease;
}
.site-header::before {
  content: "";
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--h-bg, #fff) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--h-line, transparent);
  opacity: var(--h-solid, 0);
  transition: opacity var(--t-med) ease, background-color var(--t-med) ease;
}
.site-header.is-scrolled { --h-solid: 1; --h-line: var(--c-line-on-light); }
.site-header.on-dark { --h-fg: var(--c-white); --h-bg: var(--c-black); }
.site-header.on-dark.is-scrolled { --h-line: var(--c-line-on-dark); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner {
  position: relative;
  height: 100%;
  display: flex; align-items: center; gap: var(--s-5);
}
.header-logo { display: block; flex: none; padding: 6px 0; }
.header-logo .logo { height: 30px; width: auto; }
.header-nav { margin-left: auto; }
.header-nav ul { display: flex; gap: var(--s-6); }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px;
  font-size: var(--fs-small); font-weight: 500;
}
.nav-slash {
  display: inline-block;
  width: 0; overflow: hidden;
  opacity: 0;
  transform: translateX(-4px) skewX(-8deg);
  transition: width var(--t-med) var(--ease-out), opacity var(--t-fast) ease, transform var(--t-med) var(--ease-out);
}
.nav-link:hover .nav-slash, .nav-link.is-active .nav-slash, .nav-link:focus-visible .nav-slash {
  width: 0.8em; opacity: 1; transform: none;
}
.site-header .btn {
  --btn-bg: var(--h-fg, var(--c-black));
  --btn-fg: var(--h-bg, var(--c-white));
  --btn-hover-bg: var(--h-bg, var(--c-white));
  --btn-hover-fg: var(--h-fg, var(--c-black));
  border-color: var(--h-fg, var(--c-black));
}
.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid currentColor;
  border-radius: var(--r-control);
  background: transparent;
  align-items: center; justify-content: center;
}
.menu-icon { position: relative; width: 18px; height: 10px; }
.menu-icon i {
  position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform var(--t-med) var(--ease-out), top var(--t-med) var(--ease-out);
}
.menu-icon i:first-child { top: 0; }
.menu-icon i:last-child { top: 8.5px; }
.menu-open .menu-icon i:first-child { top: 4.25px; transform: rotate(45deg); }
.menu-open .menu-icon i:last-child { top: 4.25px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .header-nav, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-logo .logo { height: 26px; }
}

/* Menu móvel */
.menu-panel {
  --bg: var(--c-black); --fg: var(--c-white); --muted: var(--c-muted-on-dark); --line: var(--c-line-on-dark);
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: var(--s-7);
  padding: calc(var(--header-h) + 32px) var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--bg); color: var(--fg);
  clip-path: inset(0 0 0 0);
}
.menu-panel[hidden] { display: none; }
.menu-panel ul { display: grid; gap: var(--s-2); }
.menu-panel li a {
  display: flex; align-items: baseline; gap: var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.menu-index { font-family: var(--font-text); font-size: var(--fs-label); color: var(--muted); letter-spacing: 0.06em; }
.menu-panel .btn { align-self: stretch; }
.menu-open .site-header { --h-fg: var(--c-white); --h-bg: var(--c-black); --h-solid: 0; transform: none; }
.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .menu-panel.is-opening { animation: menuIn 520ms var(--ease-out) both; }
  .menu-panel.is-opening li { animation: itemIn 560ms var(--ease-out) both; animation-delay: calc(120ms + var(--i) * 60ms); }
  .menu-panel.is-closing { animation: menuOut 320ms var(--ease-in-out) both; }
}
@keyframes menuIn { from { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); } to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } }
@keyframes menuOut { from { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } to { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); } }
@keyframes itemIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   01 Abertura
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(94svh, 940px);
  padding: calc(var(--header-h) + clamp(32px, 6vh, 72px)) 0 clamp(96px, 12vw, 180px);
  display: flex; align-items: center;
  overflow: clip;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}
@media (min-width: 1180px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: var(--s-5);
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-mark {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--fg); color: var(--bg);
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0;
}
.hero-title {
  font-size: var(--fs-hero);
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero-lead {
  margin-top: var(--s-5);
  max-width: 30ch;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

/* Entrada da abertura em CSS puro: não depende do JS e nunca espera um preloader */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .line-inner { animation: lineIn 820ms var(--ease-out) both; }
  .hero-title .line:nth-child(2) .line-inner { animation-delay: 90ms; }
  .eyebrow, .hero-lead { animation: fadeUp 700ms var(--ease-out) both; }
  .eyebrow { animation-delay: 0ms; }
  .hero-lead { animation-delay: 220ms; }
  .hero-actions { animation: fadeUp 700ms var(--ease-out) 320ms both; }
}
@keyframes lineIn {
  from { clip-path: inset(0 0 100% 0); transform: translateY(24px); }
  to   { clip-path: inset(0 0 -10% 0); transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Palco: o símbolo vira a moldura de um site */
.hero-stage {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
  aspect-ratio: 1 / 0.86;
  container-type: inline-size;
}
@media (min-width: 1180px) { .hero-stage { margin-right: 0; } }

.browser {
  position: absolute;
  inset: 8% 4% 10% 6%;
  display: flex; flex-direction: column;
  border-radius: var(--r-frame);
  background: var(--c-black);
  color: var(--c-white);
  box-shadow: 0 40px 80px -48px rgba(17, 17, 17, 0.55);
  overflow: hidden;
}
.browser-bar {
  display: flex; align-items: center; gap: 2.2cqi;
  height: 11cqi; min-height: 40px;
  padding: 0 3cqi;
  border-bottom: 1px solid var(--c-line-on-dark);
}
.b-nav { display: block; width: 2.6cqi; min-width: 10px; flex: none; }
.b-nav svg { width: 100%; height: auto; fill: var(--c-white); }
.b-url {
  flex: 1;
  display: flex; align-items: center; gap: 0.9cqi;
  height: 6.2cqi; min-height: 24px;
  padding: 0 2.4cqi;
  border-radius: 999px;
  background: var(--c-ink-3);
  font-size: max(10px, 2.2cqi);
  color: var(--c-muted-on-dark);
  white-space: nowrap; overflow: hidden;
}
.b-slash { display: block; width: 1.3cqi; min-width: 6px; flex: none; }
.b-slash svg { width: 100%; height: auto; fill: var(--c-white); }
.b-path { color: var(--c-white); }
.b-dot { width: 4.5cqi; height: 4.5cqi; min-width: 16px; min-height: 16px; border-radius: 50%; background: var(--c-ink-3); flex: none; }

.browser-body {
  flex: 1;
  display: flex; flex-direction: column; gap: 4cqi;
  padding: 4cqi 4.5cqi;
}
.m-nav { display: flex; align-items: center; gap: 3cqi; }
.m-logo { width: 9cqi; height: 2.6cqi; border-radius: 3px; background: var(--c-white); }
.m-links { display: flex; gap: 2cqi; margin-left: auto; }
.m-links i { width: 6cqi; height: 1.3cqi; border-radius: 2px; background: #4a4a4a; }
.m-pill { width: 10cqi; height: 4.2cqi; border-radius: 6px; background: var(--c-white); }
.m-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4cqi; align-items: stretch; flex: 1; }
.m-copy { display: flex; flex-direction: column; gap: 1.8cqi; justify-content: center; }
.m-kicker { width: 30%; height: 1.4cqi; border-radius: 2px; background: #5a5a5a; }
.m-h { width: 100%; height: 4.2cqi; border-radius: 4px; background: var(--c-white); }
.m-h2 { width: 72%; }
.m-p { width: 88%; height: 1.4cqi; border-radius: 2px; background: #474747; margin-top: 0.6cqi; }
.m-p2 { width: 64%; margin-top: 0; }
.m-btns { display: flex; gap: 1.6cqi; margin-top: 1.4cqi; }
.m-btns i { width: 13cqi; height: 4.6cqi; border-radius: 5px; background: var(--c-white); }
.m-btns i + i { background: transparent; border: 1px solid #6a6a6a; }
.m-media {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(160deg, #3c3c3c 0%, #1f1f1f 70%);
  overflow: hidden;
}
.m-media-cut {
  position: absolute; top: -10%; bottom: -10%; left: 46%;
  width: 12%;
  background: var(--c-black);
  transform: skewX(-19deg);
}
.m-media-sun {
  position: absolute; right: 16%; top: 18%;
  width: 18%; aspect-ratio: 1;
  border-radius: 50%;
  background: #d9d9d9;
}
.m-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqi; }
.m-card {
  display: flex; flex-direction: column; gap: 1.2cqi;
  height: 12cqi;
  padding: 2cqi;
  border: 1px solid var(--c-line-on-dark);
  border-radius: 8px;
}
.m-card i { height: 1.3cqi; border-radius: 2px; background: #4e4e4e; }
.m-card i:first-child { width: 50%; background: #8a8a8a; }
.m-card i:last-child { width: 80%; }

/* Componentes flutuantes ao redor da moldura */
.float {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--c-line-on-light);
  border-radius: 12px;
  background: var(--c-white);
  color: var(--c-black);
  font-size: max(11px, 2.3cqi);
  font-weight: 500;
  box-shadow: 0 18px 40px -28px rgba(17, 17, 17, 0.4);
}
.float-btn { left: 0; bottom: 3%; background: var(--c-black); color: var(--c-white); border-color: var(--c-black); border-radius: 8px; }
.float-btn svg { width: 16px; height: 16px; }
.float-toggle { right: 0; top: 0; }
.ft-track { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--c-black); }
.ft-thumb { position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--c-white); }
.float-type { right: -2%; bottom: 18%; padding: 12px 16px; }
.ft-aa { font-family: var(--font-display); font-weight: 600; font-size: 2.2em; letter-spacing: -0.04em; line-height: 1; }
.ft-meta { line-height: 1.25; }
.ft-meta small { color: var(--c-muted-on-light); font-weight: 400; }
.float-grid {
  left: 0; top: 40%;
  display: grid; grid-template-columns: repeat(2, 12px); gap: 4px;
  padding: 10px;
}
.float-grid i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--c-black); }
.float-grid i:nth-child(1), .float-grid i:nth-child(4) { background: var(--c-black); }

/* Símbolo animado (camada sobre o palco) */
.hero-mark {
  position: absolute;
  left: 50%; top: 50%;
  width: 30%;
  aspect-ratio: 13547 / 12621;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
}
.mk { position: absolute; inset: 0; }
.mk svg { position: absolute; }
.mk-frame { inset: 0; width: 100%; height: 100%; fill: var(--c-black); }
.mk-part { fill: var(--c-white); }
.mk-lt { left: 13.14%; top: 37.16%; width: 23.95%; height: 26.98%; }
.mk-slash { left: 38.02%; top: 25.04%; width: 24.21%; height: 49.05%; }
.mk-gt { left: 62.71%; top: 37.16%; width: 24.36%; height: 26.98%; }

/* Antes do JS montar a cena, o palco fica oculto (somente com movimento ativo).
   Se o JS falhar, .motion-ready libera o estado final. */
.motion:not(.motion-ready) .hero-stage:not(.is-built) { visibility: hidden; }


/* Borda diagonal das seções escuras (recorte inspirado na barra do símbolo) */
.section-edge {
  position: absolute; left: 0; right: 0;
  bottom: calc(100% - 1px);
  height: clamp(40px, 8vw, 128px);
  background: var(--c-black);
  clip-path: polygon(0 100%, 100% var(--edge, 0%), 100% 100%, 0 100%);
  pointer-events: none;
}

/* ==========================================================================
   02 Projetos
   ========================================================================== */
.projects { position: relative; padding: var(--section-y) 0; }
.projects-head {
  display: grid; gap: var(--s-4);
  margin-bottom: clamp(32px, 2rem + 2vw, 64px);
}
.projects-head .section-head { margin-bottom: 0; }
@media (min-width: 900px) {
  .projects-head { grid-template-columns: 1fr auto; align-items: end; }
}
.projects-track {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid; gap: clamp(48px, 6vw, 80px);
}
.project-link { display: block; }
.project-frame {
  position: relative;
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-frame);
  transition: border-color var(--t-med) ease;
}
.project-media {
  display: block;
  position: relative;
  border-radius: var(--r-frame-sm);
  overflow: hidden;
  background: var(--soft);
  aspect-ratio: 16 / 10;
}
.project-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: scale 450ms var(--ease-out);
}
.corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 0 solid var(--fg);
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-med) ease;
  opacity: 0.9;
  pointer-events: none;
}
.c-tl { top: -6px; left: -6px; border-top-width: 1.5px; border-left-width: 1.5px; border-top-left-radius: 6px; }
.c-tr { top: -6px; right: -6px; border-top-width: 1.5px; border-right-width: 1.5px; border-top-right-radius: 6px; }
.c-bl { bottom: -6px; left: -6px; border-bottom-width: 1.5px; border-left-width: 1.5px; border-bottom-left-radius: 6px; }
.c-br { bottom: -6px; right: -6px; border-bottom-width: 1.5px; border-right-width: 1.5px; border-bottom-right-radius: 6px; }
.project-link:hover .project-frame, .project-link:focus-visible .project-frame { border-color: color-mix(in srgb, var(--fg) 40%, transparent); }
.project-link:hover .project-media img { scale: 1.015; }
.project-link:hover .c-tl { transform: translate(-4px, -4px); }
.project-link:hover .c-tr { transform: translate(4px, -4px); }
.project-link:hover .c-bl { transform: translate(-4px, 4px); }
.project-link:hover .c-br { transform: translate(4px, 4px); }
.project-link:focus-visible { outline-offset: 10px; border-radius: var(--r-frame); }

.badge {
  position: absolute; left: 22px; top: 22px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(17, 17, 17, 0.78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--c-white);
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
}
.badge-light { position: static; display: inline-block; background: var(--c-black); }

.project-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-2) var(--s-5);
  align-items: start;
  padding: var(--s-5) 4px 0;
}
.project-index { font-size: var(--fs-label); color: var(--muted); padding-top: 6px; font-feature-settings: "tnum"; }
.project-text { display: grid; gap: 4px; }
.project-type { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.project-name { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.project-phrase { color: var(--muted); font-size: var(--fs-small); max-width: 46ch; }
.project-meta .link-arrow { grid-column: 2; margin-top: var(--s-2); }

.project-next-link {
  display: grid; place-items: center;
  height: 100%;
  min-height: 280px;
  border: 1px dashed var(--line);
  border-radius: var(--r-frame);
  padding: var(--s-7);
  transition: border-color var(--t-med) ease, background-color var(--t-med) ease;
}
.project-next-link:hover { border-color: var(--fg); background: var(--soft); }
.project-next-inner { display: grid; gap: var(--s-5); justify-items: start; max-width: 320px; }
.project-next-icon { width: 56px; height: auto; color: var(--fg); }
.project-next-title { font-family: var(--font-display); font-size: var(--fs-section); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; }

.projects-progress { display: none; }

/* Desktop com movimento: sequência horizontal fixada por um trecho curto */
.projects.is-pinned { padding-bottom: 0; }
.projects.is-pinned .projects-pin {
  height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
.projects.is-pinned .projects-head { margin-bottom: clamp(24px, 3.5vh, 48px); }
.projects.is-pinned .projects-viewport { overflow: visible; }
.projects.is-pinned .projects-track {
  display: flex; gap: 40px;
  width: max-content; max-width: none;
  margin: 0;
  padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2));
  padding-right: var(--gutter);
  will-change: transform;
}
.projects.is-pinned .project-card { width: min(56vw, calc((100vh - 360px) * 1.6)); flex: none; }
.projects.is-pinned .project-next { width: min(30vw, 420px); }
.projects.is-pinned .project-meta { grid-template-columns: auto 1fr auto; align-items: end; }
.projects.is-pinned .project-meta .link-arrow { grid-column: 3; grid-row: 1; margin: 0; }
.projects.is-pinned .projects-progress {
  display: flex; align-items: center; gap: var(--s-5);
  margin-top: clamp(20px, 3vh, 40px);
  font-size: var(--fs-label); color: var(--muted); font-feature-settings: "tnum";
}
.pp-bar { position: relative; flex: 1; max-width: 240px; height: 1px; background: var(--line); overflow: hidden; }
.pp-bar span { position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(0); }

@media (min-width: 1024px) {
  .projects:not(.is-pinned) .projects-track { grid-template-columns: repeat(2, 1fr); }
  .projects:not(.is-pinned) .project-card:first-child { grid-column: 1 / -1; }
}

/* ==========================================================================
   03 Serviços
   ========================================================================== */
.services { padding: var(--section-y) 0; }
.services-grid {
  display: grid; gap: var(--s-5);
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-6); align-items: stretch; }
}
.service-main {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--s-5);
  padding: clamp(28px, 2rem + 2vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--r-frame);
  overflow: hidden;
  isolation: isolate;
  --mx: 70%; --my: 20%;
}
.service-main::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--c-surface), transparent 70%);
  opacity: 0; transition: opacity var(--t-med) ease;
}
.service-main:hover::before { opacity: 1; }
.service-main .corner { opacity: 0.9; }
.service-main .c-tl { top: 10px; left: 10px; }
.service-main .c-br { bottom: 10px; right: 10px; }
.service-main-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 3.2vw, 4rem);
  font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  max-width: 11ch;
}
.service-main-text { color: var(--muted); max-width: 36ch; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px; font-weight: 500;
}
.service-main .btn { margin-top: auto; }
.service-main-art {
  position: absolute; right: clamp(20px, 4vw, 48px); bottom: clamp(20px, 4vw, 48px);
  width: clamp(88px, 14vw, 168px);
  aspect-ratio: 1 / 0.8;
  z-index: -1;
  opacity: 0.9;
}
.sma-win {
  position: absolute; inset: 0;
  display: flex; gap: 5px; padding: 10px;
  border: 1px solid var(--fg);
  border-radius: 14px;
}
.sma-win i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--fg); }
.sma-slash {
  position: absolute; left: 50%; top: 22%;
  width: 14%; height: 62%;
  background: var(--fg);
  transform: translateX(-50%) skewX(-19deg);
  transition: transform 600ms var(--ease-out);
}
.service-main:hover .sma-slash { transform: translateX(-50%) skewX(19deg); }
@media (max-width: 1199px) { .service-main-art { display: none; } }
@media (min-width: 1200px) { .service-main .chips, .service-main-text { max-width: calc(100% - 200px); } }

.service-list { display: grid; border-top: 1px solid var(--line); align-content: start; }
.service-row {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-5);
  align-items: center;
  padding: clamp(20px, 1rem + 1.5vw, 32px) var(--s-2);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
  transition: color var(--t-med) var(--ease-out);
}
.service-row::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--c-black);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 450ms var(--ease-out);
}
@media (hover: hover) {
  .service-row:hover { color: var(--c-white); }
  .service-row:hover::before { clip-path: inset(0 0 0 0); }
  .service-row:hover .service-benefit, .service-row:hover .service-index { color: var(--c-muted-on-dark); }
  .service-row:hover .service-mark { transform: rotate(0deg); opacity: 1; }
}
.service-index { font-size: var(--fs-label); color: var(--muted); font-feature-settings: "tnum"; align-self: start; padding-top: 6px; transition: color var(--t-med); }
.service-name { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.service-benefit { color: var(--muted); font-size: var(--fs-small); margin-top: 4px; transition: color var(--t-med); }
.service-mark {
  font-family: var(--font-display); font-size: 2rem; font-weight: 300; line-height: 1;
  transform: rotate(-38deg); opacity: 0.35;
  transition: transform 450ms var(--ease-out), opacity var(--t-med);
}

/* ==========================================================================
   04 Laboratório (demonstração)
   ========================================================================== */
.lab { --bg: var(--c-surface); padding: var(--section-y) 0; }
.lab-grid {
  display: grid; gap: var(--s-5);
}
@media (min-width: 960px) {
  .lab-grid { grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.6fr); gap: var(--s-6); }
}
.lab-controls {
  align-self: start;
  display: grid; gap: var(--s-5); align-content: start;
  padding: clamp(20px, 1rem + 1vw, 32px);
  border: 1px solid var(--c-line-on-light);
  border-radius: var(--r-frame);
  background: var(--c-white);
}
.control { display: grid; gap: var(--s-3); margin: 0; padding: 0; border: 0; min-width: 0; }
.control-label { font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0; }

.switch {
  display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: 44px; padding: 0 14px 0 8px;
  border: 1px solid var(--c-line-on-light);
  border-radius: var(--r-control);
  background: var(--c-white);
  justify-self: start;
  font-weight: 500; font-size: var(--fs-small);
}
.switch-track {
  position: relative; width: 44px; height: 26px; border-radius: 999px;
  background: var(--c-line-on-light);
  transition: background-color 220ms var(--ease-out);
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--c-white);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform 220ms var(--ease-out);
}
.switch[aria-checked="true"] .switch-track { background: var(--c-black); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(18px); }

.segmented {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; gap: 4px;
  border: 1px solid var(--c-line-on-light);
  border-radius: calc(var(--r-control) + 2px);
  background: var(--c-surface);
}
.segmented label { position: relative; display: block; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid; place-items: center;
  min-height: 40px;
  border-radius: 6px;
  font-size: var(--fs-small); font-weight: 500;
  color: var(--muted);
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.segmented input:checked + span { background: var(--c-black); color: var(--c-white); }
.segmented input:focus-visible + span { outline: 2px solid var(--c-black); outline-offset: 2px; }
.lab-readout {
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em;
}

.lab-preview {
  --ui-bg: var(--c-white); --ui-fg: var(--c-black); --ui-muted: var(--c-muted-on-light); --ui-line: var(--c-line-on-light); --ui-field: var(--c-surface);
  --ui-r: 16px; --ui-r-ctl: 10px; --ui-pad: 28px; --ui-gap: 16px;
  position: relative;
  display: grid; place-items: center;
  grid-template-columns: minmax(0, 1fr);
  min-height: 440px;
  padding: clamp(20px, 4vw, 56px);
  border-radius: var(--r-frame);
  background-color: var(--c-white);
  background-image: radial-gradient(var(--c-line-on-light) 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px solid var(--c-line-on-light);
  overflow: hidden;
  transition: background-color 250ms var(--ease-out), border-color 250ms var(--ease-out);
}
.lab-preview[data-ui-theme="dark"] {
  --ui-bg: var(--c-ink-2); --ui-fg: var(--c-white); --ui-muted: var(--c-muted-on-dark); --ui-line: #333; --ui-field: #262626;
  background-color: var(--c-black);
  background-image: radial-gradient(#2a2a2a 1px, transparent 1px);
  border-color: var(--c-black);
}
.lab-preview[data-ui-style="reto"] { --ui-r: 2px; --ui-r-ctl: 2px; }
.lab-preview[data-ui-style="amplo"] { --ui-r: 28px; --ui-r-ctl: 999px; --ui-pad: 40px; --ui-gap: 22px; }

.ui-card {
  width: min(100%, 420px);
  min-width: 0;
  display: grid; gap: var(--ui-gap);
  padding: var(--ui-pad);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r);
  background: var(--ui-bg);
  color: var(--ui-fg);
  box-shadow: 0 30px 60px -40px rgba(0,0,0,.35);
  transition: all 250ms var(--ease-out);
}
.ui-top { display: flex; align-items: center; gap: 14px; }
.ui-avatar {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: calc(var(--ui-r-ctl) * 0.8);
  background: var(--ui-fg); color: var(--ui-bg);
  transition: all 250ms var(--ease-out);
}
.lab-preview[data-ui-style="amplo"] .ui-avatar { border-radius: 50%; }
.ui-icon { width: 24px; height: auto; color: var(--ui-bg); }
.ui-avatar .ui-icon { color: currentColor; }
.ui-kicker { display: block; font-size: 12px; color: var(--ui-muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }
.ui-title { display: block; font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ui-form { display: grid; gap: 8px; }
.ui-label { font-size: 13px; font-weight: 500; }
.ui-input {
  min-height: 48px; padding: 0 16px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-ctl);
  background: var(--ui-field);
  color: var(--ui-fg);
  transition: all 200ms var(--ease-out);
}
.ui-input::placeholder { color: var(--ui-muted); }
.ui-input:focus-visible { outline: 2px solid var(--ui-fg); outline-offset: 2px; border-color: var(--ui-fg); }
.ui-input[aria-invalid="true"] { border-color: var(--ui-fg); border-style: dashed; }
.ui-hint { font-size: 12.5px; color: var(--ui-muted); min-height: 1.4em; }
.ui-hint.is-error::before { content: "! "; font-weight: 700; color: var(--ui-fg); }
.ui-button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; margin-top: 6px;
  border: 1px solid var(--ui-fg);
  border-radius: var(--ui-r-ctl);
  background: var(--ui-fg); color: var(--ui-bg);
  font-weight: 500; font-size: var(--fs-small);
  transition: transform 150ms var(--ease-out), background-color 200ms, color 200ms, border-radius 250ms var(--ease-out);
}
.ui-button:hover { background: transparent; color: var(--ui-fg); }
.ui-button:active { transform: scale(0.97); }
.ui-button:focus-visible { outline: 2px solid var(--ui-fg); outline-offset: 3px; }
.ui-btn-spinner, .ui-btn-check { display: none; width: 18px; height: 18px; }
.ui-btn-spinner { border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.ui-button.is-loading .ui-btn-spinner { display: block; }
.ui-button.is-done .ui-btn-check { display: block; }
.ui-button.is-done .ui-btn-check path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: draw 250ms var(--ease-out) forwards; }
.ui-button.is-loading, .ui-button.is-done { pointer-events: none; }
.ui-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ui-muted); padding-top: 12px; border-top: 1px solid var(--ui-line); }
.ui-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ui-fg); margin-right: 6px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ==========================================================================
   05 Processo
   ========================================================================== */
.process { position: relative; padding: var(--section-y) 0 calc(var(--section-y) + clamp(40px, 8vw, 128px)); }
.steps { display: grid; gap: var(--s-6); counter-reset: s; }
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
}
.step { display: grid; gap: var(--s-3); align-content: start; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.step-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 3vw, 5rem);
  font-weight: 500; line-height: 1; letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg);
  margin-bottom: var(--s-3);
}
.step-title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.step-text { color: var(--muted); max-width: 32ch; }
.steps-line { position: relative; height: 2px; margin-top: var(--s-7); background: var(--line); overflow: hidden; display: none; }
.steps-line span { position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(1); }
@media (min-width: 800px) { .steps-line { display: block; } }
.motion .steps-line span { transform: scaleX(0); }
.motion-ready .steps-line span { transform: scaleX(1); }

/* ==========================================================================
   06 Contato
   ========================================================================== */
.contact { position: relative; padding: var(--section-y) 0; }
.contact-page { padding-top: calc(var(--header-h) + var(--section-y)); min-height: 100svh; }
.contact-grid { display: grid; gap: var(--s-8); }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-9); align-items: start; }
}
.contact-copy { display: grid; gap: var(--s-5); justify-items: start; }
.contact-title { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.5rem); }

.contact-form { display: grid; gap: var(--s-5); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: var(--fs-small); font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--soft);
  color: var(--fg);
  line-height: 1.5;
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--fg) 45%, transparent); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-color: var(--fg); border-radius: var(--r-control); }
.field [aria-invalid="true"] { border-color: var(--fg); border-style: dashed; }
.field-error {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500;
}
.field-error::before {
  content: "!";
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; flex: none;
  border-radius: 50%;
  background: var(--fg); color: var(--bg);
  font-size: 12px; font-weight: 700;
}
.field-error[hidden] { display: none; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }
.form-note { font-size: 13px; color: var(--muted); max-width: 32ch; }
.btn-spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.btn.is-loading .btn-spinner { display: block; }
.btn.is-loading .arrow { display: none; }
.form-status {
  display: none; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  font-size: var(--fs-small);
}
.form-status.is-success, .form-status.is-error { display: flex; }
.form-status.is-error { border-style: dashed; border-color: var(--fg); }
.status-icon {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  background: var(--fg); color: var(--bg);
  font-size: 13px; font-weight: 700;
}
@media (prefers-reduced-motion: no-preference) {
  .form-status.is-success, .form-status.is-error { animation: fadeUp 300ms var(--ease-out) both; }
}

/* ==========================================================================
   Rodapé
   ========================================================================== */
.site-footer {
  --bg: #040506;
  --line: rgba(255, 255, 255, 0.09);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--s-9) 0 var(--s-6);
  background: #040506;
}
.site-footer > .container { position: relative; z-index: 1; }
/* Luz: filete brilhante no topo, brilho frio vindo de cima e reflexo que acompanha o mouse */
.footer-light { position: absolute; inset: 0; z-index: 0; pointer-events: none; --fx: 50%; --fy: 0%; }
.footer-light::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.04) 15%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0.04) 85%, transparent 100%) top / 100% 1px no-repeat,
    radial-gradient(70% 55% at 50% -8%, rgba(225, 235, 255, 0.13), transparent 70%),
    radial-gradient(40% 40% at var(--fx) var(--fy), rgba(255, 255, 255, 0.06), transparent 70%);
  transition: background-position 0.2s;
}
/* Reflexo diagonal (a barra do símbolo) que atravessa o rodapé devagar */
.footer-light::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -40%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  transform: skewX(-19deg) translateX(0);
}
@media (prefers-reduced-motion: no-preference) {
  .footer-light::after { animation: footerSheen 9s var(--ease-in-out) infinite; }
}
@keyframes footerSheen {
  0% { transform: skewX(-19deg) translateX(0); }
  60%, 100% { transform: skewX(-19deg) translateX(560%); }
}
.footer-top { display: grid; gap: var(--s-5); padding-bottom: var(--s-8); border-bottom: 1px solid var(--line); }
@media (min-width: 800px) { .footer-top { grid-template-columns: 1fr auto; align-items: end; } }
.footer-logo .logo { width: clamp(200px, 30vw, 360px); height: auto; }
.footer-tagline { color: var(--muted); font-size: var(--fs-small); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-6); padding: var(--s-7) 0; }
.footer-grid .label { margin-bottom: var(--s-4); }
.footer-list { display: grid; gap: var(--s-2); font-size: var(--fs-small); }
.footer-list a { display: inline-block; padding: 6px 0; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6);
  padding-top: var(--s-5); border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.footer-bottom a { color: var(--fg); }
.to-top { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }

/* ==========================================================================
   Página de projeto
   ========================================================================== */
.case-hero { padding: calc(var(--header-h) + clamp(32px, 6vw, 80px)) 0 clamp(32px, 4vw, 56px); }
.case-hero .container { display: grid; gap: var(--s-4); justify-items: start; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--fs-small); font-weight: 500; margin-bottom: var(--s-4); }
.case-title { font-size: clamp(2.5rem, 1.3rem + 5vw, 6rem); letter-spacing: -0.045em; }
.case-lead { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.375rem); color: var(--muted); max-width: 40ch; }
.concept-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--muted); margin-top: var(--s-2); }
.case-figure { margin-bottom: var(--section-y); }
.case-body { display: grid; gap: var(--s-7); padding-bottom: var(--section-y); }
@media (min-width: 900px) { .case-body { grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s-7); } }
.case-block { display: grid; gap: var(--s-4); align-content: start; }
.case-text { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem); line-height: 1.55; }
.case-list { display: grid; gap: var(--s-3); }
.case-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.case-list li span { font-family: var(--font-display); font-weight: 600; }
.case-list-muted { color: var(--muted); }
.case-next-link { display: grid; gap: var(--s-3); padding-top: var(--section-y); padding-bottom: var(--section-y); }
.case-next-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1rem + 7vw, 8rem);
  font-weight: 600; letter-spacing: -0.05em; line-height: 0.95;
  transition: transform 500ms var(--ease-out);
}
.case-next-link:hover .case-next-name { transform: translateX(12px); }
.cta-band { padding: var(--section-y) 0; }
.cta-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5); }

/* Páginas de texto e erro */
.text-page { padding: calc(var(--header-h) + var(--section-y)) 0 var(--section-y); }
.text-page .section-title { margin: var(--s-4) 0 var(--s-3); }
.text-updated { color: var(--muted); font-size: 13px; margin-bottom: var(--s-7); }
.text-page h2 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; margin: var(--s-7) 0 var(--s-3); }
.text-page p { color: #333; max-width: 65ch; }
.error-page { min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 48px) 0 96px; }
.error-inner { display: grid; gap: var(--s-4); justify-items: start; }
.error-icon { width: 72px; height: auto; margin-bottom: var(--s-4); }
@media (prefers-reduced-motion: no-preference) {
  .error-icon { animation: nudge 2.4s var(--ease-in-out) infinite; }
}
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateX(6px) skewX(-6deg); } }

/* ---------- Transições entre páginas (onde houver suporte) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; }
}

/* ---------- Movimento reduzido: estado final direto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Ajustes de telas pequenas ---------- */
@media (max-width: 599px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stage { aspect-ratio: 1 / 0.92; }
  .browser { inset: 9% 0 12% 0; }
  .float-type { right: 0; bottom: 4%; }
  .float-btn { bottom: 0; }
  .float-grid { display: none; }
  .form-footer .btn { width: 100%; }
  .to-top { margin-left: 0; }
}

/* ==========================================================================
   Camada de imersão
   ========================================================================== */

/* Lenis (rolagem suave no desktop) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* Campo magnético de barras na abertura */
.hero-field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero-copy { position: relative; }

/* Palco em 3D: componentes flutuam em profundidades diferentes */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) and (min-width: 1180px) {
  .hero-stage { transform-style: preserve-3d; will-change: transform; }
  .hero-stage .browser { translate: 0 0 0; }
  .float-toggle { translate: 0 0 70px; }
  .float-btn    { translate: 0 0 110px; }
  .float-type   { translate: 0 0 90px; }
  .float-grid   { translate: 0 0 50px; }
}

/* Portal 3D — "Atravessar o código" */
.portal {
  --bg: #050607;
  position: relative;
  height: 440vh;
  background: #050607;
  color: var(--c-white);
}
.portal-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.portal-scene { position: absolute; inset: 0; }
.portal-scene canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity 900ms ease; }
.portal-scene.is-live canvas { opacity: 1; }
.portal-scene.is-live .portal-fallback { opacity: 0; }

/* Alternativa sem WebGL: luz branca, piso em perspectiva e símbolo */
.portal-fallback { position: absolute; inset: 0; transition: opacity 900ms ease; overflow: hidden; }
.pf-glow {
  position: absolute; left: 62%; top: 42%;
  width: 60vmax; height: 60vmax;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(235, 242, 255, 0.16), rgba(235, 242, 255, 0.04) 55%, transparent 75%);
}
.pf-grid {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: perspective(600px) rotateX(64deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
}
.pf-icon {
  position: absolute; left: 66%; top: 40%;
  width: clamp(120px, 17vw, 230px); height: auto;
  transform: translate(-50%, -50%);
  color: #0d0e10;
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.5)) drop-shadow(0 0 40px rgba(235, 242, 255, 0.25));
}
@media (max-width: 899px) { .pf-glow, .pf-icon { left: 50%; top: 34%; } }
.portal-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(5, 6, 7, 0.9) 0%, rgba(5, 6, 7, 0.5) 26%, transparent 52%),
    linear-gradient(to right, rgba(5, 6, 7, 0.7) 0%, rgba(5, 6, 7, 0.3) 32%, transparent 55%);
  pointer-events: none;
}
.portal-content {
  position: relative; z-index: 1;
  display: grid; gap: var(--s-6);
  padding-bottom: clamp(36px, 7vh, 88px);
}
.portal-label { color: rgba(255, 255, 255, 0.55); }
.portal-label .label-index { color: #fff; }

/* Legendas das etapas — sem JS ou com movimento reduzido: lista completa */
.portal-steps { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .portal-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 980px; } .portal-steps .ps:first-child { grid-column: 1 / -1; } }
.ps { display: grid; gap: var(--s-3); align-content: start; max-width: 30ch; }
.ps-title {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 0.95rem + 2.9vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}
.ps:first-child .ps-title { font-size: clamp(2rem, 1rem + 4.4vw, 5.5rem); }
.ps-text { color: rgba(255, 255, 255, 0.68); font-size: var(--fs-body); max-width: 34ch; }

/* Com movimento: uma etapa por vez, trocando por máscara */
.motion .portal-steps { display: block; position: relative; min-height: clamp(220px, 34vh, 340px); max-width: none; }
.motion .portal-steps .ps {
  position: absolute; left: 0; bottom: 0;
  max-width: 34ch;
  opacity: 0;
  transform: translateY(24px);
  clip-path: inset(0 0 100% 0);
  transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out), clip-path 700ms var(--ease-out);
  pointer-events: none;
}
.motion .portal-steps .ps.is-active { opacity: 1; transform: none; clip-path: inset(0 0 -20% 0); pointer-events: auto; }
.motion-ready .portal-steps .ps:first-child { opacity: 1; transform: none; clip-path: none; }

/* Trilha das etapas */
.portal-rail { display: none; }
.motion .portal-rail {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  transition: opacity 400ms ease;
}
.motion .portal-rail span { display: inline-flex; align-items: center; gap: 10px; transition: color 300ms ease; }
.motion .portal-rail i { position: relative; width: 36px; height: 1px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.motion .portal-rail i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(var(--f, 0)); transform-origin: left; }
.motion .portal-rail span.is-on { color: #fff; }
.portal-rail.is-idle { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .portal { height: auto; }
  .portal-sticky { position: relative; min-height: 100svh; }
}
.portal .section-edge { background: #050607; }

/* Faixa em movimento */
.marquee {
  overflow: hidden;
  padding: clamp(24px, 4vw, 56px) 0;
  border-block: 1px solid var(--c-line-on-light);
  background: var(--c-white);
  color: var(--c-black);
  user-select: none;
}
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-group > * {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 6vw, 8.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
  padding-right: clamp(20px, 3vw, 48px);
}
.marquee-group i { font-style: normal; font-weight: 300; transform: skewX(-8deg); display: inline-block; }
.marquee .outline { color: transparent; -webkit-text-stroke: 1.5px var(--c-black); }

/* Projetos: a imagem tem folga para o parallax interno */
.project-card { will-change: transform; }

/* Cursor de leitura (somente mouse) */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor {
    position: fixed; left: 0; top: 0; z-index: 300;
    display: grid; place-items: center;
    width: 14px; height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: #fff;
    mix-blend-mode: difference;
    pointer-events: none;
    opacity: 0;
    transition: width 320ms var(--ease-out), height 320ms var(--ease-out), margin 320ms var(--ease-out), opacity 200ms ease;
  }
  .cursor.is-visible { opacity: 1; }
  .cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .cursor.is-label { width: 112px; height: 112px; margin: -56px 0 0 -56px; }
  .cursor.is-hidden { opacity: 0; }
  .cursor-label {
    font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
    color: #000;
    opacity: 0; transform: scale(0.6);
    transition: opacity 200ms ease, transform 320ms var(--ease-out);
    white-space: nowrap;
  }
  .cursor.is-label .cursor-label { opacity: 1; transform: none; }
}

/* Portal sem animação (movimento reduzido ou sem JS): cena estática em cima, etapas embaixo */
html:not(.motion) .portal { height: auto; }
html:not(.motion) .portal-sticky { position: relative; height: auto; display: block; overflow: visible; }
html:not(.motion) .portal-scene { position: relative; height: min(70vh, 640px); }
html:not(.motion) .portal-shade { display: none; }
html:not(.motion) .portal-content { padding-top: var(--s-8); padding-bottom: var(--section-y); }
html:not(.motion) .ps-title { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); }
html:not(.motion) .ps:first-child .ps-title { font-size: clamp(2rem, 1rem + 3vw, 4rem); }


/* Página de projeto: link para o site, galeria e tela no celular */
.case-live { margin-top: var(--s-3); }
.arrow-out { transform: rotate(-45deg); }
a:hover .arrow-out { transform: rotate(-45deg) translateX(4px) !important; }
.case-gallery {
  display: grid; gap: clamp(32px, 4vw, 56px);
  padding-bottom: var(--section-y);
}
@media (min-width: 1024px) {
  .case-gallery { grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr); align-items: start; }
  .case-gallery .case-phone { grid-row: span var(--case-gallery-rows, 3); position: sticky; top: calc(var(--header-h) + 32px); }
}
.case-shot, .case-phone { display: grid; gap: var(--s-3); margin: 0; }
.case-phone { justify-items: center; }
.phone-frame {
  display: block;
  width: min(100%, 320px);
  padding: 10px;
  border-radius: 44px;
  background: var(--c-black);
  box-shadow: 0 40px 80px -48px rgba(17, 17, 17, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone-frame img { width: 100%; height: auto; border-radius: 34px; display: block; }

/* Enquanto a página se reposiciona (voltar / âncora), o conteúdo fica oculto por um instante */
html.is-restoring main, html.is-restoring .site-footer { opacity: 0; }
main, .site-footer { transition: opacity 260ms ease; }
.request-brief{border:1px solid var(--line);border-radius:10px;padding:18px;margin-bottom:24px}.request-brief summary{cursor:pointer;font-weight:500;font-size:14px}.request-brief summary span,.request-brief>p{color:var(--muted);font-size:12px}.request-brief>p{margin-top:15px}.contact-form select{width:100%;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--fg);padding:12px}.contact-form select option{background:var(--bg);color:var(--fg)}

/* ==========================================================================
   Preferências de cookies
   ========================================================================== */
.footer-cookies {
  padding: 0 0 2px; border: 0; background: none; color: var(--fg);
  font: inherit; cursor: pointer;
}
.footer-cookies[hidden] { display: none; }

.consent {
  position: fixed; left: 16px; bottom: 16px; z-index: 150;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100svh - 32px); overflow: auto; overscroll-behavior: contain;
  padding: 22px 22px 18px;
  background: var(--c-black); color: var(--c-white);
  border: 1px solid var(--c-line-on-dark); border-radius: var(--r-frame-sm);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  font-size: 14px; line-height: 1.55;
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.consent[hidden] { display: none; }
.consent.is-visible { opacity: 1; transform: none; }
.consent-title {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em; margin: 0 0 6px; outline: none;
}
.consent-text { color: var(--c-muted-on-dark); margin: 0; }
.consent-text a { color: var(--c-white); }
.consent-options { margin-top: 16px; border-top: 1px solid var(--c-line-on-dark); }
.consent-options[hidden] { display: none; }
.consent-option {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--c-line-on-dark); cursor: pointer;
}
div.consent-option { cursor: default; }
.consent-option-text { display: grid; gap: 2px; }
.consent-option-text strong { font-weight: 600; font-size: 14px; }
.consent-option-text span { color: var(--c-muted-on-dark); font-size: 12.5px; line-height: 1.45; }
.consent-always { flex: none; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted-on-dark); }
.consent-switch {
  flex: none; appearance: none; -webkit-appearance: none; margin: 0;
  width: 42px; height: 24px; border-radius: 999px; position: relative; cursor: pointer;
  background: var(--c-ink-3); border: 1px solid #3a3a3a;
  transition: background-color var(--t-fast) var(--ease-out);
}
.consent-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--c-muted-on-dark);
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.consent-switch:checked { background: var(--c-white); border-color: var(--c-white); }
.consent-switch:checked::after { transform: translateX(18px); background: var(--c-black); }
.consent-switch:focus-visible { outline: 2px solid var(--c-white); outline-offset: 3px; }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.consent-actions .btn { flex: 1 1 0; min-height: 42px; }
.consent-actions .btn[hidden] { display: none; }
.consent-custom {
  flex-basis: 100%; justify-self: start; text-align: left;
  border: 0; background: none; padding: 4px 0 2px; margin-top: 2px;
  color: var(--c-muted-on-dark); font: inherit; font-size: 13px; cursor: pointer;
  width: max-content;
}
.consent-custom:hover { color: var(--c-white); }
.consent-custom[hidden] { display: none; }
.consent.is-expanded .consent-actions .btn-secondary { flex: 1 1 calc(50% - 5px); }
.consent.is-expanded .consent-actions .btn-primary { flex-basis: 100%; order: -1; }
@media (max-width: 599px) {
  .consent { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 18px 18px 14px; }
}

/* ---------- Política de privacidade ---------- */
.policy-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px;
  margin: var(--s-6) 0 0; border: 1px solid var(--line); border-radius: var(--r-frame-sm);
  overflow: hidden; background: var(--line);
}
.policy-summary div { background: var(--bg); padding: 18px 20px; }
.policy-summary dt { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.policy-summary dd { margin: 0; font-size: 15px; line-height: 1.5; }
.policy-toc { margin: var(--s-6) 0 0; padding: 0; list-style: none; columns: 2 220px; column-gap: var(--s-6); }
.policy-toc li { break-inside: avoid; padding: 6px 0; font-size: 15px; }
.policy-toc a { color: var(--fg); }
.policy-toc span { color: var(--muted); font-feature-settings: "tnum"; margin-right: 8px; }
.text-page h2 { scroll-margin-top: calc(var(--header-h) + 24px); }
.text-page h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: var(--s-5) 0 var(--s-2); }
.text-page p + p { margin-top: var(--s-3); }
.text-page ul.policy-list { margin: var(--s-3) 0 0; padding: 0; list-style: none; max-width: 65ch; color: #333; }
.text-page ul.policy-list li { position: relative; padding: 6px 0 6px 22px; }
.text-page ul.policy-list li::before { content: "/"; position: absolute; left: 0; color: var(--muted); }
.policy-table-wrap { overflow-x: auto; margin-top: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-frame-sm); }
.policy-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.policy-table th, .policy-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.policy-table tr:last-child td { border-bottom: 0; }
.policy-table th { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
.policy-table code { font-size: 13px; background: var(--soft); padding: 2px 6px; border-radius: 4px; }
.to-fill { background: #fff1a8; color: #111; padding: 1px 6px; border-radius: 4px; font-weight: 500; }
.policy-actions { margin-top: var(--s-4); }
.text-page .policy-list + p, .policy-table-wrap + p { margin-top: var(--s-4); }
