@font-face {
  font-family: "Jakarta";
  src: url("assets/fonte.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --banner: calc((min(100vw, 480px) - 40px) * .3442); /* altura da arte */
  --bloco: calc(374px + var(--banner));             /* altura do perfil + links */
  --ct: max(200px, calc(100vh - var(--bloco)));     /* onde o avatar começa */
}
@supports (height: 100svh) {
  :root { --ct: max(200px, calc(100svh - var(--bloco))); }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: #1a1024; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  color: #fff;
  font-family: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fundo: a foto ocupa a tela inteira ---------- */
.fundo {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  z-index: -1;
  background: #343236;
}

/* Celular: o queixo fica logo acima do avatar */
.fundo img {
  --w: clamp(102vw, calc((var(--ct) - 4px) / 0.639), 145vw);
  position: absolute;
  width: var(--w);
  max-width: none;
  height: auto;
  left: calc(50% - var(--w) * 0.505);
  top: min(0px, calc(var(--ct) - 4px - var(--w) * 0.639));
}

/* Degradê só atrás dos textos */
.fundo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    transparent calc(var(--ct) - 10px),
    rgb(22 8 40 / .40) calc(var(--ct) + 120px),
    rgb(22 8 40 / .58) 100%);
}

/* ---------- Coluna ---------- */
.pagina {
  width: 100%;
  max-width: 480px;              /* 440px de conteúdo + 20px de cada lado */
  margin: 0 auto;
  padding: var(--ct) 20px calc(16px + env(safe-area-inset-bottom, 0px));
}

.perfil { text-align: center; }

.avatar {
  display: block;
  width: 96px; height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgb(222 200 255 / .8);
  box-shadow: 0 6px 22px rgb(10 0 22 / .35);
}

h1 {
  margin-top: 14px;
  font-size: 30px;
  line-height: 33px;
  font-weight: 800;
  letter-spacing: -.025em;
  text-shadow: 0 2px 14px rgb(10 0 22 / .65);
}

.perfil p {
  margin-top: 4px;
  font-size: 15px;
  line-height: 23px;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 8px rgb(10 0 22 / .8);
}

.links { display: grid; gap: 14px; margin-top: 22px; }

.link {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  backdrop-filter: blur(12px) saturate(1.25);
  transition: transform .12s ease, filter .12s ease;
}
.link:active { transform: scale(.98); filter: brightness(1.12); }
.link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (hover: hover) { .link:hover { filter: brightness(1.1); } }

.sensei {
  border: 1px solid rgb(190 135 255 / .55);
  background: rgb(122 38 214 / .42);
  box-shadow: 0 10px 28px rgb(70 0 140 / .28);
}
.sensei img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 491 / 169;
  background: #1c0a30;
}
.sensei-titulo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px 0 18px;
  font-size: 16.5px;
  font-weight: 700;
}

.zap {
  display: grid;
  grid-template-columns: 32px 1fr 18px;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 15px 12px 16px;
  border: 1px solid rgb(255 255 255 / .24);
  background: rgb(255 255 255 / .12);
  font-size: clamp(15px, 4.15vw, 16.5px);
  font-weight: 700;
  line-height: 1.3;
}
.zap-icone { width: 32px; height: 32px; fill: #25d366; }

.seta {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .72;
}

.aviso {
  margin-top: 14px;
  text-align: center;
  font-size: 11.5px;
  line-height: 18px;
  color: rgb(255 255 255 / .82);
  text-shadow: 0 1px 6px rgb(10 0 22 / .8);
}

.status {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 11px 18px;
  border-radius: 999px;
  background: #fff;
  color: #1a1024;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.status.visivel { opacity: 1; visibility: visible; }

/* ---------- Telas baixas (navegador do Instagram em aparelhos menores) ---------- */
@media (max-height: 760px) {
  :root { --bloco: calc(304px + var(--banner)); }
  .avatar { width: 76px; height: 76px; }
  h1 { margin-top: 9px; font-size: 26px; line-height: 29px; }
  .perfil p { margin-top: 1px; font-size: 14px; line-height: 20px; }
  .links { gap: 12px; margin-top: 15px; }
  .sensei-titulo { height: 42px; font-size: 15.5px; }
  .zap { min-height: 58px; padding-block: 9px; }
  .aviso { margin-top: 9px; }
  .pagina { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Computador: rosto à esquerda, links no centro ---------- */
@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  .fundo img {
    --zona: calc(50vw - 220px);                      /* espaço livre ao lado da coluna */
    --w: max(72vh, min(104vh, calc(var(--zona) * 2.27)));
    width: calc(var(--w) * 3.5);
    left: calc(var(--zona) / 2 - var(--w) * 1.005);
    top: min(0px, calc(46vh - var(--w) * 0.41));
  }
  .fundo::after {
    background: linear-gradient(90deg,
      transparent calc(50% - 350px),
      rgb(20 8 38 / .62) calc(50% - 150px),
      rgb(20 8 38 / .62) calc(50% + 150px),
      transparent calc(50% + 460px));
  }
  .pagina {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding-block: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link { transition: none; }
}
