/*
 * MindLotus — site styles
 * Hand-rolled, zero-runtime, responsive, a11y-friendly.
 * Theming via CSS custom properties + prefers-color-scheme.
 */

/* ---------- Tokens ---------- */
:root {
  --bg:           #0b0f1a;
  --bg-elev-1:    #121729;
  --bg-elev-2:    #1a2140;
  --fg:           #eef1ff;
  --fg-muted:     #aab1d1;
  --accent:       #7c5cff;
  --accent-2:     #22d3ee;
  --accent-ink:   #0b0f1a;
  --border:       #23284a;
  --focus:        #ffd166;
  --danger:       #ff6b6b;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    22px;
  --shadow-1:     0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.25);
  --shadow-2:     0 10px 40px rgba(124,92,255,.25);
  --maxw:         1120px;
  --maxw-narrow:  760px;
  --gap:          24px;
  --step-0:       clamp(.95rem, .9rem + .2vw, 1.05rem);
  --step-1:       clamp(1.1rem, 1rem + .4vw, 1.25rem);
  --step-2:       clamp(1.4rem, 1.2rem + .7vw, 1.7rem);
  --step-3:       clamp(1.8rem, 1.5rem + 1vw, 2.4rem);
  --step-4:       clamp(2.4rem, 1.8rem + 2vw, 3.6rem);
  --step-5:       clamp(3rem, 2rem + 3vw, 4.8rem);
  --ease:         cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:         #faf7ff;
    --bg-elev-1:  #ffffff;
    --bg-elev-2:  #f1ecff;
    --fg:         #131530;
    --fg-muted:   #4a5072;
    --border:     #e5e1f4;
    --shadow-1:   0 1px 2px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.08);
    --shadow-2:   0 10px 40px rgba(124,92,255,.18);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0)/1.6 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: var(--step-5); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; }
p  { margin: 0 0 1em; }
ul { padding-left: 1.25em; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}
.container--narrow { max-width: var(--maxw-narrow); }

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}
.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.muted { color: var(--fg-muted); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding-block: 14px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand__name { letter-spacing: -.01em; }

.nav__links {
  display: flex;
  gap: 22px;
  margin: 0 auto 0 16px;
  padding: 0;
  list-style: none;
}
.nav__links a {
  color: var(--fg-muted);
  font-weight: 500;
}
.nav__links a:hover { color: var(--fg); text-decoration: none; }
.nav__cta { margin-left: auto; }

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--step-0);
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 16px 26px; font-size: var(--step-1); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: var(--shadow-2);
}
.btn--primary:hover { box-shadow: 0 14px 50px rgba(124,92,255,.35); }
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-elev-1); }

/* ---------- Google Play badge ----------
 * Official badge artwork from https://play.google.com/intl/en_us/badges/.
 * Brand guidelines forbid altering the badge artwork itself, so the
 * wrapper anchor is intentionally bare: no gradient, no shadow, no
 * border. Only motion/focus feedback is applied to the anchor.
 */
.play-badge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 12px;
  transition: transform .18s var(--ease);
}
.play-badge:hover { transform: translateY(-1px); text-decoration: none; }
.play-badge:active { transform: translateY(0); }
.play-badge img {
  height: 64px;
  width: auto;
  display: block;
}
@media (min-width: 720px) {
  .play-badge img { height: 72px; }
}
@media (forced-colors: active) {
  .play-badge { outline: 1px solid CanvasText; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 120px) 0 clamp(40px, 6vw, 80px);
  overflow: clip;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  z-index: -1;
  background:
    radial-gradient(60% 60% at 20% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
    radial-gradient(40% 50% at 85% 25%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 70%);
  filter: blur(30px);
  opacity: .75;
}
.hero__title {
  font-size: var(--step-5);
  max-width: 18ch;
}
.hero__sub {
  font-size: var(--step-1);
  color: var(--fg-muted);
  max-width: 62ch;
  margin-top: .4em;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 40px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev-1);
  box-shadow: var(--shadow-1);
}
.hero__stats > div { display: grid; gap: 2px; }
.hero__stats dt { font-size: .8rem; color: var(--fg-muted); letter-spacing: .12em; text-transform: uppercase; }
.hero__stats dd { margin: 0; font-weight: 600; font-size: var(--step-1); }

/* ---------- Sections ---------- */
.section {
  padding: clamp(56px, 8vw, 110px) 0;
}
.section--alt {
  background: var(--bg-elev-1);
  border-block: 1px solid var(--border);
}
.section--cta {
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%),
    var(--bg);
}
.section__title { font-size: var(--step-3); }
.section__sub   { color: var(--fg-muted); max-width: 62ch; margin-top: -.4em; margin-bottom: 2em; }

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}
.grid--features    { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); list-style: none; padding: 0; }
.grid--usecases    { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--pricing     { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 12px; }
.grid--steps       { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; padding: 0; counter-reset: step; }
.grid--screenshots { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); list-style: none; padding: 0; }
.grid--reviews     { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); list-style: none; padding: 0; }

.card, .usecase, .tier {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.card:hover, .tier:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }

.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  font-size: 22px;
  margin-bottom: 14px;
}
.card h3, .usecase h3, .tier__name { margin-bottom: .25em; }

.tier__tag {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 12px;
}
.tier ul { margin: 0; padding-left: 1.1em; color: var(--fg-muted); }
.tier ul li { margin-block: .35em; }
.tier--highlight {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--bg-elev-1)), var(--bg-elev-1));
}
.tier--highlight .tier__tag { color: var(--accent); }

/* ---------- How it works (steps) ---------- */
.step {
  position: relative;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-1);
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.step h3 { margin-bottom: .25em; }
.step p  { color: var(--fg-muted); }

/* ---------- Screenshots gallery ---------- */
.shot { margin: 0; }
.shot figure { margin: 0; }
.shot__placeholder {
  aspect-ratio: 9 / 19.5;
  width: 100%;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 14%, var(--bg-elev-1)) 0%,
      color-mix(in srgb, var(--accent-2) 14%, var(--bg-elev-1)) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.shot__placeholder::after {
  content: 'screenshot';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: .6;
}
.shot__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1440;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  background: var(--bg-elev-1);
}
.shot figcaption {
  text-align: center;
  margin-top: 8px;
  font-size: .9em;
  color: var(--fg-muted);
}

/* ---------- Reviews / social proof ---------- */
.review {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-1);
  margin: 0;
}
.review blockquote { margin: 0 0 12px; }
.review blockquote p { font-size: var(--step-1); line-height: 1.5; }
.review figcaption { color: var(--fg-muted); font-size: .9em; }

.trust-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.trust-stats div { padding: 0; }
.trust-stats dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }
.trust-stats dd { margin: 4px 0 0; font-weight: 600; }

/* ---------- Privacy checklist ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.checklist li {
  position: relative;
  padding: 6px 0 6px 28px;
  color: var(--fg-muted);
}
.checklist li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 6px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: .8rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 999px;
  font-weight: 700;
}
.checklist li strong { color: var(--fg); }

/* ---------- FAQ / details ---------- */
details {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev-1);
  margin-block: 10px;
}
details + details { margin-top: 8px; }
details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  float: right;
  color: var(--fg-muted);
  font-weight: 400;
  transition: transform .2s var(--ease);
}
details[open] summary::after { content: '−'; }

/* ---------- Legal pages ---------- */
.legal {
  padding-block: clamp(40px, 6vw, 72px);
}
.legal h1 { font-size: var(--step-4); }
.legal h2 { margin-top: 1.6em; font-size: var(--step-2); }
.legal h3 { margin-top: 1.2em; font-size: var(--step-1); }
.legal h4 { margin-top: 1em;   font-size: var(--step-0); font-weight: 700; }
.legal code {
  background: var(--bg-elev-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: .9em;
}
.legal pre {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  font-size: .9em;
  line-height: 1.5;
}
.legal aside.checklist {
  background: var(--bg-elev-2);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 1.2em 0;
}
.legal aside.checklist p { margin: 0; }
table.legal {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0 1.5em;
  font-size: .95em;
}
table.legal th,
table.legal td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
table.legal th {
  background: var(--bg-elev-2);
  font-weight: 600;
}
table.legal th[scope="row"] {
  white-space: nowrap;
  width: 1%;
}
.legal nav[aria-label="Table of contents"] ol,
.legal nav[aria-label="Breadcrumb"] {
  color: var(--fg-muted);
}
.legal nav[aria-label="Breadcrumb"] a { color: var(--fg-muted); }
.legal nav[aria-label="Breadcrumb"] a:hover { color: var(--fg); }
@media (max-width: 640px) {
  table.legal { font-size: .85em; }
  table.legal th, table.legal td { padding: 8px; }
}

/* ---------- 404 ---------- */
.center-page { min-height: 100dvh; display: grid; place-items: center; }
.notfound { text-align: center; padding-block: 48px; }
.notfound .hero__cta { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev-1);
  margin-top: 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 36px 24px;
}
@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}
.footer__heading {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--fg-muted);
  margin: 0 0 10px;
  font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-block: 6px; }
.site-footer a { color: var(--fg); }
.site-footer a:hover { color: var(--accent); }
.footer__copy { margin-top: 24px; }

/* ---------- Forced-colors (Windows high-contrast) ---------- */
@media (forced-colors: active) {
  .btn { border: 1px solid CanvasText; }
  .card, .tier, .usecase, details { border-color: CanvasText; }
}
