/* =========================================================
   Mikayo Kelmer — Kayo Tattoo
   Conceito: tinta e pele. Cenas pretas mostram o trabalho,
   cenas nude mostram a pessoa e o atendimento.
   ========================================================= */

:root {
  /* cor */
  --tinta: #000000;        /* fundo principal, a tinta */
  --carvao: #171412;       /* superfície escura, lavagem de cinza */
  --osso: #F1E8DD;         /* texto sobre tinta */
  --cinza: #9A9088;        /* texto de apoio sobre tinta (6.6:1) */
  --pele: #D9BD9F;         /* fundo nude, a pele */
  --pele-texto: #4E3D30;   /* texto de apoio sobre pele (5.8:1) */
  --ouro: #C9A06B;         /* ação principal */
  --ouro-press: #B38A57;

  /* tipografia */
  --f-titulo: "Bodoni Moda", "Didot", Georgia, serif;
  --f-texto: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* motion */
  --motion-instant: 80ms;
  --motion-fast: 140ms;
  --motion-standard: 220ms;
  --motion-emphasis: 320ms;
  --motion-scene: 450ms;
  --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: 8px;
  --shift-md: 14px;
  --press-scale: 0.98;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 20px;
  --largura: 560px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --shift-sm: 0px;
    --shift-md: 0px;
    --press-scale: 1;
    --motion-scene: 200ms;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--tinta);
}

body {
  margin: 0;
  background: var(--tinta);
  color: var(--osso);
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-titulo);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ouro);
  outline-offset: 3px;
}
.cena-pele :focus-visible { outline-color: var(--tinta); }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pular {
  position: absolute;
  top: calc(8px + var(--safe-top));
  left: 12px;
  z-index: 50;
  padding: 12px 16px;
  background: var(--osso);
  color: var(--tinta);
  font-weight: 600;
  border-radius: 999px;
  translate: 0 -200%;
}
.pular:focus { translate: 0 0; }

.marco-scroll {
  position: absolute;
  top: 160px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-family: var(--f-texto);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
}
.btn:active { transform: scale(var(--press-scale)); }
.btn i { font-size: 1.15em; }

.btn-ouro { background: var(--ouro); color: var(--tinta); }
.btn-ouro:active { background: var(--ouro-press); }

.btn-tinta { background: var(--tinta); color: var(--osso); }
.btn-tinta:active { background: var(--carvao); }

.btn-contorno {
  background: transparent;
  color: var(--tinta);
  box-shadow: inset 0 0 0 1.5px var(--tinta);
}
.btn-contorno:active { background: rgb(0 0 0 / 0.08); }

.btn-contorno-claro {
  background: transparent;
  color: var(--osso);
  box-shadow: inset 0 0 0 1.5px rgb(241 232 221 / 0.45);
}
.btn-contorno-claro:active { background: rgb(241 232 221 / 0.1); }

@media (hover: hover) and (pointer: fine) {
  .btn-ouro:hover { background: #D6B07E; }
  .btn-contorno-claro:hover { box-shadow: inset 0 0 0 1.5px var(--osso); }
  .btn-tinta:hover { background: var(--carvao); }
}

.link-sublinhado {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: rgb(201 160 107 / 0.7);
}

/* ---------- Cenas ---------- */

.cena {
  padding: 72px var(--gutter) 80px;
}
.cena > * {
  max-width: var(--largura);
  margin-left: auto;
  margin-right: auto;
}

.cena-tinta { background: var(--tinta); color: var(--osso); }
.cena-pele  { background: var(--pele);  color: var(--tinta); }

.cena h2 {
  font-size: clamp(30px, 8.6vw, 38px);
  text-wrap: balance;
}

/* ---------- CENA 1 — Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 88vh;
  min-height: 88svh;
  padding: calc(16px + var(--safe-top)) var(--gutter) 36px;
  overflow: hidden;
  isolation: isolate;
  background: var(--tinta);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media::after {
  /* legibilidade do nome sobre a foto */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(0 0 0 / 0.55) 0%, rgb(0 0 0 / 0) 22%),
    linear-gradient(to top, rgb(0 0 0 / 0.92) 0%, rgb(0 0 0 / 0.55) 30%, rgb(0 0 0 / 0) 58%);
}
.hero-poster,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-video {
  opacity: 0;
  transition: opacity var(--motion-scene) var(--ease-standard);
}
.hero-video.is-playing { opacity: 1; }

.hero-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: var(--largura);
  margin: 0 auto;
}
.hero-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(241 232 221 / 0.35);
}
.hero-arroba {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.hero-video-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.45);
  color: var(--osso);
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--motion-fast) var(--ease-standard);
}
.hero-video-toggle[hidden] { display: none; }
.hero-video-toggle:active { transform: scale(0.94); }

.hero-texto {
  width: 100%;
  max-width: var(--largura);
  margin: 0 auto;
}
.hero-nome {
  font-size: clamp(36px, 10.4vw, 40px);
  font-weight: 600;
  line-height: 1;
}
.hero-apoio {
  max-width: 30ch;
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--osso);
}
.hero-ancora {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 14px;
  color: var(--ouro);
  font-weight: 600;
  text-decoration: none;
}
.hero-ancora i { font-size: 13px; }

/* ---------- CENA 2 — Trabalhos: trilho de exposição ----------
   Mesmo formato da galeria do Igor Moreira: trilho infinito que desliza
   sozinho, cartão central em foco, vizinhos recuados em luz e escala. */

.trabalhos { padding-top: 56px; }

.trabalhos-cabeca p {
  max-width: 34ch;
  margin-top: 10px;
  color: var(--cinza);
}

.rail-shell {
  max-width: none;
  margin: 28px calc(var(--gutter) * -1) 0;
}

.rail {
  display: flex;
  gap: 14px;
  padding: 6px var(--gutter) 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; }
.rail:focus-visible { outline-offset: -3px; }

.work {
  flex: 0 0 76%;
  max-width: 300px;
  scroll-snap-align: center;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.js .work {
  opacity: 0.65;
  transform: scale(0.95);
  transition:
    opacity var(--motion-emphasis) var(--ease-emphasis),
    transform var(--motion-emphasis) var(--ease-emphasis);
}
.js .work.on { opacity: 1; transform: scale(1); }

.work-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--carvao);
  border-radius: 4px;
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.55);
}
.work-frame::after {
  /* moldura fina: quadro, não bolha */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgb(241 232 221 / 0.14);
  border-radius: 4px;
}
.work-frame img,
.work-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}
.work-video { object-position: 50% 40%; }

.work-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 11px;
  color: var(--osso);
  background: rgb(0 0 0 / 0.6);
  border: 1px solid rgb(241 232 221 / 0.2);
  border-radius: 4px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity var(--motion-emphasis) var(--ease-emphasis),
    transform var(--motion-emphasis) var(--ease-emphasis);
}
.work.on .work-zoom { opacity: 1; transform: none; }

.work-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--osso);
  background: rgb(0 0 0 / 0.6);
  border-radius: 4px;
}
.work-tag i { font-size: 9px; color: var(--ouro); }

.plate { padding: 13px 2px 0; }
.plate-no {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ouro);
}
.plate-title {
  margin-top: 5px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--osso);
}
.plate-tech {
  margin-top: 4px;
  font-size: 14px;
  color: var(--cinza);
}

/* régua de navegação */
.rail-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.counter {
  display: flex;
  flex: none;
  align-items: baseline;
  gap: 3px;
  font-family: var(--f-titulo);
  font-size: 14px;
  color: var(--cinza);
}
.counter b { font-size: 21px; font-weight: 600; color: var(--osso); }
.counter i { font-style: normal; opacity: 0.6; }

.progress {
  position: relative;
  flex: 1;
  height: 1px;
  overflow: hidden;
  background: rgb(241 232 221 / 0.18);
}
.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(100% / 6);
  height: 100%;
  background: var(--ouro);
  transition: transform var(--motion-emphasis) var(--ease-emphasis);
}

.rail-btns { display: flex; flex: none; gap: 8px; }
.rbtn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(241 232 221 / 0.24);
  border-radius: 4px;
  background: transparent;
  color: var(--osso);
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}
.rbtn:active { transform: scale(0.93); border-color: var(--ouro); color: var(--ouro); }
.js .rail-nav { display: flex; }
.rail-nav { display: none; }

@media (hover: hover) and (pointer: fine) {
  .rail { cursor: grab; }
  .rbtn:hover { border-color: var(--ouro); color: var(--ouro); }
  .work-frame:hover img,
  .work-frame:hover .work-video { transform: scale(1.035); }
  .work-frame img,
  .work-video { transition: transform 600ms var(--ease-emphasis); }
}

.trabalhos-mais { margin-top: 28px; }

/* ---------- CENA 3 — Especialidades ---------- */

.esp-lista { margin-top: 28px; }

.esp {
  padding: 22px 0;
  border-top: 1px solid rgb(0 0 0 / 0.28);
}
.esp:last-child { border-bottom: 1px solid rgb(0 0 0 / 0.28); }
.esp h3 { font-size: 25px; }
.esp p {
  max-width: 40ch;
  margin-top: 8px;
  color: var(--pele-texto);
}

.esp-foto {
  margin: 36px 0 0;
}
.esp-foto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 35%;
}

/* ---------- CENA 4 — Sobre ---------- */

.sobre { padding-top: 0; }

.sobre-foto {
  max-width: none;
  margin: 0 calc(var(--gutter) * -1);
}
.sobre-foto img {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.sobre-texto { margin-top: -64px; position: relative; }
.sobre-texto h2 { max-width: 13ch; }
.sobre-texto > p {
  max-width: 40ch;
  margin-top: 16px;
  color: var(--cinza);
}
.sobre-texto > p:first-of-type { margin-top: 20px; color: var(--osso); }

.sobre-frase {
  margin: 32px 0 0;
  padding-left: 18px;
  border-left: 2px solid var(--ouro);
}
.sobre-frase p {
  font-family: var(--f-titulo);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.35;
}

/* ---------- CENA 5 — Studio ---------- */

.studio-intro {
  max-width: 38ch;
  margin-top: 14px;
  color: var(--pele-texto);
}

.studio-faixa {
  display: flex;
  gap: 10px;
  max-width: none;
  margin: 28px calc(var(--gutter) * -1) 0;
  padding: 0 var(--gutter) 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.studio-faixa::-webkit-scrollbar { display: none; }
.studio-faixa img {
  flex: 0 0 84%;
  max-width: 460px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  scroll-snap-align: start;
}

.studio-dados {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
  margin-bottom: 0;
}
.studio-dados dt {
  font-size: 14px;
  color: var(--pele-texto);
}
.studio-dados dd {
  margin: 2px 0 0;
  font-family: var(--f-titulo);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
}

.mapa {
  margin-top: 28px;
}
.mapa .btn { width: 100%; }
.mapa iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  background: var(--carvao);
}
.studio > .btn-tinta {
  display: flex;
  width: 100%;
  margin-top: 12px;
}

/* ---------- CENA 6 — Final ---------- */

.final { padding-bottom: 64px; }

.final-foto { margin: 0 0 28px; }
.final-foto img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 25%;
}
.final > p {
  max-width: 38ch;
  margin-top: 12px;
  color: var(--cinza);
}

.links {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.links .btn { width: 100%; }

/* ---------- CTA flutuante ---------- */

.cta-flutuante {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  z-index: 20;
  width: min(calc(100% - 32px), 420px);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.45);
  translate: -50% 16px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--motion-standard) var(--ease-exit),
    translate var(--motion-standard) var(--ease-exit),
    visibility 0s linear var(--motion-standard),
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}
.cta-flutuante.is-visivel {
  translate: -50% 0;
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--motion-emphasis) var(--ease-enter),
    translate var(--motion-emphasis) var(--ease-enter),
    visibility 0s,
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

/* ---------- Painel do trabalho ampliado ---------- */

.lb {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  border: 0;
  background: transparent;
  color: var(--osso);
}
.lb[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb::backdrop { background: rgb(0 0 0 / 0.92); }

.lb-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 100%;
  overflow-y: auto;
  background: var(--carvao);
  border: 1px solid rgb(241 232 221 / 0.14);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.6);
  scrollbar-width: none;
}
.lb-panel::-webkit-scrollbar { display: none; }

.lb[open] { animation: lb-veil var(--motion-emphasis) var(--ease-enter); }
.lb[open] .lb-panel { animation: lb-sobe var(--motion-emphasis) var(--ease-enter); }
@keyframes lb-veil { from { opacity: 0; } }
@keyframes lb-sobe { from { transform: translateY(var(--shift-md)) scale(0.98); } }

.lb-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(241 232 221 / 0.2);
  border-radius: 4px;
  background: rgb(0 0 0 / 0.7);
  color: var(--osso);
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lb-close:active { transform: scale(0.93); }

.lb-img { background: var(--tinta); }
.lb-img img,
.lb-img video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58vh;
  max-height: 58dvh;
  object-fit: contain;
}

.lb-info {
  padding: 18px 18px 20px;
  border-top: 1px solid rgb(241 232 221 / 0.1);
}
.lb-no {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ouro);
}
.lb-title {
  margin-top: 6px;
  font-size: 25px;
  line-height: 1.15;
}
.lb-tech { margin-top: 5px; font-size: 14px; color: var(--cinza); }
.lb-cta { width: 100%; margin-top: 18px; }

html:has(.lb[open]) { overflow: hidden; }

/* ---------- Rodapé ---------- */

.rodape {
  padding: 32px var(--gutter) calc(28px + var(--safe-bottom));
  background: var(--tinta);
  color: var(--cinza);
  text-align: center;
  border-top: 1px solid rgb(241 232 221 / 0.12);
}
.rodape-copy { font-size: 13px; }

.credito {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin: 18px auto 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  color: var(--osso);
  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); }

/* pontilhado: o mesmo pontilhismo do sombreado preto e cinza */
.rodape .selo-b2 {
  --seal-accent: var(--ouro);
  --seal-ring: 0.4 1.4;
  --seal-font: var(--f-texto);
}

.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; }
}

/* ---------- Motion preferences ---------- */

@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; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-flutuante,
  .cta-flutuante.is-visivel { translate: -50% 0; }
  .credito:active .selo-b2 { rotate: none; }
  .js .work { transform: none; }
}

/* ---------- Telas maiores ---------- */

@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .sobre-foto { margin: 0 auto; }
  .hero { min-height: 92svh; }
}
