/* ============================================================================
   Ludyem — shared design system
   One stylesheet, reused by every app page under ludyem.dev.
   Per-app theming: override --accent1 / --accent2 / --grad-a / --grad-b in a
   small inline <style>:root{}</style> AFTER linking this file. Nothing else
   needs to change between apps.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces (shared across the whole constellation) */
  --bg:       #07070f;
  --bg2:      #0b0b16;
  --text:     #f1f5f9;
  --muted:    #94a3b8;
  --faint:    #475569;
  --card:     rgba(255,255,255,0.04);
  --border:   rgba(255,255,255,0.08);
  --radius:   16px;

  /* Accents — DEFAULT is the Ludyem brand (indigo→violet).
     App pages override these four to re-skin every component at once. */
  --accent1:  #6d6cff;
  --accent2:  #b06cff;
  --grad-a:   #9aa6ff;   /* gradient text start */
  --grad-b:   #d29bff;   /* gradient text end   */
  --accent-soft: rgba(109,108,255,0.14);
  --accent-line: rgba(109,108,255,0.30);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* ── Gradient orbs ── */
.orb { position: fixed; border-radius: 50%; filter: blur(130px); opacity: 0.16; pointer-events: none; z-index: 0; }
.orb-1 { width: 700px; height: 700px; background: var(--accent1); top: -250px; left: -150px; }
.orb-2 { width: 550px; height: 550px; background: var(--accent2); top: 400px; right: -180px; }
.orb-3 { width: 450px; height: 450px; background: var(--grad-b);  bottom: 0; left: 25%; }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
section { padding: 100px 0; }
.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100; padding: 16px 0;
  background: rgba(7,7,15,0.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo img, .logo .logo-mark { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff; font-weight: 800; font-size: 17px;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.btn-nav {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff; border: none; border-radius: 50px; padding: 9px 22px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: opacity .2s;
}
.btn-nav:hover { opacity: .85; }
.back-link { color: var(--muted); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.back-link:hover { color: var(--text); }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ── Hero ── */
.hero { padding: 140px 0 100px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: 50px; padding: 6px 16px; font-size: 13px;
  color: var(--grad-a); margin-bottom: 32px; font-weight: 500;
}
.hero-badge-dot { width: 6px; height: 6px; background: var(--grad-a); border-radius: 50%; }
h1 { font-size: clamp(44px, 7vw, 82px); font-weight: 800; line-height: 1.06; letter-spacing: -2.5px; margin-bottom: 24px; }
.grad { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: clamp(17px, 2.5vw, 21px); color: var(--muted); max-width: 600px; margin: 0 auto 44px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-art { margin: 56px auto 0; max-width: 240px; display: block; filter: drop-shadow(0 24px 60px rgba(0,0,0,.5)); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff; text-decoration: none; border-radius: 50px; padding: 16px 32px;
  font-size: 16px; font-weight: 700; box-shadow: 0 0 48px var(--accent-soft);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 64px var(--accent-line); }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s; }
.btn-secondary:hover { color: var(--text); }

/* ── Stats bar ── */
.stats-bar { display: flex; align-items: stretch; flex-wrap: wrap; margin-top: 80px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat-item { flex: 1; min-width: 160px; padding: 28px 20px; text-align: center; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 34px; font-weight: 800; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
@media (max-width: 640px) { .stat-item { border-right: none; border-bottom: 1px solid var(--border); } .stat-item:last-child { border-bottom: none; } }

/* ── Section headings ── */
.section-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent1); margin-bottom: 12px; }
.section-title { font-size: clamp(30px, 4vw, 50px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 16px; }
.section-sub { font-size: 18px; color: var(--muted); max-width: 560px; line-height: 1.65; }

/* ── Feature grid ── */
.alt { background: var(--bg2); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 64px; }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; transition: border-color .3s, transform .3s; }
.feature-card:hover { border-color: var(--accent-line); transform: translateY(-4px); }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 20px; background: var(--accent-soft); }
.feature-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.feature-card p  { font-size: 15px; color: var(--muted); line-height: 1.65; }

/* ── App cards (landing grid + family hub) ── */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 56px; }
.app-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px; display: flex; flex-direction: column; gap: 14px;
  text-decoration: none; color: var(--text); transition: border-color .3s, transform .3s;
  scroll-margin-top: 90px;
}
.app-card:hover { border-color: var(--app, var(--accent1)); transform: translateY(-4px); }
.app-card .app-icon {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: color-mix(in srgb, var(--app, var(--accent1)) 18%, transparent);
}
.app-card h3 { font-size: 20px; font-weight: 700; }
.app-card .app-blurb { font-size: 15px; color: var(--muted); line-height: 1.6; flex: 1; }
.app-card .app-foot { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--app, var(--accent1)); }
.app-card .badge-soon { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); background: var(--border); border-radius: 50px; padding: 4px 10px; }
.app-card.is-soon { cursor: default; }
.app-card.is-soon:hover { transform: none; border-color: var(--border); }

/* App Store download button (Apple-style) */
.appstore-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #000; text-decoration: none; border-radius: 12px;
  padding: 11px 18px; font-weight: 600; font-size: 15px; transition: transform .2s, opacity .2s;
}
.appstore-btn:hover { transform: translateY(-2px); }
.appstore-btn.is-disabled { background: var(--card); color: var(--muted); border: 1px solid var(--border); pointer-events: none; }
.appstore-btn small { display: block; font-size: 10px; font-weight: 500; opacity: .7; line-height: 1; }
.appstore-btn .as-lines { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.appstore-btn .as-big { font-size: 16px; font-weight: 700; }
.dl-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ── CTA ── */
.cta { text-align: center; }
.cta-card { background: linear-gradient(160deg, var(--accent-soft), rgba(255,255,255,.02)); border: 1px solid var(--accent-line); border-radius: 32px; padding: 88px 40px; }
.cta-card h2 { font-size: clamp(32px, 5vw, 58px); font-weight: 800; letter-spacing: -1.5px; margin-bottom: 16px; }
.cta-card p { font-size: 18px; color: var(--muted); margin-bottom: 44px; }
.cta-note { font-size: 13px; color: var(--faint); margin-top: 22px; }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 44px 0; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--muted); text-decoration: none; }
.footer-logo .logo-mark { width: 22px; height: 22px; border-radius: 5px; font-size: 12px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--faint); text-decoration: none; font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--muted); }
.footer-copy { font-size: 13px; color: var(--faint); }

/* ============================================================================
   Legal / support / doc pages (privacy, terms, support) — narrow column
   ========================================================================== */
.doc-main { max-width: 800px; margin: 0 auto; padding: 80px 24px 120px; position: relative; z-index: 1; }
.doc-main .nav-inner { max-width: 800px; }
.page-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent2); margin-bottom: 12px; }
.doc-main h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 12px; }
.subtitle { font-size: 18px; color: var(--muted); margin-bottom: 56px; line-height: 1.6; }
.doc-body h2 { font-size: 22px; font-weight: 700; margin: 44px 0 14px; letter-spacing: -.5px; }
.doc-body h3 { font-size: 17px; font-weight: 700; margin: 28px 0 10px; }
.doc-body p, .doc-body li { font-size: 15px; color: var(--muted); line-height: 1.75; }
.doc-body p { margin-bottom: 14px; }
.doc-body ul { margin: 0 0 14px 22px; }
.doc-body li { margin-bottom: 8px; }
.doc-body strong { color: var(--text); }
.doc-body a { color: var(--accent2); text-decoration: none; }
.doc-body a:hover { text-decoration: underline; }
.doc-body .updated { font-size: 13px; color: var(--faint); margin-bottom: 40px; }

/* Contact card (support) */
.contact-card { background: linear-gradient(135deg, var(--accent-soft), rgba(255,255,255,.02)); border: 1px solid var(--accent-line); border-radius: 20px; padding: 36px; margin-bottom: 60px; display: flex; gap: 24px; align-items: flex-start; }
.contact-icon { font-size: 36px; flex-shrink: 0; }
.contact-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.contact-card p { font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.btn-contact { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--accent1), var(--accent2)); color: #fff; text-decoration: none; border-radius: 50px; padding: 12px 24px; font-size: 14px; font-weight: 700; transition: opacity .2s; }
.btn-contact:hover { opacity: .85; }

/* FAQ accordion */
.faq-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent2); margin-bottom: 24px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .2s; }
details[open] { border-color: var(--accent-line); }
summary { padding: 22px 24px; font-size: 16px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
summary::-webkit-details-marker { display: none; }
.summary-icon { font-size: 20px; color: var(--muted); flex-shrink: 0; transition: transform .2s; }
details[open] .summary-icon { transform: rotate(45deg); color: var(--accent2); }
.faq-body { padding: 0 24px 22px; font-size: 15px; color: var(--muted); line-height: 1.7; }
.faq-body p { margin-bottom: 10px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body a { color: var(--accent2); text-decoration: none; }
.faq-body a:hover { text-decoration: underline; }

.doc-foot { border-top: 1px solid var(--border); padding: 40px 24px; text-align: center; }
.doc-foot p { font-size: 13px; color: var(--faint); margin: 0; }
.doc-foot a { color: var(--faint); margin: 0 12px; text-decoration: none; }
.doc-foot a:hover { color: var(--muted); }
