/* ═══════════════════════════════════════════════════════════════
   CAROL PORTILHO — Link Hub · O Veredito
   Tokens derivados de 04-identidade-visual/brand-book-veredito-v1/tokens.css
   + paleta estendida do prompt mestre (bronze, noite profunda, creme).
   ═══════════════════════════════════════════════════════════════ */

/* ——— Fontes oficiais (locais) ——— */
@font-face {
  font-family: "Morganite";
  src: url("../assets/fonts/Morganite-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Morganite";
  src: url("../assets/fonts/Morganite-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/Archivo.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --noite: #0A141B;
  --noite-profunda: #061017;
  --vinho: #4A1D22;
  --vinho-profundo: #300914;
  --carmim: #A31C38;
  --sinal: #F31955;
  --gelo: #EDE6E8;
  --creme: #F5F0EA;
  --bronze: #B79A87;
  --bronze-escuro: #8B6A55;

  --texto-2: rgba(237, 230, 232, 0.68);
  --linha: rgba(183, 154, 135, 0.2);

  --font-display: "Morganite", sans-serif;
  --font-texto: "Archivo", "Helvetica Neue", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  min-height: 100svh;
  background: var(--noite-profunda);
  color: var(--creme);
  font-family: var(--font-texto);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════ BACKDROP CINEMATOGRÁFICO ═══════════════ */

.stageBackdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--noite-profunda);
  isolation: isolate;
}

.stageSlide {
  position: absolute;
  inset: -2%;
  opacity: 0;
  transform: scale(1.045);
  transition:
    opacity 1.6s var(--ease-out),
    transform 7.5s linear;
  will-change: opacity, transform;
}
.stageSlide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);
  filter:
    grayscale(1)
    saturate(0.1)
    contrast(1.08)
    brightness(0.58)
    blur(0.8px);
}
@media (min-width: 1024px) {
  .stageSlide img {
    transform: translateX(var(--shift, 0%)) scale(var(--zoom, 1));
    transform-origin: var(--origin, center);
  }
}
.stageSlideActive {
  opacity: 1;
  transform: scale(1.105);
}

.stageColorGrade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      90deg,
      rgba(6, 16, 23, 0.96) 0%,
      rgba(10, 20, 27, 0.88) 34%,
      rgba(48, 9, 20, 0.58) 70%,
      rgba(10, 20, 27, 0.72) 100%
    ),
    linear-gradient(
      180deg,
      rgba(6, 16, 23, 0.26) 0%,
      rgba(6, 16, 23, 0.12) 50%,
      rgba(6, 16, 23, 0.82) 100%
    );
}

.stageSmoke {
  position: absolute;
  inset: -20%;
  z-index: 3;
  background:
    radial-gradient(circle at 72% 32%, rgba(183, 154, 135, 0.15), transparent 30%),
    radial-gradient(circle at 44% 68%, rgba(74, 29, 34, 0.3), transparent 36%);
  filter: blur(40px);
  animation: smokeDrift 16s ease-in-out infinite alternate;
}

.stageVignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  box-shadow: inset 0 0 180px rgba(3, 10, 14, 0.88);
  pointer-events: none;
}

.stageGrain {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: soft-light;
}

@keyframes smokeDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.04); }
}

/* ═══════════════ LAYOUT DE UMA DOBRA ═══════════════ */

.hub {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3svh, 40px) clamp(20px, 4vw, 24px);
}

/* ═══════════════ PAINEL GLASS ═══════════════ */

.profileShell {
  position: relative;
  width: min(100%, 510px);
  padding: clamp(20px, 3.4svh, 32px) clamp(20px, 3vw, 32px);
  border: 1px solid rgba(183, 154, 135, 0.25);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(10, 20, 27, 0.84), rgba(10, 20, 27, 0.68));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(245, 240, 234, 0.08);
  backdrop-filter: blur(22px) saturate(0.82);
  -webkit-backdrop-filter: blur(22px) saturate(0.82);
}
.profileShell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(245, 240, 234, 0.08),
    transparent 26%,
    transparent 72%,
    rgba(163, 28, 56, 0.06)
  );
}
/* Pulso de Rosa Sinal — a única dose da cor na peça (regra ≤1%) */
.profileShell::after {
  content: "";
  position: absolute;
  top: 0;
  left: 34px;
  width: 54px;
  height: 2px;
  background: linear-gradient(90deg, var(--sinal) 0%, var(--carmim) 58%, var(--bronze) 100%);
}

.shellContent {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(10px, 1.6svh, 16px);
}

/* ═══════════════ SINAL NÃO VERBAL (impressão digital) ═══════════════ */

.nonverbalSignal {
  position: absolute;
  right: -72px;
  bottom: -52px;
  width: 320px;
  opacity: 0.11;
  pointer-events: none;
  color: var(--bronze);
  animation: signalBreath 7s ease-in-out infinite;
}
.nonverbalSignal path {
  stroke: currentColor;
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}
@keyframes signalBreath {
  0%, 100% { opacity: 0.075; transform: scale(0.985); }
  50%      { opacity: 0.14;  transform: scale(1); }
}

/* ═══════════════ RETRATO ═══════════════ */

.profilePortrait {
  position: relative;
  width: clamp(104px, 15svh, 128px);
}
.portraitFrame {
  width: 100%;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  /* recorte editorial arqueado */
  border-radius: 999px 999px 26% 26% / 999px 999px 14% 14%;
  border: 1px solid var(--bronze);
  box-shadow:
    0 0 0 1px rgba(6, 16, 23, 0.9),
    0 0 34px rgba(74, 29, 34, 0.55),
    0 22px 40px rgba(0, 0, 0, 0.5);
}
.portraitFrame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
  /* acalma o fundo esverdeado da foto original — grade, não retoque */
  filter: saturate(0.82) contrast(1.03);
}
/* microacento carmim na base do arco */
.profilePortrait::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 26px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--carmim);
}

/* ═══════════════ IDENTIFICAÇÃO ═══════════════ */

.brandEyebrow {
  color: var(--bronze);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin-top: clamp(2px, 0.8svh, 8px);
}

.brandName {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.1rem, 7.2svh, 4.4rem);
  line-height: 0.96; /* brand book: Morganite nunca abaixo de 0,95 */
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gelo);
}

.brandHeadline {
  font-size: clamp(0.86rem, 1.9svh, 0.98rem);
  font-weight: 460;
  color: var(--texto-2);
  line-height: 1.45;
}
.brandHeadline strong {
  color: var(--creme);
  font-weight: 620;
}

/* ═══════════════ BOTÕES PREMIUM ═══════════════ */

.linkStack {
  display: grid;
  gap: clamp(8px, 1.2svh, 12px);
  width: 100%;
  margin-top: clamp(2px, 0.6svh, 6px);
}

.premiumLink {
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr 22px;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 16px;
  overflow: hidden;
  color: var(--creme);
  text-align: left;
  text-decoration: none;
  background: linear-gradient(100deg, rgba(245, 240, 234, 0.055), rgba(183, 154, 135, 0.035));
  border: 1px solid var(--linha);
  border-radius: 16px;
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    background-color 220ms ease;
}
.premiumLink::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    220px circle at var(--spot-x) var(--spot-y),
    rgba(183, 154, 135, 0.2),
    transparent 58%
  );
  transition: opacity 220ms ease;
}
.premiumLink:hover,
.premiumLink:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(183, 154, 135, 0.52);
}
.premiumLink:hover::before,
.premiumLink:focus-visible::before { opacity: 1; }
.premiumLink:active { transform: translateY(0) scale(0.992); }

.premiumLinkIcon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--bronze);
}
.premiumLinkIcon svg { width: 20px; height: 20px; }

.premiumLinkCopy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2px;
}
.premiumLinkCopy strong {
  font-size: 0.94rem;
  font-weight: 650;
}
.premiumLinkCopy small {
  color: var(--texto-2);
  font-size: 0.75rem;
  line-height: 1.3;
}

.premiumLinkArrow {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 18px;
  color: var(--bronze);
  transition: transform 220ms var(--ease-out);
}
.premiumLinkArrow svg { width: 100%; height: 100%; display: block; }
.premiumLink:hover .premiumLinkArrow { transform: translate(2px, -2px); }

/* botão com URL pendente ({{placeholder}}) */
.premiumLink[aria-disabled="true"],
.communityFeature[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ═══════════════ CTA DA COMUNIDADE ═══════════════ */

.communityFeature {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: clamp(72px, 10svh, 88px);
  padding: 14px 18px 12px;
  overflow: hidden;
  color: var(--creme);
  text-align: left;
  text-decoration: none;
  background:
    radial-gradient(circle at 86% 20%, rgba(183, 154, 135, 0.18), transparent 34%),
    linear-gradient(135deg, var(--vinho), var(--vinho-profundo));
  border: 1px solid rgba(183, 154, 135, 0.5);
  border-radius: 18px;
  box-shadow:
    0 18px 40px rgba(48, 9, 20, 0.3),
    inset 0 1px 0 rgba(245, 240, 234, 0.08);
  transition:
    transform 220ms var(--ease-out),
    box-shadow 220ms ease;
}
.communityFeature:hover,
.communityFeature:focus-visible {
  transform: translateY(-3px);
  box-shadow:
    0 24px 52px rgba(48, 9, 20, 0.42),
    inset 0 1px 0 rgba(245, 240, 234, 0.1);
}
.communityFeature::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 18px;
  width: 30px;
  height: 2px;
  background: var(--carmim);
}

.communityCopy { display: grid; gap: 1px; padding-top: 8px; }

.communityEyebrow {
  color: var(--bronze);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.communityTitle {
  font-family: var(--font-display);
  font-weight: 800;
  white-space: nowrap;
  font-size: clamp(1.9rem, 4.6svh, 2.6rem);
  line-height: 0.96;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gelo);
}
.communityDesc {
  color: var(--texto-2);
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 3px;
}
.communityAction {
  display: grid;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 8px;
  color: var(--bronze);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.communityAction svg {
  width: 17px;
  height: 17px;
  transition: transform 220ms var(--ease-out);
}
.communityFeature:hover .communityAction svg { transform: translate(2px, -2px); }

/* ═══════════════ ASSINATURA ═══════════════ */

.brandSignature {
  color: rgba(237, 230, 232, 0.56);
  font-size: 0.75rem;
  font-weight: 460;
  letter-spacing: 0.06em;
  margin-top: clamp(2px, 0.8svh, 8px);
}
.brandSignature::before,
.brandSignature::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--linha);
  vertical-align: middle;
  margin: 0 10px;
}

/* ═══════════════ ACESSIBILIDADE ═══════════════ */

a:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .stageSlide,
  .stageSmoke,
  .nonverbalSignal {
    animation: none;
    transition: none;
  }
  .stageSlideActive { transform: none; }
  .stageSlide:not(.stageSlideActive) { display: none; }
  .premiumLink,
  .premiumLink .premiumLinkArrow,
  .communityFeature,
  .communityAction svg {
    transition: none;
  }
}

/* ═══════════════ MOBILE COMPACTO — a dobra única é inegociável ═══════════════ */

@media (max-width: 480px) {
  .shellContent { gap: clamp(8px, 1.1svh, 11px); }
  .profileShell { padding: clamp(16px, 2.6svh, 24px) 18px; }
  .profilePortrait { width: clamp(96px, 13svh, 116px); }

  .brandEyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .brandName { font-size: clamp(2.9rem, 6.6svh, 3.8rem); }

  .premiumLink {
    grid-template-columns: 24px 1fr 18px;
    gap: 10px;
    padding: 6px 12px;
    min-height: 56px;
  }
  .premiumLinkCopy small { white-space: nowrap; }

  /* CTA da comunidade empilhado: título respira, ação vira linha */
  .communityFeature {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding: 14px 16px 12px;
  }
  .communityTitle { font-size: clamp(1.75rem, 4.2svh, 2.1rem); }
  .communityAction {
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
    gap: 8px;
  }
  .communityAction svg { width: 16px; height: 16px; }

  .brandSignature { margin-top: 0; }
}

/* ═══════════════ DESKTOP — painel à esquerda, palco à direita ═══════════════ */

@media (min-width: 1024px) {
  .hub {
    justify-content: flex-start;
    padding-left: clamp(48px, 7vw, 140px);
  }
  .profileShell { width: min(100%, 500px); }
  .shellContent { gap: clamp(12px, 2svh, 18px); }
  /* no desktop as fotos usam o enquadramento configurado por slide;
     no mobile o JS troca para positionMobile */
}

/* telas muito baixas (notebook 1366×768): compactar sem cortar */
@media (min-width: 1024px) and (max-height: 800px) {
  .profilePortrait { width: clamp(96px, 13svh, 112px); }
  .brandName { font-size: clamp(2.8rem, 6.4svh, 3.6rem); }
  .shellContent { gap: clamp(8px, 1.4svh, 12px); }
  .premiumLink { min-height: 52px; }
  .communityFeature { min-height: 68px; }
  .communityTitle { font-size: clamp(1.7rem, 4svh, 2.1rem); }
}
