/* MagFy marketing site — mirrors the app's dark glass design language */

:root {
  --bg: #07080c;
  --bg2: rgba(182, 188, 206, 0.09);
  --bg3: rgba(182, 188, 206, 0.14);
  --bg4: rgba(182, 188, 206, 0.2);
  --sheet: rgba(13, 14, 19, 0.94);

  --accent: #6d8dff;
  --accent2: #8b5cf6;
  --accent-soft: rgba(109, 141, 255, 0.14);
  --accent-fg: #fff;

  --green: #34d399;
  --amber: #fbbf24;

  --text: #f5f5f3;
  --text2: #a8adbd;
  --text3: #6e7488;

  --border: rgba(186, 191, 210, 0.13);
  --border-strong: rgba(186, 191, 210, 0.22);
  --glass-edge: rgba(255, 255, 255, 0.1);
  --wordmark-grad: linear-gradient(180deg, #d7dbff 0%, #8b5cf6 100%);
  --accent-grad: linear-gradient(135deg, #6d8dff 0%, #8b5cf6 100%);

  --max: 1120px;
  --radius: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 15% -10%, rgba(109, 141, 255, 0.16), transparent 60%),
    radial-gradient(900px 700px at 105% 5%, rgba(139, 92, 246, 0.13), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 8, 12, 0.68);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -0.01em; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  object-fit: cover; box-shadow: 0 4px 18px rgba(139,92,246,0.45);
}
.brand:hover { text-decoration: none; }

.navlinks { display: flex; gap: 28px; align-items: center; }
.navlinks a:not(.cta) {
  color: var(--text2); font-size: 14px; font-weight: 600; position: relative; padding: 4px 0;
}
.navlinks a:not(.cta):hover { color: var(--text); text-decoration: none; }
.navlinks .cta {
  background: var(--accent-grad); color: white; padding: 9px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 0 4px 16px rgba(139,92,246,0.3);
}
.navlinks .cta:hover { opacity: 0.92; text-decoration: none; }

.menu-btn {
  display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg2); cursor: pointer; align-items: center; justify-content: center;
}
.menu-btn svg { width: 18px; height: 18px; }

@media (max-width: 720px) {
  .menu-btn { display: flex; }
  .navlinks {
    position: fixed; inset: 68px 0 0 0; height: calc(100vh - 68px);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sheet); backdrop-filter: blur(20px);
    padding: 8px 24px 24px;
    transform: translateX(100%); transition: transform .28s ease;
    overflow-y: auto;
  }
  .navlinks.open { transform: translateX(0); }
  .navlinks a:not(.cta) { padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .navlinks .cta { margin-top: 20px; text-align: center; padding: 14px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid var(--border); cursor: pointer; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent-grad); color: white; border: none; box-shadow: 0 10px 28px rgba(139,92,246,0.35); }
.btn-primary:hover { opacity: 0.94; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: var(--bg2); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg3); text-decoration: none; }
.btn { transition: transform .15s ease, opacity .15s ease, background .15s ease; }

/* ---------- hero ---------- */
.hero { padding: 76px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; text-align: center; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(109,141,255,0.3);
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; margin-bottom: 20px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px); font-weight: 900; letter-spacing: -0.025em;
  margin: 0 0 18px; line-height: 1.08;
}
.hero .grad { background: var(--wordmark-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: clamp(16px, 1.6vw, 18.5px); color: var(--text2); max-width: 480px; margin: 0 0 32px; }
@media (max-width: 900px) { .hero p.sub { max-width: 100%; margin-inline: auto; } }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero-ctas { justify-content: center; } }

.trust-row {
  display: flex; gap: 22px; margin-top: 36px; flex-wrap: wrap; color: var(--text3); font-size: 13px; font-weight: 600;
}
@media (max-width: 900px) { .trust-row { justify-content: center; } }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 15px; height: 15px; color: var(--green); }

/* ---------- phone mockup ---------- */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-glow {
  position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.35), transparent 70%);
  filter: blur(10px); top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.phone {
  position: relative; width: 260px; border-radius: 38px; padding: 12px;
  background: linear-gradient(160deg, #1a1c24, #0b0c11);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.phone .screen {
  background: #0b0c11; border-radius: 28px; overflow: hidden; padding: 18px 16px 16px;
  min-height: 480px; position: relative;
}
.phone .notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 20px; background: #050608; border-radius: 12px; z-index: 5;
}
.mock-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-top: 6px; }
.mock-topbar .greet { font-size: 11px; color: var(--text3); }
.mock-topbar .name { font-size: 14px; font-weight: 800; color: var(--text); }
.mock-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-grad); }

.mock-balance {
  background: var(--accent-grad); border-radius: 18px; padding: 16px; margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(109,141,255,0.3);
}
.mock-balance .label { font-size: 10.5px; color: rgba(255,255,255,0.75); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.mock-balance .amt { font-size: 24px; font-weight: 900; color: white; margin-top: 4px; }
.mock-balance .sub { font-size: 11px; color: rgba(255,255,255,0.85); margin-top: 6px; }

.mock-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mock-stat { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.mock-stat .l { font-size: 9.5px; color: var(--text3); font-weight: 700; text-transform: uppercase; }
.mock-stat .v { font-size: 15px; font-weight: 800; color: var(--text); margin-top: 4px; }
.mock-stat .v.green { color: var(--green); }
.mock-stat .v.amber { color: var(--amber); }

.mock-list-h { font-size: 11px; font-weight: 800; color: var(--text3); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px; }
.mock-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mock-item:last-child { border-bottom: none; }
.mock-item .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.mock-item .meta { flex: 1; min-width: 0; }
.mock-item .t { font-size: 12.5px; font-weight: 700; color: var(--text); }
.mock-item .d { font-size: 10.5px; color: var(--text3); }
.mock-item .amt { font-size: 12.5px; font-weight: 800; color: var(--text); }

.mock-insight {
  background: var(--accent-soft); border: 1px solid rgba(109,141,255,0.3); border-radius: 14px;
  padding: 12px; margin-bottom: 14px;
}
.mock-insight .mi-head { font-size: 11px; font-weight: 800; color: var(--accent); margin-bottom: 5px; }
.mock-insight .mi-text { font-size: 11.5px; line-height: 1.45; color: var(--text2); }

.mock-card-rec {
  display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px;
}
.mock-card-rec .cr-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.mock-card-rec .meta { flex: 1; min-width: 0; }
.mock-card-rec .t { font-size: 12.5px; font-weight: 700; color: var(--text); }
.mock-card-rec .d { font-size: 10px; color: var(--text3); }
.mock-card-rec .cr-badge { font-size: 10.5px; font-weight: 800; color: var(--green); white-space: nowrap; }

/* ---------- sections ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 600px; margin: 0 auto 44px; }
.section-head .eyebrow { display: inline-flex; }
.section-head h2 { font-size: clamp(27px, 3.6vw, 38px); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 12px; }
.section-head p { color: var(--text2); margin: 0; font-size: 15.5px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 780px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  position: relative; overflow: hidden; transition: border-color .2s ease, transform .2s ease;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--glass-edge); }
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card .icon {
  width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 17px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
.card p { font-size: 14px; color: var(--text2); margin: 0; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { text-align: center; position: relative; }
.step .num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent-grad); color: white;
  display: grid; place-items: center; font-weight: 900; font-size: 16px; margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(139,92,246,0.35);
}
.step h3 { font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.step p { font-size: 14px; color: var(--text2); margin: 0; max-width: 240px; margin-inline: auto; }

/* ---------- pricing ---------- */
.price-card { text-align: center; display: flex; flex-direction: column; }
.price-card .plan { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); font-weight: 800; margin-bottom: 8px; }
.price-card .amount { font-size: 34px; font-weight: 900; margin: 4px 0 4px; letter-spacing: -0.02em; }
.price-card .period { font-size: 13px; color: var(--text3); margin-bottom: 18px; }
.price-card.featured {
  border-color: rgba(109,141,255,0.5);
  box-shadow: 0 0 0 1px rgba(109,141,255,0.5), 0 16px 40px rgba(109,141,255,0.2);
  position: relative;
}
.price-card .ribbon {
  position: absolute; top: -1px; right: 18px; background: var(--accent-grad); color: white;
  font-size: 10.5px; font-weight: 800; padding: 5px 12px; border-radius: 0 0 10px 10px;
  letter-spacing: 0.02em;
}
.price-card ul { list-style: none; padding: 0; margin: 4px 0 0; text-align: left; font-size: 13.5px; color: var(--text2); flex: 1; }
.price-card ul li { padding: 8px 0; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-start; }
.price-card ul li:first-child { border-top: none; }
.price-card ul li svg { width: 15px; height: 15px; color: var(--green); flex-shrink: 0; margin-top: 2px; }
.note { text-align: center; color: var(--text3); font-size: 13px; margin-top: 24px; max-width: 560px; margin-inline: auto; }

/* ---------- store badges ---------- */
.store-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.store-badge {
  display: flex; align-items: center; gap: 10px; background: #000; color: white;
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 18px;
  font-size: 13px;
}
.store-badge svg { width: 24px; height: 24px; }
.store-badge .lines { display: flex; flex-direction: column; line-height: 1.25; }
.store-badge .l1 { font-size: 10px; color: rgba(255,255,255,0.7); }
.store-badge .l2 { font-size: 15px; font-weight: 700; }
.store-badge:hover { text-decoration: none; opacity: 0.88; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 4px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: var(--text); font-size: 15.5px; font-weight: 700; font-family: var(--font);
}
.faq-q svg { width: 18px; height: 18px; color: var(--text3); flex-shrink: 0; transition: transform .2s ease; }
.faq-item.open .faq-q svg { transform: rotate(45deg); color: var(--accent); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .25s ease;
  color: var(--text2); font-size: 14.5px; padding: 0 4px;
}
.faq-a p { margin: 0 0 18px; }
.faq-item.open .faq-a { max-height: 240px; }

/* ---------- final CTA ---------- */
.cta-band {
  background: var(--accent-grad); border-radius: 28px; padding: 56px 32px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(24px, 3.6vw, 32px); font-weight: 900; color: white; margin: 0 0 12px; letter-spacing: -0.02em; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0 0 28px; font-size: 15.5px; }
.cta-band .btn-primary { background: white; color: #4c3fb8; box-shadow: 0 10px 28px rgba(0,0,0,0.25); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 24px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.foot-grid p { color: var(--text3); font-size: 13.5px; margin: 14px 0 0; max-width: 280px; }
.foot-col h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); margin: 0 0 14px; }
.foot-col a { display: block; color: var(--text2); font-size: 14px; margin-bottom: 10px; }
.foot-col a:hover { color: var(--text); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.foot-bottom .fnote { color: var(--text3); font-size: 13px; }

/* ---------- legal pages ---------- */
.legal { padding: 52px 0 90px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: 32px; font-weight: 900; margin-bottom: 4px; letter-spacing: -0.02em; }
.legal .updated { color: var(--text3); font-size: 13px; margin-bottom: 36px; }
.legal h2 { font-size: 19px; font-weight: 800; margin: 34px 0 12px; color: var(--text); letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--text2); font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.legal th, .legal td { text-align: left; padding: 11px; border: 1px solid var(--border); color: var(--text2); }
.legal th { color: var(--text); background: var(--bg2); }
.legal strong { color: var(--text); }
.legal a { color: var(--accent); }
.legal-toc {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px;
  margin: 28px 0 40px; font-size: 13.5px;
}
.legal-toc a { display: block; color: var(--text2); padding: 4px 0; }
.legal-toc a:hover { color: var(--accent); }
