/* Custom layer on top of Tailwind — animations, glass, waveform, modal */

:root {
  --ink: #1a1530;
  --violet: #7c6cf0;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


.noise-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-bg {
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(900px 500px at 90% 20%, rgba(196, 181, 253, 0.55), transparent 50%),
    radial-gradient(800px 500px at 40% 100%, rgba(125, 211, 252, 0.45), transparent 55%),
    linear-gradient(165deg, #faf7ff 0%, #f3ecff 35%, #fdf2ff 70%, #eef8ff 100%);
}

.hero-parallax .blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
  opacity: 0.85;
  will-change: transform;
}

.blob-1 {
  width: 320px;
  height: 320px;
  left: -80px;
  top: 10%;
  background: radial-gradient(circle at 30% 30%, rgba(167, 139, 250, 0.75), rgba(236, 72, 153, 0.25));
}

.blob-2 {
  width: 280px;
  height: 280px;
  right: -40px;
  top: 35%;
  background: radial-gradient(circle at 40% 40%, rgba(56, 189, 248, 0.55), rgba(167, 139, 250, 0.2));
}

.blob-3 {
  width: 360px;
  height: 360px;
  left: 25%;
  bottom: -120px;
  background: radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.45), rgba(129, 140, 248, 0.25));
}

.floating-stars {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 20px rgba(124, 108, 240, 0.35);
  animation: starFloat 8s ease-in-out infinite;
}

.s1 {
  left: 12%;
  top: 22%;
  font-size: 14px;
  animation-delay: 0s;
}
.s2 {
  left: 78%;
  top: 18%;
  font-size: 18px;
  animation-delay: 1.2s;
}
.s3 {
  left: 64%;
  top: 48%;
  font-size: 12px;
  animation-delay: 0.6s;
}
.s4 {
  left: 22%;
  top: 62%;
  font-size: 16px;
  animation-delay: 2s;
}
.s5 {
  left: 88%;
  top: 70%;
  font-size: 13px;
  animation-delay: 0.3s;
}

@keyframes starFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translateY(-18px) scale(1.08);
    opacity: 1;
  }
}

.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.glass-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 40px -24px rgba(26, 21, 48, 0.35);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.35rem 0.9rem;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5b21b6;
  background: linear-gradient(90deg, rgba(237, 233, 254, 0.95), rgba(224, 242, 254, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.section-glow {
  height: 420px;
  background: radial-gradient(closest-side, rgba(167, 139, 250, 0.35), transparent 70%);
}

.feature-ico {
  display: flex;
  height: 3rem;
  width: 3rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-size: 1.35rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(237, 233, 254, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 25px -18px rgba(26, 21, 48, 0.45);
}

.label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(26, 21, 48, 0.72);
}

.input {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out);
}

.input::placeholder {
  color: rgba(26, 21, 48, 0.35);
  font-weight: 500;
}

.input:focus {
  border-color: rgba(124, 108, 240, 0.55);
  box-shadow: 0 0 0 4px rgba(124, 108, 240, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

textarea.input {
  resize: vertical;
  min-height: 96px;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%236366f1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

/* Waveform */
.waveform {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  height: 56px;
  padding: 0.35rem 0.25rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(245, 243, 255, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.waveform span {
  flex: 1;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(124, 108, 240, 0.85), rgba(236, 72, 153, 0.55));
  transform-origin: bottom;
  transition: transform 0.12s var(--ease-out), opacity 0.12s;
  opacity: 0.55;
}

.waveform.is-playing span {
  opacity: 1;
  animation: barBounce 0.85s ease-in-out infinite;
}

.waveform span:nth-child(odd) {
  animation-duration: 0.95s;
}
.waveform span:nth-child(3n) {
  animation-duration: 0.75s;
}

@keyframes barBounce {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

.audio-card.is-active {
  border-color: rgba(124, 108, 240, 0.45);
  box-shadow: 0 25px 55px -28px rgba(91, 33, 182, 0.45);
}

.play-btn.is-playing {
  background: linear-gradient(135deg, #7c6cf0, #ec4899);
}

/* Accordion */
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  text-align: left;
  font-weight: 800;
  font-size: 0.95rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}

.accordion-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.55);
  position: relative;
  flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease-out);
}

.accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-item.is-open .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.accordion-panel {
  padding: 0 1.25rem 1.15rem;
  color: rgba(26, 21, 48, 0.68);
  font-size: 0.95rem;
  line-height: 1.65;
}

.accordion-item.is-open {
  border-color: rgba(124, 108, 240, 0.35);
}

/* Footer */
.footer-link {
  color: rgba(26, 21, 48, 0.55);
  transition: color 0.2s;
}

.footer-link:hover {
  color: #5b21b6;
}

/* Mobile CTA safe area */
.mobile-cta {
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

body {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-cta {
    display: none;
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 21, 48, 0.45);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  border-radius: 1.75rem;
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
}

.modal-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(400px 200px at 50% 0%, rgba(167, 139, 250, 0.35), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.modal-close {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 0;
  background: rgba(255, 255, 255, 0.65);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Demo hero waveform container */
[data-demo-wave] {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
}

[data-demo-wave] span {
  flex: 1;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(124, 108, 240, 0.85), rgba(56, 189, 248, 0.45));
  opacity: 0.5;
  transform-origin: bottom;
}

[data-demo-wave].is-playing span {
  opacity: 1;
  animation: barBounce 0.85s ease-in-out infinite;
}

/* Mobile nav burger */
[data-mobile-nav-toggle] .burger-bar {
  transition:
    transform 0.22s var(--ease-out),
    opacity 0.18s var(--ease-out);
}

[data-mobile-nav-toggle].is-open .burger-bar:first-child {
  transform: translateY(6px) rotate(45deg);
}

[data-mobile-nav-toggle].is-open .burger-bar--mid {
  opacity: 0;
}

[data-mobile-nav-toggle].is-open .burger-bar:last-child {
  transform: translateY(-6px) rotate(-45deg);
}
