/* =====================================================================
   layout.css — casca da página: fundo da Área de Membros, barra de
   vidro do topo, menu mobile, rodapé, barra fixa, preloader e lightbox
   ===================================================================== */

/* ---------- Preloader (o mesmo da Área de Membros) ---------- */
.ion-pl {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 50% 42%, #15140f 0%, #060608 62%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.ion-pl--hide { opacity: 0; visibility: hidden; pointer-events: none; }
.ion-pl__wrap { position: relative; width: 138px; height: 138px; display: grid; place-items: center; }
.ion-pl__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: pl-rot 14s linear infinite; }
.ion-pl__ring circle { fill: none; stroke: #F9C90A; stroke-opacity: 0.42; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1.5 9; }
.ion-pl__dot { position: absolute; inset: 0; animation: pl-rot 1.15s linear infinite; }
.ion-pl__dot::before {
  content: ''; position: absolute; top: -3px; left: 50%;
  width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: #F9C90A; box-shadow: 0 0 10px 1px rgba(249, 201, 10, 0.9);
}
.ion-pl__disc {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #1a1a1f 0%, #0b0b0f 78%);
  border: 1px solid rgba(249, 201, 10, 0.18);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.65), 0 0 34px rgba(249, 201, 10, 0.12);
}
.ion-pl__disc img { width: 38px; }
@keyframes pl-rot { to { transform: rotate(360deg); } }

/* ---------- Fundo da Área de Membros (sem partículas) ---------- */
.atmo {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1050px 580px at 14% -8%, rgba(249, 201, 10, 0.095), transparent 62%),
    radial-gradient(920px 540px at 90% 6%, rgba(224, 168, 0, 0.085), transparent 64%),
    var(--ion-canvas);
}
.atmo__bolts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 50% 46%, rgba(0, 0, 0, 0.12) 16%, rgba(0, 0, 0, 0.5) 54%, #000 94%);
  mask-image: radial-gradient(ellipse 88% 82% at 50% 46%, rgba(0, 0, 0, 0.12) 16%, rgba(0, 0, 0, 0.5) 54%, #000 94%);
}
.atmo__plane {
  position: absolute;
  inset: -128px -120px;
  will-change: transform;
  animation: bolt-glide 22s linear infinite;
}
.atmo__base {
  position: absolute;
  inset: 0;
  background: url('../assets/brand/patterns/bolt-tile-yellow.svg') repeat;
  background-size: 120px 128px;
  opacity: 0.02;
}
.atmo__glow {
  position: absolute;
  inset: 0;
  -webkit-mask: url('../assets/brand/patterns/bolt-tile-yellow.svg') repeat;
  mask: url('../assets/brand/patterns/bolt-tile-yellow.svg') repeat;
  -webkit-mask-size: 120px 128px;
  mask-size: 120px 128px;
}
.atmo__wave {
  position: absolute;
  inset: -32%;
  will-change: transform, opacity;
}
.atmo__wave--a {
  background: radial-gradient(ellipse 42% 24% at 50% 50%, rgba(255, 232, 117, 0.18) 0%, rgba(249, 201, 10, 0.08) 44%, transparent 76%);
  animation: wave-a 11s ease-in-out infinite;
}
.atmo__wave--b {
  background: radial-gradient(ellipse 34% 30% at 50% 50%, rgba(249, 201, 10, 0.14) 0%, rgba(224, 168, 0, 0.06) 46%, transparent 76%);
  animation: wave-b 21s ease-in-out infinite;
}
.atmo__orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
}
.atmo__orb--a {
  top: -140px; left: -110px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(249, 201, 10, 0.4) 0%, rgba(224, 168, 0, 0.14) 42%, transparent 72%);
  filter: blur(85px);
  animation: orb-a 18s ease-in-out infinite;
}
.atmo__orb--b {
  top: 30%; right: -160px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(224, 168, 0, 0.36) 0%, rgba(184, 134, 11, 0.12) 45%, transparent 72%);
  filter: blur(95px);
  animation: orb-b 23s ease-in-out infinite;
}
@keyframes bolt-glide { to { transform: translate3d(120px, -128px, 0); } }
@keyframes wave-a {
  0% { transform: translate3d(-34%, 26%, 0) rotate(-18deg); opacity: 0; }
  28%, 72% { opacity: 1; }
  100% { transform: translate3d(34%, -26%, 0) rotate(-18deg); opacity: 0; }
}
@keyframes wave-b {
  0% { transform: translate3d(32%, 28%, 0) rotate(16deg); opacity: 0; }
  30%, 70% { opacity: 0.9; }
  100% { transform: translate3d(-30%, -24%, 0) rotate(16deg); opacity: 0; }
}
@keyframes orb-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.45; }
  50% { transform: translate3d(80px, 60px, 0) scale(1.12); opacity: 0.65; }
}
@keyframes orb-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.4; }
  50% { transform: translate3d(-90px, -50px, 0) scale(1.1); opacity: 0.6; }
}

/* ---------- Barra superior de vidro (flutuante) ---------- */
.topbar {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 100;
  padding-inline: var(--gutter);
  pointer-events: none;
}
.topbar__bar {
  pointer-events: auto;
  max-width: var(--container);
  height: var(--header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 10px 0 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 100%), rgba(10, 10, 14, 0.32);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 14px 40px rgba(0, 0, 0, 0.32);
  transition: background-color 0.4s ease, box-shadow 0.4s ease, transform 0.5s var(--ease-out-expo), height 0.4s var(--ease-out-expo);
}
.topbar.is-scrolled .topbar__bar {
  --header-h: 60px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 100%), rgba(8, 8, 12, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 20px 50px rgba(0, 0, 0, 0.55);
}
/* Fio dourado que acende embaixo da barra */
.topbar__bar::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249, 201, 10, 0.75), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.topbar__bar { position: relative; }
.topbar.is-scrolled .topbar__bar::after { opacity: 1; }

/* Logo da barra (SVG inline animado + holofote elétrico) */
.brand {
  --mouse-x: 30%;
  --mouse-y: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  padding-block: 8px;
}
.brand__logo { position: relative; width: 138px; }
.brand__logo svg { width: 100%; height: auto; overflow: visible; }
.brand__electric {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  transition: --ion-spot-inner 0.22s ease-out, --ion-spot-outer 0.28s ease-out;
  -webkit-mask-image: radial-gradient(circle at var(--mouse-x) var(--mouse-y), #000 var(--ion-spot-inner), transparent var(--ion-spot-outer));
  mask-image: radial-gradient(circle at var(--mouse-x) var(--mouse-y), #000 var(--ion-spot-inner), transparent var(--ion-spot-outer));
}
.brand:hover .brand__electric { --ion-spot-inner: 40px; --ion-spot-outer: 120px; }
.brand__halo {
  position: absolute;
  left: var(--mouse-x);
  top: var(--mouse-y);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  background: radial-gradient(circle closest-side, rgba(249, 201, 10, 0.3), rgba(249, 201, 10, 0.06) 60%, transparent);
  transition: opacity 0.25s ease, transform 0.3s ease;
}
.brand:hover .brand__halo { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.brand .logo-bolt { filter: drop-shadow(0 0 0 rgba(249, 201, 10, 0)); transition: filter 0.4s ease; }
.brand:hover .logo-bolt { filter: drop-shadow(0 0 10px rgba(249, 201, 10, 0.7)); }

/* Menu em pílula de vidro com indicador amarelo que desliza */
.navpill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.navpill__link {
  position: relative;
  z-index: 1;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-dim);
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.25s ease;
}
.navpill__link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.navpill__link.is-active { color: #111113; background: transparent; }
.navpill__indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(135deg, rgba(255, 214, 40, 0.97) 0%, rgba(249, 201, 10, 0.92) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 170, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 6px rgba(160, 110, 0, 0.25),
    0 0 22px rgba(249, 201, 10, 0.45);
  transition:
    left 0.72s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.72s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease;
  transition:
    left 0.8s linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1),
    width 0.8s linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1),
    opacity 0.25s ease;
}
.navpill__indicator.is-on { opacity: 1; }
.navpill__indicator.is-squashing { animation: ion-pill-squash 0.78s ease-out; }
@keyframes ion-pill-squash {
  0% { transform: scaleX(1) scaleY(1); }
  30% { transform: scaleX(1.08) scaleY(0.9); }
  55% { transform: scaleX(0.97) scaleY(1.04); }
  75% { transform: scaleX(1.01) scaleY(0.99); }
  100% { transform: scaleX(1) scaleY(1); }
}

.topbar__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar__cta { --btn-pad-y: 0.66rem; --btn-pad-x: 1.15rem; font-size: 0.88rem; }

.menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.35s var(--ease-out-expo), opacity 0.2s ease;
}
.menu-btn__bars { position: relative; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ''; position: absolute; left: 0; }
.menu-btn__bars::before { transform: translateY(-6px); }
.menu-btn__bars::after { transform: translateY(6px); }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: rotate(-45deg); }

/* Painel do menu mobile (vidro) */
.sheet {
  pointer-events: auto;
  max-width: var(--container);
  margin: 10px auto 0;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(10, 10, 14, 0.82);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 30px 60px rgba(0, 0, 0, 0.6);
  transform-origin: top center;
  animation: sheet-in 0.45s var(--ease-out-expo);
}
.sheet__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.sheet__link:hover, .sheet__link.is-active { background: rgba(249, 201, 10, 0.1); color: var(--ion-yellow); }
.sheet__link::after { content: '→'; opacity: 0.4; }
.sheet .btn { margin-top: 8px; }
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1080px) {
  .navpill__link { padding: 8px 11px; font-size: 0.82rem; }
}
@media (max-width: 940px) {
  .navpill { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 520px) {
  .topbar { top: 10px; }
  .topbar__bar { padding: 0 8px 0 14px; border-radius: 18px; gap: 10px; }
  .brand__logo { width: 112px; }
  .topbar__cta { --btn-pad-x: 0.85rem; font-size: 0.8rem; }
  .topbar__cta .btn__arrow { display: none; }
}
@media (max-width: 360px) {
  .topbar__cta { display: none; }
}

/* ---------- Rodapé ---------- */
.footer {
  position: relative;
  padding: clamp(44px, 5vw, 64px) 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 5, 7, 0.4), rgba(5, 5, 7, 0.95));
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer__brand { display: flex; flex-direction: column; align-items: center; width: fit-content; }  /* logo centralizada com Instagram e Behance */
.footer__logo { width: 170px; margin-bottom: 18px; }
.footer__tagline { color: var(--ink-dim); font-size: 0.92rem; max-width: 40ch; }
.footer__title {
  font-family: var(--font-label);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ion-yellow);
  margin-bottom: 14px;
}
.footer__links { display: grid; gap: 10px; }
.footer__links a { color: var(--ink-dim); font-size: 0.92rem; transition: color 0.2s ease; }
.footer__links a:hover { color: var(--ion-yellow); }
.footer__socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ion-cream);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.footer__social:hover { color: var(--ion-yellow); box-shadow: inset 0 0 0 1px rgba(249, 201, 10, 0.6); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.footer__bottom nav { display: flex; gap: 18px; }
.footer__bottom a:hover { color: var(--ion-yellow); }
.footer__disclaimer { margin-top: 18px; font-size: 0.74rem; line-height: 1.6; color: #5d5d68; max-width: 110ch; }
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ---------- Barra fixa de compra (mobile) ---------- */
.dock {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), rgba(10, 10, 14, 0.7);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(140%);
  transition: transform 0.5s var(--ease-out-expo);
}
.dock.is-visible { transform: none; }
.dock__price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; line-height: 1; }
.dock__price small { font-size: 0.8rem; color: var(--ion-yellow); margin-right: 2px; }
.dock__label { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--ink-dim); }
@media (max-width: 760px) {
  .dock { display: flex; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(1400px, 96vw);
  max-width: none;
  max-height: 94dvh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: rgba(8, 8, 12, 0.92);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 120px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(3, 3, 5, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lightbox[open] { display: flex; flex-direction: column; animation: lb-in 0.4s var(--ease-out-expo); }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.lightbox__caption { font-size: 0.88rem; color: var(--ink-dim); }
.lightbox__controls { display: flex; gap: 6px; }
.lightbox__btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, color 0.2s ease;
}
.lightbox__btn:hover { background: var(--ion-yellow); color: #111; }
.lightbox__stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 14px; overflow: auto; }
.lightbox__img { max-height: calc(94dvh - 100px); width: auto; border-radius: var(--r-sm); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .atmo__plane, .atmo__wave, .atmo__orb { animation: none !important; }
  .atmo__wave { opacity: 0; }
}
