/* ==========================================================
   Rastrek | Links da bio (Instagram)
   Mesma linguagem da página do aplicativo: amarelo + grafite,
   fonte do sistema, vidro, painel grafite e entrada suave.
   ========================================================== */

:root {
  --amarelo: #fdb813;
  --amarelo-escuro: #f2a900;
  --grafite: #333333;
  --branco: #ffffff;
  --cinza-claro: #f5f5f7;
  --texto-2: #666666;
  --linha: rgba(51, 51, 51, .08);
  --painel: #333333;          /* painel grafite (planos) */

  --suave: cubic-bezier(.22, 1, .36, 1);   /* sem rebote, como mola criticamente amortecida */

  --margem: max(20px, env(safe-area-inset-left));
  --margem-dir: max(20px, env(safe-area-inset-right));
  --largura: 460px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--branco);
  color: var(--grafite);
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--grafite); outline-offset: 4px; border-radius: 14px; }

svg.seta, .plano-acao svg, .app-acao svg {
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Página ---------- */
.pagina {
  position: relative;
  max-width: calc(var(--largura) + 40px);
  margin: 0 auto;
  padding: calc(36px + env(safe-area-inset-top)) var(--margem-dir) calc(40px + env(safe-area-inset-bottom)) var(--margem);
}

/* ---------- Topo minimalista: logo + selo com ponto de sinal ---------- */
.topo {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 0 32px;
}
.logo-titulo { margin: 0; }
.logo { display: block; width: 136px; }
.logo img { width: 100%; height: auto; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 18px 0 0; padding: 6px 12px 6px 10px;
  border-radius: 99px;
  border: 1px solid var(--linha);
  font-size: .8125rem; font-weight: 500; line-height: 1.2; letter-spacing: -.003em;
  color: var(--texto-2);
}
.chip.entra { animation-delay: .06s; }

/* Ponto amarelo que emite 2 pulsos de sinal e para */
.sinal {
  position: relative; flex: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amarelo);
}
.sinal::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--amarelo); opacity: 0;
  animation: sinal 1.8s cubic-bezier(.2, .6, .3, 1) .8s 2;
}
@keyframes sinal { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3); opacity: 0; } }

h1 {
  margin: 0 auto;
  max-width: 15ch;
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -.028em;
  font-weight: 700;
  text-wrap: balance;
}
.sub {
  margin: 12px auto 24px;
  max-width: 32ch;
  font-size: 1rem;
  line-height: 1.45;
  letter-spacing: -.006em;
  color: var(--texto-2);
  text-wrap: pretty;
}

/* ---------- Toque: resposta imediata, no pressionar ---------- */
.cta, .plano, .app, .lista a {
  transition: transform .25s var(--suave), box-shadow .25s var(--suave), background-color .2s ease;
}
.cta:active, .plano:active, .app:active, .lista a:active { transform: scale(.975); transition-duration: .1s; }

/* ---------- Botão principal ---------- */
.cta {
  display: flex; align-items: center; gap: 14px;
  min-height: 68px;
  padding: 12px 18px 12px 16px;
  border-radius: 20px;
  background: var(--amarelo);
  color: #241f00;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 16px 30px -16px rgba(180, 120, 0, .7);
}
.cta-ic {
  flex: none; width: 40px; height: 40px; padding: 8px;
  border-radius: 50%;
  background: #333333; fill: var(--amarelo);
}
.cta > span { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.cta strong { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.015em; }
.cta small { margin-top: 2px; font-size: .8125rem; opacity: .75; }
.cta .seta { flex: none; width: 18px; height: 18px; opacity: .6; }
@media (hover: hover) {
  .cta:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 20px 34px -16px rgba(180, 120, 0, .8); }
}

/* ---------- Planos: um painel grafite ---------- */
.bloco { margin-top: 36px; }
.rotulo {
  margin: 0 0 10px 4px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: var(--texto-2);
}

.planos {
  list-style: none; margin: 0; padding: 6px;
  display: grid; gap: 6px;
  background: var(--painel);
  border-radius: 26px;
  color: #fff;
}
.plano {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px 16px;
  border-radius: 20px;
}
@media (hover: hover) { .plano:hover { background: rgba(255, 255, 255, .05); } }

.plano-destaque { background: rgba(253, 184, 19, .1); box-shadow: inset 0 0 0 1px rgba(253, 184, 19, .35); }
@media (hover: hover) { .plano-destaque:hover { background: rgba(253, 184, 19, .15); } }

.plano-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plano-nome { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.012em; }
.selo-plano {
  align-self: flex-start; margin-bottom: -2px; padding: 3px 9px;
  border-radius: 99px; background: var(--amarelo); color: #241f00;
  font-style: normal; font-size: .6875rem; font-weight: 700; letter-spacing: .01em;
}
.preco { white-space: nowrap; font-size: 1.375rem; font-weight: 700; letter-spacing: -.025em; color: var(--amarelo); font-variant-numeric: tabular-nums; }
.preco small { font-size: .75rem; font-weight: 600; letter-spacing: 0; color: rgba(255, 255, 255, .6); }
.preco small:first-child { margin-right: 2px; color: var(--amarelo); }

.plano-desc { font-size: .875rem; line-height: 1.45; color: rgba(255, 255, 255, .7); }
.plano-acao {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 2px;
  font-size: .875rem; font-weight: 600; color: var(--amarelo);
}
.plano-acao svg { width: 15px; height: 15px; }

.nota {
  margin: 12px 4px 0;
  font-size: .8125rem; line-height: 1.45; color: var(--texto-2);
}

/* ---------- Cartão do aplicativo ---------- */
.app {
  position: relative;
  display: flex; align-items: stretch;
  margin-top: 28px;
  min-height: 150px;
  border-radius: 24px;
  background: var(--cinza-claro);
  border: 1px solid var(--linha);
  overflow: hidden;
  isolation: isolate;
}
@media (hover: hover) { .app:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -20px rgba(0, 0, 0, .35); } }

.app-texto {
  position: relative; z-index: 2;
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 0 20px 20px;
}
.app-texto strong { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.015em; }
.app-texto > span:not(.app-acao) { max-width: 22ch; font-size: .8125rem; line-height: 1.45; color: var(--texto-2); }
.app-acao {
  display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 10px;
  font-size: .875rem; font-weight: 600;
}
.app-acao svg { width: 15px; height: 15px; }

.app-visual { position: relative; flex: none; width: 128px; }
.mini-disco {
  position: absolute; right: -40px; top: 50%;
  width: 170px; aspect-ratio: 1; margin-top: -85px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd15a, var(--amarelo) 55%, var(--amarelo-escuro));
}
.mini-fone {
  position: absolute; left: 14px; top: 22px;
  width: 96px; padding: 4px;
  border-radius: 20px;
  background: linear-gradient(150deg, #3a3a3c, #111113);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 20px 30px -14px rgba(51, 40, 0, .55);
  transform: rotate(-6deg);
  transition: transform .5s var(--suave);
}
.mini-fone img { aspect-ratio: 1 / 2; width: 100%; height: auto; object-fit: cover; object-position: top; border-radius: 16px; }
@media (hover: hover) { .app:hover .mini-fone { transform: rotate(-3deg) translateY(-4px); } }

/* ---------- Lista de links (agrupada, linhas finas) ---------- */
.lista {
  list-style: none; margin: 16px 0 0; padding: 0;
  border-radius: 24px;
  background: var(--cinza-claro);
  border: 1px solid var(--linha);
  overflow: hidden;
}
.lista li + li a::before {
  content: ""; position: absolute; top: 0; left: 68px; right: 0;
  border-top: 1px solid var(--linha);
}
.lista a {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 64px;
  padding: 10px 18px 10px 14px;
}
.lista a:active { background: rgba(0, 0, 0, .04); transform: none; }
@media (hover: hover) { .lista a:hover { background: rgba(0, 0, 0, .03); } }

.ic {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: #333333;
}
.ic svg { width: 20px; height: 20px; fill: none; stroke: var(--amarelo); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.txt strong { font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; }
.txt small { margin-top: 2px; font-size: .8125rem; color: var(--texto-2); }
.lista .seta { flex: none; width: 16px; height: 16px; color: var(--texto-2); opacity: .7; }

/* ---------- Emergência (0800) ---------- */
.emergencia-bloco { margin-top: 16px; }
.emergencia {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 18px 20px 22px;
  border-radius: 26px;
  background: var(--painel);
  color: #fff;
  transition: transform .25s var(--suave), box-shadow .25s var(--suave);
}
.emergencia:active { transform: scale(.975); transition-duration: .1s; }
@media (hover: hover) { .emergencia:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .5); } }

.emergencia-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.emergencia-titulo { font-size: .875rem; font-weight: 600; letter-spacing: -.005em; color: rgba(255, 255, 255, .72); }
.emergencia-numero {
  margin: 2px 0 4px;
  font-size: clamp(1.625rem, 1.2rem + 2vw, 2rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -.025em;
  color: var(--amarelo);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.emergencia-desc { font-size: .8125rem; line-height: 1.4; color: rgba(255, 255, 255, .66); }

.ligar {
  flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--amarelo);
  box-shadow: 0 0 0 6px rgba(253, 184, 19, .14);
}
.ligar svg { width: 24px; height: 24px; fill: #241f00; }


/* ---------- Entrada ---------- */
@keyframes surge { from { opacity: 0; transform: translateY(12px); } }
.entra { animation: surge .9s var(--suave) both; }
.cta.entra { animation-delay: .12s; }

.js .revela { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--suave), transform .7s var(--suave); }
.js .revela.visivel { opacity: 1; transform: none; }
.js .planos.revela { transition-delay: .06s; }
.js .nota.revela { transition-delay: .12s; }

/* ---------- Telas pequenas (320px) ---------- */
@media (max-width: 360px) {
  .cta { gap: 12px; padding-left: 12px; }
  .cta strong { font-size: 1rem; }
  .plano { padding: 16px 14px 14px; }
  .plano-topo { flex-direction: column; gap: 2px; }
  .app-visual { width: 104px; }
  .emergencia { gap: 12px; padding: 18px 14px 18px 18px; }
  .ligar { width: 46px; height: 46px; }
  .mini-fone { width: 84px; left: 10px; }
}

/* ---------- Acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
  .entra, .sinal::after { animation: none; }
  .js .revela { transform: none; transition: opacity .3s ease; }
  .cta, .plano, .app, .lista a, .mini-fone, .emergencia { transition: none; }
  .cta:hover, .cta:active, .plano:active, .app:hover, .app:active, .emergencia:hover, .emergencia:active { transform: none; }
  .app:hover .mini-fone { transform: rotate(-6deg); }
}

@media (prefers-contrast: more) {
  :root { --texto-2: #444444; --linha: rgba(51, 51, 51, .3); }
  .plano-desc, .preco small, .emergencia-desc, .emergencia-titulo { color: rgba(255, 255, 255, .88); }
}

/* ---------- Modo escuro (segue o aparelho) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --branco: #161617;
    --grafite: #f5f5f7;
    --cinza-claro: #1f1f21;
    --texto-2: #a1a1a6;
    --linha: rgba(255, 255, 255, .1);
    --painel: #232325;
  }
  .planos, .emergencia { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
  .cta { box-shadow: 0 16px 30px -18px rgba(253, 184, 19, .45); }
  .cta-ic, .ic { background: #0b0b0c; }
  .lista a:active { background: rgba(255, 255, 255, .06); }
  @media (hover: hover) { .lista a:hover { background: rgba(255, 255, 255, .04); } }
  .mini-fone { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 20px 30px -14px rgba(0, 0, 0, .8); }
  :focus-visible { outline-color: var(--amarelo); }
}
@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root { --texto-2: #c7c7cc; }
}
