/* =========================================================================
   Swish — mystic purple dark theme
   ========================================================================= */

:root {
  /* Core palette */
  --bg-0: #07020f;
  --bg-1: #120627;
  --bg-2: #1c0a3a;
  --violet: #8b5cf6;
  --violet-bright: #a855f7;
  --magenta: #d946ef;
  --indigo: #6366f1;
  --cyan-glow: #22d3ee;

  --text: #ece7ff;
  --text-dim: #b3a9d9;
  --text-faint: #7d729f;

  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(168, 85, 247, 0.22);
  --card-border-hover: rgba(217, 70, 239, 0.5);

  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1120px;

  --grad-brand: linear-gradient(120deg, #a855f7 0%, #d946ef 55%, #6366f1 100%);
  --grad-text: linear-gradient(120deg, #e9d5ff 0%, #f0abfc 50%, #c4b5fd 100%);
  --shadow-glow: 0 20px 60px -20px rgba(168, 85, 247, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Cosmic background layers ---- */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 15% -5%, rgba(168, 85, 247, 0.28), transparent 60%),
    radial-gradient(800px 700px at 90% 10%, rgba(217, 70, 239, 0.22), transparent 55%),
    radial-gradient(1000px 800px at 50% 110%, rgba(99, 102, 241, 0.25), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 55%, #05010b 100%);
}
.cosmos::after {
  /* faint starfield */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 55% 85%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 10% 80%, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0.6;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.7; } }

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
.orb.a { width: 420px; height: 420px; background: radial-gradient(circle, var(--magenta), transparent 70%); top: -80px; left: -60px; }
.orb.b { width: 480px; height: 480px; background: radial-gradient(circle, var(--indigo), transparent 70%); bottom: -140px; right: -80px; animation-delay: -5s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Nav ---- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 3, 22, 0.55);
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand .logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  box-shadow: var(--shadow-glow);
  font-size: 18px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 9px 18px; border-radius: 999px; background: var(--grad-brand); color: #fff !important; font-weight: 600; box-shadow: var(--shadow-glow); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  cursor: pointer; border: none; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 26px 70px -18px rgba(217, 70, 239, 0.7); }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--card-border); }
.btn-ghost:hover { border-color: var(--card-border-hover); transform: translateY(-2px); }

/* ---- Store badges ---- */
.store-badges { display: flex; gap: 16px; flex-wrap: wrap; }
.store-badge {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  text-decoration: none; color: var(--text);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  min-width: 190px;
}
.store-badge:hover { transform: translateY(-3px); border-color: var(--card-border-hover); background: rgba(255, 255, 255, 0.07); }
.store-badge svg { width: 28px; height: 28px; flex-shrink: 0; }
.store-badge .lbl { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge .lbl small { font-size: 0.7rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.store-badge .lbl strong { font-size: 1.05rem; font-weight: 700; }

/* ---- Hero ---- */
.hero { padding: 90px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--card-border);
  font-size: 0.82rem; color: var(--text-dim); margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.3rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; margin-bottom: 22px; }
.hero p.lead { font-size: 1.2rem; color: var(--text-dim); max-width: 520px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-direction: column; gap: 22px; }

/* ---- Phone mockup ---- */
.phone-stage { display: grid; place-items: center; position: relative; }
.phone {
  position: relative; width: 290px; height: 590px;
  border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #2a1150, #150726);
  border: 1px solid rgba(217, 70, 239, 0.35);
  box-shadow: 0 40px 120px -30px rgba(168, 85, 247, 0.75), inset 0 0 0 2px rgba(255,255,255,0.04);
  animation: float 8s ease-in-out infinite;
}
.phone .screen {
  width: 100%; height: 100%; border-radius: 32px; overflow: hidden;
  background: linear-gradient(180deg, #1a0a34, #0c0419);
  display: flex; flex-direction: column;
}
.phone .notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 120px; height: 26px; background: #05010b; border-radius: 0 0 16px 16px; z-index: 2; }
.screen-top { padding: 40px 20px 14px; text-align: center; }
.screen-top .app-name { font-weight: 700; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wish-card-mini {
  margin: 8px 16px; padding: 14px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--card-border);
  text-align: left;
}
.wish-card-mini .star { color: var(--magenta); font-size: 0.8rem; }
.wish-card-mini h4 { font-size: 0.95rem; margin: 6px 0 4px; }
.wish-card-mini p { font-size: 0.78rem; color: var(--text-faint); }

/* ---- Sections ---- */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -0.02em; margin-bottom: 16px; }
.section-head p { color: var(--text-dim); font-size: 1.1rem; }

/* ---- Feature cards ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  padding: 30px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.feature:hover { transform: translateY(-6px); border-color: var(--card-border-hover); background: rgba(255,255,255,0.07); }
.feature .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(168, 85, 247, 0.15); border: 1px solid var(--card-border);
  font-size: 24px; margin-bottom: 18px;
}
.feature h3 { font-size: 1.25rem; margin-bottom: 10px; }
.feature p { color: var(--text-dim); font-size: 0.98rem; }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step { text-align: center; padding: 24px; }
.step .num {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 1.3rem;
  background: var(--grad-brand); box-shadow: var(--shadow-glow);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-dim); }

/* ---- CTA band ---- */
.cta-band {
  text-align: center; padding: 70px 40px; border-radius: 28px;
  background: linear-gradient(135deg, rgba(168,85,247,0.18), rgba(217,70,239,0.12));
  border: 1px solid var(--card-border);
  position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.cta-band p { color: var(--text-dim); font-size: 1.15rem; margin-bottom: 30px; }
.cta-band .store-badges { justify-content: center; }

/* ---- Footer ---- */
footer.site {
  border-top: 1px solid rgba(168, 85, 247, 0.12);
  padding: 46px 0 60px; margin-top: 40px; color: var(--text-faint);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-faint); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-dim); }

/* =========================================================================
   Shared wish viewer (wish.html)
   ========================================================================= */
.viewer { min-height: 100vh; display: flex; flex-direction: column; }
.viewer main { flex: 1; display: grid; place-items: center; padding: 100px 24px 60px; }
.wish-view {
  width: 100%; max-width: 560px; text-align: center;
  padding: 44px 36px; border-radius: 28px;
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow-glow);
  animation: rise 0.6s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.wish-view .wish-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(217, 70, 239, 0.15); border: 1px solid var(--card-border);
  font-size: 0.8rem; color: var(--text-dim); margin-bottom: 22px;
}
.wish-view .wish-image {
  width: 100%; max-height: 260px; object-fit: cover; border-radius: 18px;
  margin-bottom: 24px; border: 1px solid var(--card-border);
}
.wish-view h1 { font-size: 2rem; line-height: 1.15; margin-bottom: 14px; letter-spacing: -0.02em; }
.wish-view .wish-note { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 20px; }
.wish-view .wish-meta { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 30px; }
.wish-view .wish-author { color: var(--violet-bright); font-weight: 600; }
.wish-actions { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.wish-actions .hint { font-size: 0.85rem; color: var(--text-faint); }

.viewer-loading, .viewer-error { text-align: center; max-width: 460px; }
.spinner {
  width: 46px; height: 46px; margin: 0 auto 24px; border-radius: 50%;
  border: 3px solid rgba(168, 85, 247, 0.25); border-top-color: var(--magenta);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.viewer-error h1 { font-size: 1.8rem; margin-bottom: 12px; }
.viewer-error p { color: var(--text-dim); margin-bottom: 26px; }

/* Desktop redirect overlay */
.redirect-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(7, 2, 15, 0.82); backdrop-filter: blur(10px);
  display: none; place-items: center; padding: 24px;
}
.redirect-overlay.show { display: grid; animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.redirect-card {
  max-width: 460px; text-align: center; padding: 40px 34px; border-radius: 26px;
  background: linear-gradient(160deg, #1c0a3a, #0c0419);
  border: 1px solid var(--card-border-hover); box-shadow: var(--shadow-glow);
  animation: rise 0.4s ease both;
}
.redirect-card h2 { font-size: 1.6rem; margin-bottom: 12px; }
.redirect-card p { color: var(--text-dim); margin-bottom: 26px; }
.redirect-card .store-badges { justify-content: center; margin-bottom: 18px; }
.redirect-card .close-x {
  background: none; border: none; color: var(--text-faint); cursor: pointer;
  font-size: 0.9rem; text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions { align-items: center; }
  .store-badges { justify-content: center; }
  .features, .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.cta-only { display: flex; }
}
@media (max-width: 480px) {
  .wish-view { padding: 32px 22px; }
  .store-badge { min-width: 0; flex: 1; }
}
