:root {
  --violet: #6E5CE0;
  --violet-soft: #8B8CF0;
  --ink: #241B3D;
  --ink-soft: rgba(36, 27, 61, 0.65);
  --on-page: #FFFFFF;
  --on-page-soft: rgba(255, 255, 255, 0.72);
  --paper: #FFF9F2;
  --paper-ink: #2B2620;
  --paper-ink-soft: rgba(43, 38, 32, 0.7);
  --mint: #3FD9B8;
  --pink: #FF5DA2;
  --gold: #E0A83C;
  --line: rgba(43, 38, 32, 0.12);

  --font-display: "Fredoka", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --font-serif: "Nunito", sans-serif;
  --font-mono: "Space Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--violet);
  color: var(--on-page);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* Background blobs (hero + product sections only, positioned absolute per-section) */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.bg-blob-1 { width: 380px; height: 380px; background: var(--violet-soft); top: -100px; left: -120px; animation: float1 18s ease-in-out infinite; }
.bg-blob-2 { width: 320px; height: 320px; background: var(--pink); top: 20%; right: -100px; animation: float2 22s ease-in-out infinite; }
.bg-blob-3 { width: 300px; height: 300px; background: var(--mint); bottom: -80px; left: 15%; animation: float3 20s ease-in-out infinite; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px,50px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px,-30px); } }
@keyframes float3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,-40px); } }

.float-icons {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.float-icon {
  position: absolute;
  font-size: 46px;
  opacity: 0.18;
  filter: grayscale(1) brightness(4);
  animation: icon-float 7s ease-in-out infinite;
}
.fi-1 { top: 14%; left: 8%; animation-delay: 0s; }
.fi-2 { top: 22%; right: 10%; animation-delay: 1.2s; font-size: 38px; }
.fi-3 { bottom: 30%; left: 14%; animation-delay: 2.4s; font-size: 34px; }
.fi-4 { bottom: 18%; right: 14%; animation-delay: 0.8s; }
.fi-5 { top: 55%; left: 4%; animation-delay: 1.8s; font-size: 36px; }
.fi-6 { top: 8%; right: 28%; animation-delay: 2.8s; font-size: 32px; }
.fi-7 { bottom: 8%; left: 30%; animation-delay: 1.5s; font-size: 40px; }
.fi-8 { top: 40%; right: 4%; animation-delay: 0.4s; font-size: 30px; }
@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}
@media (max-width: 640px) {
  .float-icon { font-size: 22px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .float-icon { animation: none; }
}

.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 60;
  animation: confetti-fly 0.9s ease-out forwards;
}
@keyframes confetti-fly {
  0% { transform: translate(0,0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), -140px) rotate(var(--rot)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-piece { display: none; }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--mint), var(--pink));
  z-index: 50;
  transition: width 0.1s ease-out;
}

.sticky-cta {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 120%);
  z-index: 40;
  transition: transform 0.3s ease;
}
.sticky-cta.visible {
  transform: translate(-50%, 0);
}
.btn-sticky {
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.feature-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease;
}

.spotlight {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(
    380px circle at var(--sx, 50%) var(--sy, 30%),
    rgba(255, 255, 255, 0.16),
    transparent 70%
  );
}
.spotlight.active {
  opacity: 1;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--on-page-soft);
  margin: 0 0 16px;
}
.eyebrow-dark { color: var(--gold); }

/* HERO */
.hero {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 90px 24px 70px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-logo {
  width: 110px;
  height: 110px;
  border-radius: 32px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.28);
  margin-bottom: 28px;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-page-soft);
  max-width: 520px;
  margin: 0 0 36px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-primary, .btn-secondary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s ease;
}
.btn-primary {
  background: var(--on-page);
  color: var(--violet);
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
.btn-secondary {
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--on-page);
}
.btn-primary:active, .btn-secondary:active { transform: scale(0.96); }
.hero-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--on-page-soft);
}

/* STORY */
.story {
  position: relative;
  z-index: 1;
  background: var(--paper);
  color: var(--paper-ink);
  padding: 90px 24px;
  border-radius: 40px 40px 0 0;
}
.story-inner {
  max-width: 620px;
  margin: 0 auto;
}
.story-text {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.75;
  color: var(--paper-ink);
  margin: 0 0 26px;
}
.story-text em { color: var(--gold); font-style: italic; }
.story-text-close {
  font-weight: 500;
  border-left: 3px solid var(--gold);
  padding-left: 18px;
}

.artifact {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 36px 0 12px;
  padding: 24px;
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(43,38,32,0.08);
}
.chat-bubble {
  background: #EEEAF7;
  border-radius: 14px 14px 14px 2px;
  padding: 12px 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #2B2620;
}
.chat-check { font-size: 11px; color: #9B93B5; }
.artifact-arrow {
  font-size: 22px;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.salli-row-demo {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: center;
  gap: 10px;
  background: var(--violet);
  border-radius: 14px;
  padding: 10px 14px;
  flex: 1;
  min-width: 220px;
}
.demo-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.demo-main { display: flex; flex-direction: column; }
.demo-cat { font-size: 13px; font-weight: 700; color: #fff; font-family: var(--font-body); }
.demo-date { font-size: 10px; color: rgba(255,255,255,0.65); }
.demo-method { font-size: 10px; color: rgba(255,255,255,0.65); font-weight: 600; text-transform: uppercase; }
.demo-amount { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: #fff; }

.artifact-caption {
  font-size: 13px;
  color: var(--paper-ink-soft);
  text-align: center;
  margin: 0 0 36px;
  font-style: italic;
}

/* PRODUCT */
.product {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 90px 24px;
  text-align: center;
}
.product-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  margin: 0 0 50px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: left;
}
.feature-card {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 22px;
  padding: 28px;
}
.feature-icon { font-size: 30px; display: block; margin-bottom: 14px; }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
}
.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-page-soft);
  margin: 0;
}
.badge-row { display: flex; gap: 8px; margin-bottom: 14px; }
.mini-badge {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 12px;
  font-family: var(--font-display);
}

/* FINAL CTA */
.final-cta {
  position: relative;
  z-index: 1;
  padding: 40px 24px 100px;
  display: flex;
  justify-content: center;
}
.cta-card {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: 56px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.cta-logo {
  width: 80px; height: 80px;
  border-radius: 24px;
  margin: 0 auto 20px;
  box-shadow: 0 10px 24px rgba(36,27,61,0.2);
}
.cta-tagline {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}
.cta-tagline-si {
  font-family: "Noto Sans Sinhala", var(--font-body);
  color: var(--violet);
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 28px;
}
.cta-card .btn-primary { background: var(--violet); color: #fff; }
.cta-card .btn-secondary { background: rgba(110,92,224,0.1); border-color: rgba(110,92,224,0.25); color: var(--violet); }

.social-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.social-link {
  color: var(--on-page-soft);
  text-decoration: none;
  font-weight: 600;
}
.social-link:hover { color: var(--on-page); }
.social-sep { color: var(--on-page-soft); opacity: 0.5; }

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin: 0 auto 14px;
  opacity: 0.85;
}
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px 50px;
  font-size: 13px;
  color: var(--on-page-soft);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .bg-blob-1, .bg-blob-2, .bg-blob-3 { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .story { border-radius: 28px 28px 0 0; padding: 70px 20px; }
  .hero { padding: 70px 20px 56px; }
  .artifact { flex-direction: column; align-items: stretch; }
  .artifact-arrow { text-align: center; transform: rotate(90deg); }
}
