﻿/* =========================
   Design Tokens
   ========================= */
:root {
  --bg-top: #d9cefb;
  --bg-mid: #e8defd;
  --bg-bottom: #f2ecff;

  --ink: #3f3287;
  --muted: #5f5499;
  --line: rgba(83, 55, 173, 0.14);

  --glass: rgba(255, 255, 255, 0.62);
  --primary-a: #5e4bde;
  --primary-b: #d06ddf;
  --link-accent: #4a39b9;
  --footer-ink: #4f4496;

  --shadow-soft: 0 16px 40px rgba(87, 63, 176, 0.16);
  --shadow-main: 0 28px 80px rgba(87, 63, 176, 0.2);

  --max-width: 1160px;
}

/* =========================
   Base
   ========================= */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(
    180deg,
    var(--bg-top),
    var(--bg-mid) 45%,
    var(--bg-bottom)
  );
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

/* =========================
   Background Scene
   ========================= */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg__orb {
  position: absolute;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  filter: blur(58px);
}

.bg__orb--left {
  top: -300px;
  left: -340px;
  background: radial-gradient(
    circle,
    rgba(196, 147, 255, 0.9) 0%,
    rgba(196, 147, 255, 0) 65%
  );
}

.bg__orb--right {
  top: -300px;
  right: -340px;
  background: radial-gradient(
    circle,
    rgba(126, 106, 239, 0.78) 0%,
    rgba(126, 106, 239, 0) 65%
  );
}

.bg__stars {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 0 2px, transparent 2px),
    radial-gradient(circle at 80% 25%, #fff 0 2px, transparent 2px),
    radial-gradient(circle at 30% 65%, #fff 0 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, #fff 0 2px, transparent 2px);
}

/* Fixed decorative wave */
.bg__wave {
  position: fixed;
  top: 410px;
  left: 0;
  width: 100%;
  height: 360px;
  fill: rgba(255, 255, 255, 0.42);
}

/* =========================
   Header
   ========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(243, 237, 255, 0.74);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand__mark {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(227, 214, 255, 0.95),
    rgba(214, 196, 252, 0.92)
  );
  box-shadow: var(--shadow-soft);
}

.brand__name {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.4px;
}

.nav {
  margin-left: auto;
  margin-right: 14px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow-soft);
}

.nav a {
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

.nav a:hover {
  background: rgba(109, 84, 214, 0.08);
  color: var(--ink);
}

.nav a.is-active {
  color: var(--ink);
  background: rgba(109, 84, 214, 0.12);
}

.header__actions {
  display: flex;
  align-items: center;
}

/* Keep CTA label on one line */
.header__actions .btn {
  white-space: nowrap;
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 17px;
  font-weight: 900;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--sm {
  padding: 14px 42px;
}

.btn--primary {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--primary-a), var(--primary-b));
  box-shadow: 0 18px 42px rgba(96, 69, 193, 0.3);
}

.btn--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.menuBtn {
  display: none;
  width: 46px;
  height: 46px;
  margin-left: 10px;
  border-radius: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--primary-a), var(--primary-b));
}

.mobileNav {
  display: none;
}

/* =========================
   Hero
   ========================= */
.hero {
  padding: 86px 0 60px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: start;
  gap: 34px;
}

.hero__copy {
  padding-top: 30px;
}

.hero__copy h1 {
  margin: 0;
  font-family: "Sora", "Nunito Sans", sans-serif;
  font-size: clamp(40px, 5.2vw, 62px);
  line-height: 1.03;
  letter-spacing: -1.2px;
}

.hero__copy p {
  margin: 22px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

.hero__webLink {
  color: var(--link-accent);
  font-weight: 900;
  text-decoration: none;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

.hero__note {
  margin-top: 18px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.hero__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Phone mockup shell */
.phone {
  width: min(385px, 100%);
  padding: 18px;
  border-radius: 52px;
  border: 2px solid rgba(124, 95, 222, 0.38);
  background: linear-gradient(
    180deg,
    rgba(238, 232, 255, 0.82),
    rgba(255, 255, 255, 0.65)
  );
  box-shadow: var(--shadow-main);
}

.phone__top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: rgba(66, 52, 128, 0.85);
  font-size: 14px;
  font-weight: 800;
}

.phone__screen {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  aspect-ratio: 390 / 700;
}

.phone__iframeWrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
}

.phone__iframeWrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.phone__fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.88);
}

.phone__fallback img {
  width: 100%;
  max-width: 280px;
  opacity: 0.95;
}

.phone__fallbackText {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.phone__fallbackText a {
  color: var(--link-accent);
  font-weight: 800;
}

.phone__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.btn--phone {
  padding: 10px 14px;
  font-size: 13px;
  box-shadow: none;
}

.hero__hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* =========================
   Features
   ========================= */
.features {
  padding: 90px 0 80px;
}

.features h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(42px, 4vw, 60px);
  font-weight: 900;
  letter-spacing: -0.6px;
}

.features__lead {
  margin: 18px auto 34px;
  max-width: 740px;
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.4;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 26px;
  border: 1px solid rgba(132, 105, 214, 0.2);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0.52)
  );
  backdrop-filter: blur(3px);
  box-shadow:
    0 12px 26px rgba(87, 63, 176, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition:
    transform 0.18s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

/* Animated border glow */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 0deg,
    rgba(124, 99, 223, 0.1),
    rgba(211, 120, 226, 0.5),
    rgba(124, 99, 223, 0.1)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: cardBorderSpin 7s linear infinite;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 88, 220, 0.35);
  box-shadow:
    0 20px 38px rgba(87, 63, 176, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

@keyframes cardBorderSpin {
  to {
    transform: rotate(360deg);
  }
}

.card__titleRow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(137, 110, 223, 0.28);
  color: #7c63df;
  font-size: 14px;
  background: radial-gradient(circle at 30% 25%, #f3ebff, #ddceff);
  box-shadow: 0 6px 12px rgba(124, 99, 223, 0.2);
}

.card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

/* =========================
   Footer
   ========================= */
.footer {
  border-top: 1px solid var(--line);
  background: rgba(248, 243, 255, 0.7);
}

.footer__top {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
}

.footer__nav {
  justify-self: end;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__nav a,
.footer__bottom p {
  color: var(--footer-ink);
  font-size: 18px;
  font-weight: 700;
}

.footer__bottom {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
}

.footer__bottom p {
  margin: 0;
  text-align: center;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 1100px) {
  .brand__name {
    font-size: 34px;
  }

  .hero__copy h1 {
    font-size: clamp(42px, 8vw, 64px);
  }

  .hero__copy p,
  .hero__note,
  .features__lead,
  .card p {
    font-size: 17px;
  }

  .card h3 {
    font-size: 20px;
  }

  .footer__nav a,
  .footer__bottom p {
    font-size: 20px;
  }
}

/* Switch to mobile nav before labels wrap */
@media (max-width: 1080px) {
  .header__inner {
    min-height: 78px;
  }

  .brand__name {
    font-size: 30px;
  }

  .nav {
    display: none;
  }

  .menuBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header__actions {
    margin-left: auto;
  }

  .header__actions .btn {
    display: none;
  }

  .mobileNav {
    padding: 0 0 14px;
  }

  .mobileNav.is-open {
    display: grid;
    gap: 8px;
  }

  .mobileNav a {
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    font-weight: 800;
  }

  .mobileNav a.mobileNav__download {
    /* Emphasize primary action in mobile nav */
    margin-top: 4px;
    text-align: center;
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, var(--primary-a), var(--primary-b));
    box-shadow: 0 14px 30px rgba(96, 69, 193, 0.28);
  }
}

@media (max-width: 860px) {
  .hero {
    padding-top: 46px;
  }

  .bg__wave {
    top: 350px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero__copy {
    padding-top: 0;
  }

  .hero__copy h1 {
    font-size: clamp(36px, 10vw, 56px);
  }

  .hero__copy p,
  .hero__note {
    font-size: 17px;
  }

  .phone__actions {
    justify-content: flex-start;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card h3 {
    font-size: 22px;
  }

  .footer__top {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 20px;
    padding: 20px 0;
  }

  .footer__top .brand {
    justify-self: center;
  }

  .footer__nav {
    /* Footer nav stack on mobile */
    justify-self: center;
    display: grid;
    width: auto;
    gap: 14px;
    justify-items: center;
    text-align: center;
  }

  .footer__nav a {
    display: block;
    width: auto;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: center;
    line-height: 1.4;
  }

  .footer__nav a,
  .footer__bottom p {
    font-size: 18px;
  }

  .footer__bottom {
    padding: 10px 0 16px;
  }
}
