/* * Vitrine dos projetos: moldura de navegador, capa dos cards, celular, vitrine animada (.ds-reel) e vídeo * ampliado (.ds-lb). Tudo pensado para a seção escura de Projetos: cantos retos, rótulos em mono, lima como * única cor de ação e a cor do site de cada projeto (--accent) só no brilho ao redor do vídeo. */ /* ─────────────────────────── Moldura de navegador ─────────────────────────── */ .ds-bframe { display: flex; flex-direction: column; min-width: 0; border: 1px solid rgba(255, 255, 255, 0.12); background: #0b0b0b; box-shadow: 0 28px 60px -34px rgba(0, 0, 0, 0.9); } .ds-bframe-bar { display: flex; align-items: center; gap: 12px; flex: none; height: 30px; padding: 0 10px; background: #141414; border-bottom: 1px solid rgba(255, 255, 255, 0.08); } .ds-bframe-dots { display: flex; flex: none; gap: 6px; & i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); } } .ds-bframe-url { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; max-width: 360px; height: 20px; margin-inline: auto; padding: 0 9px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); & svg { flex: none; opacity: 0.7; } & span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } @media (max-width: 479px) { .ds-bframe-bar { height: 26px; gap: 8px; padding: 0 8px; } .ds-bframe-dots i { width: 6px; height: 6px; } .ds-bframe-url { height: 18px; font-size: 9px; } } /* ─────────────────────────── Capa dos cards ─────────────────────────── */ .ds-frame { --accent: var(--slash); position: relative; isolation: isolate; flex: none; /* o card é uma coluna flex: sem isto a capa encolhe e perde a proporção */ margin-bottom: var(--sp-5); /* brilho na cor do site, só no card que está tocando */ &::after { content: ""; position: absolute; z-index: -1; inset: 4% 6% 4%; background: radial-gradient( 60% 70% at 50% 50%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 72% ); filter: blur(32px); opacity: 0; transition: opacity 0.7s var(--ease-out); pointer-events: none; } &[data-active="true"]::after { opacity: 0.5; } } .ds-frame-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0a center top / cover no-repeat; & > video, & > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transform-origin: top center; transition: transform 0.7s var(--ease-out), opacity 0.6s ease; } /* o poster já está de fundo: o vídeo entra em fade quando começa a tocar */ & > video { opacity: 0; } & > video[data-ready="true"] { opacity: 1; } } @media (hover: hover) { .ds-card:hover .ds-frame-screen > video, .ds-card:hover .ds-frame-screen > img { transform: scale(1.02); } } .ds-frame-expand { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; cursor: zoom-in; &:focus-visible { outline: 2px solid var(--slash); outline-offset: -4px; } } .ds-frame-chip { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: var(--slash); opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s var(--ease-out); pointer-events: none; &::after { content: "↗"; } } .ds-frame-expand:hover .ds-frame-chip, .ds-frame-expand:focus-visible .ds-frame-chip { opacity: 1; transform: none; } /* pausa dos vídeos que tocam sozinhos (WCAG 2.2.2): alvo de toque de 44px, ícone de 28px */ .ds-frame-pause { position: absolute; left: 2px; bottom: 2px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; color: #fff; background: transparent; cursor: pointer; & svg { width: 28px; height: 28px; padding: 7px; fill: currentColor; background: rgba(5, 5, 5, 0.66); border: 1px solid rgba(255, 255, 255, 0.22); transition: background 0.2s ease; } &:hover svg { background: rgba(5, 5, 5, 0.9); } &:focus-visible { outline: 2px solid var(--slash); outline-offset: -4px; } } /* sem mouse não existe "passar por cima": o aviso fica sempre à vista */ @media (hover: none) { .ds-frame-chip { opacity: 1; transform: none; } } /* ─────────────────────────── Celular ─────────────────────────── */ .ds-phone { position: relative; flex: none; aspect-ratio: 390 / 844; padding: 7px; background: #111; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 30px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.05); &::before { content: ""; position: absolute; z-index: 2; top: 11px; left: 50%; width: 24%; height: 4px; transform: translateX(-50%); border-radius: 4px; background: #000; opacity: 0.8; } } .ds-phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 24px; background: #0a0a0a center top / cover no-repeat; & > video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; } } /* ─────────────────────────── Vitrine animada ─────────────────────────── */ .ds-reel { --pin-h: calc(100svh - var(--site-header-height)); position: relative; margin-top: var(--sp-16); /* a cena fica presa durante (soma dos pesos) alturas de tela de rolagem */ height: calc(var(--pin-h) + var(--reel-sum, 1) * 100svh); } .ds-reel-pin { position: sticky; top: var(--site-header-height); height: var(--pin-h); overflow: clip; } .ds-reel-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: var(--sp-4); height: 100%; padding-block: var(--sp-4); } @media (min-width: 1024px) { .ds-reel-grid { grid-template-columns: minmax(190px, 250px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: var(--sp-10); padding-block: var(--sp-6); } } /* lista de projetos: faixa rolável na horizontal em telas pequenas, coluna no desktop */ .ds-reel-index { min-width: 0; & > ol { display: flex; gap: 8px; list-style: none; overflow-x: auto; scrollbar-width: none; } & > ol::-webkit-scrollbar { display: none; } & > ol > li > button { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; white-space: nowrap; color: rgba(255, 255, 255, 0.66); background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.12); cursor: pointer; transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease; @media (hover: hover) { &:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); } } /* por dentro: a faixa rolável (overflow-x) cortaria o anel desenhado para fora */ &:focus-visible { outline: 2px solid var(--slash); outline-offset: -4px; } &[aria-current="true"] { color: #fff; border-color: rgba(204, 255, 0, 0.55); background: rgba(204, 255, 0, 0.07); } } } .ds-reel-hint { display: none; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: var(--sp-5); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slash); } .ds-reel-hint-line { width: 24px; height: 1px; background: var(--slash); } .ds-reel-hint-sub { width: 100%; color: rgba(255, 255, 255, 0.5); } .ds-reel-num { color: var(--slash); } .ds-reel-name { display: none; } /* trechos do projeto em cena: só no desktop, onde sobra coluna; cada um leva ao ponto do vídeo */ .ds-reel-chapters { display: none; list-style: none; margin: 6px 0 10px 16px; border-left: 1px solid rgba(255, 255, 255, 0.12); & button { display: flex; align-items: center; width: 100%; min-height: 32px; gap: 10px; padding: 0 12px; border: 0; background: transparent; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); text-align: left; & span { color: rgba(255, 255, 255, 0.5); } @media (hover: hover) { &:hover { color: #fff; } } &[aria-current="true"] { color: var(--slash); background: transparent; border: 0; & span { color: var(--slash); } } } } @media (min-width: 1024px) { .ds-reel-chapters { display: grid; } } @media (min-width: 1024px) and (pointer: coarse) { .ds-reel-chapters button { min-height: 44px; } } .ds-reel-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--slash); transform: scaleX(var(--p, 0)); transform-origin: left; opacity: 0; } .ds-reel-index > ol > li > button[aria-current="true"] .ds-reel-bar { opacity: 1; } @media (min-width: 640px) { .ds-reel-name { display: inline; } } @media (min-width: 1024px) { .ds-reel-hint { display: flex; } .ds-reel-index > ol { flex-direction: column; gap: 6px; overflow: visible; } .ds-reel-index > ol > li > button { width: 100%; gap: 14px; padding: 0 16px; } } .ds-reel-stage { position: relative; min-height: 0; /* o palco mede a si mesmo: o conjunto cresce até o limite da largura ou da altura que sobrar */ container-type: size; } .ds-reel-layer { --accent: var(--slash); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.6s var(--ease-out), visibility 0s linear 0.5s; &[data-state="before"] { transform: translateY(-14px); } &[data-state="active"] { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; } } /* aparelhos + legenda, um bloco só: a legenda tem sempre a mesma largura e o mesmo canto esquerdo do notebook */ .ds-reel-set { --caption-h: 13.75rem; /* reserva da legenda: título, trecho atual e botões */ --gap: var(--sp-6); display: flex; flex-direction: column; gap: var(--gap); /* cabe na largura (com folga para o celular sobrepor) e na altura (legenda + barra de 30px + tela 16:10) */ width: min(90cqw, calc((100cqh - var(--caption-h) - var(--gap) - 30px) * 1.6)); min-width: min(100%, 320px); } .ds-reel-devices { position: relative; &::before { content: ""; position: absolute; inset: -4% 0; z-index: -1; background: radial-gradient( 55% 60% at 50% 50%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 72% ); filter: blur(44px); opacity: 0.45; pointer-events: none; } } .ds-reel-set { isolation: isolate; } .ds-reel-laptop { width: 100%; } .ds-reel-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0a center top / cover no-repeat; & > video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; } } .ds-reel-phone { position: absolute; right: -5%; bottom: -3%; width: 22%; min-width: 88px; } /* celular: o celular é o aparelho principal (o notebook some) e a legenda ocupa a largura toda */ @media (max-width: 639px) { .ds-reel-grid { /* respiro para o botão fixo de preferências de analytics, que ocupa o canto de baixo */ padding-bottom: 68px; } .ds-reel-layer { align-items: stretch; } .ds-reel-set { --caption-h: 12.5rem; width: min(100cqw, 460px); height: 100%; margin-inline: auto; justify-content: space-between; } .ds-reel-devices { flex: 1 1 0; min-height: 0; display: flex; justify-content: center; } .ds-reel-laptop { display: none; } .ds-reel-phone { position: relative; inset: auto; width: auto; min-width: 0; height: 100%; max-width: 100%; } } .ds-reel-caption { flex: none; display: grid; gap: 6px; min-width: 0; } .ds-reel-title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 38px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; color: #fff; } .ds-reel-sub { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.68); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .ds-reel-chapter { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; font-size: 13px; color: #fff; & strong { font-weight: 600; } } .ds-reel-chapter-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--slash); } .ds-reel-ticks { display: flex; gap: 4px; list-style: none; & li { width: 18px; height: 3px; background: rgba(255, 255, 255, 0.18); transition: background 0.3s ease; } & li[data-state="done"] { background: rgba(204, 255, 0, 0.5); } & li[data-state="now"] { background: var(--slash); } } .ds-reel-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); } .ds-reel-actions .ds-link-muted { border-color: rgba(255, 255, 255, 0.18); color: #fff; } /* tela baixa (celular deitado, janela de desktop curta): a vitrine não cabe, e os cards já mostram os vídeos */ @media (max-height: 560px) { .ds-reel { display: none; } } /* desktop com pouca altura: a lista de projetos e os trechos têm de caber na altura do pin */ @media (min-width: 1024px) and (max-height: 700px) { .ds-reel-hint { display: none; } } @media (min-width: 1024px) and (max-height: 700px) and (pointer: fine) { .ds-reel-index > ol > li > button { min-height: 38px; } .ds-reel-chapters button { min-height: 28px; } } /* janela curta: sem o subtítulo a legenda cabe em menos altura e o notebook ganha tela */ @media (min-width: 640px) and (max-height: 700px) { .ds-reel-set { --caption-h: 10.5rem; } .ds-reel-sub { display: none; } } /* celular: o subtítulo sai para o aparelho ter mais tela, e o contador "02/05" já faz o papel dos tiques */ @media (max-width: 639px) { .ds-reel-sub, .ds-reel-ticks { display: none; } } /* celular baixo demais: o aparelho ficaria uma cápsula ilegível */ @media (max-width: 639px) and (max-height: 600px) { .ds-reel { display: none; } } @media (prefers-reduced-motion: reduce) { .ds-reel { display: none; } } /* sem JavaScript a vitrine nunca monta: o espaço reservado por ela some */ @media (scripting: none) { .ds-reel-placeholder { display: none; } } /* ─────────────────────────── Vídeo ampliado ─────────────────────────── */ html.ds-lb-open { overflow: hidden; /* a barra de rolagem clássica some junto: devolve o espaço dela para a página não pular */ padding-right: var(--ds-scrollbar, 0px); } .ds-lb { --accent: var(--slash); color-scheme: dark; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: clamp(12px, 3vw, 32px); border: 0; color: #fff; background: rgba(5, 5, 5, 0.88); backdrop-filter: blur(8px); overscroll-behavior: contain; &[open] { display: flex; align-items: center; justify-content: center; animation: ds-lb-in 0.28s var(--ease-out); } &::backdrop { background: transparent; } } @keyframes ds-lb-in { from { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .ds-lb[open] { animation: none; } } .ds-lb-panel { display: flex; flex-direction: column; gap: var(--sp-4); width: min(1180px, 100%); height: min(100%, 900px); min-height: 0; padding: clamp(14px, 2.4vw, 24px); overflow: auto; background: #0c0c0c; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 0 120px -30px color-mix(in srgb, var(--accent) 55%, transparent); } .ds-lb-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3) var(--sp-4); } .ds-lb-heading { flex: 1 1 200px; min-width: 0; } .ds-lb-count { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--slash); } .ds-lb-title { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 30px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; } .ds-lb-toggle { display: inline-flex; min-width: 0; margin: 0; padding: 0; border: 1px solid rgba(255, 255, 255, 0.16); & button { min-height: 44px; padding: 0 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); background: transparent; border: 0; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; &[aria-pressed="true"] { color: var(--ink); background: var(--slash); } &:focus-visible { outline: 2px solid var(--slash); outline-offset: -3px; } } } .ds-lb-nav { display: flex; gap: 6px; & button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, 0.16); cursor: pointer; transition: border-color 0.2s ease; @media (hover: hover) { &:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.5); } } &:disabled { opacity: 0.3; cursor: default; } &:focus-visible { outline: 2px solid var(--slash); outline-offset: 2px; } & svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; } } } /* o palco mede a si mesmo: o aparelho cresce até o limite da largura ou da altura que sobrar */ .ds-lb-stage { flex: 1 1 0; min-height: 200px; display: flex; align-items: center; justify-content: center; container-type: size; } .ds-lb-frame { width: min(100cqw, calc((100cqh - 30px) * 1.6)); } .ds-lb-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0a center top / cover no-repeat; } .ds-lb-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; } .ds-lb-phone { height: min(100cqh, calc(100cqw * 844 / 390)); } .ds-lb-controls { display: flex; align-items: center; gap: var(--sp-3); } .ds-lb-play { display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--ink); background: var(--slash); border: 0; cursor: pointer; &:focus-visible { outline: 2px solid #fff; outline-offset: 2px; } & svg { width: 16px; height: 16px; fill: currentColor; } } .ds-lb-time { flex: none; min-width: 72px; font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.7); } .ds-lb-range { flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; &::-webkit-slider-runnable-track { height: 3px; background: rgba(255, 255, 255, 0.22); } &::-moz-range-track { height: 3px; background: rgba(255, 255, 255, 0.22); } &::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border: 0; border-radius: 0; background: var(--slash); } &::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 0; background: var(--slash); } &:focus-visible { outline: 2px solid var(--slash); outline-offset: 2px; } } .ds-lb-chapters { display: flex; flex: none; /* é filha de coluna flex: sem isto a fileira rolável encolhe a quase nada em celular baixo */ flex-wrap: wrap; gap: 8px; list-style: none; & button { min-height: 36px; padding: 0 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: rgba(255, 255, 255, 0.7); background: transparent; border: 1px solid rgba(255, 255, 255, 0.14); cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease; & span { color: var(--slash); } @media (hover: hover) { &:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); } } &[aria-current="true"] { color: #fff; border-color: var(--slash); } &:focus-visible { outline: 2px solid var(--slash); outline-offset: -4px; } } } @media (pointer: coarse) { .ds-lb-chapters button { min-height: 44px; } } .ds-lb-links { display: flex; flex-wrap: wrap; gap: var(--sp-3); & .ds-link-muted { color: #fff; border-color: rgba(255, 255, 255, 0.18); } } @media (max-width: 639px) { .ds-lb { padding: 0; } .ds-lb-panel { width: 100%; height: 100%; border: 0; } .ds-lb-chapters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .ds-lb-chapters::-webkit-scrollbar { display: none; } .ds-lb-time { display: none; } } /* telas muito estreitas: nome, versão e setas não cabem na mesma linha; o alternador de versão ocupa uma só */ @media (max-width: 389px) { .ds-lb-panel { gap: var(--sp-3); } .ds-lb-heading { flex-basis: 0; } .ds-lb-toggle { order: 3; flex: 1 1 100%; } .ds-lb-toggle button { flex: 1; } } /* celular deitado: vídeo grande ao lado, controles em coluna (empilhado, o vídeo ficava com 200px de altura) */ @media (max-height: 520px) and (min-width: 640px) { .ds-lb { padding: 0; } .ds-lb-panel { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "head stage" "ctrl stage" "chap stage" "links stage"; gap: var(--sp-3) var(--sp-4); width: 100%; height: 100%; border: 0; } .ds-lb-head { grid-area: head; } .ds-lb-controls { grid-area: ctrl; } .ds-lb-chapters { grid-area: chap; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ds-lb-chapters::-webkit-scrollbar { display: none; } .ds-lb-links { grid-area: links; } .ds-lb-stage { grid-area: stage; min-height: 0; } }