*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #1c1d20;
  --paper: #ffffff;
  --muted: #999d9e;
  /* Tema (claro por padrão; o escuro sobrescreve em html[data-theme="dark"]) */
  --fg: var(--ink);          /* texto principal nas seções de fundo --paper */
  --line: #e3e3e3;           /* linhas divisórias */
  --line-strong: #c9cbcc;    /* contorno dos botões */
  --text-2: #4a4d50;         /* texto de parágrafo */
  --text-3: #6b6e70;         /* texto secundário */
  --surface: #f1f1f1;        /* caixas e fundos de destaque */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  /* Proporção da foto do hero e altura mínima dela na tela (sobrescritas no HTML) */
  --hero-ratio: 1.5;
  --hero-h: 100svh;
}

html { -webkit-text-size-adjust: 100%; }
/* Esconde a barra de rolagem (como no site original); a rolagem continua funcionando */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: #0e0f10;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  transition: transform 0.9s var(--ease-in-out) 0.15s;
}
.loader.is-done { transform: translateY(-100%); }
.loader__word { display: flex; align-items: center; gap: 0.6rem; font-size: clamp(2rem, 4.5vw, 3.6rem); }
.loader__word .dot { width: 0.28em; height: 0.28em; border-radius: 50%; background: #fff; }
.loader__curve { position: absolute; top: 100%; left: 0; width: 100%; height: 12vh; fill: var(--ink); transition: height 0.9s var(--ease-in-out) 0.15s; }
.loader.is-done .loader__curve { height: 0; }

/* ---------- Tema escuro (botão no menu da bolinha, menu.js) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121315;
  --fg: #ececec;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.3);
  --text-2: #b9bcbf;
  --text-3: #8e9295;
  --surface: #1e1f22;
}
/* Transição suave das cores só durante a troca de tema */
html.theme-anim, html.theme-anim *:not(.theme-toggle, .theme-toggle *), html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, fill 0.5s ease, stroke 0.5s ease !important;
}

/* ---------- Interruptor PT / EN (i18n.js) ---------- */
html.i18n-wait body { visibility: hidden; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 0; padding: 0.4rem 0; color: inherit; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.lang-switch__opt { opacity: 0.45; transition: opacity 0.3s; }
.lang-switch[aria-checked="false"] .lang-switch__opt:first-child,
.lang-switch[aria-checked="true"] .lang-switch__opt:last-child { opacity: 1; }
.lang-switch__track {
  position: relative; width: 2.3rem; height: 1.25rem; border-radius: 999px;
  border: 1px solid currentColor; opacity: 0.9;
}
.lang-switch__knob {
  position: absolute; top: 50%; left: 0.2rem; width: 0.75rem; height: 0.75rem; border-radius: 50%;
  background: currentColor; translate: 0 -50%; transition: transform 0.35s var(--ease-out);
}
.lang-switch[aria-checked="true"] .lang-switch__knob { transform: translateX(1.05rem); }
.lang-switch:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.nav__links .lang-switch { margin-left: clamp(0.4rem, 1vw, 1rem); }
.mmenu__social .lang-switch { font-size: 0.95rem; }
.mmenu__prefs { display: flex; align-items: center; gap: 1.6rem; margin-top: 1.8rem; }

/* Botão de tema: sol (claro) <-> lua (escuro) */
.theme-toggle {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; background: none; color: #fff; cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
}
.theme-toggle:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.theme-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.theme-toggle svg { width: 1.3rem; height: 1.3rem; overflow: visible; transition: transform 0.6s var(--ease-out); }
.theme-toggle__core { fill: currentColor; transform-box: view-box; transform-origin: 12px 12px; transition: transform 0.6s var(--ease-out); }
.theme-toggle__cut { transform: translate(12px, -12px); transition: transform 0.6s var(--ease-out); }
.theme-toggle__rays {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  transform-box: view-box; transform-origin: 12px 12px; transition: transform 0.6s var(--ease-out), opacity 0.35s;
}
/* Lua: o círculo cresce, a "mordida" entra e os raios giram e somem */
.theme-toggle.is-dark svg { transform: rotate(-20deg); }
html[data-theme="dark"] .mmenu__ball { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 6px 20px rgba(0, 0, 0, 0.4); }
.theme-toggle.is-dark .theme-toggle__core { transform: scale(1.7); }
.theme-toggle.is-dark .theme-toggle__cut { transform: translate(0, 0); }
.theme-toggle.is-dark .theme-toggle__rays { transform: rotate(90deg) scale(0.4); opacity: 0; }

/* Animação das letras ao trocar de língua (i18n.js) */
.ls-w { white-space: nowrap; }
.ls-c {
  display: inline-block; position: relative;
  /* recorta acima e abaixo da letra: a antiga some subindo, a nova surge de baixo */
  clip-path: inset(-0.12em -0.5em -0.06em -0.5em);
}
.ls-n { display: inline-block; transform: translateY(130%); will-change: transform; }
.ls-o { position: absolute; left: 0; top: 0; white-space: pre; will-change: transform; }

/* ---------- Menu flutuante (menu.js) ---------- */
html.mmenu-lock { overflow: hidden; }
.mmenu__ball {
  position: fixed; top: 24px; right: 24px; z-index: 92;
  width: 84px; height: 84px; border: 0; border-radius: 50%;
  background: var(--ink); color: #fff; cursor: pointer; overflow: hidden; isolation: isolate;
  display: grid; place-items: center;
  transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0);
  transition: transform 0.45s var(--ease-out), background-color 0.4s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.mmenu.is-visible .mmenu__ball { transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1); }
.mmenu__fill {
  position: absolute; left: -10%; top: 100%; z-index: -1; width: 120%; height: 200%;
  border-radius: 50%; background: #455ce9; transition: top 0.6s var(--ease-in-out);
}
.mmenu__ball:hover .mmenu__fill, .mmenu.is-open .mmenu__fill { top: -50%; }
.mmenu__ball:focus-visible { outline: 2px solid #455ce9; outline-offset: 4px; }
.mmenu__icon { display: grid; gap: 6px; width: 26px; transition: transform 0.3s var(--ease-out); }
/* Medidas inteiras: as duas linhas ficam com a mesma espessura */
.mmenu__icon i { display: block; height: 1px; background: currentColor; transition: transform 0.4s var(--ease-out); }
.mmenu.is-open .mmenu__icon i:first-child { transform: translateY(3.5px) rotate(45deg); }
.mmenu.is-open .mmenu__icon i:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mmenu__overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease-in-out);
}
.mmenu.is-open .mmenu__overlay { opacity: 1; pointer-events: auto; }
.mmenu__panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(640px, 100vw); background: var(--ink); color: #fff;
  transform: translateX(calc(100% + 12vw)); transition: transform 0.8s var(--ease-in-out);
}
.mmenu.is-open .mmenu__panel { transform: translateX(0); }
/* Borda curva à esquerda do painel: achata quando ele termina de entrar */
.mmenu__curve {
  position: absolute; top: 0; right: calc(100% - 1px); width: 12vw; height: 100%; fill: var(--ink);
  transform-origin: right center; transition: transform 0.8s var(--ease-in-out);
}
.mmenu.is-open .mmenu__curve { transform: scaleX(0); }
.mmenu__inner {
  height: 100%; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(6rem, 16vh, 9rem) clamp(2rem, 10%, 6rem) clamp(2.5rem, 7vh, 4rem); overflow-y: auto;
}
.mmenu__label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.5);
  padding-bottom: 1.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.mmenu__label--plain { border: 0; padding-bottom: 1rem; }
.mmenu__links { display: grid; margin-top: clamp(2rem, 6vh, 3.5rem); }
.mmenu__links a {
  position: relative; width: fit-content;
  font-size: clamp(2.6rem, 5.4vw, 4.2rem); line-height: 1.3; letter-spacing: -0.02em;
}
.mmenu__links a::before {
  content: ""; position: absolute; left: -1.6rem; top: 50%; width: 0.6rem; height: 0.6rem;
  border-radius: 50%; background: #fff; transform: translateY(-50%) scale(0);
  transition: transform 0.3s var(--ease-out);
}
.mmenu__links a:hover::before, .mmenu__links a.is-current::before, .mmenu__links a:focus-visible::before { transform: translateY(-50%) scale(1); }
.mmenu__links a:focus-visible { outline: none; }
.mmenu__social { margin-top: 3rem; }
.mmenu__social div { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.mmenu__social a:hover { color: #8fa0ff; }
@media (prefers-reduced-motion: reduce) {
  .mmenu__panel, .mmenu__curve, .mmenu__overlay, .mmenu__ball { transition-duration: 0.01s; }
}

/* ---------- Transição entre páginas ---------- */
html.pt-hold::after { content: ""; position: fixed; inset: 0; z-index: 199; background: var(--ink); }
.pt {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  transform: translateY(100%);
  transition: transform 0.8s var(--ease-in-out);
  pointer-events: none;
}
.pt.is-covering { transform: translateY(0); pointer-events: auto; }
.pt.is-leaving { transform: translateY(-100%); }
.pt.is-static, .pt.is-static * { transition: none !important; }
.pt__curve { position: absolute; left: 0; width: 100%; fill: var(--ink); transition: height 0.8s var(--ease-in-out); }
.pt__curve--top { bottom: 100%; height: 14vh; }
.pt__curve--bottom { top: 100%; height: 14vh; }
.pt.is-covering .pt__curve--top { height: 0; }
.pt.is-leaving .pt__curve--bottom { height: 0; }
.pt__label {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.4s 0.3s, transform 0.6s var(--ease-out) 0.3s;
}
.pt__label .dot { width: 0.28em; height: 0.28em; border-radius: 50%; background: #fff; }
.pt.is-covering .pt__label { opacity: 1; transform: none; }
.pt.is-leaving .pt__label { opacity: 0; transform: translateY(-20px); transition: opacity 0.3s, transform 0.6s var(--ease-in-out); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(1.2rem, 2.6vw, 2.2rem) clamp(1.2rem, 4vw, 3.6rem);
  color: #fff; font-size: 1rem;
  mix-blend-mode: normal;
  transition: opacity 0.4s, transform 0.6s var(--ease-out);
}
.nav.is-hidden { opacity: 0; transform: translateY(-120%); pointer-events: none; }
.nav__logo { display: flex; gap: 0.4rem; align-items: center; }
.nav__copy { display: inline-block; transition: transform 0.6s var(--ease-out); }
.nav__logo:hover .nav__copy { transform: rotate(360deg); }
/* Os dois textos ficam empilhados na mesma célula: a largura é a do maior, nada é cortado */
.nav__roll { position: relative; overflow: hidden; display: inline-grid; white-space: nowrap; }
.nav__roll > span { grid-area: 1 / 1; }
.nav__roll-a, .nav__roll-b { transition: transform 0.6s var(--ease-out); }
.nav__roll-b { transform: translateX(110%); }
.nav__logo:hover .nav__roll-a { transform: translateX(-110%); }
.nav__logo:hover .nav__roll-b { transform: translateX(0); }
.nav__links { display: flex; gap: clamp(1.2rem, 2.6vw, 2.6rem); }
.nav__links a { position: relative; padding: 0.4rem 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 50%; bottom: -0.35rem; width: 5px; height: 5px;
  border-radius: 50%; background: currentColor; transform: translateX(-50%) scale(0);
  transition: transform 0.25s var(--ease-out);
}
.nav__links a:hover::after { transform: translateX(-50%) scale(1); }

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero__sticky {
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden; background: #0e0f10;
}

/*
  hero.webp = 2560x1200: as 1200 linhas de cima da foto original (1280x1920, sem upscale),
  com as laterais estendidas e desfocadas para telas largas.
  Altura renderizada = 125svh  ->  a foto inteira equivaleria a 200svh,
  então a cabeça (~260px de 1920) ocupa ~27% da altura da tela, cortando na cintura.
*/
.stage {
  position: absolute; left: 50%; top: 0;
  width: max(100vw, calc(var(--hero-h) * var(--hero-ratio)));
  aspect-ratio: var(--hero-ratio);
  transform: translateX(-50%);
  will-change: transform;
}
.stage__img { width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }

/* UI sobre o hero */
.hero__ui { position: absolute; inset: 0; color: #fff; pointer-events: none; will-change: opacity, transform; }
.hero__ui > * { pointer-events: auto; }

.location {
  position: absolute; left: 0; top: 36%;
  display: flex; align-items: center; gap: 2.2rem;
  padding: 1.5rem 1.5rem 1.5rem clamp(1.2rem, 4vw, 3.6rem);
  background: var(--ink);
  border-radius: 0 999px 999px 0;
  font-size: 1.05rem; line-height: 1.35;
}
.location__globe {
  display: grid; place-items: center;
  width: 4.6rem; height: 4.6rem; border-radius: 50%; background: var(--muted);
}
.location__globe svg { width: 2.4rem; fill: none; stroke: #fff; stroke-width: 1.2; animation: spin 10s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.role { position: absolute; right: clamp(1.2rem, 8vw, 9rem); top: 30%; font-size: clamp(1.4rem, 2.2vw, 2.1rem); line-height: 1.25; }
.role__arrow { width: 1.1rem; margin: 0 0 2.4rem 1.6rem; fill: none; stroke: #fff; stroke-width: 1.4; }

.marquee {
  position: absolute; left: 0; right: 0; bottom: 3vh;
  overflow: hidden; white-space: nowrap; pointer-events: none;
}
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__track span {
  font-size: clamp(6rem, 15vw, 17rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1;
  padding-right: 0.25em;
}

/* ---------- About (placeholder) ---------- */
.about { position: relative; z-index: 2; background: var(--paper); border-radius: 0; }
.about__inner {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(5rem, 14vh, 11rem) clamp(1.2rem, 4vw, 3.6rem);
  display: grid; grid-template-columns: 2.2fr 1fr; gap: 4rem; align-items: start;
}
.about h2 { font-size: clamp(1.6rem, 2.7vw, 2.6rem); font-weight: 400; line-height: 1.3; }
.about p { font-size: 1.05rem; line-height: 1.6; color: var(--text-2); padding-top: 0.6rem; }

/* ---------- Trabalhos recentes ---------- */
.work { position: relative; z-index: 2; background: var(--paper); }
.work__inner {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) clamp(1.2rem, 4vw, 3.6rem) clamp(6rem, 16vh, 12rem);
}
.work__label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 2.4rem;
}
.work__list { list-style: none; border-bottom: 1px solid var(--line); }
.work__list li { border-top: 1px solid var(--line); }

.project {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem 3rem; align-items: center;
  padding: clamp(2.2rem, 5vw, 4rem) clamp(0.5rem, 4vw, 5rem);
  transition: opacity 0.4s var(--ease-out);
}
.project__media { display: none; }
.project__main { display: flex; flex-direction: column; gap: 0.9rem; transition: transform 0.4s var(--ease-out); }
.project__title { font-size: clamp(2.2rem, 5.6vw, 5.4rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1; }
.project__desc { max-width: 38rem; font-size: 1rem; line-height: 1.55; color: var(--text-3); }
.project__meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem;
  font-size: 1rem; text-align: right; white-space: nowrap;
  transition: transform 0.4s var(--ease-out);
}
.project__meta span { color: var(--muted); font-size: 0.9rem; }

@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .work__list:hover .project { opacity: 0.35; }
  .work__list .project:hover { opacity: 1; }
  .project:hover .project__main { transform: translateX(-10px); }
  .project:hover .project__meta { transform: translateX(10px); }
  .project { cursor: none; }
}
.project:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; }

/* Prévia flutuante */
.preview, .preview-cursor {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s var(--ease-out);
}
.preview { width: 400px; height: 350px; overflow: hidden; }
.preview.is-on, .preview-cursor.is-on { transform: translate(-50%, -50%) scale(1); }
.preview__slider { height: 100%; transition: transform 0.5s var(--ease-in-out); }
.preview__slide { display: grid; place-items: center; width: 100%; height: 100%; background: var(--bg); }
.preview__slide img { width: 82%; height: auto; max-height: 82%; object-fit: cover; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.preview-cursor {
  display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%;
  background: #455ce9; color: #fff; font-size: 0.95rem;
}

/* Botão "pill" com preenchimento que sobe */
.work__more { display: flex; justify-content: center; margin-top: clamp(3rem, 8vh, 5rem); }
.pill {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 1.6rem 3.4rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 1rem;
  transition: color 0.4s var(--ease-out), border-color 0.4s;
}
/* Elipse proporcional ao botão (120% da largura x 200% da altura):
   centrada nele, cobre os quatro cantos em qualquer proporção */
.pill__fill {
  position: absolute; left: -10%; top: 100%; z-index: -1; width: 120%; height: 200%;
  border-radius: 50%; background: #455ce9;
  transition: top 0.6s var(--ease-in-out);
}
.pill:hover { color: #fff; border-color: #455ce9; }
.pill:hover .pill__fill { top: -50%; }

.pill { display: inline-block; }
/* Seta de link externo desenhada em SVG (o caractere ↗ vira emoji no celular) */
.pill[target="_blank"] .pill__label::after {
  content: ""; display: inline-block; width: 0.72em; height: 0.72em; margin-left: 0.45em; vertical-align: -0.02em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 10L10 2M3.5 2H10V8.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 10L10 2M3.5 2H10V8.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pill--dark { background: var(--fg); border-color: var(--fg); color: var(--paper); }

/* ---------- Página de projeto ---------- */
body.is-case { background: var(--paper); }
/* Páginas internas: o menu fica só no topo e rola junto com a página */
.nav--dark { position: absolute; color: var(--fg); background: transparent; }
.case { --pad: clamp(1.2rem, 4vw, 3.6rem); }
.case__head { max-width: 1200px; margin: 0 auto; padding: clamp(8rem, 22vh, 13rem) var(--pad) clamp(3rem, 8vh, 5rem); }
.case__title { font-size: clamp(3rem, 9vw, 8.5rem); font-weight: 400; letter-spacing: -0.04em; line-height: 0.95; }
.case__info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: clamp(3rem, 8vh, 6rem); }
.case__info > div { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.case__info dt, .case__label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.case__info dd { margin-top: 1.2rem; font-size: 1.1rem; line-height: 1.4; }

.case__media {
  display: grid; place-items: center; background: var(--bg);
  padding: clamp(2rem, 7vw, 7rem) var(--pad);
  min-height: 60vh;
}
.case__media.is-cover { padding: 0; }
.case__video, .case__img { width: min(1100px, 100%); height: auto; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25); }
.case__img.is-cover { width: 100%; height: min(80vh, 56vw); object-fit: cover; box-shadow: none; }
.case__video.is-phone { width: min(340px, 80vw); border-radius: 28px; border: 8px solid #111; }

.case__body {
  max-width: 1200px; margin: 0 auto; padding: clamp(4rem, 12vh, 8rem) var(--pad) 0;
  display: grid; grid-template-columns: 1fr 2.2fr; gap: 3rem;
}
.case__text { display: grid; gap: 1.3rem; font-size: 1.1rem; line-height: 1.65; color: var(--text-2); }
.case__lead { font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.3; color: var(--fg); }
.case__list { list-style: none; display: grid; }
.case__list li { padding: 1.1rem 0; border-top: 1px solid var(--line); color: var(--fg); }
.case__list li:last-child { border-bottom: 1px solid var(--line); }
.case__note { font-size: 0.98rem; padding: 1.2rem 1.4rem; background: var(--surface); border-radius: 12px; }
.case__credits { font-size: 0.9rem; color: var(--muted); }
.case__links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.case__links .pill { padding: 1.3rem 2.4rem; }

.case__extra { max-width: 1200px; margin: 0 auto; padding: clamp(4rem, 12vh, 8rem) var(--pad) 0; }
.case__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.case__stats div { border-top: 1px solid var(--fg); padding-top: 1.4rem; display: grid; gap: 0.5rem; align-content: start; }
.case__stats strong { font-size: clamp(2.6rem, 5.5vw, 5rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1; }
.case__stats span { color: var(--text-3); }
.case__steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.case__steps li { border-top: 1px solid var(--fg); padding-top: 1.4rem; }
.case__num { font-size: 0.85rem; color: var(--muted); }
.case__steps h3 { font-size: 1.6rem; font-weight: 400; margin: 0.8rem 0 0.7rem; }
.case__steps p { color: var(--text-2); line-height: 1.55; }
.case__table { overflow-x: auto; }
.case__table table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.case__table caption { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-bottom: 1.4rem; }
.case__table th, .case__table td { text-align: left; padding: 1.1rem 1.4rem 1.1rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.case__table th { font-weight: 500; border-bottom-color: var(--fg); }

.case__gallery {
  max-width: 1200px; margin: 0 auto; padding: clamp(4rem, 12vh, 8rem) var(--pad) 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem;
}
.case__gallery figure { display: grid; gap: 0.9rem; }
.case__gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg); padding: 6%; }
.case__gallery figcaption { font-size: 0.9rem; color: var(--muted); }

.case__next {
  display: grid; justify-items: center; gap: 1.6rem; text-align: center;
  margin-top: clamp(6rem, 16vh, 11rem); padding: clamp(4rem, 10vh, 7rem) var(--pad);
  border-top: 1px solid var(--line);
}
.case__next-title { font-size: clamp(2.6rem, 7vw, 6.5rem); letter-spacing: -0.03em; line-height: 1; transition: transform 0.5s var(--ease-out); }
.case__next-thumb { display: grid; place-items: center; width: min(420px, 80vw); aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.case__next-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.case__next:hover .case__next-title { transform: translateY(-6px); }
.case__next:hover .case__next-thumb img { transform: scale(1.05); }

/* ---------- Página Sobre (sobre.html) ---------- */
.about-page { --pad: clamp(1.2rem, 4vw, 3.6rem); background: var(--paper); }
.about-page > section { max-width: 1200px; margin-inline: auto; padding-inline: var(--pad); }
.ab-head { padding-top: clamp(8rem, 22vh, 13rem); }
.ab-title { font-size: clamp(3rem, 7.5vw, 7rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.02; }

.ab-intro {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(3rem, 8vw, 8rem); align-items: start;
  margin-top: clamp(4rem, 12vh, 8rem); border-top: 1px solid var(--line); padding-top: clamp(4rem, 10vh, 7rem);
}
.ab-intro__text { display: grid; gap: 2rem; padding-top: 1rem; }
.ab-arrow { width: 1.1rem; fill: none; stroke: var(--fg); stroke-width: 1.4; }
.ab-lead { font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.6; }
.ab-small { font-size: 0.98rem; line-height: 1.6; color: var(--text-3); }
.ab-photo { position: relative; }

/* Pilha de fotos arrastável (pilha-fotos.js) */
.swipe-stack { position: relative; z-index: 1; perspective: 1000px; padding: 5rem 0 1rem; }
.swipe-stack__cards {
  z-index: 1;
  position: relative; width: 50%; aspect-ratio: 2 / 3; margin: 0 auto;
  touch-action: pan-y;
}
.swipe-card {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 1.4rem; user-select: none; -webkit-user-drag: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transform-origin: 50% 50%; will-change: transform; background: var(--surface);
}
.swipe-card.is-top { cursor: grab; touch-action: none; }
.swipe-card.is-dragging { cursor: grabbing; }
.swipe-card:focus-visible { outline: 2px solid var(--fg); outline-offset: 6px; }
.swipe-stack__hint { text-align: center; margin: 2.5rem 0 0; font-size: 0.85rem; color: var(--muted); }

.ab-services { margin-top: clamp(6rem, 16vh, 11rem); }
.ab-services__title { font-size: clamp(2.2rem, 4.5vw, 4rem); font-weight: 400; letter-spacing: -0.03em; }
.ab-services__list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); margin-top: clamp(3rem, 8vh, 5rem); }
.ab-services__list li { border-top: 1px solid var(--line); padding-top: 2rem; }
.ab-num { font-size: 0.9rem; color: var(--muted); }
.ab-services__list h3 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); font-weight: 400; letter-spacing: -0.02em; margin: 1.8rem 0 1.4rem; }
.ab-services__list p { line-height: 1.65; color: var(--text-2); }

.ab-award {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(3rem, 8vw, 8rem); align-items: center;
  margin-top: clamp(6rem, 16vh, 11rem); padding-bottom: clamp(7rem, 18vh, 12rem);
}
/* Fotos do Porto Hack: pilha com cartões quadrados + selo "2º lugar" */
.swipe-stack--square .swipe-stack__cards { width: 62%; aspect-ratio: 1; }
.award-badge {
  position: absolute; top: 2rem; right: 6%; z-index: 2; pointer-events: none;
  display: grid; place-items: center; align-content: center; width: 5.4rem; aspect-ratio: 1; border-radius: 50%;
  background: #455ce9; color: #fff; rotate: -10deg; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}
.award-badge b { font-size: 1.9rem; font-weight: 500; line-height: 1; letter-spacing: -0.03em; }
.award-badge small { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em; }
.ab-award__text { display: grid; gap: 1.6rem; }
.ab-award__text h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; }
.ab-award__text h2 span { color: var(--muted); }
.ab-award__text p { line-height: 1.65; color: var(--text-2); font-size: 1.05rem; }
.ab-award__meta { font-size: 0.95rem !important; color: var(--text-3) !important; }

@media (max-width: 860px) {
  .ab-intro, .ab-award { grid-template-columns: 1fr; }
  .ab-services__list { grid-template-columns: 1fr; }
}

/* ---------- Página de contato (contato.html) ---------- */
body.is-contact { background: var(--ink); }
body.is-contact .nav { position: absolute; }
.nav__links a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }
.cpage__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
.cpage__title { font-size: clamp(3rem, 7vw, 6.6rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; }
.cpage__side { display: grid; justify-items: end; gap: clamp(3rem, 8vh, 5rem); flex-shrink: 0; }
.cpage__avatar { width: clamp(5.5rem, 9vw, 8.5rem); aspect-ratio: 1; border-radius: 50%; overflow: hidden; }
.cpage__avatar img { width: 100%; height: 100%; object-fit: cover; }
.cpage__arrow { width: 1.1rem; fill: none; stroke: #fff; stroke-width: 1.4; }

.cpage__grid { display: grid; grid-template-columns: 2.2fr 1fr; gap: clamp(3rem, 8vw, 8rem); margin-top: clamp(5rem, 12vh, 8rem); }
.cform__field {
  display: grid; grid-template-columns: clamp(2.6rem, 5vw, 4.5rem) 1fr; row-gap: 1rem;
  padding: clamp(2rem, 4vh, 2.8rem) 0; border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.cform__num { grid-row: span 2; font-size: 0.85rem; color: rgba(255, 255, 255, 0.45); padding-top: 0.5rem; }
.cform__q { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.cform input, .cform textarea {
  width: 100%; background: none; border: 0; outline: 0; color: #fff;
  font: inherit; font-size: 1.15rem; padding: 0.3rem 0; resize: none;
  color-scheme: dark;
  /* Se o navegador tentar pintar o campo (preenchimento automático, colar sugestão do teclado),
     a troca de cor leva dias e nunca aparece: o campo continua escuro com texto branco */
  transition: background-color 600000s 0s, color 600000s 0s;
}
.cform textarea { min-height: 2.2rem; overflow: hidden; }
/* Preenchimento automático do navegador: mantém o fundo escuro e o texto branco */
.cform input:-webkit-autofill,
.cform input:-webkit-autofill:hover,
.cform input:-webkit-autofill:focus,
.cform textarea:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px var(--ink) inset;
  box-shadow: 0 0 0 1000px var(--ink) inset;
  transition: background-color 9999s ease-out 0s;
}
.cform input:autofill { background: transparent; }
.cform ::placeholder { color: rgba(255, 255, 255, 0.35); }
.cform__field:focus-within .cform__q { color: #8fa0ff; }
.cform__field.is-invalid { border-top-color: #ff6b6b; }
.cform__field.is-invalid .cform__q::after { content: " *"; color: #ff6b6b; }
.cform__status { min-height: 1.5rem; margin-top: 1rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.7); }
.cform__send { margin-top: clamp(5rem, 12vh, 7rem); }
button.contact__cta { border: 0; font: inherit; font-size: 1.15rem; cursor: pointer; }
button.contact__cta:focus-visible, .contact__cta:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.cpage__details { display: grid; align-content: start; gap: 3rem; padding-top: 0.6rem; font-size: 1.02rem; }
.cpage__details ul { list-style: none; display: grid; gap: 0.55rem; }
.cpage__details a { position: relative; }
.cpage__details a:hover { color: #8fa0ff; }

@media (max-width: 860px) {
  .cpage__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cpage__head { flex-direction: column-reverse; }
  .cpage__title br { display: none; }
  .cpage__side { justify-items: start; }
  .cpage__arrow { display: none; }
  .cform__send { margin-bottom: 5rem; }
}

/* ---------- Contato (rodapé de todas as páginas) ---------- */
.contact { position: relative; background: var(--ink); color: #fff; overflow: hidden; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
/* Borda curva da seção branca acima, que achata conforme o rodapé aparece */
.contact__curve { position: absolute; inset: 0 0 auto 0; height: calc(var(--curve, 1) * 12vh); pointer-events: none; }
.contact__curve span {
  position: absolute; left: -25%; bottom: 0; width: 150%; height: 1000%;
  background: var(--paper); border-radius: 0 0 50% 50%;
}
/* Ocupa a tela inteira; a barra de baixo fica colada no fim */
.contact__inner {
  position: relative; width: 100%; max-width: 1200px; margin: 0 auto; flex: 1;
  display: flex; flex-direction: column;
  padding: clamp(9rem, 22vh, 14rem) clamp(1.2rem, 4vw, 3.6rem) 2rem;
}
.contact__head { position: relative; }
.contact__title {
  font-size: clamp(3rem, 7vw, 6.6rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05;
  padding-right: 4rem;
}
.contact__avatar {
  display: inline-block; vertical-align: middle; overflow: hidden; border-radius: 50%;
  width: 0.95em; height: 0.95em; margin: -0.15em 0.25em 0 0;
}
.contact__avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact__arrow {
  position: absolute; right: 0; bottom: 0.4rem; width: 1.1rem;
  fill: none; stroke: #fff; stroke-width: 1.4;
}

.contact__line { position: relative; margin: clamp(4rem, 10vh, 6rem) 0 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.contact__cta {
  position: absolute; right: clamp(1rem, 12vw, 11rem); top: 0; translate: 0 -50%;
  display: grid; place-items: center; width: clamp(9.5rem, 14vw, 12.5rem); aspect-ratio: 1;
  border-radius: 50%; background: #455ce9; color: #fff; overflow: hidden; isolation: isolate;
  font-size: 1.05rem; text-align: center; will-change: transform;
}
.contact__cta .pill__fill { background: #334bd3; }
.contact__cta:hover .pill__fill { top: -50%; }
.contact__cta-label { display: block; padding: 0 1.4rem; will-change: transform; }

.contact__pills { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: clamp(3rem, 8vh, 5rem); }
.contact__pills .pill { padding: 1.5rem 2.6rem; border-color: rgba(255, 255, 255, 0.3); }

.contact__bar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap;
  margin-top: auto; padding-top: clamp(6rem, 16vh, 10rem); font-size: 0.95rem;
}
.contact__meta { display: flex; gap: clamp(2rem, 5vw, 4rem); flex-wrap: wrap; }
.contact__label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45); margin-bottom: 0.9rem;
}
.contact__socials { display: flex; gap: 1.6rem; }
.contact__socials a { position: relative; }
.contact__socials a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.25rem; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.contact__socials a:hover::after { transform: scaleX(1); transform-origin: left; }

@media (max-width: 760px) {
  .contact__curve { height: calc(var(--curve, 1) * 6vh); }
  .contact__title { padding-right: 0; }
  .contact__arrow { display: none; }
  .contact__cta { right: 1.2rem; width: 8.5rem; font-size: 0.95rem; }
  .contact__pills { flex-direction: column; margin-top: 7rem; }
  .contact__pills .pill { text-align: center; padding: 1.3rem 1rem; overflow-wrap: anywhere; }
  .contact__bar { flex-direction: column-reverse; align-items: flex-start; }
}

@media (max-width: 760px) {
  .case__info, .case__stats, .case__steps, .case__body { grid-template-columns: 1fr; }
  .case__info { gap: 0; }
  .case__info > div { padding: 1.2rem 0; }
  .case__info dd { margin-top: 0.5rem; }
  .case__body { gap: 1.4rem; }
  .case__media { min-height: 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav__links { gap: 1rem; font-size: 0.95rem; }
  .location { top: auto; bottom: 32%; padding: 1rem 1rem 1rem 1.2rem; gap: 1rem; font-size: 0.9rem; }
  .location__globe { width: 3.2rem; height: 3.2rem; }
  .location__globe svg { width: 1.7rem; }
  .role { top: auto; bottom: 18%; left: 1.2rem; right: auto; font-size: 1.35rem; }
  .role__arrow { margin-bottom: 1rem; }
  .marquee { bottom: 2vh; }
  .marquee__track span { font-size: 26vw; }
  .about__inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Sem mouse: cartões com a imagem no lugar da prévia flutuante */
@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .preview, .preview-cursor { display: none; }
  .project { grid-template-columns: 1fr; padding: 2rem 0; }
  .project__media { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--bg); margin-bottom: 0.6rem; }
  .project__media img { width: 84%; max-height: 84%; object-fit: cover; }
  .project__title { font-size: clamp(2rem, 9vw, 3rem); }
  .project__meta { flex-direction: row; justify-content: space-between; align-items: baseline; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .location__globe svg { animation: none; }
  .loader, .loader__curve { transition-duration: 0.01s; }
}

@media (max-width: 760px) {
  .mmenu__ball { width: 64px; height: 64px; top: 16px; right: 16px; }
}

/* Celular: o topo mostra só o logo e o interruptor PT/EN; a navegação fica na bola de menu */
@media (max-width: 760px) {
  .nav__links > a { display: none; }
  .nav__links .lang-switch { margin-left: 0; }
  .nav { padding-right: 96px; } /* espaço para a bola de menu (64px + margens) */
}
.cform.is-sending .contact__cta { opacity: 0.6; cursor: progress; }
