/* Seção "Resultados" do site @orodmorais.
   Layout: título à esquerda, trilho de cards 9:16 que sangra até a borda direita.
   Desktop mostra 3 a 4 cards, celular mostra 1,3 (o próximo aparece cortado).
   Tokens seguem brand/identidade-visual.md: navy, off-white, lima (economia), pêssego (IA). */

:root {
  --navy: #0B1426;
  --navy-2: #13203A;
  --ink: #F4F1EA;
  --ink-dim: #A7B0C4;
  --lime: #D4FF3D;
  --peach: #FFB089;
  --line: rgba(244, 241, 234, 0.16);
  --display: 'Archivo', system-ui, sans-serif;
  --text: 'Bricolage Grotesque', system-ui, sans-serif;
  color-scheme: dark;
}

body {
  background: var(--navy);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  margin: 0;
}

/* ---------- Seção ---------- */
.res {
  --edge: max(16px, env(safe-area-inset-left, 0px), calc((100% - 1240px) / 2 + 16px));
  --card-w: clamp(220px, 21vw, 290px);
  --gap: 20px;
  padding-block: 88px 96px;
  scroll-margin-top: 16px;
}

.res-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-left: var(--edge);
  padding-right: var(--edge);
  margin-bottom: 40px;
}

.res-copy { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.res h2 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(2rem, 5.2vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.res-lead {
  margin: 0;
  max-width: 40ch;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink-dim);
}

.res-nav { display: flex; gap: 10px; flex: none; }

.arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
}
.arrow:hover:not(:disabled) { background: var(--ink); color: var(--navy); border-color: var(--ink); }
.arrow:disabled { opacity: .3; cursor: default; }
.arrow svg { width: 20px; height: 20px; }
.arrow:focus-visible, .res-track:focus-visible, .ig:focus-visible, .dot:focus-visible, .cta-btn:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- Trilho ---------- */
.res-track {
  display: flex;
  gap: var(--gap);
  padding-left: var(--edge);
  padding-right: var(--edge);
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--edge);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.res-track::-webkit-scrollbar { display: none; }

.res-empty { color: var(--ink-dim); margin: 0; }

/* ---------- Card ---------- */
.clip {
  --accent: var(--lime);
  flex: 0 0 var(--card-w);
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.clip[data-tone="ai"] { --accent: var(--peach); }

.clip-media {
  position: relative;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: var(--navy-2);
  isolation: isolate;
  cursor: default;
  transition: filter .35s ease;
}
.clip.is-off .clip-media { filter: saturate(.55) brightness(.62); }

.clip-media::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(244, 241, 234, .1);
  z-index: 3;
  pointer-events: none;
}

.clip-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* leitura dos selos sobre qualquer imagem */
.clip-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to top, rgba(11, 20, 38, .72), rgba(11, 20, 38, 0));
  pointer-events: none;
  z-index: 1;
}

.chip {
  position: absolute;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1;
  white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; flex: none; }
.chip.views { font-variant-numeric: tabular-nums; top: 12px; background: rgba(244, 241, 234, .95); color: var(--navy); }
.chip.made { bottom: 20px; background: var(--accent); color: var(--navy); }

/* barra de progresso do clipe: a "linha do tempo" do card */
.bar {
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  z-index: 2;
  background: rgba(11, 20, 38, .6);
}
.bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
}

.clip h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-wrap: balance;
}

.meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.875rem;
  color: var(--ink-dim);
}
.tag { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 700; }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ig {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.ig:hover { text-decoration-color: var(--ink); }
.ig svg { width: 12px; height: 12px; }

/* ---------- Indicador (celular) ---------- */
.res-dots { display: none; justify-content: center; margin-top: 20px; padding-inline: 16px; }
.dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  transform: translate(-50%, -50%);
  background: var(--line);
  transition: width .25s, background-color .25s;
}
.dot[aria-current="true"]::before { width: 20px; background: var(--ink); }

/* ---------- Barra fixa de CTA (celular) ---------- */
.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(11, 20, 38, .94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transition: transform .28s ease;
}
.cta-bar[data-hidden="true"] { transform: translateY(105%); }
.cta-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cta-copy strong {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 0.9375rem;
  line-height: 1.15;
}
.cta-copy span { font-size: 0.8125rem; color: var(--ink-dim); }
.cta-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.9375rem;
  text-decoration: none;
}

/* ---------- Responsivo ---------- */
@media (max-width: 719px) {
  .res { --card-w: min(74vw, 300px); --gap: 12px; padding-block: 56px 64px; }
  .res-head { margin-bottom: 28px; }
  .res-nav { display: none; }
  .res-dots { display: flex; }
  .cta-bar { display: flex; }
  .res h2 { max-width: 13ch; }
}

@media (prefers-reduced-motion: reduce) {
  .clip-media, .arrow, .dot::before, .cta-bar { transition: none; }
  .clip-media { cursor: pointer; }
}
