/* =============================================================
   App Store Landing Template — Shared Styles
   Dark & premium. Used by index / privacy / terms / support.
   Jekyll note: colors & brand live in :root below so a future
   _config.yml / data file can be wired in with minimal edits.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ---------- Design tokens ----------
   THEME COLORS: the 10 primitives below are the entire palette.
   In the Jekyll build they're overridden by _includes/theme.html,
   which reads the active preset from _config.yml (theme:) and
   _data/themes.yml. Everything else (borders, glows, gradients,
   card backgrounds) is DERIVED from these via color-mix(), so a
   single theme swap recolors the whole site — light or dark.
   Defaults here = the "midnight" dark theme (fallback if no Jekyll). */
:root {
  /* ---- Primitives (themeable) ---- */
  --bg:        #07080c;   /* page background        */
  --bg-2:      #0a0c12;   /* footer / deep surface  */
  --surface:   #0e111a;   /* cards                  */
  --surface-2: #141826;   /* raised cards / hover   */
  --text:      #eef0f6;   /* primary text           */
  --text-dim:  #aab2c2;   /* secondary text         */
  --muted:     #6c7585;   /* tertiary text          */
  --accent:    #8a7cff;   /* primary brand color    */
  --accent-2:  #34e5d0;   /* secondary brand color  */
  --accent-ink:#0a0c12;   /* text on accent fills   */

  /* ---- Derived (do not edit — follows the primitives above) ---- */
  --border:    color-mix(in srgb, var(--text) 9%, transparent);
  --border-2:  color-mix(in srgb, var(--text) 14%, transparent);
  --hairline:  color-mix(in srgb, var(--text) 3%, transparent);
  --surface-tint: color-mix(in srgb, var(--text) 3%, transparent);
  --grad:      linear-gradient(118deg, var(--accent), var(--accent-2));
  --grad-soft: linear-gradient(118deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent-2) 14%, transparent));
  --glow-violet: color-mix(in srgb, var(--accent) 45%, transparent);
  --glow-cyan:   color-mix(in srgb, var(--accent-2) 32%, transparent);
  --card-grad: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--bg-2)), var(--bg-2) 55%, color-mix(in srgb, var(--accent-2) 12%, var(--bg-2)));
  --nav-bg:    color-mix(in srgb, var(--bg) 80%, transparent);

  /* Radii */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 30px;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: .002em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }
p { text-wrap: pretty; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-2)); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Background decor ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.bg-decor::before { /* subtle grid */
  content: ""; position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.orb--1 { width: 620px; height: 620px; background: radial-gradient(circle, var(--glow-violet), transparent 70%); top: -220px; left: -120px; }
.orb--2 { width: 540px; height: 540px; background: radial-gradient(circle, var(--glow-cyan), transparent 70%); top: 120px; right: -160px; }
.orb--3 { width: 480px; height: 480px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%); bottom: -180px; left: 30%; }
.bg-grain { /* fine noise for richness */
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, border-color .25s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-ghost { border: 1px solid var(--border-2); color: var(--text); background: var(--surface-tint); }
.btn-ghost:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Official "Download on the App Store" badge */
.btn-store {
  display: inline-flex; align-items: center;
  border-radius: 12px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s, opacity .2s;
}
.btn-store img {
  display: block; height: 52px; width: auto;
  border-radius: 12px;
}
.btn-store:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -18px var(--glow-violet);
}
/* Slightly smaller badge in the top navigation. */
.nav .btn-store img { height: 42px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .logo { width: 38px; height: 38px; border-radius: 11px; flex: none; }
.brand .name { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--text-dim); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 16px; }

/* ---------- App icon / logo mark (placeholder) ---------- */
.appmark {
  border-radius: 22%;
  background:
    radial-gradient(120% 120% at 20% 15%, rgba(255,255,255,.35), transparent 45%),
    var(--grad);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 30px -10px var(--glow-violet);
}
.appmark svg { width: 56%; height: 56%; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-block: clamp(56px, 8vw, 88px) 40px; position: relative; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .brand .name { font-size: 19px; }
.footer-tag { color: var(--muted); margin-top: 16px; max-width: 30ch; font-size: 15px; }
.footer-col h4 { font-family: var(--font-display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; font-weight: 500; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: var(--muted); font-size: 15px; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: clamp(40px, 6vw, 64px); padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px;
}
.footer-bottom .legal-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-bottom .legal-links a:hover { color: var(--text); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive footer/nav ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer .brand-block { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}
