/* ==========================================================
   Isadora Camargo — Portfólio
   Mesmo sistema visual do currículo: fundo areia, grotesca
   bold para títulos, mono para texto corrido, seções numeradas.
   ========================================================== */

:root {
  --bg: #e8e4dc;
  --bg-alt: #dfdad0;
  --ink: #1a1a1a;
  --ink-soft: #5c5952;
  --line: #c4beb2;
  --placeholder: #d3cdc1;

  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  /* Largura máxima das imagens sangradas: tela de um MacBook Pro 16" */
  --bleed-max: 1728px;
  --col-label: minmax(0, 1fr);
  --col-content: minmax(0, 2fr);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

/* Rolagem suave (Lenis) */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

/* Âncoras não ficam escondidas atrás do topo fixo */
[id] {
  scroll-margin-top: 72px;
}

/* ---------- Barra de rolagem ---------- */

/* Chrome, Edge e Safari: barra fina, fundo areia, puxador grafite reto */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-left: 1px solid var(--line);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-soft);
  border: 3px solid var(--bg);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink);
}

/* Firefox */
@supports (-moz-appearance: none) {
  html {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-soft) var(--bg);
  }
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  border-top: 1px solid var(--line);
  padding: 40px 0 72px;
}

.section-grid {
  display: grid;
  grid-template-columns: 56px var(--col-label) var(--col-content);
  gap: 0 24px;
}

.section-num {
  font-size: 13px;
}

.section-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Topo ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.topbar nav {
  display: flex;
  gap: 24px;
}

.topbar a:hover,
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Abertura ---------- */

.hero {
  display: grid;
  grid-template-columns: var(--col-label) var(--col-content);
  gap: 32px 24px;
  padding: 64px 0 56px;
}

.hero-name {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(44px, 6.4vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero-meta {
  align-self: end;
}

.meta {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 4px 16px;
  margin: 0;
  font-size: 13px;
}

.meta dt {
  text-transform: uppercase;
  color: var(--ink-soft);
}

.meta dd {
  margin: 0;
}

/* ---------- Lista de projetos ---------- */

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  grid-column: 2 / -1;
}

.project {
  border-top: 1px solid var(--line);
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.project > a,
.project > div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.2fr) minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
}

.project-num {
  font-size: 13px;
  color: var(--ink-soft);
}

.project-name {
  font-family: var(--sans);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.project-tags {
  font-size: 13px;
  color: var(--ink-soft);
}

.project-thumb {
  aspect-ratio: 4 / 3;
  background: var(--placeholder);
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project > a:hover .project-name {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.project > a:hover .project-thumb img {
  transform: scale(1.04);
}

.soon {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  color: var(--ink-soft);
}

/* ---------- Texto corrido ---------- */

.prose {
  max-width: 62ch;
}

.prose p {
  margin: 0 0 1em;
}

.list-slash {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-slash li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
}

.list-slash li::before {
  content: "/";
  position: absolute;
  left: 0;
}

.timeline {
  margin-top: 40px;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.timeline-item strong {
  font-family: var(--sans);
  font-size: 15px;
}

.caps {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-size: 12px;
}

.contact-big {
  display: inline-block;
  font-family: var(--sans);
  font-size: clamp(26px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  word-break: break-word;
}

.contact-big:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

/* ---------- Página de case ---------- */

.case-head {
  padding: 56px 0 48px;
}

.case-back {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.case-title {
  margin: 0 0 32px;
  font-family: var(--sans);
  font-size: clamp(40px, 7vw, 104px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.case-lede {
  margin: 0 0 48px;
  max-width: 34ch;
  font-family: var(--sans);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.case-facts dt {
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-size: 12px;
}

.case-facts dd {
  margin: 0;
}

.media {
  margin: 0 0 24px;
}

.media img {
  width: 100%;
  background: var(--placeholder);
}

/* Imagem sangrada: ocupa a largura inteira da tela, fora da coluna */
.bleed,
.media--bleed {
  width: min(100vw, var(--bleed-max));
  margin-left: calc(50% - min(50vw, var(--bleed-max) / 2));
}

.media--bleed figcaption {
  padding: 0 var(--gutter);
}

/* Respiro antes da linha que abre um novo capítulo depois de imagens */
.media + .section,
.media-grid + .section,
.lv-band + .section,
.arch + .section,
.pal + .section,
.stripes + .section,
.ty + .section {
  margin-top: clamp(56px, 8vw, 120px);
}

/* Abertura do case: só o logo, sobre o fundo da página */
.logo-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(280px, 42vw, 620px);
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.logo-hero img {
  width: min(62%, 720px);
  height: auto;
}

.logo-hero--wide img {
  width: min(48%, 560px);
}

.logo-hero + .section {
  margin-top: clamp(56px, 8vw, 120px);
}

.logo-hero--tall img {
  width: auto;
  height: clamp(140px, 22vw, 300px);
}

/* Arquitetura de marca */
.arch {
  margin: 0 0 24px;
  padding: clamp(24px, 4vw, 56px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.arch strong {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: clamp(16px, 1.6vw, 22px);
  letter-spacing: -0.01em;
}

.arch-root {
  position: relative;
  width: max-content;
  margin: 0 auto 40px;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  text-align: center;
}

.arch-root strong {
  font-size: clamp(24px, 2.6vw, 36px);
}

.arch-root::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  height: 40px;
  border-left: 1px solid var(--ink);
}

.arch-kids {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.arch-kids > div,
.arch-kids > a {
  padding: 14px;
  border: 1px solid var(--line);
}

a.is-case:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a.link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.arch-kids > .is-case {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.arch-kids > .is-case .caps {
  color: var(--line);
}

/* Abertura de submarca dentro de um case */
.sub-head {
  margin-top: clamp(80px, 12vw, 180px);
  padding: 24px 0 32px;
  border-top: 2px solid var(--ink);
}

.sub-title {
  margin: 8px 0 0;
  font-family: var(--sans);
  font-size: clamp(36px, 6vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.stripes--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Grade de variações de logo, montada em código */
.lv-band {
  margin-bottom: 24px;
}

.lv {
  --g: clamp(8px, 1.25vw, 20px);
  display: grid;
  gap: var(--g);
}

.lv-row {
  display: grid;
  gap: var(--g);
  aspect-ratio: 1631 / 366;
}

.lv-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lv-tile .lv-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lv-tile .lv-logo {
  position: relative;
  width: auto;
  height: var(--h);
}

.media video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--placeholder);
}

.media figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.media-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.media-grid .media {
  margin: 0;
}

/* Bloco que segura o lugar das imagens enquanto não chegam */
.ph {
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: var(--placeholder);
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  aspect-ratio: 16 / 9;
}

.ph--square {
  aspect-ratio: 1 / 1;
}

.ph--tall {
  aspect-ratio: 4 / 5;
}

.todo {
  background: #f3d9a4;
  padding: 0 4px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}

.swatches--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.swatch {
  font-size: 12px;
}

.pillars {
  margin: 32px 0 0;
}

.pillars > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 4px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.pillars dt {
  font-family: var(--sans);
  font-weight: 700;
}

.pillars dd {
  margin: 0;
  color: var(--ink-soft);
}

.swatch-chip {
  aspect-ratio: 1 / 1;
  margin-bottom: 8px;
  border: 1px solid var(--line);
}

.type-specimen {
  margin: 24px 0 40px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.type-specimen .big {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 32px;
}

.result-num {
  display: block;
  font-family: var(--sans);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.case-next {
  display: block;
  padding: 48px 0 64px;
  border-top: 1px solid var(--line);
}

.case-next .caps {
  display: block;
  margin-bottom: 8px;
}

.case-next strong {
  font-family: var(--sans);
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.case-next:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}

/* ---------- Cursor ---------- */

.has-cursor,
.has-cursor * {
  cursor: none !important;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cursor.is-visible {
  opacity: 1;
}

.cursor-dot {
  position: absolute;
  top: -5px;
  left: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  transition: width 0.25s ease, height 0.25s ease, top 0.25s ease, left 0.25s ease,
    background-color 0.25s ease, transform 0.15s ease;
}

.cursor.is-link .cursor-dot {
  top: -20px;
  left: -20px;
  width: 40px;
  height: 40px;
  background: transparent;
}

.cursor.is-label .cursor-dot {
  top: -50px;
  left: -50px;
  width: 100px;
  height: 100px;
}

.cursor.is-down .cursor-dot {
  transform: scale(0.8);
}

.cursor-label {
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cursor.is-label .cursor-label {
  opacity: 1;
}

/* ---------- Paleta recriada em código ---------- */

.pal {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(8px, 1.25vw, 20px);
  margin: 0 0 24px;
  aspect-ratio: 1635 / 902;
  font-family: "Outfit", var(--sans);
}

.pal-c {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(16px, 2.4vw, 40px);
  background: var(--bg);
  color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
}

.pal-c--main {
  grid-row: 1 / span 2;
}

.pal-name {
  font-size: clamp(20px, 2.4vw, 40px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
}

.pal-c--main .pal-name {
  font-size: clamp(28px, 3.6vw, 56px);
}

.pal-codes {
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 300;
  line-height: 1.5;
}

/* ---------- Specimen tipográfico recriado em código ---------- */

.ty {
  --ink-ty: #262626;
  margin-bottom: 24px;
  background: #9eab87;
  color: var(--ink-ty);
  font-family: "Outfit", var(--sans);
}

.ty-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 112px) var(--gutter);
}

.ty-label {
  margin: 0;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 300;
}

.ty-label--sec {
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--ink-ty);
}

.ty-hero {
  margin: 0 0 clamp(16px, 2vw, 28px);
  font-family: "Lexend", var(--sans);
  font-size: clamp(64px, 9vw, 136px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

.ty-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--ink-ty);
  font-size: 12px;
  font-weight: 300;
}

.ty-text {
  margin: 24px 0 0;
  max-width: 34ch;
  margin-left: auto;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 300;
  line-height: 1.6;
}

.ty-sec {
  margin: 8px 0 24px;
  font-size: clamp(36px, 3.6vw, 52px);
  font-weight: 400;
  line-height: 1;
}

.ty-alpha {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 34px);
  font-weight: 200;
  line-height: 1.2;
  word-spacing: 0.1em;
}

.ty-weights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-self: stretch;
  min-height: clamp(360px, 50vw, 760px);
  border: 1px solid var(--ink-ty);
}

.ty-w {
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--ink-ty);
  container-type: inline-size;
}

.ty-w:first-child {
  border-left: 0;
}

.ty-w span {
  display: block;
  padding-top: 0.6em;
  font-family: "Lexend", var(--sans);
  font-size: clamp(14px, 2vw, 30px);
  font-weight: var(--w);
  text-align: center;
}

.ty-w b {
  position: absolute;
  left: 50%;
  bottom: 0;
  font-family: "Lexend", var(--sans);
  font-size: 175cqi;
  font-weight: var(--w);
  line-height: 0.72;
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .ty-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .ty-weights {
    min-height: 320px;
  }

  .pal {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    aspect-ratio: auto;
  }

  .pal-c {
    aspect-ratio: 1 / 1;
  }

  .pal-c--main {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 16 / 9;
  }
}

/* ---------- Paleta em faixas verticais ---------- */

.stripes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 24px;
  aspect-ratio: 16 / 9;
  font-family: "Lato", var(--sans);
}

.stripes > div {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: clamp(16px, 4vw, 72px) 8px;
  background: var(--bg);
  color: var(--fg);
  text-align: center;
}

.stripes span {
  font-size: clamp(11px, 1.1vw, 17px);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .stripes {
    grid-template-columns: minmax(0, 1fr);
    aspect-ratio: auto;
  }

  .stripes > div {
    justify-content: flex-start;
    padding: 28px var(--gutter);
    text-align: left;
  }

  .media-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .arch-kids {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* ---------- Rodapé ---------- */

.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Responsivo ---------- */

@media (max-width: 900px) {
  .section-grid {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .section-grid > .section-body,
  .projects {
    grid-column: 1 / -1;
    margin-top: 24px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 48px 0 64px;
  }

  .project > a,
  .project > div {
    grid-template-columns: 32px minmax(0, 1fr) 96px;
  }

  .project-tags {
    grid-column: 2;
    grid-row: 2;
    margin-top: -8px;
  }

  .project-thumb {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .case-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lv-row {
    grid-template-columns: minmax(0, 1fr) !important;
    aspect-ratio: auto;
  }

  .lv-tile {
    aspect-ratio: 16 / 10;
  }

  .swatches,
  .swatches--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .topbar .wrap > span {
    display: none;
  }

  .topbar nav {
    gap: 16px;
  }

  .media-grid,
  .results,
  .timeline-item,
  .pillars > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .meta {
    grid-template-columns: 80px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-thumb img,
  .cursor-dot {
    transition: none;
  }
}

/* ---------- Ritmo dos cases: imagens encostadas, sem respiro entre elas ---------- */

.media,
.media-grid,
.media-grid--3,
.lv-band,
.pal,
.ty,
.stripes,
.arch,
.logo-hero {
  margin-bottom: 0;
}

.media-grid,
.media-grid--3 {
  gap: 0;
  width: min(100vw, var(--bleed-max));
  margin-left: calc(50% - min(50vw, var(--bleed-max) / 2));
}

/* um bloco de imagem logo depois de outro: sem vão */
.media + .media,
.media + .media-grid,
.media-grid + .media,
.media-grid + .media-grid {
  margin-top: 0;
}

/* Vídeo vertical centralizado numa faixa da cor do próprio vídeo */
.media--band {
  display: flex;
  justify-content: center;
  background: var(--band);
}

.media--band video {
  width: min(100%, 560px);
}

/* ==========================================================
   Sistema de marca padrão dos cases: paleta (.cs) e tipografia (.ts)
   Mesma estrutura em todos os projetos, cada um com seus dados.
   ========================================================== */

.ds {
  padding: clamp(40px, 5vw, 80px) 0;
}

.ds-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-soft);
}

/* ---------- Paleta ---------- */

.cs {
  display: grid;
  grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
  gap: 32px clamp(16px, 2vw, 32px);
  margin: 0;
  padding: clamp(18px, 2vw, 28px) 0 0;
  list-style: none;
}

.cs-item {
  min-width: 0;
}

.cs-chip {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

/* Par de cores: a cor de apoio entra como faixa na base da principal */
.cs-item--pair .cs-chip::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: var(--c2);
}

.cs-name {
  margin: 14px 0 10px;
  font-family: var(--sans);
  font-size: clamp(15px, 1.3vw, 19px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.cs-codes {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.cs-codes dt {
  color: var(--ink-soft);
}

.cs-codes dd {
  margin: 0;
}

.cs-pair {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.cs-pair i {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
}

/* ---------- Tipografia ---------- */

.ts-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding: clamp(28px, 4vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.ts-spec {
  min-width: 0;
}

.ts-svg {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(36px, 5.6vw, 84px);
  color: var(--ink);
}

.ts-live {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(46px, 7.4vw, 112px);
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.ts-meta {
  display: grid;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.ts-meta div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
}

.ts-meta dt {
  color: var(--ink-soft);
}

.ts-meta dd {
  margin: 0;
}

.media + .ds,
.media-grid + .ds,
.ds + .media,
.ds + .media-grid {
  margin-top: 0;
}

.section + .ds {
  padding-top: 0;
}

.footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .cs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ts-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .cs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================
   Home: cases em grade grande
   ========================================================== */

.work-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 0 24px;
  align-items: baseline;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
}

.view-toggle {
  display: flex;
  gap: 4px;
}

.view-toggle button {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.view-toggle button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 28px);
  margin-bottom: clamp(56px, 7vw, 112px);
}

.work-list {
  display: none;
}

.work[data-view="list"] .works {
  display: none;
}

.work[data-view="list"] .work-list {
  display: grid;
}

.work-tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--placeholder);
  color: #fff;
}

/* contorno leve para os cards claros não sumirem no fundo */
.work-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.07);
  pointer-events: none;
}

/* destaque: largura toda, formato panorâmico */
.work-tile--feature {
  grid-column: 1 / -1;
}

.work-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.work-tile--feature .work-media {
  aspect-ratio: 2 / 1;
}

/* 1px de sobra em cada lado evita fresta do fundo por arredondamento de subpixel */
.work-media img,
.work-media > video,
.work-shot {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.work-shot img {
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* vídeo que toca dentro de uma peça do mockup (mesmo recorte da imagem) */
.work-shot video {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  object-fit: cover;
}

/* véu escuro que segura o nome do case no hover */
.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.66), rgb(0 0 0 / 0) 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.work-info {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  align-items: baseline;
  padding: clamp(16px, 2vw, 32px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
}

.work-num {
  grid-row: 1;
  grid-column: 1;
  font-size: 12px;
}

.work-name {
  grid-row: 1;
  grid-column: 2;
  font-family: var(--sans);
  font-size: clamp(24px, 2.8vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.work-tile--feature .work-name {
  font-size: clamp(32px, 5vw, 80px);
}

.work-tags {
  grid-column: 2;
  font-size: 12px;
  opacity: 0.85;
}

.work-tile:hover .work-media img,
.work-tile:hover .work-media > video,
.work-tile:hover .work-shot,
.work-tile:focus-visible .work-media img,
.work-tile:focus-visible .work-media > video,
.work-tile:focus-visible .work-shot {
  transform: scale(1.035);
}

.work-tile:hover .work-media::after,
.work-tile:focus-visible .work-media::after,
.work-tile:hover .work-info,
.work-tile:focus-visible .work-info {
  opacity: 1;
  transform: none;
}

.work-tile:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Telas de toque e celulares: sem hover, o nome fica sempre visível abaixo da imagem */
@media (hover: none), (max-width: 700px) {
  .work-tile {
    overflow: visible;
    background: none;
    color: var(--ink);
  }

  .work-tile::after,
  .work-media::after {
    display: none;
  }

  .work-media {
    background: var(--placeholder);
  }

  .work-info {
    position: static;
    padding: 12px 0 4px;
    opacity: 1;
    transform: none;
  }

  .work-name,
  .work-tile--feature .work-name {
    font-size: 22px;
  }

  .work-tags {
    color: var(--ink-soft);
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .works {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-tile--feature .work-media {
    aspect-ratio: 16 / 9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-media img,
  .work-media > video,
  .work-shot,
  .work-info {
    transition: none;
  }
}


/* Mockup com tela viva: o vídeo ocupa o lugar de uma peça dentro da foto */
.media--screen {
  position: relative;
}

.media .media-screen {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  object-fit: cover;
}

@media (max-width: 600px) {
  .footer .wrap {
    flex-wrap: wrap;
  }
}

/* ---------- Seletor de idioma: bandeira num círculo ---------- */

.topbar nav {
  align-items: center;
}

.lang {
  position: relative;
  margin-left: 4px;
}

.lang summary {
  display: flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.flag {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-position: center;
  background-size: cover;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12);
}

.lang summary .flag {
  width: 22px;
  height: 22px;
  transition: box-shadow 0.2s ease;
}

.lang summary:hover .flag,
.lang[open] summary .flag {
  box-shadow: 0 0 0 1px var(--bg), 0 0 0 2.5px var(--ink);
}

.flag--br {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' fill='%23009C3B'/%3E%3Cpath d='M20 7 37 20 20 33 3 20Z' fill='%23FFDF00'/%3E%3Ccircle cx='20' cy='20' r='7.5' fill='%23002776'/%3E%3Cpath d='M12.8 18.6c4.6-1 9.6-.4 14.3 1.9' stroke='%23fff' stroke-width='1.3' fill='none'/%3E%3C/svg%3E");
}

.flag--us {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' fill='%23fff'/%3E%3Cg fill='%23B22234'%3E%3Crect width='40' height='3.08'/%3E%3Crect y='6.15' width='40' height='3.08'/%3E%3Crect y='12.3' width='40' height='3.08'/%3E%3Crect y='18.46' width='40' height='3.08'/%3E%3Crect y='24.6' width='40' height='3.08'/%3E%3Crect y='30.77' width='40' height='3.08'/%3E%3Crect y='36.92' width='40' height='3.08'/%3E%3C/g%3E%3Crect width='20' height='21.54' fill='%233C3B6E'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='4' cy='4' r='1'/%3E%3Ccircle cx='10' cy='4' r='1'/%3E%3Ccircle cx='16' cy='4' r='1'/%3E%3Ccircle cx='7' cy='8' r='1'/%3E%3Ccircle cx='13' cy='8' r='1'/%3E%3Ccircle cx='4' cy='12' r='1'/%3E%3Ccircle cx='10' cy='12' r='1'/%3E%3Ccircle cx='16' cy='12' r='1'/%3E%3Ccircle cx='7' cy='16' r='1'/%3E%3Ccircle cx='13' cy='16' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

.lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.08);
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.lang-menu a:hover {
  background: var(--bg-alt);
  text-decoration: none;
}

.lang-menu a[aria-current="true"] {
  font-weight: 500;
}

.lang-menu a[aria-current="true"]::after {
  content: "✓";
  margin-left: auto;
  color: var(--ink-soft);
}

@media (max-width: 600px) {
  .topbar .wrap > a {
    white-space: nowrap;
  }

  .topbar nav {
    gap: 14px;
  }
}

/* No celular, o número da seção Projetos sai para dar espaço ao título e ao seletor */
@media (max-width: 700px) {
  .work-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
  }

  .work-head .section-num {
    display: none;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  white-space: nowrap;
}

/* e-mail e telefone no mesmo tamanho e peso; a fonte encolhe para o
   e-mail caber inteiro numa linha em qualquer celular */
.contact-big {
  display: block;
  width: fit-content;
  font-size: min(clamp(26px, 3.6vw, 48px), calc((100vw - 2 * var(--gutter)) / 13.6));
  white-space: nowrap;
  word-break: normal;
}

.contact-big + .contact-big {
  margin-top: 0.25em;
}

/* Celulares bem estreitos: o topo aperta um pouco para tudo caber */
@media (max-width: 380px) {
  .topbar .wrap {
    gap: 10px;
    letter-spacing: 0.02em;
  }

  .topbar .wrap > a {
    white-space: normal;
  }

  .topbar nav {
    gap: 10px;
  }
}

/* Vídeo do logo com o fundo já na cor da página (funciona em qualquer navegador) */
.media--logo {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--bg);
}

.media--logo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: none;
  transform: scale(1.4);
}

.media--logo + .media {
  margin-top: 0;
}

.media--logo .logo-still {
  display: none;
}

/* Celular: no lugar do vídeo, o logo estático em SVG */
@media (max-width: 700px) {
  .media--logo {
    display: flex;
    justify-content: center;
    aspect-ratio: auto;
    padding: 48px 0 32px;
  }

  .media--logo video {
    display: none;
  }

  .media--logo .logo-still {
    display: block;
    width: 46%;
    height: auto;
    background: none;
  }
}

/* Símbolos com o significado ao lado */
.sym {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.sym-item {
  display: grid;
  grid-template-columns: clamp(64px, 7vw, 96px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(18px, 2.2vw, 28px) 0;
  border-bottom: 1px solid var(--line);
}

.sym-icon {
  display: block;
  width: 100%;
  height: clamp(56px, 6vw, 84px);
  color: #7a8569;
}

.sym-title {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sym-text {
  margin: 0;
  color: var(--ink-soft);
}

/* PNG com transparência não leva o fundo de carregamento */
.media img[src$=".png"] {
  background: none;
}

/* Tipografia no celular: specimen com respiro e ficha em duas colunas */
@media (max-width: 600px) {
  .ts-row {
    gap: 18px;
    padding: 28px 0;
  }

  .ts-svg {
    width: auto;
    height: auto;
    max-width: 88%;
    max-height: 40px;
  }

  .ts-live {
    font-size: clamp(38px, 11vw, 52px);
  }

  .ts-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
  }

  .ts-meta div {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 2px;
  }

  .ts-meta dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
}

/* ==========================================================
   Movimento: entrada da página e scroll reveal
   ========================================================== */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Entrada da página (só com JS e sem movimento reduzido) ---------- */

/* a máscara tem folga embaixo para não cortar descendentes (g, j, p, ç) */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.22em;
  margin-bottom: -0.22em;
}

.line > span {
  display: block;
}

@keyframes rise {
  from { transform: translateY(110%); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .line > span {
    animation: rise 1.15s var(--ease-out) both;
    animation-delay: calc(0.12s + var(--i, 0) * 0.1s);
  }

  .js .topbar {
    animation: fade-in 0.9s ease both;
  }

  .js .hero-meta,
  .js .case-back,
  .js .case-lede,
  .js .case-facts {
    animation: fade-up 1s var(--ease-out) both;
  }

  .js .case-back { animation-delay: 0.05s; }
  .js .hero-meta,
  .js .case-lede { animation-delay: 0.45s; }
  .js .case-facts { animation-delay: 0.6s; }

  /* ---------- Scroll reveal: fade simples e rápido em tudo ---------- */

  .rv-media,
  .rv-tile,
  .rv-text,
  .rv-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.7s var(--ease-out);
  }

  .rv-tile {
    transition-delay: var(--d, 0s);
  }

  .rv-media.is-in,
  .rv-tile.is-in,
  .rv-text.is-in,
  .rv-item.is-in {
    opacity: 1;
    transform: none;
  }
}


/* <picture> (WebP com srcset) não interfere no layout das imagens */
picture {
  display: contents;
}

/* Ouça e assista: player do Spotify + links */
.listen {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.listen-player {
  display: block;
  border: 0;
  border-radius: 12px;
}

.listen-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.listen-link {
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, color 0.2s ease;
}

.listen-link:hover {
  background: var(--ink);
  color: var(--bg);
}
