/* ---------- design tokens ---------- */
:root {
  --bg: #0b0915;
  --bg-2: #14102a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f1ff;
  --text-dim: rgba(244, 241, 255, 0.7);
  --text-mute: rgba(244, 241, 255, 0.5);
  --accent: #8e67d8;
  --accent-2: #c19af1;
  --accent-warm: #ff7ac8;
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
*, *::before, *::after { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
a:hover { color: var(--accent-2); }

/* ---------- background mesh + drifting mana ---------- */
body::before {
  content: "";
  position: fixed;
  inset: -10vmax;
  background:
    radial-gradient(60vmax 60vmax at 12% 0%, rgba(142, 103, 216, 0.25), transparent 60%),
    radial-gradient(50vmax 50vmax at 95% 20%, rgba(255, 122, 200, 0.18), transparent 60%),
    radial-gradient(50vmax 50vmax at 50% 100%, rgba(58, 32, 130, 0.4),    transparent 70%),
    var(--bg);
  z-index: -2;
  animation: mesh-shift 22s ease-in-out infinite alternate;
}
@keyframes mesh-shift {
  0%   { transform: scale(1)    translate(0, 0); }
  100% { transform: scale(1.08) translate(2vmax, -2vmax); }
}

.mana-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.mana-field .drift {
  position: absolute;
  left: var(--x);
  top: 110%;
  width: 64px;
  height: 64px;
  opacity: 0;
  animation: drift-up var(--d) linear infinite;
  animation-delay: var(--a);
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.3));
}
.mana-field .drift img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0.55;
}
@keyframes drift-up {
  0%   { transform: translate(0, 0)    rotate(0);   opacity: 0;    }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translate(-4vw, -120vh) rotate(180deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .mana-field .drift { animation: none; }
  .mana-field .drift { display: none; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(11, 9, 21, 0.55);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 9, 21, 0.78);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 18px;
}
.brand img {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(142, 103, 216, 0.4);
  transition: transform 0.4s var(--ease);
}
.brand:hover img { transform: rotate(-6deg) scale(1.06); }

.primary-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--text-dim);
}
.primary-nav a { position: relative; padding: 6px 2px; }
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.primary-nav a:hover::after { transform: scaleX(1); }
@media (max-width: 540px) {
  .primary-nav { display: none; }
}

.studio-back {
  font-size: 13px;
  color: var(--text-mute);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.studio-back:hover {
  color: var(--accent-2);
  border-color: rgba(142, 103, 216, 0.4);
  background: rgba(142, 103, 216, 0.08);
}
@media (max-width: 720px) {
  .studio-back { display: none; }
}

/* ---------- legal page ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 28px 120px;
}
.legal-inner > * + * { margin-top: 18px; }
.legal h1 {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 14px;
}
.legal h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-top: 44px;
  color: var(--text);
}
.legal .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent-2);
}
.legal .updated {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 4px;
}
.legal .lede {
  font-size: 19px;
  color: var(--text-dim);
  margin-top: 28px;
}
.legal p, .legal li {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.65;
}
.legal ul {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal li::marker { color: var(--accent); }
.legal a {
  color: var(--accent-2);
  border-bottom: 1px solid rgba(193, 154, 241, 0.25);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.legal a:hover { border-color: var(--accent-2); }
.legal .legal-foot {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-mute);
}
.primary-nav a[aria-current="page"] { color: var(--text); }
.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- layout ---------- */
main { display: block; }
.section {
  padding: 120px 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 14px;
}
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: clamp(44px, 7vw, 88px); }
h2 { font-size: clamp(30px, 4.4vw, 48px); }
h3 { font-size: 22px; }

.lede {
  color: var(--text-dim);
  font-size: clamp(17px, 1.6vw, 20px);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.section-head .lede { margin-top: 14px; }

/* ---------- hero ---------- */
.hero {
  padding: 120px 28px 80px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
}

.kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(142, 103, 216, 0.12);
  border: 1px solid rgba(142, 103, 216, 0.3);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.hero h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: word-in 0.7s var(--ease) forwards;
}
.hero h1 .word:nth-child(1) { animation-delay: 0.15s; }
.hero h1 .word:nth-child(2) { animation-delay: 0.32s; }
.hero h1 .word:nth-child(3) { animation-delay: 0.50s; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent-2), var(--accent-warm));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: word-in 0.7s var(--ease) 0.5s forwards,
             gradient-shift 8s ease-in-out infinite alternate 1.5s;
}
@keyframes word-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.hero .lede {
  color: var(--text-dim);
  margin: 22px 0 32px;
  max-width: 540px;
  font-size: clamp(17px, 1.6vw, 19px);
}
@media (max-width: 880px) {
  .hero .lede { margin-left: auto; margin-right: auto; }
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 880px) {
  .hero-cta { justify-content: center; }
}

.platforms {
  margin-top: 24px;
  color: var(--text-mute);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* hero icon */
.hero-art { display: flex; justify-content: center; }
.icon-wrap {
  position: relative;
  width: clamp(220px, 32vw, 360px);
  aspect-ratio: 1;
}
.app-icon {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 26%;
  box-shadow:
    0 30px 80px -20px rgba(142, 103, 216, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  animation: float 6s ease-in-out infinite;
}
.icon-glow {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(193, 154, 241, 0.5), transparent 70%);
  filter: blur(20px);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-12px) rotate(-1.5deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50%      { opacity: 1;   transform: scale(1.05); }
}

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  animation: hint-pulse 2.4s ease-in-out infinite;
}
.scroll-hint .chev {
  width: 5px;
  height: 5px;
  background: var(--accent-2);
  border-radius: 50%;
  animation: hint-dot 2.4s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}
@keyframes hint-dot {
  0%   { transform: translateY(0);    opacity: 1; }
  60%  { transform: translateY(16px); opacity: 0.2; }
  100% { transform: translateY(0);    opacity: 1; }
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              background 0.25s var(--ease);
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(142, 103, 216, 0.7);
}
.btn.primary:hover {
  box-shadow: 0 18px 40px -12px rgba(142, 103, 216, 0.9);
}
.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn.ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(115deg,
              transparent 25%,
              rgba(255, 255, 255, 0.45) 50%,
              transparent 75%);
  transition: left 0.7s var(--ease);
}
.btn:hover .btn-shine { left: 120%; }

/* ---------- features ---------- */
.features .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 880px) {
  .features .grid { grid-template-columns: 1fr; }
}
@media (min-width: 540px) and (max-width: 880px) {
  .features .grid { grid-template-columns: repeat(2, 1fr); }
}

.feature {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease),
              border-color 0.35s var(--ease),
              background 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(142, 103, 216, 0.5), transparent 60%);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.feature:hover {
  transform: translateY(-4px);
  background: var(--surface-2);
  border-color: rgba(142, 103, 216, 0.3);
  box-shadow: 0 20px 50px -25px rgba(142, 103, 216, 0.6);
}
.feature:hover::before { opacity: 1; }

.feature-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(142, 103, 216, 0.15);
  color: var(--accent-2);
  font-size: 22px;
  margin-bottom: 18px;
  transition: transform 0.4s var(--ease);
}
.feature:hover .feature-mark {
  transform: rotate(-8deg) scale(1.08);
}
.feature h3 { margin-bottom: 8px; }
.feature p  { color: var(--text-dim); font-size: 15px; }

/* ---------- mana strip ---------- */
.mana-strip .mana-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.mana-strip .mana {
  width: clamp(48px, 6vw, 76px);
  height: clamp(48px, 6vw, 76px);
  border-radius: 50%;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}
.mana-strip .mana:hover {
  transform: translateY(-6px) rotate(8deg) scale(1.1);
  filter: brightness(1.15) drop-shadow(0 0 18px rgba(193, 154, 241, 0.6));
}

/* ---------- how it works ---------- */
.how .steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 880px) {
  .how .steps { grid-template-columns: 1fr; }
}
.step {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.step:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 200, 0.35);
}
.step-num {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p  { color: var(--text-dim); font-size: 15px; }

/* ---------- pricing ---------- */
.pro .plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .pro .plans { grid-template-columns: 1fr; }
}
.plan {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.plan:hover { transform: translateY(-4px); }
.plan.featured {
  border-color: rgba(142, 103, 216, 0.45);
  background:
    linear-gradient(180deg, rgba(142, 103, 216, 0.12), transparent 80%),
    var(--surface-2);
  box-shadow: 0 30px 60px -25px rgba(142, 103, 216, 0.6);
}
.plan .badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
}
.plan h3 { font-size: 24px; }
.plan .price {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.plan ul { list-style: none; display: grid; gap: 10px; }
.plan li {
  color: var(--text-dim);
  font-size: 15px;
  position: relative;
  padding-left: 20px;
}
.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-weight: 700;
}
.plan .btn { align-self: flex-start; }
.pro .note {
  text-align: center;
  margin-top: 40px;
  color: var(--text-mute);
  font-size: 14px;
}

/* ---------- privacy ---------- */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 880px) {
  .privacy-grid { grid-template-columns: 1fr; }
}
.privacy-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.privacy-card:hover {
  transform: translateY(-4px);
  border-color: rgba(193, 154, 241, 0.4);
}
.privacy-card h3 { margin-bottom: 8px; }
.privacy-card p  { color: var(--text-dim); font-size: 15px; }

/* ---------- disclaimer ---------- */
.disclaimer {
  padding: 60px 28px 120px;
  max-width: 820px;
  margin: 0 auto;
}
.disclaimer-inner {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.disclaimer-inner h3 {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.disclaimer-inner p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}
.disclaimer-inner p + p { margin-top: 10px; }
.disclaimer-inner a { color: var(--accent-2); border-bottom: 1px dashed rgba(193, 154, 241, 0.4); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 28px;
  background: rgba(11, 9, 21, 0.6);
  backdrop-filter: blur(20px);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.footer-brand img { border-radius: 6px; }
footer nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--text-dim);
}
.copyright {
  color: var(--text-mute);
  font-size: 13px;
}

/* ---------- reveal animations ---------- */
.reveal {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal[data-anim="fade-up"]   { transform: translateY(24px); }
.reveal[data-anim="fade-in"]   { transform: none; }
.reveal[data-anim="pop"]       { transform: scale(0.85); }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1 .word { opacity: 1; transform: none; animation: none; }
  .app-icon, .icon-glow { animation: none; }
  .scroll-hint { animation: none; }
}

/* ---------- showcase ---------- */
.showcase .phone-row {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 36px;
}
.phone {
  flex: 0 0 auto;
  width: 220px;
  text-align: center;
  transition: transform 0.4s var(--ease);
}
.phone:hover { transform: translateY(-6px); }
.phone-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 38px;
  padding: 8px;
  background: linear-gradient(160deg, #2a2440 0%, #15102a 60%, #0a0716 100%);
  box-shadow:
    0 30px 70px -28px rgba(0, 0, 0, 0.8),
    0 8px 24px -10px rgba(142, 103, 216, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.phone-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 40%);
  pointer-events: none;
  z-index: 2;
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
  display: block;
}
.phone figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
@media (max-width: 880px) {
  .showcase .phone-row { gap: 18px; }
  .phone { width: 170px; }
  .phone-frame { border-radius: 30px; padding: 6px; }
  .phone-frame img { border-radius: 24px; }
}
@media (max-width: 540px) {
  .showcase .phone-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .phone { scroll-snap-align: center; width: 200px; }
}
