Files
portifolio-evandrodevbr/app/globals.css
T
Evandro Fonseca Junior 318a764190 perf(movimento): sem tela vazia, passagens em CSS e vitrine leve
Projetos sobem sobre o palco do hero e o celular tem hero de uma tela sem mergulho; passagens com animation-timeline em CSS, sem GSAP nem motion; troca da vitrine sem texto duplicado; moldura de celular só com pôster e scrub reencodado em 960 px (9,4 para 5,2 MB); 3D monta na primeira interação e para quando parado; transição entre páginas do mesmo segmento; foco em anel duplo; texto de 15 px no celular; código morto removido.
2026-10-14 14:15:50 -03:00

1484 lines
32 KiB
CSS

@import "tailwindcss";
@config "../tailwind.config.js";
@theme {
/* Literal values only: var() indirection here stops Tailwind v4 from generating *-sp-* utilities. */
--spacing-sp-1: 4px;
--spacing-sp-2: 8px;
--spacing-sp-3: 12px;
--spacing-sp-4: 16px;
--spacing-sp-5: 20px;
--spacing-sp-6: 24px;
--spacing-sp-8: 32px;
--spacing-sp-10: 40px;
--spacing-sp-12: 48px;
--spacing-sp-16: 64px;
--spacing-sp-20: 80px;
--spacing-sp-24: 96px;
}
:root {
--ink: #0a0a0a;
--ink-80: rgba(10, 10, 10, 0.8);
--ink-40: rgba(10, 10, 10, 0.4);
--ink-12: rgba(10, 10, 10, 0.12);
--ink-06: rgba(10, 10, 10, 0.06);
--paper: #f4f2ed;
--paper-dark: #eceae4;
--white: #ffffff;
--slash: #ccff00;
--slash-dim: rgba(204, 255, 0, 0.16);
--meta: #4a4a4a;
--border: rgba(10, 10, 10, 0.1);
--border-light: rgba(10, 10, 10, 0.06);
--sp-1: 4px;
--sp-2: 8px;
--sp-3: 12px;
--sp-4: 16px;
--sp-5: 20px;
--sp-6: 24px;
--sp-8: 32px;
--sp-10: 40px;
--sp-12: 48px;
--sp-16: 64px;
--sp-20: 80px;
--sp-24: 96px;
--r-sm: 4px;
--r-md: 8px;
--r-lg: 16px;
--r-full: 999px;
--site-header-height: 60px;
/* Escala fluida: igual ao desenho original até ~1440px e cresce nas telas grandes. */
--shell: clamp(1240px, 76vw, 1760px);
--fs-section-title: min(max(clamp(24px, 4vw, 44px), 3.05vw), 68px);
--fs-lead: min(max(15px, 1.05vw), 19px);
--font-display: var(--font-space-grotesk), sans-serif;
--font-mono: var(--font-geist-mono), monospace;
--font-body: var(--font-display);
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--ease-in: cubic-bezier(0.4, 0, 1, 1);
}
/* Layered so Tailwind utilities (later layer) can override the zero-reset. */
@layer base {
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
a {
color: inherit;
}
}
html,
body {
width: 100%;
max-width: 100%;
overflow-x: hidden;
overscroll-behavior-x: none;
}
html {
scroll-behavior: smooth;
scroll-padding-top: calc(var(--site-header-height) + var(--sp-4));
}
@media (min-width: 1280px) {
:root {
--site-header-height: 68px;
}
}
.site-header-nav,
.site-header-cv,
.site-header-version {
display: none;
}
.site-header-menu-toggle,
.site-header-mobile-panel {
display: flex;
}
.site-header-menu-toggle {
width: 44px;
height: 44px;
flex: 0 0 44px;
}
@media (min-width: 1025px) {
.site-header-nav {
display: flex;
}
.site-header-cv,
.site-header-version {
display: inline-flex;
}
.site-header-menu-toggle,
.site-header-mobile-panel {
display: none;
}
}
.skip-link {
position: fixed;
top: 8px;
left: 16px;
z-index: 10000;
transform: translateY(-160%);
border: 1px solid var(--slash);
background: var(--ink);
color: var(--white);
padding: 10px 14px;
font-family: var(--font-display);
font-size: 15px;
font-weight: 600;
text-decoration: none;
transition: transform 0.2s var(--ease-out);
}
.skip-link:focus {
transform: translateY(0);
outline: 2px solid var(--slash);
outline-offset: 3px;
}
/* Anel de foco que se vê em qualquer fundo: faixa lima, faixa escura e faixa lima. No fundo escuro valem as
limas; no creme, a escura (lima sobre creme dá só 1,1:1). */
:where(a, button, input, select, textarea, summary):focus-visible {
outline: 2px solid var(--ink);
outline-offset: 2px;
box-shadow: 0 0 0 6px var(--slash);
}
.film-grain {
position: fixed;
inset: 0;
z-index: 9990;
pointer-events: none;
background:
repeating-radial-gradient(
circle at 20% 30%,
var(--paper) 0 0.6px,
transparent 0.8px 3px
),
repeating-radial-gradient(
circle at 70% 60%,
var(--ink) 0 0.5px,
transparent 0.7px 4px
);
mix-blend-mode: overlay;
opacity: 0.08;
transition: opacity 0.3s ease;
}
/* partículas e efeitos nunca ficam por cima das telas dos projetos (FilmGrain marca quando uma está à vista) */
.film-grain[data-over-projects] {
opacity: 0;
}
@media (prefers-reduced-motion: reduce), (pointer: coarse) {
.film-grain {
display: none;
}
}
body {
position: relative;
background: var(--paper);
color: var(--ink);
/* sans por padrão: a mono é só dos rótulos (.ds-eyebrow, .ds-kicker, .ds-tag...), que a pedem à parte */
font-family: var(--font-body);
font-size: 14px;
line-height: 1.68;
}
img,
video,
canvas,
svg {
max-width: 100%;
}
/* Texto corrido em sans (leitura); a monoespacada fica nos rotulos, tags e metadados.
:where() mantem especificidade zero: classes de componente e utilitarios continuam mandando. */
:where(main, footer) :where(p, li, dd) {
font-family: var(--font-body);
}
:where(
.ds-eyebrow,
.ds-kicker,
.ds-tag,
.ds-metric,
.quality-code,
.quality-hint,
.quality-disclaimer
) {
font-family: var(--font-mono);
}
@supports (overflow: clip) {
html,
body {
overflow-x: clip;
}
}
button,
input,
select,
textarea {
font: inherit;
}
::selection {
background: var(--slash);
color: var(--ink);
}
.bg-grid {
background-image:
linear-gradient(rgba(10, 10, 10, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(10, 10, 10, 0.03) 1px, transparent 1px);
background-size: 48px 48px;
}
.bg-grid-light {
background-image:
linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
background-size: 48px 48px;
}
.ds-main {
/* no top padding needed */
}
.ds-section {
padding: clamp(72px, 9vw, 112px) clamp(24px, 6vw, 64px);
background: var(--paper);
border-bottom: 1px solid var(--border);
}
.ds-section:nth-of-type(even):not(.ds-section-dark) {
background: var(--paper-dark);
}
.ds-section-dark {
background: var(--ink);
border-bottom-color: rgba(255, 255, 255, 0.06);
color: var(--white);
}
.ds-section-shell {
width: min(var(--shell), 100%);
margin: 0 auto;
}
.ds-section-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: var(--sp-6);
margin-bottom: var(--sp-10);
/* o cabeçalho mede a si mesmo: a mesma regra serve para qualquer largura de tela */
container-type: inline-size;
}
.ds-section-meta {
flex: 1 1 auto;
min-width: 0;
max-width: 760px;
}
/* Largo: título à esquerda, descrição à direita, alinhados pela base (some a faixa vazia ao lado do título). */
@container (min-width: 880px) {
.ds-section-meta {
max-width: none;
display: grid;
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
grid-template-areas:
"eyebrow eyebrow"
"title lead"
"line line";
column-gap: var(--sp-10);
align-items: end;
> .ds-eyebrow {
grid-area: eyebrow;
}
> .ds-section-title {
grid-area: title;
}
> .ds-section-description {
grid-area: lead;
max-width: 62ch;
font-size: var(--fs-lead);
}
> .ds-draw-line {
grid-area: line;
}
}
}
/* rótulos curtos em mono: 12 px no mínimo e espaçamento moderado */
.ds-eyebrow,
.ds-kicker {
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--meta);
}
.ds-eyebrow {
margin-bottom: var(--sp-2);
}
.ds-section-title {
font-family: var(--font-display);
font-size: var(--fs-section-title);
line-height: 1.02;
font-weight: 800;
letter-spacing: -0.035em;
}
.ds-section-description {
max-width: 58ch;
color: rgba(10, 10, 10, 0.74);
font-size: 15px;
line-height: 1.7;
}
.ds-grid-2,
.ds-grid-4 {
display: grid;
gap: var(--sp-6);
}
.ds-grid-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* Colunas automáticas: sem breakpoint. Cabem 2 até ~1360px de largura útil e 3 acima disso. */
.ds-grid-fluid {
display: grid;
gap: var(--sp-6);
grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
}
.ds-grid-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ds-card,
.ds-panel {
border: 1px solid var(--border);
min-width: 0;
}
.ds-card {
background: rgba(255, 255, 255, 0.92);
padding: clamp(20px, 3vw, 28px);
display: flex;
flex-direction: column;
}
.ds-panel {
background: rgba(10, 10, 10, 0.03);
padding: var(--sp-5);
display: flex;
flex-direction: column;
}
.ds-card-title {
font-family: var(--font-display);
font-size: clamp(16px, 2.4vw, 30px);
line-height: 1.08;
letter-spacing: -0.025em;
margin-top: var(--sp-4);
}
.ds-copy {
margin-top: var(--sp-4);
color: var(--ink-80);
font-size: 16px;
line-height: 1.6;
flex-grow: 1;
}
.ds-tags {
display: flex;
flex-wrap: wrap;
gap: 10px;
list-style: none;
margin-top: auto;
padding-top: var(--sp-6);
}
.ds-tag {
padding: 8px 12px;
border: 1px solid rgba(10, 10, 10, 0.12);
background: rgba(10, 10, 10, 0.03);
font-size: 12px;
letter-spacing: 0.02em;
text-transform: none;
font-weight: 500;
/* pílula inteira numa linha: a quebra acontece entre tags (.ds-tags wrap), nunca dentro dela */
white-space: nowrap;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease,
transform 0.2s ease;
}
.ds-tag:hover {
border-color: rgba(10, 10, 10, 0.3);
box-shadow: 0 2px 12px rgba(10, 10, 10, 0.1);
}
.ds-section-dark .ds-tag:hover {
border-color: rgba(255, 255, 255, 0.3);
box-shadow: 0 2px 16px rgba(255, 255, 255, 0.06);
}
.ds-metric {
display: inline-flex;
align-items: center;
gap: var(--sp-2);
color: rgba(10, 10, 10, 0.65);
font-size: 12px;
letter-spacing: 0.06em;
text-transform: uppercase;
}
/* Botões e links de ação: texto em sans 15 px, sem caixa-alta mono. O verde-limão preenchido
(.ds-link-accent) é só da ação de contato; as demais ações usam contorno (.ds-link-muted) ou
link de texto (.ds-link-text). */
.ds-link {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 44px; /* alvo de toque minimo e mesma altura em todos os botoes */
gap: var(--sp-2);
text-decoration: none;
font-family: var(--font-display);
font-size: 15px;
font-weight: 500;
line-height: 1.25;
letter-spacing: 0;
text-transform: none;
transition:
transform 0.2s ease,
background 0.2s ease,
border-color 0.2s ease;
}
.ds-link:hover {
transform: translateY(-1px);
}
.ds-link-accent {
color: var(--ink);
background: var(--slash);
padding: 12px 18px;
font-weight: 600;
transition:
transform 0.25s ease,
box-shadow 0.25s ease,
background 0.25s ease;
}
.ds-link-accent:hover {
background: #ffffff;
box-shadow:
0 0 20px rgba(204, 255, 0, 0.45),
0 0 48px rgba(204, 255, 0, 0.18);
}
.ds-section-dark .ds-link-accent:hover {
box-shadow:
0 0 24px rgba(204, 255, 0, 0.55),
0 0 60px rgba(204, 255, 0, 0.22);
}
/* contorno: ação secundária (sem lima) */
.ds-link-muted {
padding: 12px 18px;
border: 1px solid rgba(10, 10, 10, 0.28);
transition:
transform 0.25s ease,
box-shadow 0.25s ease,
border-color 0.25s ease;
}
.ds-link-muted:hover {
border-color: var(--ink-40);
box-shadow: 0 4px 20px rgba(10, 10, 10, 0.12);
}
.ds-section-dark .ds-link-muted:hover {
border-color: rgba(255, 255, 255, 0.7);
box-shadow: none;
}
/* link de texto: ação terciária, sublinhada, sem caixa */
.ds-link-text {
padding: 0 2px;
text-decoration: underline;
text-decoration-thickness: 1px;
text-underline-offset: 5px;
}
.ds-link-text:hover {
transform: none;
text-decoration-thickness: 2px;
}
.ds-list {
margin-top: var(--sp-5);
padding-left: 18px;
font-size: 15px;
line-height: 1.7;
flex-grow: 1;
}
.ds-list li::marker {
color: var(--slash);
}
.ds-section-dark .ds-eyebrow,
.ds-section-dark .ds-kicker,
.ds-section-dark .ds-metric {
color: rgba(255, 255, 255, 0.65);
}
.ds-section-dark .ds-section-description {
color: rgba(255, 255, 255, 0.75);
}
.ds-section-dark .ds-card,
.ds-section-dark .ds-panel {
background: rgba(255, 255, 255, 0.03);
border-color: rgba(255, 255, 255, 0.08);
}
.ds-section-dark .ds-copy,
.ds-section-dark .ds-list {
color: rgba(255, 255, 255, 0.74);
}
.ds-section-dark .ds-tag {
border-color: rgba(255, 255, 255, 0.1);
background: rgba(255, 255, 255, 0.04);
}
.ds-section-dark .ds-link-muted {
border-color: rgba(255, 255, 255, 0.38);
}
.ds-draw-line {
display: block;
width: 100%;
height: 1px;
margin-top: var(--sp-4);
background: linear-gradient(
90deg,
rgba(10, 10, 10, 0.38) 0%,
rgba(10, 10, 10, 0.06) 100%
);
}
.ds-section-dark .ds-draw-line {
background: linear-gradient(
90deg,
rgba(204, 255, 0, 0.5) 0%,
rgba(204, 255, 0, 0.08) 100%
);
}
@keyframes marquee {
from {
transform: translateX(0);
}
to {
transform: translateX(-50%);
}
}
@keyframes marquee-reverse {
from {
transform: translateX(-50%);
}
to {
transform: translateX(0);
}
}
.scroll-velocity-text {
position: relative;
color: inherit;
}
.scroll-velocity-viewport {
overflow: hidden;
white-space: nowrap;
}
.scroll-velocity-track,
.scroll-velocity-group {
display: flex;
width: max-content;
}
.scroll-velocity-group {
flex-shrink: 0;
min-width: 100vw;
}
.scroll-velocity-item {
display: inline-flex;
align-items: center;
flex-shrink: 0;
font-family: var(--font-display);
font-size: clamp(3rem, 10vw, 8rem);
font-weight: 800;
line-height: 1;
letter-spacing: -0.04em;
text-transform: uppercase;
}
.scroll-velocity-dot {
margin-inline: var(--sp-8);
color: var(--slash);
}
.animate-marquee {
animation: marquee 40s linear infinite;
}
.animate-marquee-reverse {
animation: marquee-reverse 45s linear infinite;
}
.scroll-velocity-text:hover .scroll-velocity-track,
.scroll-velocity-text:focus-within .scroll-velocity-track {
animation-play-state: paused;
}
.scroll-velocity-control {
position: absolute;
top: var(--sp-2);
right: var(--sp-3);
z-index: 1;
min-height: 44px;
border: 1px solid rgba(244, 242, 237, 0.5);
background: var(--ink);
color: var(--paper);
padding-inline: var(--sp-3);
font-family: var(--font-display);
font-size: 15px;
font-weight: 500;
cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
.scroll-velocity-text {
color: var(--paper);
}
.scroll-velocity-track {
animation: none;
transform: none;
}
.scroll-velocity-viewport {
overflow: visible;
white-space: normal;
}
.scroll-velocity-track,
.scroll-velocity-group {
display: block;
width: 100%;
}
.scroll-velocity-group {
min-width: 0;
}
.scroll-velocity-group[aria-hidden="true"] {
display: none;
}
.scroll-velocity-item {
display: block;
padding: var(--sp-6);
font-size: clamp(2rem, 8vw, 4rem);
line-height: 1.1;
white-space: normal;
}
.scroll-velocity-dot {
display: none;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
/* biome-ignore lint/complexity/noImportantStyles: reduced-motion must override component animation styles. */
animation-duration: 0.01ms !important;
/* biome-ignore lint/complexity/noImportantStyles: reduced-motion must override component animation styles. */
animation-iteration-count: 1 !important;
/* biome-ignore lint/complexity/noImportantStyles: reduced-motion must override component transition styles. */
transition-duration: 0.01ms !important;
/* biome-ignore lint/complexity/noImportantStyles: reduced-motion must override smooth scrolling. */
scroll-behavior: auto !important;
}
}
@media (max-width: 1024px) {
.site-header-nav,
.site-header-cv,
.site-header-version {
display: none;
}
.site-header-menu-toggle,
.site-header-mobile-panel {
display: flex;
}
.ds-section-header {
flex-direction: column;
gap: var(--sp-4);
}
.ds-grid-2,
.ds-grid-4 {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
/* texto corrido de no mínimo 15 px no celular (o que não traz tamanho próprio herda daqui); só os rótulos mono
curtos (.ds-eyebrow, .ds-tag, .ds-metric) ficam em 12 */
body {
font-size: 15px;
}
.ds-section {
padding: clamp(52px, 13vw, 64px) 20px;
}
.ds-section-header {
margin-bottom: var(--sp-8);
}
.ds-section-title {
font-size: clamp(24px, 8vw, 34px);
}
.ds-card-title {
font-size: clamp(16px, 5vw, 24px);
}
.ds-section-description,
.ds-copy,
.ds-list {
font-size: 15px;
line-height: 1.65;
}
.ds-tags {
gap: 8px;
padding-top: var(--sp-5);
}
.ds-tag {
padding: 7px 10px;
}
}
/* ═══════════════════════════════════════════
CINEMATIC STYLES - Awwwards Level
═══════════════════════════════════════════ */
/* Section divider animations */
@keyframes shimmerDivider {
0% {
transform: translateX(-100%);
opacity: 0;
}
50% {
opacity: 0.8;
}
100% {
transform: translateX(100%);
opacity: 0;
}
}
@keyframes pulseDot {
0%,
100% {
transform: scale(1);
opacity: 0.3;
}
50% {
transform: scale(2);
opacity: 1;
}
}
.section-divider {
pointer-events: none;
}
.section-divider-gradient {
position: relative;
width: 100%;
height: 1px;
overflow: hidden;
}
.section-divider-gradient span {
position: absolute;
inset: 0;
background: linear-gradient(90deg, transparent, var(--slash), transparent);
opacity: 0.3;
}
.section-divider-gradient span:last-child {
animation: shimmerDivider 3s ease-in-out infinite;
opacity: 0.6;
}
.section-divider-pulse {
display: flex;
align-items: center;
justify-content: center;
gap: var(--sp-2);
padding-block: var(--sp-8);
}
.section-divider-pulse span {
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--slash);
animation: pulseDot 2s ease-in-out infinite;
}
.section-divider-pulse span:nth-child(2) {
animation-delay: 0.15s;
}
.section-divider-pulse span:nth-child(3) {
animation-delay: 0.3s;
}
.section-divider-pulse span:nth-child(4) {
animation-delay: 0.45s;
}
.section-divider-pulse span:nth-child(5) {
animation-delay: 0.6s;
}
.section-divider-waveform {
width: 100%;
height: 60px;
color: var(--slash);
}
.section-divider-waveform svg {
display: block;
width: 100%;
height: 60px;
}
.section-divider-waveform path {
fill: none;
stroke: currentColor;
stroke-width: 1;
vector-effect: non-scaling-stroke;
}
.section-divider-waveform path:nth-child(1) {
opacity: 0.1;
}
.section-divider-waveform path:nth-child(2) {
opacity: 0.07;
}
.section-divider-waveform path:nth-child(3) {
opacity: 0.04;
}
@media (prefers-reduced-motion: reduce) {
.section-divider-gradient span:last-child,
.section-divider-pulse span {
animation: none;
}
}
/* Hero: brilho de fundo e entrada em CSS (so posicao; o texto ja nasce visivel para o LCP) */
.hero-glow {
position: absolute;
inset: 0;
pointer-events: none;
background:
radial-gradient(
55% 65% at 78% 38%,
rgba(204, 255, 0, 0.11),
transparent 70%
),
radial-gradient(40% 50% at 6% 92%, rgba(204, 255, 0, 0.05), transparent 70%);
}
/* Hero: palco de 100svh; com a cena 3D (data-dive, mais abaixo) ele fica fixo enquanto a rolagem conduz o mergulho.
--hero-p (0 a 1) e --hero-open (0 a 1: a máscara do fundo se abrindo) vêm de cinematic/HeroField.tsx. */
.hero {
--hero-p: 0;
--hero-open: 0;
isolation: isolate;
}
.hero-stage {
position: relative;
display: flex;
flex-direction: column;
min-height: 100svh;
overflow: hidden;
}
/* Máscara dos fundos ambientes do hero (cena 3D e malha estática): transparente no miolo, onde ficam o título
e as molduras da direita, e opaca nas bordas e cantos. Com o mergulho (--hero-open 0 → 1) o miolo some e o
fundo aparece inteiro, quando o texto e a coluna da direita já saíram de cena. */
.hero-glow::after,
.hero-field {
--clear: calc((1 - var(--hero-open)) * 52% - 1%);
--feather: calc((1 - var(--hero-open)) * 30%);
mask-image: radial-gradient(
ellipse at 46% 50%,
transparent var(--clear),
#000 calc(var(--clear) + var(--feather) + 1%)
);
}
/* Sem WebGL, com aparelho que não aguenta a cena, ou antes de ela carregar: malha de pontos estática, leve */
.hero-glow::after {
content: "";
position: absolute;
inset: 0;
background:
radial-gradient(circle, rgba(244, 242, 237, 0.22) 1px, transparent 1.5px) 0
0 / 22px 22px;
opacity: 0.6;
transition: opacity 1.2s var(--ease-out);
}
.hero:has(.hero-field[data-ready]) .hero-glow::after {
opacity: 0;
}
/* Fundo ambiente: a cena 3D fica com pouca opacidade (sobe para a opacidade cheia só no mergulho). O
desenho entra por animação (e não por transition) para a opacidade poder seguir a rolagem sem atraso. */
.hero-field {
position: absolute;
inset: 0;
opacity: 0;
pointer-events: none;
&[data-ready] {
opacity: calc(0.5 + 0.5 * var(--hero-open));
animation: hero-field-in 1.6s var(--ease-out) both;
}
}
@keyframes hero-field-in {
from {
opacity: 0;
}
}
.hero-scrim {
position: absolute;
inset: 0;
pointer-events: none;
background:
linear-gradient(
90deg,
rgba(10, 10, 10, 0.86) 0%,
rgba(10, 10, 10, 0.55) 36%,
transparent 62%
), linear-gradient(0deg, rgba(10, 10, 10, 0.9), transparent 28%);
@media (max-width: 1023px) {
background: linear-gradient(
0deg,
rgba(10, 10, 10, 0.92) 0 30%,
rgba(10, 10, 10, 0.5) 65%,
rgba(10, 10, 10, 0.7)
);
}
}
/* Entrada: as palavras do título já pintam no primeiro quadro (sem opacity:0, bom para o LCP) e sobem em cascata
(só deslocamento: desfocar texto grande a cada quadro obriga a redesenhá-lo) */
.hero-word {
display: inline-block;
animation: hero-word 1.1s var(--ease-out) both;
animation-delay: calc(0.12s + var(--i) * 45ms);
}
@keyframes hero-word {
from {
transform: translateY(0.42em) rotate(2deg);
}
}
.hero-in,
.hero-foot > * {
animation: hero-in 1s var(--ease-out) both;
animation-delay: var(--d, 0.05s);
}
.hero-foot > * {
--d: 0.85s;
}
@keyframes hero-in {
from {
opacity: 0;
transform: translateY(18px);
}
}
.hero-cue-line {
width: 56px;
height: 1px;
background: currentColor;
transform-origin: left;
animation: hero-cue 2.4s var(--ease-out) infinite;
}
@keyframes hero-cue {
0% {
transform: scaleX(0);
}
60% {
transform: scaleX(1);
opacity: 1;
}
100% {
transform: scaleX(1);
opacity: 0;
}
}
.hero-caption-title {
display: block;
color: var(--slash);
font: 600 12px / 1.4 var(--font-mono);
letter-spacing: 0.08em;
text-transform: uppercase;
}
.hero-captions {
display: none;
}
/* Mergulho: só onde a cena 3D roda. HeroField marca o hero com data-dive (mouse, aparelho que aguenta, sem
movimento reduzido) e a tela precisa ter altura para o conteúdo caber. Sem 3D (toque, aparelho fraco,
"economizar dados", movimento reduzido) o hero é só o palco de 100svh: nenhum bloco extra de rolagem, nenhum
desfoque ligado à rolagem e nenhum ouvinte de rolagem. */
.ds-main {
/* rolagem do mergulho: o progresso (--hero-p) vai de 0 a 1 nela */
--hero-dive: 110svh;
}
@media (min-height: 700px) and (prefers-reduced-motion: no-preference) {
/* O palco (100svh, preso) fica parado durante o mergulho e mais uma tela: nela Projetos sobe sobre ele, com
margin-top de -100svh. A cena acaba de frente para os dados e Projetos a cobre: nunca uma tela vazia entre o
mergulho e a seção seguinte (HeroField.tsx usa a mesma conta: o progresso acaba quando Projetos começa a subir). */
.hero[data-dive] {
height: calc(200svh + var(--hero-dive));
& + .ds-section {
position: relative;
margin-top: -100svh;
box-shadow: 0 -32px 64px -24px rgba(0, 0, 0, 0.8);
}
/* Legendas do mergulho: cada uma aparece enquanto a câmera atravessa a sua camada (--hero-p) */
& .hero-captions {
position: absolute;
inset: 0;
display: grid;
place-items: end center;
margin: 0;
padding: 0 var(--sp-6) 11svh;
list-style: none;
pointer-events: none;
/* faixa escura atrás da legenda, como em legenda de cinema, sem cobrir o centro da cena */
background: linear-gradient(0deg, rgba(10, 10, 10, 0.75), transparent 38%);
opacity: clamp(
0,
min((var(--hero-p) - 0.24) * 14, (0.94 - var(--hero-p)) * 14),
1
);
& li {
--mid: calc((var(--from) + var(--to)) / 2);
grid-area: 1 / 1;
max-width: 26ch;
color: #f4f2ed;
font: 600 clamp(24px, 2.8vw + 12px, 48px) / 1.12 var(--font-display);
letter-spacing: -0.035em;
text-align: center;
text-shadow: 0 2px 40px rgba(10, 10, 10, 0.9);
opacity: clamp(
0,
min(
(var(--hero-p) - var(--from)) *
14,
(var(--to) - var(--hero-p)) *
14
),
1
);
translate: 0 calc((var(--hero-p) - var(--mid)) * -160px);
}
/* mesmos intervalos em que a câmera enquadra cada camada (cameraFrames em HeroFieldScene.tsx) */
& li:nth-child(1) {
--from: 0.26;
--to: 0.46;
}
& li:nth-child(2) {
--from: 0.52;
--to: 0.71;
}
& li:nth-child(3) {
--from: 0.76;
--to: 0.92;
}
& .hero-caption-title {
margin-bottom: var(--sp-3);
font-size: 12px;
}
}
& .hero-stage {
position: sticky;
top: 0;
height: 100svh;
}
/* o texto sai de cena enquanto a câmera mergulha: sobe, encolhe e some (sem desfoque: só opacidade e
transform, que a placa de vídeo compõe sem redesenhar o texto a cada quadro) */
& .hero-content {
transform: translate3d(0, calc(var(--hero-p) * -16vh), 0)
scale(calc(1 - var(--hero-p) * 0.08));
transform-origin: 0 50%;
opacity: calc(1 - var(--hero-p) * 4.2);
}
& .hero-foot {
opacity: calc(1 - var(--hero-p) * 5);
}
/* a coluna da direita (molduras) sai junto com o texto: o fundo 3D se abre sem passar atrás dela */
& .hero-aside {
transform: translate3d(0, calc(var(--hero-p) * -10vh), 0);
opacity: calc(1 - var(--hero-p) * 4.2);
}
& .hero-scrim {
opacity: calc(1 - var(--hero-p) * 1.4);
}
}
}
@media (prefers-reduced-motion: reduce) {
.hero-word,
.hero-in,
.hero-foot > *,
.hero-cue-line {
animation: none;
}
}
/* Passagem entre seções: só o conteúdo (.ds-section-shell) de cada cena chega com fade e uma subida curta
enquanto ela entra na janela, ligado à rolagem (rolar para cima desfaz). O fundo da seção nunca muda de
opacidade: entre seções do mesmo tom não há fade nem fresta de outra cor. O primeiro filho (o hero) não tem
passagem. Sem suporte a animation-timeline o conteúdo já está no lugar, sem animação. */
.ds-main {
background: var(--ink);
}
@keyframes ds-scene-in {
from {
opacity: 0;
transform: translateY(32px);
}
}
@media (prefers-reduced-motion: no-preference) {
@supports (animation-timeline: view()) {
.ds-main > :not(.hero) > .ds-section-shell {
/* backwards: antes de entrar o conteúdo espera escondido; depois, volta ao estilo normal (sem transform
sobrando, que prenderia a vitrine fixa dentro de um bloco de transform) */
animation: ds-scene-in linear backwards;
animation-timeline: view();
animation-range: entry 0% entry 25%;
}
}
}
/* Lenis controla a suavidade da rolagem: o scroll-behavior nativo brigaria com ele */
html.lenis,
html.lenis body {
height: auto;
}
html.lenis {
scroll-behavior: auto;
}
/* Cinematic card hover effect */
.ds-card {
transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ds-card:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(10, 10, 10, 0.12);
}
.ds-section-dark .ds-card:hover {
box-shadow:
0 20px 40px rgba(0, 0, 0, 0.4),
0 0 1px rgba(204, 255, 0, 0.1);
}
/* Navegação entre páginas (app/template.tsx liga as transições de visualização do React): a página atual
recua e desfoca, a nova chega de baixo. O cabeçalho tem nome próprio e fica parado durante a troca. */
.site-header {
view-transition-name: site-header;
}
::view-transition-group(site-header) {
animation: none;
}
/* biome-ignore lint/correctness/noUnknownTypeSelector: page é um nome de view-transition, não um elemento */
::view-transition-group(page) {
animation: none;
}
/* biome-ignore lint/correctness/noUnknownTypeSelector: page é um nome de view-transition, não um elemento */
::view-transition-old(page) {
animation: page-out 280ms cubic-bezier(0.7, 0, 0.84, 0) both;
}
/* biome-ignore lint/correctness/noUnknownTypeSelector: page é um nome de view-transition, não um elemento */
::view-transition-new(page) {
animation: page-in 640ms var(--ease-out) 160ms both;
}
@keyframes page-out {
to {
opacity: 0;
transform: scale(0.97);
filter: blur(8px);
}
}
@keyframes page-in {
from {
opacity: 0;
transform: translateY(40px) scale(1.015);
filter: blur(10px);
}
}
@media (prefers-reduced-motion: reduce) {
/* biome-ignore lint/correctness/noUnknownTypeSelector: page é um nome de view-transition, não um elemento */
::view-transition-old(page) {
animation: none;
}
/* biome-ignore lint/correctness/noUnknownTypeSelector: page é um nome de view-transition, não um elemento */
::view-transition-new(page) {
animation: none;
}
}
/* Títulos de seção (TextDiffuseReveal): entram palavra por palavra só com transparência e deslocamento,
que a placa de vídeo compõe sem redesenhar */
.text-reveal-word {
display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
.text-reveal-word {
transition:
opacity 0.7s var(--ease-out),
transform 0.9s var(--ease-out);
transition-delay: calc(var(--d, 0s) + var(--i, 0) * 55ms);
}
.text-reveal:not([data-shown]) .text-reveal-word {
opacity: 0;
transform: translateY(0.35em);
}
}
/* Entradas por rolagem (Section, Reveal, DrawLine, LazyRevealImage): useInView marca data-shown (ou data-loaded)
e a transição é CSS. O estado escondido só existe com JavaScript e sem movimento reduzido; de outro modo o
conteúdo já nasce visível. */
@media (prefers-reduced-motion: no-preference) and (scripting: enabled) {
.ds-reveal {
opacity: 0;
transform: translateY(var(--reveal-y, 18px));
transition:
opacity var(--reveal-duration, 0.8s) var(--ease-out),
transform var(--reveal-duration, 0.8s) var(--ease-out);
transition-delay: var(--reveal-delay, 0s);
}
.ds-reveal[data-shown],
.ds-section-header[data-shown] .ds-reveal {
opacity: 1;
transform: none;
}
.ds-draw-line {
opacity: 0;
transform: scaleX(0);
transform-origin: left;
transition:
opacity 0.6s var(--ease-out),
transform 0.6s var(--ease-out);
transition-delay: var(--reveal-delay, 0s);
}
.ds-draw-line[data-shown] {
opacity: 1;
transform: none;
}
.ds-lazy-reveal {
opacity: 0;
transform: translateY(20px) scale(1.02);
transition:
opacity 0.75s var(--ease-out),
transform 0.75s var(--ease-out);
}
.ds-lazy-reveal[data-loaded] {
opacity: 1;
transform: none;
}
}
/* ScrollProgress: barra do topo e trilho lateral ligados à rolagem da página, sem JavaScript */
@keyframes ds-progress-x {
from {
transform: scaleX(0);
}
to {
transform: scaleX(1);
}
}
@keyframes ds-progress-y {
from {
transform: scaleY(0);
}
to {
transform: scaleY(1);
}
}
@keyframes ds-progress-dot {
from {
transform: translateY(0);
}
to {
transform: translateY(120px);
}
}
/* aparece depois dos primeiros 2% e some nos últimos 2% */
@keyframes ds-progress-fade {
0% {
opacity: 0;
}
2%,
98% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@supports (animation-timeline: scroll()) {
.ds-scroll-bar {
animation:
ds-progress-x linear both,
ds-progress-fade linear both;
animation-timeline: scroll(root), scroll(root);
}
.ds-scroll-rail {
animation: ds-progress-fade linear both;
animation-timeline: scroll(root);
}
.ds-scroll-fill {
animation: ds-progress-y linear both;
animation-timeline: scroll(root);
}
.ds-scroll-dot {
animation: ds-progress-dot linear both;
animation-timeline: scroll(root);
}
}
@supports not (animation-timeline: scroll()) {
.ds-scroll-progress {
display: none;
}
}