/* ==========================================================================
   JP Store · Bio Prime V3
   Conceito: chegada. A página abre com a mesma foto de perfil que a pessoa
   acabou de tocar no Instagram e prova com os posts fixados da loja.
   Fundo preto, texto claro, verde do monograma reservado ao pedido e neon
   só na moldura das fotos.
   ========================================================================== */

:root {
  /* cor */
  --black: #000000;       /* fundo */
  --lift: #07100B;        /* cena da prova, um degrau acima do preto */
  --surface: #122019;     /* plástico da sacola: cartão VIP, mapa carregando */
  --chalk: #F3F4F1;       /* texto e botão claro */
  --chalk-soft: #A3ADA7;  /* texto de apoio, 9:1 no preto */
  --ink: #0F1A14;         /* texto sobre botões claros e verdes */
  --grass: #3DD07F;       /* face do monograma: pedido, anel, foco */
  --grass-deep: #137A3F;  /* chanfro do monograma: sola dos botões */
  --neon: #42F58D;        /* monograma aceso: moldura das fotos da prova */
  --rule: rgb(243 244 241 / .16);
  --rule-strong: rgb(243 244 241 / .7);

  /* tipo: uma família, o eixo de largura separa os papéis */
  --font: 'Archivo', Arial, system-ui, sans-serif;
  --wide: 112%;
  --wider: 125%;

  /* layout */
  --col: 560px;
  --gutter: 20px;
  --chamfer: 20px;
  --radius: 6px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* motion */
  --motion-instant: 80ms;
  --motion-fast: 140ms;
  --motion-standard: 200ms;
  --motion-emphasis: 320ms;
  --motion-scene: 420ms;
  --motion-signature: 700ms;

  --ease-enter: cubic-bezier(.16, 1, .3, 1);
  --ease-exit: cubic-bezier(.7, 0, .84, 0);
  --ease-standard: cubic-bezier(.65, 0, .35, 1);
  --ease-emphasis: cubic-bezier(.2, .9, .1, 1);

  --shift-sm: 4px;
  --shift-md: 12px;
  --press-depth: 4px;   /* altura da "sola" dos botões */
  --press-shift: 4px;   /* quanto o botão afunda no toque */
  --press-scale: .96;
}

/* ---------- base ---------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: dark; }

body {
  margin: 0;
  background: var(--black);
  color: var(--chalk);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a, button {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button { font: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--grass); outline-offset: 3px; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: -100px; left: 16px;
  z-index: 30;
  padding: 12px 16px;
  background: var(--chalk);
  color: var(--ink);
  font-weight: 700;
}
.skip:focus { top: calc(12px + var(--safe-top)); }

.page { max-width: var(--col); margin-inline: auto; background: var(--black); }

.chev {
  width: 24px; height: 24px; flex: 0 0 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-fast) var(--ease-enter);
}

/* ---------- botões: sola que afunda no toque ----------------------------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  font-stretch: 106%;
  transition:
    transform var(--motion-instant) var(--ease-standard),
    box-shadow var(--motion-instant) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.btn__icon { width: 24px; height: 24px; flex: 0 0 24px; fill: currentColor; }

.btn--order {
  background: var(--grass);
  color: var(--ink);
  box-shadow: 0 var(--press-depth) 0 var(--grass-deep);
}

.btn--vip {
  justify-content: space-between;
  background: var(--chalk);
  color: var(--ink);
  box-shadow: 0 var(--press-depth) 0 var(--grass-deep);
}

/* ---------- cena 1 · chegada ---------------------------------------------- */

.hero { padding: calc(28px + var(--safe-top)) var(--gutter) 40px; }

.hero__id { display: flex; align-items: center; gap: 18px; }

/* a foto de perfil do Instagram, com o anel que a pessoa acabou de tocar */
.avatar {
  --size: 120px;
  position: relative;
  flex: 0 0 var(--size);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
}

.avatar__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);   /* o traço começa no topo */
}

.avatar__ring circle {
  fill: none;
  stroke: var(--grass);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.avatar__img {
  position: absolute;
  top: 9px; left: 9px;
  width: calc(var(--size) - 18px);
  height: calc(var(--size) - 18px);
  border-radius: 50%;
  object-fit: cover;
  transition: transform var(--motion-instant) var(--ease-standard);
}

.hero__who { min-width: 0; line-height: 1.3; }
.hero__name { font-size: 22px; font-weight: 800; font-stretch: var(--wide); }
.hero__handle { font-size: 15px; color: var(--chalk-soft); overflow-wrap: anywhere; }
.hero__place { margin-top: 2px; font-size: 14px; color: var(--chalk-soft); }

.hero__title {
  margin-top: 28px;
  font-size: clamp(32px, 10vw, 40px);
  font-weight: 800;
  font-stretch: var(--wide);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.hero__lead { max-width: 34ch; margin-top: 12px; font-size: 17px; color: var(--chalk-soft); }
.hero .btn { margin-top: 24px; }
.hero__note { margin-top: 12px; font-size: 14px; color: var(--chalk-soft); }

/* ---------- cenas --------------------------------------------------------- */

.scene { padding: 48px var(--gutter); }

.scene__title {
  font-size: clamp(28px, 8vw, 34px);
  font-weight: 800;
  font-stretch: var(--wide);
  line-height: 1.05;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.scene__lead { max-width: 40ch; margin-top: 10px; color: var(--chalk-soft); }
.scene__note { margin-top: 16px; font-size: 14px; color: var(--chalk-soft); }

/* ---------- cena 2 · escolha ---------------------------------------------- */

#escolha { padding-top: 8px; }

.picks { margin: 24px -12px 0; border-top: 2px solid var(--rule-strong); }
.picks li { border-bottom: 1px solid var(--rule); }

.pick {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 16px;
  min-height: 76px;
  padding: 12px;
  transition:
    background-color var(--motion-instant) var(--ease-standard),
    color var(--motion-instant) var(--ease-standard);
}

.pick__name {
  font-size: 26px;
  font-weight: 800;
  font-stretch: var(--wider);
  line-height: 1.1;
}

.pick__hint { grid-column: 1; font-size: 14px; color: var(--chalk-soft); }
.pick .chev { grid-column: 2; grid-row: 1 / span 2; }

/* ---------- cena 3 · prova ------------------------------------------------ */

.scene--proof { background: var(--lift); }

.reel {
  --slide: min(78vw, 430px);
  position: relative;
  display: flex;
  gap: 12px;
  margin: 0 calc(var(--gutter) * -1);
  padding-block: 24px 40px;   /* espaço para brilho e sombra não serem cortados */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }

/* espaçadores: primeira e última foto também param no centro */
.reel::before,
.reel::after { content: ''; flex: 0 0 calc((100% - var(--slide)) / 2 - 12px); }

.reel__item {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--slide);
  scroll-snap-align: center;
}

/* moldura neon + sombra em camadas (brilho, reflexo verde e projeção longa).
   Estática: só o transform do item anima, nada de repintar sombra no scroll */
.reel__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 2px solid var(--neon);
  border-radius: 10px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / .6),
    0 0 18px rgb(66 245 141 / .5),
    0 20px 36px -16px rgb(66 245 141 / .38),
    0 36px 52px -22px rgb(0 0 0 / .95);
  transition: opacity var(--motion-instant) var(--ease-standard);
}

.reel__info {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
  padding: 12px 2px 0;
}

.reel__name { font-size: 19px; font-weight: 800; font-stretch: var(--wide); line-height: 1.2; }
.reel__role { grid-column: 1; font-size: 14px; color: var(--chalk-soft); }
.reel__info .chev { grid-column: 2; grid-row: 1 / span 2; }

.reel-nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;   /* pontos no centro, pausa à direita */
  align-items: center;
}
.reel-nav::before { content: ''; }
.reel-nav[hidden] { display: none; }
.reel-nav__dots { display: flex; justify-content: center; }

.reel-nav__dot {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
}

.reel-nav__dot::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 4px;
  background: rgb(243 244 241 / .35);
  transition:
    transform var(--motion-standard) var(--ease-standard),
    background-color var(--motion-standard) var(--ease-standard);
}

.reel-nav__dot[aria-pressed="true"]::after { background: var(--neon); transform: scaleX(2.5); }

.reel-nav__toggle {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--chalk);
  transition: background-color var(--motion-instant) var(--ease-standard);
}
.reel-nav__toggle[hidden] { display: none; }
.reel-nav__toggle:active { background: rgb(243 244 241 / .12); }

.reel-nav__icon {
  grid-area: 1 / 1;
  width: 20px; height: 20px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reel-nav__icon--play,
.reel-nav__toggle[aria-pressed="true"] .reel-nav__icon--pause { display: none; }
.reel-nav__toggle[aria-pressed="true"] .reel-nav__icon--play { display: block; }

.line-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  margin-top: 16px;
  border-top: 2px solid var(--rule-strong);
  font-weight: 700;
}

/* ---------- cena 4 · grupo VIP -------------------------------------------- */

.vip { padding-top: 48px; padding-bottom: 8px; }

.vip__card {
  padding: 32px 24px;
  background: var(--surface);
  color: var(--chalk);
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
}

.vip__title {
  font-size: clamp(28px, 8vw, 34px);
  font-weight: 800;
  font-stretch: var(--wide);
  line-height: 1.05;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.vip__lead { max-width: 36ch; margin-top: 10px; color: var(--chalk-soft); }
.vip .btn { margin-top: 24px; }
.vip :focus-visible { outline-offset: -6px; }

/* ---------- cena 5 · contato (silêncio) ----------------------------------- */

/* mapa: iframe nativo com loading="lazy", só carrega perto da tela */
.map {
  position: relative;
  margin-top: 24px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}

.map::before {
  content: 'Carregando mapa';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--chalk-soft);
}

.map__frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.contacts { margin-top: 24px; border-top: 2px solid var(--rule-strong); }
.contacts li { border-bottom: 1px solid var(--rule); }

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 16px;
  min-height: 64px;
  padding-block: 10px;
}

.contact__label { grid-column: 1; font-size: 14px; color: var(--chalk-soft); }
.contact__value {
  grid-column: 1;
  font-weight: 600;
  overflow-wrap: anywhere;
  transition: color var(--motion-instant) var(--ease-standard);
}
.contact .chev { grid-column: 2; grid-row: 1 / span 2; }

/* ---------- rodapé -------------------------------------------------------- */

.foot {
  padding: 28px var(--gutter) calc(32px + var(--safe-bottom));
  border-top: 2px solid var(--rule-strong);
  font-size: 14px;
  color: var(--chalk-soft);
}
.foot p + p { margin-top: 4px; }
.foot a { color: var(--chalk); text-decoration: underline; text-underline-offset: 3px; }

.js .foot { padding-bottom: calc(112px + var(--safe-bottom)); }

/* ---------- barra de pedido fixa ------------------------------------------ */

.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  pointer-events: none;
}
.dock[hidden] { display: none; }

.dock__inner {
  max-width: calc(var(--col) - 32px);
  margin-inline: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(100% + 24px + var(--safe-bottom)));
  transition:
    transform var(--motion-fast) var(--ease-exit),
    opacity var(--motion-fast) var(--ease-exit),
    visibility 0s linear var(--motion-fast);
}

.dock.is-on .dock__inner {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    transform var(--motion-standard) var(--ease-enter),
    opacity var(--motion-standard) var(--ease-enter),
    visibility 0s;
}

/* ---------- hover: só onde existe ponteiro fino --------------------------- */

@media (hover: hover) and (pointer: fine) {
  .btn--order:hover { background: #5ADB93; }
  .btn--vip:hover { background: #FFFFFF; }
  .pick:hover { background: rgb(243 244 241 / .06); }
  .pick:hover .chev,
  .line-link:hover .chev,
  .contact:hover .chev,
  .reel__item:hover .chev,
  .btn--vip:hover .chev { transform: translateX(var(--shift-sm)); }
  .line-link:hover,
  .contact:hover .contact__value,
  .foot a:hover { color: var(--grass); }
}

/* ---------- toque: depois do hover para vencer no celular ----------------- */

.btn:active { transform: translateY(var(--press-shift)); }
.btn--order:active { background: #34B86F; box-shadow: 0 0 0 var(--grass-deep); }
.btn--vip:active { background: #E2E5E0; box-shadow: 0 0 0 var(--grass-deep); }

.avatar:active .avatar__img { transform: scale(var(--press-scale)); }

.pick:active { background: var(--chalk); color: var(--ink); }
.pick:active .pick__hint { color: rgb(15 26 20 / .75); }
.reel__item:active .reel__photo { opacity: .82; }
.pick:active .chev,
.line-link:active .chev,
.contact:active .chev,
.reel__item:active .chev,
.btn--vip:active .chev { transform: translateX(var(--shift-sm)); }
.line-link:active,
.contact:active .contact__value { color: var(--grass); }

/* ---------- motion dirigido ----------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  /* SIGNATURE · o anel do perfil se fecha uma vez, como no Instagram */
  .avatar__ring circle {
    animation: ring-draw var(--motion-signature) var(--ease-emphasis) 150ms both;
  }

  /* SUPPORT · 3D: as fotos laterais giram voltadas para o centro, seguindo o scroll */
  @supports (animation-timeline: view()) {
    .reel__item {
      animation: reel-depth linear both;
      animation-timeline: view(inline);
    }
  }
}

@keyframes ring-draw {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

/* 3D: laterais giram em perspectiva voltadas para o centro; a do meio fica de frente.
   Sem suporte a scroll-driven ou com movimento reduzido: fotos planas, só moldura e sombra */
@keyframes reel-depth {
  0%   { transform: perspective(900px) rotateY(-30deg) scale(.86); opacity: .6; }
  50%  { transform: perspective(900px) rotateY(0deg) scale(1);     opacity: 1; }
  100% { transform: perspective(900px) rotateY(30deg) scale(.86);  opacity: .6; }
}

/* SUPPORT · VIP muda o contexto: a janela abre uma vez ao entrar na tela */
.js .vip[data-reveal] {
  clip-path: inset(10% 8% 10% 8%);
  transition: clip-path var(--motion-scene) var(--ease-enter);
}

.js .vip[data-reveal] .vip__content {
  opacity: 0;
  transform: translateY(var(--shift-md));
  transition:
    opacity var(--motion-scene) var(--ease-enter) 60ms,
    transform var(--motion-scene) var(--ease-enter) 60ms;
}

.js .vip.is-in { clip-path: inset(0 0 0 0); }
.js .vip.is-in .vip__content { opacity: 1; transform: none; }

/* ---------- movimento reduzido: estado sem deslocamento ------------------- */

@media (prefers-reduced-motion: reduce) {
  :root {
    --shift-sm: 0px;
    --shift-md: 0px;
    --press-shift: 0px;
    --press-scale: 1;
    --motion-scene: 200ms;
  }
  .js .vip[data-reveal] { clip-path: none; }
}

/* ---------- larguras ------------------------------------------------------ */

@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .avatar { --size: 100px; }
  .hero__id { gap: 14px; }
  .pick__name { font-size: 23px; }
  .btn { padding-inline: 16px; }
}

@media (min-width: 600px) {
  body { background: #0B0D0C; }
  .page {
    margin-block: 24px;
    border-radius: 8px;
    overflow: clip;
    box-shadow: 0 0 0 1px rgb(243 244 241 / .08);
  }
}
