/* ============================================================
   LunaLab — moonlit cosmic landing page
   Display: Space Grotesk · Body: Manrope
   ============================================================ */

:root {
  /* surfaces */
  --bg:         #06060f;
  --bg-2:       #0a0a18;
  --surface:    rgba(255, 255, 255, 0.035);
  --surface-2:  rgba(255, 255, 255, 0.06);
  --surface-solid: #11112a;
  --border:     rgba(150, 140, 240, 0.14);
  --border-bright: rgba(168, 158, 255, 0.32);

  /* moonlit accents */
  --violet:  #8b7bf0;
  --indigo:  #6366f1;
  --lilac:   #c4b5fd;
  --lunar:   #8fd3ff;   /* cool moon-glow cyan */
  --magenta: #d97bf0;

  /* text */
  --text:   #edecf7;
  --muted:  #9c9bbb;
  --faint:  #6d6c8a;

  /* effects */
  --glow-violet: 0 0 60px rgba(139, 123, 240, 0.45);
  --shadow-card: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --ring: 0 0 0 1px var(--border);

  --maxw: 1200px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- cosmic backdrop ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.cosmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(110, 90, 240, 0.28), transparent 60%),
    radial-gradient(900px 600px at 8% 12%, rgba(50, 80, 200, 0.18), transparent 55%),
    radial-gradient(1200px 900px at 50% 120%, rgba(150, 100, 230, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* ---------- layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}
section { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lilac);
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lunar);
  box-shadow: 0 0 10px var(--lunar);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }

.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 50px);
  margin: 20px 0 16px;
}
.section-head p { color: var(--muted); font-size: 18px; }

.gradient-text {
  background: linear-gradient(110deg, #fff 8%, var(--lilac) 42%, var(--lunar) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 15px;
  padding: 13px 22px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap;
}
.btn-primary {
  color: #0b0b1a;
  background: linear-gradient(120deg, var(--lilac), var(--lunar));
  box-shadow: 0 8px 30px -8px rgba(143, 211, 255, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -8px rgba(143, 211, 255, 0.7); }
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-bright); transform: translateY(-2px); }

/* google play badge (drawn) */
.play-badge {
  display: inline-flex; align-items: center; gap: 13px;
  padding: 11px 20px 11px 17px;
  border-radius: 14px;
  background: #0c0c1c;
  border: 1px solid var(--border-bright);
  text-decoration: none;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.play-badge:hover { transform: translateY(-2px); border-color: var(--lilac); box-shadow: 0 12px 34px -12px rgba(143,211,255,.4); }
.play-badge .tri {
  width: 26px; height: 29px; flex: none;
}
.play-badge .txt { line-height: 1.15; }
.play-badge .txt small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.play-badge .txt strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text); }

/* ============================================================
   HEADER
   ============================================================ */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
header.nav.scrolled {
  background: rgba(8, 8, 18, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav-inner {
  height: 74px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand .logo-slot {
  width: 40px; height: 40px; border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--glow-violet);
}
.brand .moon-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 32% 30%, #fff, var(--lilac) 40%, var(--violet) 100%);
  box-shadow: var(--glow-violet);
  position: relative; flex: none;
}
.brand .moon-mark::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); top: 6px; right: 4px;
}
.brand b { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

/* file-based logo + screenshots */
.logo-img {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  object-fit: cover;
  box-shadow: var(--glow-violet);
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.float-card .ic img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.brand b span { color: var(--lilac); }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  position: relative; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--lilac), var(--lunar)); transition: width .28s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 170px 0 90px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
}
.hero h1 {
  font-size: clamp(44px, 6.4vw, 82px);
  margin: 26px 0 24px;
}
.hero p.lead {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--muted); max-width: 520px; margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 52px; flex-wrap: wrap;
}
.hero-stats .stat b {
  font-family: var(--font-display); font-size: 30px; font-weight: 600; display: block;
  background: linear-gradient(120deg, #fff, var(--lilac)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats .stat span { font-size: 13.5px; color: var(--faint); letter-spacing: .03em; }

/* hero visual: floating moon + orbiting phones */
.hero-visual { position: relative; height: 540px; }
.moon-orb {
  position: absolute; top: 8%; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px; border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, #fbfbff 0%, #d9d4ff 30%, #9a8cf0 64%, #5b4fc7 100%);
  box-shadow:
    0 0 90px 10px rgba(139, 123, 240, 0.5),
    inset -30px -26px 70px rgba(40, 30, 90, 0.55);
}
.moon-orb::before, .moon-orb::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(80, 65, 150, 0.28); box-shadow: inset 3px 3px 8px rgba(30,20,70,.4);
}
.moon-orb::before { width: 54px; height: 54px; top: 58px; left: 70px; }
.moon-orb::after  { width: 32px; height: 32px; top: 150px; left: 200px; }
.moon-crater {
  position: absolute; border-radius: 50%;
  background: rgba(70, 56, 140, 0.3); box-shadow: inset 2px 2px 6px rgba(30,20,70,.4);
}

.orbit-ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  border: 1px dashed rgba(168,158,255,.22); border-radius: 50%;
}
.orbit-ring.r1 { width: 460px; height: 460px; }
.orbit-ring.r2 { width: 600px; height: 600px; border-color: rgba(168,158,255,.12); }

.float-card {
  position: absolute; z-index: 3;
  background: rgba(18, 18, 38, 0.82); backdrop-filter: blur(12px);
  border: 1px solid var(--border-bright); border-radius: 16px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-card); width: max-content;
}
.float-card .ic {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
}
.float-card small { display: block; font-size: 11px; color: var(--faint); }
.float-card strong { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.fc-1 { top: 64%; left: -2%; }
.fc-2 { top: 30%; right: -4%; }
.fc-3 { top: 84%; right: 8%; }

/* ============================================================
   APP SHOWCASE
   ============================================================ */
.apps { padding: 60px 0 40px; }
.app-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center;
  padding: 70px 0;
}
.app-row.reverse .app-copy { order: 2; }
.app-row.reverse .app-phone { order: 1; }

.app-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: .04em;
  padding: 6px 13px; border-radius: 100px; margin-bottom: 20px;
}
.app-copy h3 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 18px; }
.app-copy > p { color: var(--muted); font-size: 17.5px; max-width: 480px; margin-bottom: 30px; }

.feat-list { display: grid; gap: 16px; margin-bottom: 34px; }
.feat-list li { display: flex; gap: 14px; align-items: flex-start; list-style: none; }
.feat-list .fic {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.feat-list b { font-family: var(--font-display); font-weight: 600; font-size: 16px; display: block; margin-bottom: 2px; }
.feat-list span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* phone mockup */
.phone {
  position: relative; width: 290px; aspect-ratio: 9 / 19.5;
  margin: 0 auto;
  border-radius: 40px;
  background: linear-gradient(150deg, #2a2a44, #14142a);
  padding: 11px;
  box-shadow:
    0 40px 90px -30px rgba(0,0,0,.85),
    inset 0 0 0 1.5px rgba(180,170,255,.18);
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 7px; border-radius: 100px; background: #050510; z-index: 4;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden; position: relative;
  background: #0a0a16;
}
.phone-screen image-slot { width: 100%; height: 100%; display: block; }
.phone-glow {
  position: absolute; inset: -40px; border-radius: 60px; z-index: -1;
  filter: blur(50px); opacity: .55;
}
.app-phone { position: relative; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery { padding: 90px 0; }
.gallery-track {
  display: flex; gap: 26px; overflow-x: auto; padding: 14px 28px 30px; margin: 0 -28px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track .phone { flex: none; scroll-snap-align: center; width: 248px; transition: transform .4s; }
.gallery-track .phone:hover { transform: translateY(-10px); }
.gallery-hint { color: var(--faint); font-size: 13.5px; margin-top: 6px; display: flex; align-items: center; gap: 8px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: 90px 0; }
.about-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(28,26,58,.7), rgba(12,12,26,.55));
  backdrop-filter: blur(10px);
  padding: 64px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center;
}
.about-card .glow-blob {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(143,211,255,.4), transparent 65%);
  filter: blur(40px); top: -120px; right: -80px; z-index: 0;
}
.about-card > * { position: relative; z-index: 1; }
.about h2 { font-size: clamp(28px, 3.6vw, 42px); margin: 18px 0 20px; }
.about p { color: var(--muted); font-size: 17px; margin-bottom: 16px; }
.about-pillars { display: grid; gap: 18px; }
.about-pillars .pill {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); transition: border-color .25s, transform .25s;
}
.about-pillars .pill:hover { border-color: var(--border-bright); transform: translateX(4px); }
.about-pillars .pic {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  box-shadow: 0 6px 18px -6px var(--violet);
}
.about-pillars b { font-family: var(--font-display); font-size: 16px; display: block; }
.about-pillars span { font-size: 13.5px; color: var(--muted); }

/* ============================================================
   CTA STRIP
   ============================================================ */
.cta-strip { padding: 50px 0 90px; }
.cta-box {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); padding: 64px;
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% -30%, rgba(143,211,255,.28), transparent 60%),
    linear-gradient(160deg, rgba(40,34,86,.85), rgba(14,14,30,.9));
  border: 1px solid var(--border-bright);
}
.cta-box h2 { font-size: clamp(30px, 4vw, 50px); margin-bottom: 16px; }
.cta-box p { color: var(--muted); font-size: 18px; max-width: 520px; margin: 0 auto 34px; }
.cta-box .badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
footer.site {
  border-top: 1px solid var(--border);
  padding: 70px 0 36px;
  background: linear-gradient(180deg, transparent, rgba(10,10,22,.7));
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 54px;
}
.foot-brand .brand { margin-bottom: 18px; }
.foot-brand p { color: var(--muted); font-size: 14.5px; max-width: 290px; margin-bottom: 22px; }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: all .25s; text-decoration: none;
}
.socials a:hover { color: var(--text); border-color: var(--border-bright); background: var(--surface-2); transform: translateY(-3px); }
.foot-col h5 {
  font-family: var(--font-display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 18px; font-weight: 600;
}
.foot-col a {
  display: block; color: var(--muted); text-decoration: none; font-size: 14.5px; margin-bottom: 12px;
  transition: color .2s, padding-left .2s;
}
.foot-col a:hover { color: var(--lilac); padding-left: 4px; }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  padding-top: 28px; border-top: 1px solid var(--border);
  color: var(--faint); font-size: 13.5px;
}
.foot-bottom a { color: var(--faint); text-decoration: none; }
.foot-bottom a:hover { color: var(--muted); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
/* hidden state only applies once JS confirms reveal support — otherwise content shows by default */
.reveal { transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal-ready .reveal { opacity: 0; transform: translateY(28px); }
.reveal-ready .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes floaty2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(12px); } }
@keyframes pulseGlow { 0%,100% { opacity: .5; } 50% { opacity: .85; } }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes twinkle { 0%,100%{opacity:.25;} 50%{opacity:1;} }

.moon-orb { animation: floaty 9s ease-in-out infinite; }
.fc-1 { animation: floaty2 7s ease-in-out infinite; }
.fc-2 { animation: floaty 6.4s ease-in-out infinite .4s; }
.fc-3 { animation: floaty2 8s ease-in-out infinite .8s; }
.phone-glow { animation: pulseGlow 5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .reveal, .reveal-ready .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 420px; margin-top: 20px; }
  .moon-orb { width: 230px; height: 230px; }
  .app-row, .about-card { grid-template-columns: 1fr; gap: 40px; }
  .app-row.reverse .app-copy { order: 1; }
  .app-row.reverse .app-phone { order: 2; }
  .about-card { padding: 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 130px 0 70px; }
  .about-card, .cta-box { padding: 30px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .hero-stats { gap: 26px; }
  .nav-cta .btn-ghost { display: none; }
}
