Files
portifolio-evandrodevbr/app/components/showcase/showcase.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

1352 lines
27 KiB
CSS

/*
* Vitrine dos projetos: moldura de navegador, capa dos cards, celular, vitrine animada (.ds-reel), lista de
* projetos (.ds-reel-list) e vídeo ampliado (.ds-lb). Tudo pensado para a seção escura de Projetos: cantos
* retos, rótulos curtos em mono (12 px no mínimo), texto de botão em sans 15 px, lima só em detalhes (nenhum
* botão preenchido de lima aqui: isso é da ação de contato) e a cor do site de cada projeto (--accent) só no
* brilho ao redor do vídeo. Nenhum efeito (grão, partículas, escurecimento) fica por cima das telas.
*/
/* ─────────────────────────── 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: 12px;
line-height: 1;
letter-spacing: 0.02em;
color: rgba(255, 255, 255, 0.68);
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: 20px;
}
}
/* ─────────────────────────── 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;
}
.ds-frame-chip {
position: absolute;
right: 10px;
bottom: 10px;
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 36px;
padding: 0 12px;
font-family: var(--font-display);
font-size: 15px;
font-weight: 500;
color: #fff;
background: rgba(10, 10, 10, 0.82);
border: 1px solid rgba(255, 255, 255, 0.4);
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);
}
}
/* 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,
& > img {
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;
}
}
.ds-reel-pick {
position: relative;
display: flex;
align-items: center;
gap: 10px;
min-height: 44px;
padding: 0 14px;
font-family: var(--font-display);
font-size: 15px;
font-weight: 500;
white-space: nowrap;
color: rgba(255, 255, 255, 0.72);
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);
}
}
&[aria-current="true"] {
color: #fff;
border-color: rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.08);
}
}
.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: 12px;
letter-spacing: 0.08em;
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 {
font-family: var(--font-mono);
font-size: 12px;
color: var(--slash);
&::before {
content: attr(data-n);
}
}
.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);
}
.ds-reel-chapter-pick {
display: flex;
align-items: center;
width: 100%;
min-height: 32px;
gap: 10px;
padding: 0 12px;
border: 0;
background: transparent;
font-family: var(--font-display);
font-size: 15px;
line-height: 1.25;
color: rgba(255, 255, 255, 0.66);
text-align: left;
@media (hover: hover) {
&:hover {
color: #fff;
}
}
&[aria-current="true"] {
color: var(--slash);
}
}
.ds-reel-chapter-num {
font-family: var(--font-mono);
font-size: 12px;
color: rgba(255, 255, 255, 0.5);
}
.ds-reel-chapter-pick[aria-current="true"] .ds-reel-chapter-num {
color: var(--slash);
}
@media (min-width: 1024px) {
.ds-reel-chapters {
display: grid;
}
}
@media (min-width: 1024px) and (pointer: coarse) {
.ds-reel-chapter-pick {
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-pick[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-pick {
width: 100%;
gap: 14px;
padding: 0 16px;
}
}
.ds-reel-stage {
position: relative;
display: flex;
align-items: center;
justify-content: center;
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;
}
/* 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);
}
/* as camadas de aparelhos (uma por projeto) ficam empilhadas na mesma célula: o bloco tem a altura de um par */
.ds-reel-devices {
position: relative;
display: grid;
}
.ds-reel-set {
isolation: isolate;
}
/* a troca de projeto é um fade cruzado só dos aparelhos (a legenda é um bloco à parte, abaixo): sem deslocamento.
Quem não está em cena já é inert (sem foco, sem clique, fora da busca) e aria-hidden. */
.ds-reel-layer {
--accent: var(--slash);
position: relative;
grid-area: 1 / 1;
min-width: 0;
opacity: 0;
pointer-events: none;
transition: opacity 0.45s ease;
&[data-state="active"] {
opacity: 1;
pointer-events: auto;
}
/* brilho na cor do site, atrás dos aparelhos */
&::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-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;
}
/* uma só legenda para o projeto em cena: na troca ela some depressa (120 ms, o mesmo CAPTION_OUT_MS de
ProjectReel.tsx) e volta com o conteúdo novo; só opacidade, o texto nunca se desloca */
.ds-reel-caption {
flex: none;
display: grid;
gap: 6px;
min-width: 0;
transition: opacity 0.2s ease-out;
&[data-leaving] {
opacity: 0;
pointer-events: none;
transition: opacity 0.12s linear;
}
}
.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: 12px;
letter-spacing: 0.06em;
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);
}
}
/* Ver case e Ampliar vídeo em contorno; Abrir site é link de texto. Nada em lima: o preenchido é do contato. */
.ds-reel-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--sp-2) var(--sp-3);
margin-top: var(--sp-2);
& .ds-link.ds-link-muted {
padding: 8px 16px;
color: #fff;
border-color: rgba(255, 255, 255, 0.38);
background: transparent;
}
@media (hover: hover) {
& .ds-link.ds-link-muted:hover {
border-color: #fff;
box-shadow: none;
}
}
& .ds-link.ds-link-text {
color: rgba(255, 255, 255, 0.84);
}
}
.ds-reel-expand {
cursor: pointer;
& svg {
flex: none;
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.6;
}
}
/* tela baixa (celular deitado, janela de desktop curta): a vitrine fixa não cabe, e a lista de projetos entra no lugar */
@media (max-height: 560px) {
.ds-reel {
display: none;
}
}
/* antes de o navegador montar a página, só onde a vitrine fixa vai existir: o bloco reservado aparece e a lista
(que o servidor entregou, com o texto e os links) fica escondida; sem JavaScript, a lista é quem aparece */
.ds-reel-placeholder {
display: none;
}
@media (min-width: 768px) and (min-height: 561px) and (
prefers-reduced-motion: no-preference
) and (scripting: enabled) {
.ds-reel-placeholder {
display: block;
}
.ds-reel-list[data-pending] {
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-pick {
min-height: 38px;
}
.ds-reel-chapter-pick {
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;
}
}
@media (prefers-reduced-motion: reduce) {
.ds-reel {
display: none;
}
}
/* ─────────────────────────── Lista de projetos ─────────────────────────── */
/*
* Sem rolagem presa: celular, movimento reduzido e janelas baixas. No celular é um carrossel por toque
* (rolagem horizontal com encaixe; o card seguinte aparece pela borda); acima de 768 px, uma grade.
*/
.ds-reel-list {
margin-top: var(--sp-10);
}
.ds-reel-items {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
gap: var(--sp-8) var(--sp-6);
list-style: none;
}
.ds-reel-item {
--accent: var(--slash);
display: flex;
flex-direction: column;
gap: var(--sp-5);
min-width: 0;
}
.ds-reel-item-media {
position: relative;
isolation: isolate;
&::before {
content: "";
position: absolute;
inset: -4% 0;
z-index: -1;
background: radial-gradient(
55% 60% at 50% 50%,
color-mix(in srgb, var(--accent) 36%, transparent),
transparent 72%
);
filter: blur(36px);
opacity: 0.4;
pointer-events: none;
}
}
.ds-reel-item-screen {
position: relative;
aspect-ratio: 16 / 10;
overflow: hidden;
background: #0a0a0a;
& > img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: top;
}
}
.ds-reel-item-phone {
width: min(62%, 240px);
margin-inline: auto;
}
@media (max-width: 767px) {
.ds-reel-list {
margin-top: var(--sp-8);
}
.ds-reel-items {
display: flex;
gap: var(--sp-4);
overflow-x: auto;
overscroll-behavior-x: contain;
scroll-snap-type: x mandatory;
scroll-padding-inline: var(--sp-5);
scrollbar-width: none;
/* o card seguinte aparece pela borda: é o convite para deslizar */
margin-inline: calc(var(--sp-5) * -1);
padding: 2px var(--sp-5) var(--sp-4);
}
.ds-reel-items::-webkit-scrollbar {
display: none;
}
.ds-reel-item {
flex: 0 0 min(82%, 340px);
scroll-snap-align: start;
padding: var(--sp-5) var(--sp-4);
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.1);
}
/* um cartão mais baixo: sem subtítulo a legenda cabe e o celular da moldura ganha espaço; texto corrido em 15 px */
.ds-reel-item .ds-reel-sub {
font-size: 15px;
-webkit-line-clamp: 3;
}
}
/* sem JavaScript o carrossel vira lista vertical: nada fica escondido atrás de uma rolagem lateral */
@media (scripting: none) {
.ds-reel-items {
display: grid;
overflow: visible;
margin-inline: 0;
padding: 0;
}
.ds-reel-item {
flex: 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: 12px;
letter-spacing: 0.08em;
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);
}
.ds-lb-toggle button {
min-height: 44px;
padding: 0 16px;
font-family: var(--font-display);
font-size: 15px;
font-weight: 500;
color: rgba(255, 255, 255, 0.72);
background: transparent;
border: 0;
cursor: pointer;
transition:
background 0.2s ease,
color 0.2s ease;
/* a versão escolhida: fundo claro e sublinhado em lima (a lima só marca, não preenche o botão) */
&[aria-pressed="true"] {
color: #fff;
background: rgba(255, 255, 255, 0.12);
box-shadow: inset 0 -2px 0 var(--slash);
}
}
.ds-lb-nav {
display: flex;
gap: 6px;
}
.ds-lb-nav 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;
}
}
.ds-lb-nav button 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: #fff;
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.5);
cursor: pointer;
@media (hover: hover) {
&:hover {
border-color: #fff;
}
}
& svg {
width: 16px;
height: 16px;
fill: currentColor;
}
}
.ds-lb-time {
flex: none;
min-width: 72px;
font-family: var(--font-mono);
font-size: 12px;
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);
}
}
.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;
}
.ds-lb-chapters button {
min-height: 40px;
padding: 0 14px;
font-family: var(--font-display);
font-size: 15px;
white-space: nowrap;
color: rgba(255, 255, 255, 0.76);
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.14);
cursor: pointer;
transition:
color 0.2s ease,
border-color 0.2s ease;
@media (hover: hover) {
&:hover {
color: #fff;
border-color: rgba(255, 255, 255, 0.4);
}
}
&[aria-current="true"] {
color: #fff;
border-color: rgba(255, 255, 255, 0.7);
}
}
.ds-lb-chapters button span {
font-family: var(--font-mono);
font-size: 12px;
color: var(--slash);
}
@media (pointer: coarse) {
.ds-lb-chapters button {
min-height: 44px;
}
}
.ds-lb-links {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--sp-2) var(--sp-3);
& .ds-link.ds-link-muted {
padding: 8px 16px;
color: #fff;
border-color: rgba(255, 255, 255, 0.38);
background: transparent;
}
& .ds-link.ds-link-text {
color: rgba(255, 255, 255, 0.84);
}
}
@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 e janela de desktop curta: 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)) or (
(max-height: 700px) and (min-width: 900px)
) {
.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;
}
}
/* ─────────────────────────── Foco ─────────────────────────── */
/* Anel de foco da vitrine (sempre sobre fundo escuro): lima. Em tudo o que fica dentro de um contêiner que corta
o que passa da borda (a faixa rolável do índice, as telas, a lista de trechos) o anel fica por dentro; nos
controles soltos, por fora. Sem o halo do anel duplo global (globals.css): ele é para fundos claros. */
:is(
.ds-frame-expand,
.ds-frame-pause,
.ds-reel-pick,
.ds-reel-chapter-pick,
.ds-lb-toggle button,
.ds-lb-chapters button
):focus-visible {
outline: 2px solid var(--slash);
outline-offset: -4px;
box-shadow: none;
}
:is(.ds-lb-nav button, .ds-lb-play, .ds-lb-range):focus-visible {
outline: 2px solid var(--slash);
outline-offset: 2px;
box-shadow: none;
}