/**
 * Citizz.app premium layer — structure, motion, and colour parity with
 * karmavyuha.com / commerce landing (glass, pillars, trust chips).
 */

/* —— Premium motion keyframes —— */
@keyframes premiumRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes chipPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glassBreath {
  0%,
  100% {
    box-shadow:
      0 8px 40px rgba(62, 45, 150, 0.09),
      0 1px 0 rgba(79, 61, 240, 0.06) inset;
  }
  50% {
    box-shadow:
      0 14px 48px rgba(62, 45, 150, 0.14),
      0 1px 0 rgba(79, 61, 240, 0.1) inset;
  }
}

@keyframes btnIdleShimmer {
  0%,
  78%,
  100% {
    transform: translateX(-120%) skewX(-12deg);
  }
  88% {
    transform: translateX(120%) skewX(-12deg);
  }
}

@keyframes zzGlowPulse {
  0%,
  100% {
    filter:
      drop-shadow(0 1px 0 rgba(255, 251, 235, 0.45))
      drop-shadow(0 4px 20px rgba(245, 158, 11, 0.28));
  }
  50% {
    filter:
      drop-shadow(0 1px 0 rgba(255, 251, 235, 0.55))
      drop-shadow(0 6px 28px rgba(245, 158, 11, 0.38));
  }
}

@keyframes bubbleIdle {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

@keyframes panelShine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes iconBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes heroMeshDrift {
  0%,
  100% {
    background-position:
      0% 0%,
      100% 100%,
      50% 0%,
      100% 80%,
      0% 0%;
  }
  50% {
    background-position:
      4% 2%,
      96% 98%,
      48% 2%,
      98% 78%,
      0% 0%;
  }
}

.citizz-premium[data-site='public']::before {
  opacity: 0.48;
}

.citizz-premium[data-site='public'] {
  background-image:
    radial-gradient(ellipse 110% 75% at 0% 0%, rgba(79, 61, 240, 0.13), transparent 54%),
    radial-gradient(ellipse 75% 55% at 100% 0%, rgba(245, 158, 11, 0.07), transparent 48%),
    radial-gradient(ellipse 85% 65% at 100% 100%, rgba(14, 165, 233, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 38% at 20% 100%, rgba(245, 158, 11, 0.05), transparent 44%),
    linear-gradient(180deg, #e6e8f6 0%, #e2e6f4 42%, #dde3f2 100%);
}

/* —— Nav: calmer glass, less loop glow —— */
.citizz-premium .pub-top {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: rgba(79, 61, 240, 0.1);
  animation: fadeDown var(--dur-med) var(--ease-out) both;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 10px 40px rgba(30, 27, 75, 0.06);
}

/* —— Hero mesh (commerce-grade) —— */
.citizz-premium .pub-hero--splash {
  border-color: rgba(79, 61, 240, 0.16);
  min-height: auto;
  overflow: visible;
  justify-content: flex-start;
  padding: 24px 16px 28px;
  background-size: 120% 120%, 120% 120%, 100% 100%, 100% 100%, 100% 100%;
  animation: heroMeshDrift 22s var(--ease-out) infinite;
  background:
    radial-gradient(ellipse 120% 80% at 10% 10%, rgba(250, 245, 255, 0.96), transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 90%, rgba(255, 251, 235, 0.72), transparent 45%),
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(99, 102, 241, 0.15), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 80%, rgba(244, 114, 182, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(244, 245, 251, 0.54) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 24px 80px rgba(79, 61, 240, 0.1);
}

.citizz-premium .pub-hero-kicker {
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(79, 61, 240, 0.14);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  letter-spacing: 0.12em;
  animation: fadeDown var(--dur-med) var(--ease-out) 0.08s both;
}

/* Trust chips — karmavyuha “Design + build | Fixed scope” row */
.pub-trust-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  max-width: 36rem;
}
.pub-trust-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #312e81;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(79, 61, 240, 0.14);
  box-shadow: 0 4px 18px rgba(79, 61, 240, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  animation: chipPop 0.52s var(--ease-spring) both;
}
.pub-trust-chips li:nth-child(1) {
  animation-delay: 0.24s;
}
.pub-trust-chips li:nth-child(2) {
  animation-delay: 0.32s;
}
.pub-trust-chips li:nth-child(3) {
  animation-delay: 0.4s;
}
.pub-trust-chips li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f3df0, var(--citizz-zz-bright));
  flex-shrink: 0;
}

/* Glass CTA band */
.pub-glass-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: calc(var(--radius) + 10px);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 8px 40px rgba(62, 45, 150, 0.09),
    0 1px 0 rgba(79, 61, 240, 0.06) inset;
  animation:
    premiumRise 0.68s var(--ease-out) 0.42s both,
    glassBreath 5s var(--ease-out) 1.2s infinite;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* Primary button shimmer */
.citizz-premium .btn-pub--primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4338ca 0%, #4f3df0 45%, #6366f1 100%);
  box-shadow: 0 6px 22px rgba(79, 61, 240, 0.38);
}
.citizz-premium .btn-pub--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 48%,
    transparent 100%
  );
  transform: translateX(-120%) skewX(-12deg);
  transition: transform 0.55s var(--ease-out);
}
.citizz-premium .btn-pub--primary > * {
  position: relative;
  z-index: 1;
}
.citizz-premium .btn-pub--primary:hover::after {
  transform: translateX(120%) skewX(-12deg);
}
.citizz-premium .pub-hero-explore.btn-pub--primary::after {
  animation: btnIdleShimmer 5.5s var(--ease-out) 1.8s infinite;
}

/* Section titles — centered karmavyuha rhythm */
.pub-section-title {
  text-align: center;
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  position: relative;
  padding-bottom: 10px;
}
.citizz-premium .pub-section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 52px;
  height: 3px;
  margin-left: -26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f3df0, var(--citizz-zz-bright), #38bdf8);
  background-size: 200% 100%;
  transform: scaleX(0);
  opacity: 0;
  transition:
    transform 0.55s var(--ease-out),
    opacity 0.4s ease;
}
.citizz-premium [data-reveal].is-visible .pub-section-title::after {
  transform: scaleX(1);
  opacity: 1;
  transition-delay: 0.12s;
  animation: panelShine 4s linear 0.8s infinite;
}
.pub-section-intro {
  text-align: center;
  margin: 0 auto 24px;
  max-width: 40rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 500;
}

/* Pillars grid */
.pub-pillars {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-bottom: 8px;
}
@media (min-width: 720px) {
  .pub-pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}
.pub-pillar {
  position: relative;
  padding: 22px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.9) 100%);
  box-shadow: 0 10px 36px rgba(79, 61, 240, 0.07);
  overflow: hidden;
  transition:
    transform var(--dur-med) var(--ease-spring),
    box-shadow var(--dur-med) var(--ease-out);
}
.citizz-premium .pub-pillar:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 48px rgba(79, 61, 240, 0.14);
}
.citizz-premium .pub-pillar:hover .pub-pillar__icon {
  animation: iconBob 0.55s var(--ease-spring);
}
.pub-pillar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f3df0, var(--citizz-zz-mid), #38bdf8);
  opacity: 0.88;
}
.pub-pillar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(79, 61, 240, 0.14) 0%,
    rgba(99, 102, 241, 0.09) 45%,
    rgba(245, 158, 11, 0.12) 100%
  );
  border: 1px solid rgba(79, 61, 240, 0.12);
  box-shadow: 0 4px 14px rgba(79, 61, 240, 0.08);
  color: #4f3df0;
}
.pub-pillar__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.pub-pillar:nth-child(2) .pub-pillar__icon {
  color: #b45309;
  background: linear-gradient(
    145deg,
    rgba(245, 158, 11, 0.14) 0%,
    rgba(251, 191, 36, 0.09) 50%,
    rgba(79, 61, 240, 0.1) 100%
  );
}
.pub-pillar:nth-child(3) .pub-pillar__icon {
  color: #0369a1;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.12) 0%, rgba(79, 61, 240, 0.11) 100%);
}
.pub-pillar h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pub-pillar p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.52;
  color: var(--muted);
}

/* Numbered how-steps */
.citizz-premium .pub-how-steps__list {
  counter-reset: citizz-step;
}
.citizz-premium .pub-how-step {
  counter-increment: citizz-step;
  position: relative;
}
.citizz-premium .pub-how-step::before {
  content: counter(citizz-step, decimal-leading-zero);
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(79, 61, 240, 0.45);
}
@media (min-width: 720px) {
  .citizz-premium .pub-how-step::before {
    top: 12px;
    left: 12px;
  }
}

/* Cards — always-on accent edge */
.citizz-premium .pub-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #4f3df0, #6366f1, var(--citizz-zz-bright), #38bdf8);
  opacity: 0.55;
  transform: none;
}
.citizz-premium .pub-card:hover::before {
  transform: scaleX(1);
  opacity: 1;
}

/* Inner page header — deeper glass */
.citizz-premium .pub-page-head {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(248, 250, 255, 0.9) 50%,
    rgba(79, 61, 240, 0.05) 100%
  );
  box-shadow: 0 12px 40px rgba(30, 27, 75, 0.07);
  border-color: rgba(79, 61, 240, 0.12);
}

.citizz-premium .pub-prose,
.citizz-premium .pub-faq details {
  box-shadow: 0 8px 32px rgba(30, 27, 75, 0.05);
}

.citizz-premium .pub-faq details[open] {
  box-shadow: 0 12px 36px rgba(79, 61, 240, 0.1);
}

/* Audience / trust cards lift */
.citizz-premium .pub-audience-card,
.citizz-premium .pub-trust-grid__item {
  transition:
    transform var(--dur-med) var(--ease-spring),
    box-shadow var(--dur-med) var(--ease-out);
}
.citizz-premium .pub-audience-card:hover,
.citizz-premium .pub-trust-grid__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 44px rgba(79, 61, 240, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .citizz-premium .btn-pub--primary::after {
    display: none;
  }
  .citizz-premium .pub-hero--splash,
  .pub-glass-cta,
  .pub-trust-chips li,
  .citizz-premium .pub-hero-trades,
  .citizz-premium .pub-hero-tagline,
  .citizz-premium .pub-hero-trades__panel,
  .citizz-premium .pub-hero-trade__bubble,
  .citizz-premium .pub-hero--splash h1 .pub-brand__zz,
  .citizz-premium .pub-section-title::after {
    animation: none !important;
  }
  [data-reveal-group]:not(.is-visible) > .pub-how-step,
  [data-reveal-group]:not(.is-visible) > .pub-pillar {
    opacity: 1;
    transform: none;
  }
  .pub-trust-chips li {
    opacity: 1;
  }
}

/* Richer scroll reveals */
.citizz-premium [data-reveal].is-visible {
  animation: premiumRise 0.62s var(--ease-out) both;
}
[data-reveal-group].is-visible > .pub-pillar {
  animation: premiumRise 0.52s var(--ease-out) both;
}
[data-reveal-group].is-visible > .pub-pillar:nth-child(1) {
  animation-delay: 0.05s;
}
[data-reveal-group].is-visible > .pub-pillar:nth-child(2) {
  animation-delay: 0.1s;
}
[data-reveal-group].is-visible > .pub-pillar:nth-child(3) {
  animation-delay: 0.15s;
}
[data-reveal-group]:not(.is-visible) > .pub-pillar {
  opacity: 0;
  transform: translateY(12px);
}

/* Wordmark — all viewports (ZZ gradient + drop-shadow bleed) */
.citizz-premium .pub-hero--splash h1 {
  overflow: visible;
  padding-inline: 14px;
}
.citizz-premium .pub-hero-title__inner {
  overflow: visible;
  padding-inline: 4px 0.35em;
}
.citizz-premium .pub-hero--splash h1 .pub-brand__zz {
  padding-right: 0.16em;
  background-size: 200% auto;
  animation:
    heroGlow 10s var(--ease-out) infinite,
    zzGlowPulse 4.5s ease-in-out infinite;
}

/* Hero trades + tagline motion */
.citizz-premium .pub-hero-tagline {
  animation: premiumRise 0.62s var(--ease-out) 0.16s both;
}
.citizz-premium .pub-hero-trades {
  animation: premiumRise 0.72s var(--ease-out) 0.3s both;
}
.citizz-premium .pub-hero-trades__panel {
  position: relative;
  animation: glassBreath 6s var(--ease-out) 1s infinite;
}
.citizz-premium .pub-hero-trades__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    120deg,
    rgba(79, 61, 240, 0.35),
    rgba(245, 158, 11, 0.45),
    rgba(56, 189, 248, 0.35),
    rgba(79, 61, 240, 0.35)
  );
  background-size: 300% 100%;
  animation: panelShine 8s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.citizz-premium .pub-hero-trade__bubble {
  animation: bubbleIdle 3.2s ease-in-out infinite;
}
.citizz-premium .pub-hero-trade:nth-child(even) .pub-hero-trade__bubble {
  animation-delay: -1.1s;
}
.citizz-premium .pub-hero-trade:nth-child(3n) .pub-hero-trade__bubble {
  animation-delay: -2s;
}

/* Below-fold: how-steps use data-reveal-group (pub-reveal.js) */
[data-reveal-group]:not(.is-visible) > .pub-how-step {
  opacity: 0;
  transform: translateY(12px);
}
[data-reveal-group].is-visible > .pub-how-step {
  animation: riseIn 0.48s var(--ease-out) both;
}
[data-reveal-group].is-visible > .pub-how-step:nth-child(1) {
  animation-delay: 0.04s;
}
[data-reveal-group].is-visible > .pub-how-step:nth-child(2) {
  animation-delay: 0.08s;
}
[data-reveal-group].is-visible > .pub-how-step:nth-child(3) {
  animation-delay: 0.12s;
}
[data-reveal-group].is-visible > .pub-how-step:nth-child(4) {
  animation-delay: 0.16s;
}

/* Nav + card micro-interactions */
.citizz-premium .pub-nav a {
  transition:
    background var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-spring),
    box-shadow var(--dur-fast) ease;
}
.citizz-premium .pub-nav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 61, 240, 0.1);
}
.citizz-premium .pub-card {
  transition:
    transform var(--dur-med) var(--ease-spring),
    box-shadow var(--dur-med) var(--ease-out);
}
.citizz-premium .pub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 44px rgba(79, 61, 240, 0.12);
}
.citizz-premium .pub-play-badge {
  transition:
    transform var(--dur-med) var(--ease-spring),
    box-shadow var(--dur-med) var(--ease-out);
}
.citizz-premium .pub-play-badge:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Compact glass footer */
.citizz-premium .pub-footer {
  position: relative;
  border-color: rgba(79, 61, 240, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(248, 250, 255, 0.78) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 8px 32px rgba(30, 27, 75, 0.06);
}
.citizz-premium .pub-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #4f3df0, var(--citizz-zz-bright), transparent);
  opacity: 0.7;
}

/* —— Mobile hero polish —— */
@media (max-width: 559px) {
  .citizz-premium .pub-hero--splash {
    padding-inline: 14px;
  }

  .citizz-premium .pub-hero--splash h1 {
    font-size: clamp(2.15rem, 10.5vw, 2.85rem);
    letter-spacing: -0.04em;
  }
  .citizz-premium .pub-hero-title__inner {
    padding-inline: 4px 10px;
    max-width: 100%;
  }
  .citizz-premium .pub-hero--splash h1 .pub-brand__zz {
    font-size: 1.06em;
    margin-left: 2px;
    padding-right: 6px;
  }

  /* Trust chips: single centred column (not 2+1 wrap) */
  .pub-trust-chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: min(100%, 17.5rem);
    margin-inline: auto;
    margin-bottom: 12px;
  }
  .pub-trust-chips li {
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.7rem;
    padding: 9px 12px;
  }

  /* Glass CTA: stacked, centred, full-width button + Play badge */
  .citizz-premium .pub-glass-cta.pub-hero-cta--splash {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 14px 14px 16px;
    gap: 14px;
  }
  .citizz-premium .pub-glass-cta .pub-hero-explore {
    width: 100%;
    max-width: 18rem;
    justify-content: center;
  }
  .citizz-premium .pub-glass-cta .pub-play-badge--hero {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
  }
  .citizz-premium .pub-glass-cta .pub-play-badge--hero img {
    height: 48px;
    width: auto;
  }

  .citizz-premium .pub-hero-kicker {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    padding: 6px 12px 6px 8px;
    max-width: 100%;
    text-align: center;
    line-height: 1.35;
  }

  .pub-hero-tagline {
    font-size: 0.92rem;
    padding-inline: 4px;
  }
}
