/* Paisa Landing Page - Material Expressive + Liquid Glass */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens ── */
:root {
  --bg:          hsl(240, 8%, 8%);
  --bg-alt:      hsl(240, 6%, 11%);
  --card:        hsl(240, 6%, 14%);
  --text:        #ffffff;
  --text-muted:  #9CA3AF;
  --border:      rgba(255, 255, 255, 0.12);
  --radius:      1.25rem;
  --radius-lg:   1.75rem;

  /* Accent palette */
  --coral:   #FF6B6B;
  --blue:    #64B5F6;
  --purple:  #CE93D8;
  --green:   #81C784;
  --amber:   #FFD54F;
  --teal:    #4DB6AC;
  --pink:    #F48FB1;
  --indigo:  #7986CB;
  --orange:  #FFB74D;

  /* Soft tints for glass backgrounds */
  --coral-soft:   rgba(255, 107, 107, 0.10);
  --blue-soft:    rgba(100, 181, 246, 0.10);
  --purple-soft:  rgba(206, 147, 216, 0.10);
  --green-soft:   rgba(129, 199, 132, 0.10);
  --amber-soft:   rgba(255, 213, 79, 0.10);
  --teal-soft:    rgba(77, 182, 172, 0.10);
  --pink-soft:    rgba(244, 143, 177, 0.10);
  --indigo-soft:  rgba(121, 134, 203, 0.10);
  --orange-soft:  rgba(255, 183, 77, 0.10);

  /* Animation curves */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Google Sans Flex', system-ui, -apple-system, sans-serif;
  font-variation-settings: "ROND" 100;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  font-variation-settings: "ROND" 100;
  line-height: 1.2;
}

/* ── Glass System ── */
.glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
  z-index: 0;
}

.glass > * { position: relative; z-index: 1; }

/* Glass nav - no specular highlight */
.glass-nav { border-radius: 0; }
.glass-nav::before { display: none; }

/* Tinted glass variants */
.glass-coral {
  background: var(--coral-soft);
  border-color: rgba(255, 107, 107, 0.15);
}

.glass-blue {
  background: var(--blue-soft);
  border-color: rgba(100, 181, 246, 0.15);
}

.glass-purple {
  background: var(--purple-soft);
  border-color: rgba(206, 147, 216, 0.15);
}

.glass-green {
  background: var(--green-soft);
  border-color: rgba(129, 199, 132, 0.15);
}

.glass-amber {
  background: var(--amber-soft);
  border-color: rgba(255, 213, 79, 0.15);
}

.glass-teal {
  background: var(--teal-soft);
  border-color: rgba(77, 182, 172, 0.15);
}

.glass-pink {
  background: var(--pink-soft);
  border-color: rgba(244, 143, 177, 0.15);
}

.glass-indigo {
  background: var(--indigo-soft);
  border-color: rgba(121, 134, 203, 0.15);
}

.glass-orange {
  background: var(--orange-soft);
  border-color: rgba(255, 183, 77, 0.15);
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.3s var(--ease-smooth);
}

.header.scrolled {
  background: rgba(14, 14, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Buttons ── */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 200ms var(--ease-bounce), box-shadow 200ms var(--ease-smooth);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-pill:hover {
  transform: scale(1.04);
}

.btn-pill:active {
  transform: scale(0.97);
}

.btn-pill-primary {
  background: var(--coral);
  color: #1a1a2e;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.btn-pill-primary:hover {
  box-shadow: 0 0 32px rgba(255, 107, 107, 0.5);
}

.btn-pill-glass {
  background: transparent;
  color: var(--text-muted);
  border: none;
}

.btn-pill-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* ── Typography ── */
.text-gradient {
  color: var(--coral);
}

.text-hero {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ── Animations ── */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(1deg); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes specular-sweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Hero ── */
.hero-mesh {
  position: relative;
  overflow: hidden;
}

.hero-mesh::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 15% 70%, rgba(255, 107, 107, 0.08) 0%, transparent 100%),
    radial-gradient(ellipse 40% 50% at 85% 25%, rgba(206, 147, 216, 0.06) 0%, transparent 100%),
    radial-gradient(ellipse 45% 35% at 50% 90%, rgba(100, 181, 246, 0.05) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-mesh > * { position: relative; z-index: 1; }

.phone-float {
  animation: float 4s ease-in-out infinite;
}

.phone-frame {
  padding: 8px;
  border-radius: 2.75rem;
  position: relative;
}

.phone-glow {
  position: absolute;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
}

.phone-glow-coral {
  background: rgba(255, 107, 107, 0.12);
  filter: blur(80px);
  border-radius: 50%;
  animation: glow-pulse 4s ease-in-out infinite;
}

.phone-glow-purple {
  background: rgba(206, 147, 216, 0.08);
  filter: blur(80px);
  border-radius: 50%;
  animation: glow-pulse 5s ease-in-out infinite 1s;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── Fade-Up on Scroll ── */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 600ms var(--ease-smooth), transform 600ms var(--ease-smooth);
  transition-delay: var(--delay, 0ms);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Bento Grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bento-large {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .bento-large {
    grid-column: span 2;
  }
}

.bento-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: transform 350ms var(--ease-bounce), box-shadow 350ms var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  z-index: 0;
}

.bento-card > * { position: relative; z-index: 1; }

.bento-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.bento-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.bento-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.bento-card img {
  border-radius: 0.875rem;
  transition: transform 350ms var(--ease-bounce);
}

.bento-card:hover img {
  transform: scale(1.02);
}

/* Large bento card layout */
.bento-large-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .bento-large-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .bento-large-text {
    flex: 1;
  }

  .bento-large-img {
    flex: 1;
    max-width: 50%;
  }
}

/* ── Feature Cards (legacy compat) ── */
.feature-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: background 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.feature-card img {
  border-radius: 0.75rem;
  transition: transform 0.3s ease;
}

.feature-card:hover img {
  transform: scale(1.03);
}

/* ── Reviews ── */
.review-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  transition: transform 350ms var(--ease-bounce);
}

.review-card:hover {
  transform: translateY(-4px);
}

.review-platform {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── FAQ ── */
details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

details summary {
  padding: 1.125rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 200ms var(--ease-smooth);
}

details summary:hover {
  color: var(--coral);
}

details summary::after {
  content: '';
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 300ms var(--ease-bounce);
  flex-shrink: 0;
}

details[open] summary::after {
  transform: rotate(180deg);
}

details summary::-webkit-details-marker { display: none; }

details > div {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  animation: fade-in 200ms var(--ease-smooth);
}

/* ── Mobile Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 350ms var(--ease-bounce), opacity 200ms var(--ease-smooth);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
  .hamburger { display: flex; }
  .nav-links { display: none !important; }
  .nav-support { display: none !important; }
}

/* ── Mobile Drawer ── */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-smooth);
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: rgba(14, 14, 20, 0.95);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 95;
  transform: translateX(100%);
  transition: transform 350ms var(--ease-out-back);
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 200ms var(--ease-smooth), color 200ms var(--ease-smooth);
}

.mobile-drawer a:hover,
.mobile-drawer a.active-link {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.mobile-drawer a svg {
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.6;
}

/* ── Store Badges ── */
.store-badge {
  height: 48px;
  transition: transform 200ms var(--ease-bounce);
}

.store-badge:hover {
  transform: scale(1.05);
}

.store-badge-lg {
  height: 64px;
}

/* ── Stars ── */
.star { color: #FACC15; }

/* ── Social Icons ── */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  transition: background 200ms var(--ease-smooth), transform 200ms var(--ease-bounce);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.social-link svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--text-muted);
  transition: fill 200ms var(--ease-smooth);
}

.social-link:hover svg {
  fill: var(--text);
}

/* ── Download CTA ── */
.cta-section {
  background: var(--bg-alt);
  position: relative;
}

.cta-glass-overlay {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

/* ── Code Blocks ── */
pre {
  background: rgba(0, 0, 0, 0.4);
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

pre code {
  background: none;
  padding: 0;
}

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  font-weight: 700;
  color: var(--text);
}

td {
  color: var(--text-muted);
}

/* ── Prose (secondary pages) ── */
.prose {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.prose h1 { font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 1.5rem; }
.prose h2 { font-size: 1.5rem; margin-bottom: 1rem; margin-top: 2rem; }
.prose p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { color: var(--text-muted); margin-bottom: 0.5rem; }
.prose a { color: var(--coral); text-decoration: none; }
.prose a:hover { text-decoration: underline; }

/* ── Changelog Badge ── */
.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  padding: 0.25rem 0.875rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Footer ── */
.footer-bar {
  border-top: 1px solid;
  border-color: rgba(255, 107, 107, 0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
