/* DHDESIGNIA, BIO PRIME
   A página é preta e vermelha como o feed; a cor vem dos 26 clientes.
   O vermelho existe em um lugar só: o próximo passo no WhatsApp.
   Uma família (Archivo) em duas larguras: condensada é a voz de cartaz dos criativos,
   larga é a conversa. */

:root {
  --estudio: #000000;
  --carvao: #17110F;
  --carvao-toque: #231A18;
  --linha: #2E2422;
  --contorno: #73635F;
  --papel: #F4F0EC;
  --cinza: #A59C98;
  --sinal: #D0101A;
  --sinal-toque: #A80D15;

  --f: "Archivo", "Arial Narrow", Arial, sans-serif;
  --cartaz: 62%;
  --semi: 75%;

  --motion-instant: 80ms;
  --motion-fast: 140ms;
  --motion-standard: 220ms;
  --motion-emphasis: 320ms;
  --motion-scene: 420ms;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-standard: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-emphasis: cubic-bezier(0.22, 1, 0.36, 1);
  --shift-sm: 12px;
  --press-scale: 0.98;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 20px;
  --maxw: 520px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--estudio);
  color-scheme: dark;
}

/* A única luz da página: o vermelho de estúdio dos criativos, parado, atrás do rosto */
body {
  margin: 0;
  background:
    radial-gradient(130% 440px at 16% -60px, rgb(208 16 26 / 0.3), transparent 72%) no-repeat,
    var(--estudio);
  color: var(--papel);
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  flex: none;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--papel);
  outline-offset: 3px;
  border-radius: 6px;
}

.pular {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--papel);
  color: var(--estudio);
  font-weight: 600;
}
.pular:focus { top: calc(12px + var(--safe-top)); }

.pagina {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(28px + var(--safe-top)) var(--gutter) 0;
}

/* --------------------------------------------------------------- títulos */

.titulo {
  font-stretch: var(--cartaz);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
}

.titulo--1 { font-size: clamp(34px, 10.4vw, 40px); }
.titulo--2 { font-size: clamp(28px, 8.2vw, 32px); }

/* ---------------------------------------------------------- cena 1: abertura */

.id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.id__foto {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--carvao);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16);
}

.id__marca {
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.03em;
}

.id__marca b {
  font-weight: 900;
  margin-right: 0.16em;
}

.id__quem {
  margin-top: 5px;
  color: var(--cinza);
  font-size: 14px;
  line-height: 1.3;
}

.abertura .titulo--1 { margin-top: 32px; }

.abertura__texto {
  max-width: 34ch;
  margin-top: 14px;
  color: var(--cinza);
}

/* --------------------------------------------------------------- botões */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.btn .ico { width: 22px; height: 22px; }

.btn--zap {
  background: var(--sinal);
  color: #FFFFFF;
}

.btn--zap:active {
  transform: scale(var(--press-scale));
  background: var(--sinal-toque);
}

.btn--linha {
  min-height: 52px;
  background: transparent;
  color: var(--papel);
  box-shadow: inset 0 0 0 1px var(--contorno);
}

.btn--linha .ico { width: 16px; height: 16px; }
.btn--linha:active { transform: scale(var(--press-scale)); background: var(--carvao-toque); }

.abertura .btn { margin-top: 24px; }

/* ------------------------------------------------------------ cena 2: vitrine */

.vitrine { margin-top: 56px; }

.vitrine__texto {
  max-width: 34ch;
  margin-top: 10px;
  color: var(--cinza);
  font-size: 15px;
}

/* Filtros só existem com JS; sem ele a grade inteira fica à vista */
.filtros {
  display: none;
  flex-wrap: wrap;
  gap: 8px 6px;
  margin-top: 18px;
}

.js .filtros { display: flex; }

.filtro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--contorno);
  font-size: 15px;
  font-stretch: var(--semi);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--motion-instant) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.filtro span {
  color: var(--cinza);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.filtro:active { transform: scale(0.96); }

.filtro[aria-pressed="true"] {
  background: var(--papel);
  box-shadow: none;
  color: var(--estudio);
}

.filtro[aria-pressed="true"] span { color: #5E5652; }

.grade {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 10px;
  margin-top: 20px;
}

.obra[hidden] { display: none; }

.obra__link {
  display: block;
  border-radius: 10px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Contorno de 1px só para separar as páginas escuras do fundo preto */
.obra__link img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  background: var(--carvao);
  box-shadow: 0 0 0 1px var(--linha);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.obra__link:active img { transform: scale(0.96); }

.obra__nome {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.vitrine__lugares {
  margin-top: 24px;
  color: var(--cinza);
  font-size: 15px;
}

/* ------------------------------------------------------------- cena 3: oferta */

/* A faixa de carvão marca a troca de modo: de olhar para decidir */
.oferta {
  margin: 56px calc(-1 * var(--gutter)) 0;
  padding: 40px var(--gutter) 36px;
  background: var(--carvao);
}

.preco {
  margin-top: 14px;
  color: var(--cinza);
  font-size: 16px;
}

.preco strong {
  display: block;
  margin-top: 2px;
  color: var(--papel);
  font-size: 56px;
  font-stretch: var(--cartaz);
  font-weight: 900;
  line-height: 0.95;
}

.oferta__texto {
  max-width: 36ch;
  margin-top: 18px;
}

.inclui {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.inclui li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 600;
}

.inclui .ico {
  width: 14px;
  height: 14px;
  color: var(--cinza);
  transform: translateY(1px);
}

.oferta__sub {
  margin-top: 30px;
  color: var(--cinza);
  font-size: 15px;
  font-weight: 500;
}

.reune {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.35;
}

.oferta__meta {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--linha);
  color: var(--cinza);
  font-size: 15px;
}

.oferta .btn { margin-top: 16px; }

/* -------------------------------------------------------------- cena 4: diego */

.diego { margin-top: 56px; }

.diego__topo {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 16px;
  align-items: end;
}

.diego__foto {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  background: var(--carvao);
}

.diego__texto p {
  margin-top: 10px;
  color: var(--cinza);
  font-size: 15px;
  line-height: 1.5;
}

.diego__sub {
  margin-top: 32px;
  font-size: 18px;
  font-weight: 700;
}

.servicos {
  margin-top: 12px;
  border-radius: 16px;
  background: var(--carvao);
  overflow: hidden;
}

.servicos li + li { border-top: 1px solid var(--linha); }

.servico {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--motion-instant) var(--ease-standard);
}

.servico:active { background: var(--carvao-toque); }
.servico:focus-visible { outline-offset: -3px; }

.servico__txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.servico__nome {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.servico__desc {
  color: var(--cinza);
  font-size: 15px;
  line-height: 1.4;
}

.servico__ico { width: 22px; height: 22px; }

/* -------------------------------------------------------- cena 5: outros caminhos */

.mais { margin-top: 40px; }

.mais ul { border-top: 1px solid var(--linha); }
.mais li { border-bottom: 1px solid var(--linha); }

.mais__item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 10px 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--motion-instant) var(--ease-standard);
}

.mais__item:active { opacity: 0.7; }

.mais__marca {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.mais__marca--ig {
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--contorno);
  font-size: 20px;
}

.mais__txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mais__nome {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.mais__desc {
  color: var(--cinza);
  font-size: 15px;
}

.mais__seta {
  width: 12px;
  height: 12px;
  color: var(--cinza);
}

/* ------------------------------------------------------------------ rodapé */

.rodape {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px var(--gutter) calc(36px + var(--safe-bottom));
  color: var(--cinza);
  font-size: 13px;
  text-align: center;
}

/* Com JS a barra de WhatsApp pode estar na tela: o rodapé não fica atrás dela */
.js .rodape { padding-bottom: calc(108px + var(--safe-bottom)); }

.credito {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin: 18px auto 0;
  color: var(--papel);
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.credito-txt strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.selo-b2 {
  --seal-ink: currentColor;
  --seal-accent: #D90000;
  --seal-ring: 0;
  --seal-font: inherit;
  flex: none;
  width: 72px;
  height: 72px;
  overflow: visible;
  transition: rotate 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.selo-borda,
.selo-anel { fill: none; stroke: var(--seal-ink); }
.selo-borda { stroke-width: 1; }
.selo-anel { stroke-width: 0.7; stroke-dasharray: var(--seal-ring); opacity: 0.75; }

.selo-texto {
  fill: var(--seal-ink);
  font-family: var(--seal-font);
  font-size: 6.3px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.selo-b { fill: var(--seal-ink); }
.selo-acento { fill: var(--seal-accent); }

/* anel liso: a página inteira é feita de linhas finas; o acento é o vermelho do WhatsApp */
.rodape .selo-b2 {
  --seal-accent: var(--sinal);
  --seal-ring: 0;
  --seal-font: var(--f);
}

.credito:active .selo-b2 { rotate: -10deg; }

.selo-giro {
  transform-box: view-box;
  transform-origin: 50px 50px;
}

@keyframes selo-gira { to { transform: rotate(360deg); } }
@keyframes selo-flutua {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}

@media (prefers-reduced-motion: no-preference) {
  .selo-giro { animation: selo-gira 24s linear infinite; }
  .selo-b2 { animation: selo-flutua 4.8s ease-in-out infinite; }
  .selo-b2.is-still,
  .selo-b2.is-still .selo-giro,
  .is-page-hidden .selo-b2,
  .is-page-hidden .selo-giro { animation-play-state: paused; }
}

/* ------------------------------------------------------ barra de WhatsApp */

.barra { display: none; }

.js .barra {
  display: block;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 10;
  padding: 10px var(--gutter) calc(10px + var(--safe-bottom));
  background: var(--estudio);
  box-shadow: 0 -1px 0 var(--linha);
  visibility: hidden;
  opacity: 0;
  transform: translateY(var(--shift-sm));
  transition:
    opacity var(--motion-standard) var(--ease-exit),
    transform var(--motion-standard) var(--ease-exit),
    visibility 0s linear var(--motion-standard);
}

.js .barra.is-on {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity var(--motion-standard) var(--ease-enter),
    transform var(--motion-standard) var(--ease-enter),
    visibility 0s;
}

.barra .btn {
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  margin: 0 auto;
  min-height: 52px;
}

/* ------------------------------------------------------- folha do projeto */

.folha {
  width: 100%;
  max-width: var(--maxw);
  max-height: 92vh;
  max-height: 92svh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--carvao);
  color: var(--papel);
  overflow: hidden;
}

.folha::backdrop { background: rgb(0 0 0 / 0.78); }

.folha__corpo {
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px calc(16px + var(--safe-bottom));
}

.folha__topo {
  display: grid;
  grid-template-columns: 44% 1fr;
  gap: 16px;
  align-items: start;
}

.folha__img {
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 1039;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  background: var(--estudio);
  box-shadow: 0 0 0 1px var(--linha);
}

.folha__nicho {
  color: var(--cinza);
  font-size: 14px;
  line-height: 1.35;
}

.folha__nome {
  margin-top: 8px;
  font-size: 28px;
  font-stretch: var(--cartaz);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.folha__nome:focus { outline: none; }

.folha__lugar {
  margin-top: 10px;
  color: var(--cinza);
  font-size: 14px;
  line-height: 1.35;
}

.folha__desc {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.folha .btn--zap { margin-top: 18px; }
.folha .btn--linha { margin-top: 8px; }

.folha__fechar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--cinza);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--motion-instant) var(--ease-standard);
}

.folha__fechar:active { background: var(--carvao-toque); }

html:has(.folha[open]) { overflow: hidden; }

/* Sem View Transitions, a folha sobe da base. Com elas, a miniatura conduz a entrada. */
.folha[open] { animation: folha-sobe var(--motion-emphasis) var(--ease-enter); }
.folha[open]::backdrop { animation: aparece var(--motion-standard) var(--ease-standard); }
.is-morphing .folha[open] { animation: none; }

@keyframes folha-sobe { from { transform: translateY(100%); } }
@keyframes aparece { from { opacity: 0; } }

/* Elemento compartilhado: a miniatura (3:4) cresce e vira a página inteira na folha.
   O recorte acompanha a troca, sempre preso ao topo, em vez de esticar a imagem. */
::view-transition-group(*) {
  animation-duration: var(--motion-emphasis);
  animation-timing-function: var(--ease-emphasis);
}

::view-transition-old(bp-obra),
::view-transition-new(bp-obra) {
  height: 100%;
  object-fit: cover;
  object-position: top;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--motion-standard);
}

/* ------------------------------------------------------- interação fina */

@media (hover: hover) and (pointer: fine) {
  .btn--zap:hover { background: var(--sinal-toque); }
  .btn--linha:hover { background: var(--carvao-toque); }
  .filtro:hover { box-shadow: inset 0 0 0 1px var(--cinza); }
  .filtro[aria-pressed="true"]:hover { box-shadow: none; }
  .obra__link:hover .obra__nome { text-decoration: underline; text-underline-offset: 3px; }
  .servico:hover { background: var(--carvao-toque); }
  .mais__item:hover .mais__nome { text-decoration: underline; text-underline-offset: 4px; }
  .folha__fechar:hover { background: var(--carvao-toque); }
}

/* ---------------------------------------------------------- reduced motion
   Nada escala nem desliza: a barra e a folha surgem em fade, filtros e folha
   trocam em corte (o JS pula as View Transitions) e o selo fica parado.
   Nenhuma informação depende de movimento. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --press-scale: 1;
    --shift-sm: 0px;
  }
  .filtro:active,
  .obra__link:active img { transform: none; }
  .folha[open] { animation: aparece 200ms var(--ease-standard); }
  .credito:active .selo-b2 { rotate: none; }
}

/* Em 320px o rótulo do WhatsApp cabe numa linha só */
@media (max-width: 350px) {
  .btn {
    gap: 8px;
    padding-inline: 12px;
    font-size: 16px;
  }
}

@media (min-width: 768px) {
  body {
    background:
      radial-gradient(760px 480px at 50% -80px, rgb(208 16 26 / 0.26), transparent 72%) no-repeat,
      var(--estudio);
  }
  .pagina { padding-top: calc(64px + var(--safe-top)); }
  .oferta { margin-inline: 0; border-radius: 20px; }
}
