/* Uma Abelhinha: preto e mel, tudo em favo */

:root {
  --preto: #000000;
  --favo: #16110a;
  --favo-2: #221a0e;
  --mel: #f2a900;
  --ouro: #ffd970;
  --ambar: #8a5a00;
  --cera: #fff3d6;
  --cera-80: rgba(255, 243, 214, .82);
  --cera-60: rgba(255, 243, 214, .64);

  --f-titulo: "Fredoka", "M PLUS Rounded 1c", ui-rounded, system-ui, sans-serif;
  --f-texto: "M PLUS Rounded 1c", ui-rounded, system-ui, sans-serif;

  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --hex-largo: polygon(18px 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0 50%);
  --lado: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--preto);
  background-image:
    radial-gradient(120% 60% at 50% 0%, rgba(242, 169, 0, .14), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66 0 50V16L28 0l28 16v34L28 66Zm0 0v34' fill='none' stroke='%23f2a900' stroke-opacity='.07' stroke-width='1.2'/%3E%3C/svg%3E");
  color: var(--cera);
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ouro); outline-offset: 3px; border-radius: 6px; }

/* ---------- Mel escorrendo do topo (desenhado em js/mel.js) ---------- */
.mel {
  position: absolute; inset: 0 0 auto; height: 220px;
  z-index: 5; pointer-events: none;
}
.mel--curta { height: 140px; }
/* reserva sem JavaScript: só a faixa */
.mel__faixa {
  position: absolute; inset: 0 0 auto; height: 7px;
  background: linear-gradient(180deg, var(--ouro), var(--mel));
}
.mel__svg { position: absolute; inset: 0; display: block; overflow: visible; }

/* ---------- Abelha ---------- */
.asa { transform-box: fill-box; transform-origin: 50% 90%; }
.arroba__abelha { width: 22px; height: 22px; flex: none; }

/* ---------- Botão em favo alongado ---------- */
.hexbtn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 14px clamp(26px, 8vw, 38px);
  border: 0; background: none; cursor: pointer;
  font-family: var(--f-titulo); font-weight: 600; font-size: clamp(16.5px, 5.2vw, 19px); line-height: 1.15;
  letter-spacing: .005em;
  text-decoration: none; text-align: center;
  color: var(--preto);
  -webkit-tap-highlight-color: transparent;
}
.hexbtn::before, .hexbtn::after {
  content: ""; position: absolute; clip-path: var(--hex-largo);
}
.hexbtn::before {
  inset: 0; z-index: -1;
  background:
    linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) -160% 0 / 60% 100% no-repeat,
    linear-gradient(180deg, var(--ouro), var(--mel) 70%, #e29b00);
  transition: background-position .7s ease;
}
.hexbtn::after { inset: -4px; z-index: -2; background: var(--cera); opacity: 0; }
.hexbtn:focus-visible { outline: none; }
.hexbtn:focus-visible::after { opacity: 1; }
@media (hover: hover) { .hexbtn:hover::before { background-position: 260% 0, 0 0; } }
.hexbtn:active { transform: translateY(1px); }
.hexbtn--mel { filter: drop-shadow(0 10px 22px rgba(242, 169, 0, .38)); }
.hexbtn--mel::before { animation: reflexo 5.5s ease-in-out 3.6s infinite; }
.selo .hexbtn--mel::before { animation-delay: 1.2s; }
@keyframes reflexo {
  0% { background-position: -160% 0, 0 0; }
  16%, 100% { background-position: 260% 0, 0 0; }
}
.hexbtn svg { width: 22px; height: 22px; flex: none; }

/* ---------- Hexágono genérico (fotos) ---------- */
.hex { display: block; clip-path: var(--hex); aspect-ratio: .866; overflow: hidden; }
.hex img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   PÁGINA 1: a porta
   ========================================================= */
.porta__palco {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: minmax(46svh, 1fr) auto;
}
.porta__retrato {
  position: relative; margin: 0;
  overflow: hidden;
}
.porta__retrato img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 36%;
  animation: revelar 1.6s ease-out both;
}
/* fundo do retrato termina em favo, com o contorno dourado */
.porta__retrato::after {
  content: ""; position: absolute; inset: auto 0 0; height: 46%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='28' viewBox='0 0 64 28'%3E%3Cpath d='M0 3 32 22 64 3v25H0z' fill='%23000'/%3E%3Cpath d='M0 3 32 22 64 3' fill='none' stroke='%23f2a900' stroke-width='2.5'/%3E%3C/svg%3E") repeat-x 50% 100% / 64px 28px,
    linear-gradient(180deg, transparent, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .92) calc(100% - 14px), transparent calc(100% - 14px));
}
@keyframes revelar {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: none; }
}

.porta__texto {
  position: relative; z-index: 2;
  background: radial-gradient(closest-side, rgba(242, 130, 0, .16), transparent);
  padding: 0 var(--lado) calc(28px + env(safe-area-inset-bottom));
  margin-top: 4px;
  text-align: center;
  animation: subir 1s ease-out .5s both;
}
@keyframes subir {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.arroba {
  position: absolute; left: 0; right: 0; top: -58px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .7);
  font-weight: 500; font-size: 15px; color: var(--cera-80);
}
.nome {
  margin: 0;
  font-family: var(--f-titulo); font-weight: 700; font-stretch: 112%;
  font-size: clamp(40px, calc((100vw - 2 * var(--lado)) / 5.7), 84px); line-height: 1; letter-spacing: -.01em;
  padding-bottom: .04em;
  background: linear-gradient(180deg, var(--cera) 0%, var(--ouro) 38%, var(--mel) 75%, #d58c00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(242, 169, 0, .28));
}
.bio {
  text-wrap: balance;
  max-width: 30ch; margin: 10px auto 34px;
  font-size: 16.5px; color: var(--cera-80);
}

.entrar { position: relative; max-width: 340px; margin: 0 auto; }
.entrar .hexbtn { width: 100%; }
.voadora {
  position: absolute; width: 46px; height: 46px;
  right: 4px; top: -30px;
  pointer-events: none;
  animation: voo 2.4s cubic-bezier(.45, .05, .3, 1) .9s both, pairar 2.8s ease-in-out 3.3s infinite;
}
.voadora .asa { animation: bater .09s linear infinite alternate; }
@keyframes voo {
  0% { opacity: 0; transform: translate(-62vw, -48svh) rotate(-25deg) scale(.7); }
  12% { opacity: 1; }
  45% { transform: translate(-12vw, -30svh) rotate(18deg) scale(1.05); }
  75% { transform: translate(14px, -58px) rotate(-12deg); }
  100% { opacity: 1; transform: translate(0, 0) rotate(14deg); }
}
@keyframes pairar {
  0%, 100% { transform: translate(0, 0) rotate(14deg); }
  50% { transform: translate(-3px, -7px) rotate(8deg); }
}
@keyframes bater {
  from { transform: scaleY(1); }
  to { transform: scaleY(.45); }
}

.dica {
  text-wrap: balance;
  max-width: 32ch; margin: 16px auto 0;
  font-size: 14px; color: var(--cera-60);
}

@media (min-width: 900px) {
  .porta__palco {
    grid-template-rows: none;
    grid-template-columns: minmax(360px, 460px) minmax(0, 580px);
    justify-content: center; align-items: center;
    gap: clamp(48px, 7vw, 110px);
    padding: 90px 40px 60px;
  }
  /* o retrato vira uma célula do favo, com contorno dourado */
  .porta__retrato {
    aspect-ratio: .866;
    clip-path: var(--hex);
    background: linear-gradient(160deg, var(--ouro), var(--mel) 45%, var(--ambar));
  }
  .porta__retrato img {
    inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px);
    clip-path: var(--hex);
  }
  .porta__retrato::after { display: none; }
  .porta__texto { margin: 0; padding: 0; text-align: left; }
  .arroba { position: static; justify-content: flex-start; margin: 0 0 4px; text-shadow: none; }
  .nome { font-size: clamp(76px, 7.4vw, 104px); }
  .bio, .dica, .entrar { margin-left: 0; }
  .entrar { max-width: 380px; }
  .entrar .hexbtn { min-height: 64px; font-size: 21px; }
  .dica { font-size: 15px; }
  .bio { font-size: 19px; }
}

/* =========================================================
   PÁGINA 2: a colmeia
   ========================================================= */
.colmeia { padding-bottom: env(safe-area-inset-bottom); }

.perfil {
  position: relative;
  max-width: 560px; margin: 0 auto;
  padding: 50px var(--lado) 0;
  text-align: center;
}
.voltar {
  position: absolute; left: var(--lado); top: 46px;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--favo); border: 1.5px solid rgba(242, 169, 0, .35);
  color: var(--ouro);
}
.voltar svg { width: 20px; height: 20px; }
.perfil__foto {
  width: 84px; margin: 0 auto;
  padding: 3px; background: linear-gradient(160deg, var(--ouro), var(--mel), var(--ambar));
}
.perfil__foto img { clip-path: var(--hex); }
.perfil__nome {
  margin: 8px 0 0;
  font-family: var(--f-titulo); font-weight: 700; font-stretch: 112%;
  font-size: 34px; line-height: 1; color: var(--ouro);
}
.perfil__arroba {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px 0 0; font-size: 15px; font-weight: 500; color: var(--cera-80);
}

.favos {
  max-width: 560px; margin: 0 auto;
  padding: 0 var(--lado);
}
.bloco { margin-top: 30px; }
.bloco:first-child { margin-top: 20px; }
.bloco__titulo {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px;
  font-family: var(--f-titulo); font-weight: 600; font-size: 22px; line-height: 1.2;
  color: var(--cera);
}
.bloco__titulo svg { width: 22px; height: 22px; color: var(--mel); flex: none; }

/* --- selo +18 --- */
.selo {
  position: relative; overflow: hidden;
  padding: 20px 18px 20px;
  border-radius: 28px;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(242, 169, 0, .22), transparent 70%),
    var(--favo);
  border: 1.5px solid rgba(242, 169, 0, .45);
  text-align: center;
}
.selo__fotos { display: flex; justify-content: center; margin-bottom: 10px; }
.selo__fotos .hex {
  width: 58px; margin: 0 -5px;
  filter: blur(7px) saturate(1.2);
}
.selo__fotos .hex:nth-child(2) { width: 70px; margin-top: -6px; z-index: 1; }
.selo__titulo {
  text-wrap: balance;
  margin: 0; font-family: var(--f-titulo); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--ouro);
}
.selo__texto { text-wrap: balance; max-width: 34ch; margin: 4px auto 16px; font-size: 15px; color: var(--cera-80); }
.selo .hexbtn { width: 100%; max-width: 340px; }
.selo.is-abrindo { animation: derreter .45s ease-in forwards; }
@keyframes derreter {
  to { opacity: 0; transform: translateY(18px) scale(.97); }
}

/* --- plataformas --- */
.plataformas { display: grid; gap: 12px; }
.plat {
  display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 14px;
  min-height: 98px; padding: 12px 14px 12px 12px;
  border-radius: 24px;
  background: var(--favo);
  border: 1.5px solid rgba(242, 169, 0, .5);
  text-decoration: none;
  transition: border-color .2s, background-color .2s;
  animation: chegar .5s cubic-bezier(.2, .8, .2, 1) both;
}
.plat:nth-child(2) { animation-delay: .08s; }
.plat:nth-child(3) { animation-delay: .16s; }
@keyframes chegar {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.plat__foto { width: 84px; padding: 2px; background: var(--mel); }
.plat__foto img { clip-path: var(--hex); }
.plat__info { min-width: 0; }
.plat__nome {
  display: block;
  font-family: var(--f-titulo); font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--ouro);
}
.plat__desc { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; color: var(--cera-80); }
.plat__acao {
  padding: 9px 15px; border-radius: 999px;
  background: var(--mel); color: var(--preto);
  font-family: var(--f-titulo); font-weight: 600; font-size: 16px; white-space: nowrap;
}
@media (hover: hover) { .plat:hover { border-color: var(--ouro); background-color: var(--favo-2); } }

/* destaque: cartão grande com foto, primeiro da lista */
.plat--estrela {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0;
  min-height: 400px; padding: 18px;
  border: 2px solid var(--mel);
  background: var(--preto);
  box-shadow: 0 18px 50px -16px rgba(242, 169, 0, .65);
}
.plat__capa { position: absolute; inset: 0; }
.plat__capa img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.plat__capa::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, .78) 70%, rgba(0, 0, 0, .95));
}
.plat__selo {
  position: absolute; top: 14px; left: 14px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--mel); color: var(--preto);
  font-family: var(--f-titulo); font-weight: 600; font-size: 14.5px; line-height: 1.2;
}
.plat--estrela .plat__info { position: relative; }
.plat--estrela .plat__nome { font-size: 36px; font-stretch: 110%; line-height: 1.05; }
.plat--estrela .plat__desc { font-size: 15.5px; color: var(--cera); }
.plat--estrela .hexbtn { position: relative; width: 100%; margin-top: 14px; }
@media (hover: hover) { .plat--estrela:hover { border-color: var(--ouro); background-color: var(--preto); } }
.plat.is-em-breve { cursor: default; }
.plat.is-em-breve .hexbtn { filter: none; opacity: .9; }

/* --- canais do YouTube --- */
.canais { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.canal {
  display: flex; flex-direction: column;
  border-radius: 24px; overflow: hidden;
  background: var(--favo);
  border: 1.5px solid rgba(242, 169, 0, .3);
  text-decoration: none;
  transition: border-color .2s;
}
@media (hover: hover) { .canal:hover { border-color: var(--mel); } }
.canal__capa { position: relative; display: block; aspect-ratio: 4 / 4.2; overflow: hidden; }
.canal__capa img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transition: transform .5s ease; }
@media (hover: hover) { .canal:hover .canal__capa img { transform: scale(1.04); } }
.canal__capa::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(0, 0, 0, .62) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23ffd970'/%3E%3C/svg%3E") 56% 50% / 26px no-repeat;
  border: 1.5px solid var(--mel);
}
.canal__info { display: block; padding: 12px 14px 4px; flex: 1; }
.canal__nome { display: block; font-family: var(--f-titulo); font-weight: 700; font-size: 19px; line-height: 1.15; color: var(--ouro); }
.canal__meta { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--cera-80); }
.canal__acao {
  margin: 10px 14px 14px; padding: 9px 0; border-radius: 999px;
  background: var(--mel); color: var(--preto); text-align: center;
  font-family: var(--f-titulo); font-weight: 600; font-size: 16px;
}

/* --- redes em favo --- */
.favo {
  --w: min(112px, calc((100vw - 20px) / 3));
  --h: calc(var(--w) * 1.1547);
  padding-bottom: 4px;
}
.favo__linha { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 6px; }
.favo__linha + .favo__linha { margin-top: calc(var(--h) * -.25 + 5px); }
.celula { width: var(--w); height: var(--h); position: relative; }
.celula a, .celula > span {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  clip-path: var(--hex);
  background: linear-gradient(170deg, var(--favo-2), var(--favo));
  color: var(--ouro); text-decoration: none; text-align: center;
  transition: background .2s, color .2s;
}
/* borda dourada: hexágono por baixo, 2px maior */
.celula::before {
  content: ""; position: absolute; inset: 0;
  clip-path: var(--hex); background: rgba(242, 169, 0, .55);
}
.celula a { inset: 2px; }
.celula > span { inset: 2px; }
.celula svg { width: 26px; height: 26px; }
.celula__rede { font-family: var(--f-titulo); font-weight: 600; font-size: 13.5px; line-height: 1.1; color: var(--cera); }
.celula__perfil { max-width: 94%; font-size: clamp(9.5px, 2.95vw, 11px); line-height: 1.2; color: var(--cera-80); white-space: nowrap; }
.celula a:focus-visible, .celula a:active { background: linear-gradient(170deg, var(--ouro), var(--mel)); color: var(--preto); }
.celula a:focus-visible span, .celula a:active span { color: var(--preto); }
@media (hover: hover) {
  .celula a:hover { background: linear-gradient(170deg, var(--ouro), var(--mel)); color: var(--preto); }
  .celula a:hover span { color: var(--preto); }
}
.celula a:focus-visible { outline: none; }
.celula:has(a:focus-visible)::before { background: var(--cera); inset: -3px; }
.celula--mel > span { background: radial-gradient(circle at 50% 40%, rgba(242, 169, 0, .3), var(--favo) 70%); }
.celula--mel svg { width: 46px; height: 46px; }

.rodape {
  max-width: 560px; margin: 44px auto 0;
  padding: 18px var(--lado) 30px;
  border-top: 1px solid rgba(242, 169, 0, .2);
  text-align: center; font-size: 13.5px; color: var(--cera-60);
}
.rodape p { margin: 4px 0; }
.rodape a { display: inline-block; padding: 10px 2px; color: var(--ouro); }

@media (min-width: 600px) {
  .perfil { padding-top: 76px; }
  .voltar { top: 72px; }
  .favo { --w: 128px; }
  .celula__perfil { font-size: 11.5px; }
}

/* celulares estreitos: o "Assinar" desce para baixo do texto */
@media (max-width: 380px) {
  .plat:not(.plat--estrela) { grid-template-columns: 70px 1fr; column-gap: 12px; row-gap: 8px; min-height: 0; }
  .plat__foto { width: 70px; grid-row: span 2; }
  .plat__info { grid-column: 2; }
  .plat__nome { font-size: 20px; }
  .plat__acao { grid-column: 2; justify-self: start; padding: 7px 18px; font-size: 15px; }
  .selo__titulo { font-size: 21px; }
}

/* telas baixas: cabeçalho compacto para o botão +18 caber sem rolar */
@media (max-height: 620px) {
  .perfil { padding-top: 38px; }
  .voltar { top: 34px; }
  .perfil__foto { width: 62px; }
  .perfil__nome { margin-top: 4px; font-size: 28px; }
  .bloco:first-child { margin-top: 14px; }
  .selo { padding-top: 16px; }
  .selo__fotos { margin-bottom: 6px; }
  .selo__fotos .hex { width: 46px; }
  .selo__fotos .hex:nth-child(2) { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
}
