/*
 * Lumnon Apps Center - public site.
 * Design tokens copied from lumnon.com so both sites look like one product.
 * No inline styles anywhere (strict Content-Security-Policy).
 */

:root {
  --bg: #0a0e1a;
  --surface: #121826;
  --surface-2: #1a2236;
  --surface-3: #212b42;
  --border: rgba(255, 255, 255, .08);
  --text: #edf1f7;
  --text-muted: #8b96aa;
  --primary: #3b9eff;
  --primary-2: #1f6feb;
  --primary-ink: #06132a;
  --cool: #22d3ee;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-2: 0 4px 16px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-glow: 0 0 60px rgba(59, 158, 255, .18);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --content: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
main { flex: 1; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

/* Header: sticky, blurred, hairline border (as on lumnon.com) */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 14, 26, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--content); margin: 0 auto; height: 63px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { display: block; height: 32px; width: auto; }
.brand-divider { width: 1px; height: 22px; background: var(--border); }
.brand-sub { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; color: var(--text-muted); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: filter .15s ease, background-color .15s ease, transform .15s ease;
}
.btn-primary { color: var(--primary-ink); background: linear-gradient(var(--primary), var(--primary-2)); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { color: var(--text); background: var(--surface-2); border-color: var(--border); font-weight: 500; }
.btn-secondary:hover { background: var(--surface-3); }
.btn-sm { padding: 9px 16px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn.is-static { cursor: default; color: var(--text-muted); }
.btn.is-static:hover { background: var(--surface-2); }

/* Hero: centred text with a blue glow at the top (as on lumnon.com) */
.hero {
  position: relative; isolation: isolate;
  max-width: 820px; margin: 0 auto; padding: 72px 20px 56px; text-align: center;
}
.hero::before {
  /* Sized to the hero (never wider than the screen); fades out before its edges. */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: -70px; height: 460px;
  background: radial-gradient(closest-side, rgba(59, 158, 255, .20), rgba(59, 158, 255, .06) 55%, transparent);
}
.eyebrow {
  margin: 0 0 12px; color: var(--primary);
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.hero h1 { margin: 0 0 18px; font-size: clamp(2rem, 5vw, 3.1rem); }
.lead { margin: 0 auto 30px; max-width: 40em; color: var(--text-muted); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-note { margin: 16px 0 0; color: var(--text-muted); font-size: .85rem; }
.hero-apps {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.hero-apps li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 7px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 500;
}
.hero-app-icon { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.hero-app-icon.tile { font-size: 1rem; }

/* Letter tiles, used until an icon is uploaded in Admin > Apps */
.tile { display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 600; }
.tone-1 { background: linear-gradient(135deg, #3b9eff, #1f6feb); }
.tone-2 { background: linear-gradient(135deg, #8b7dff, #5b45e0); }
.tone-3 { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.tone-4 { background: linear-gradient(135deg, #f5a524, #c2410c); }
.tone-5 { background: linear-gradient(135deg, #f472b6, #be185d); }
.tone-6 { background: linear-gradient(135deg, #34d399, #047857); }

/* Sections: full-width hairline between them (as on lumnon.com) */
.section {
  max-width: var(--content); margin: 0 auto; padding: 64px 20px;
  border-top: 1px solid var(--border);
}
.section h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); }
.section-lead { margin: 0 0 32px; max-width: 46em; color: var(--text-muted); font-size: 1.02rem; }

/* App cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(59, 158, 255, .45); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.card-head { display: flex; align-items: center; gap: 14px; }
.card-icon { flex: none; width: 60px; height: 60px; border-radius: var(--radius-md); object-fit: cover; box-shadow: var(--shadow-2); }
.card-icon.tile { font-size: 1.6rem; }
.card-title { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.card-title h3 { margin: 0; font-size: 1.35rem; }
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-muted); font-size: .74rem; font-weight: 600;
}
.pill-live { background: rgba(59, 158, 255, .12); color: var(--primary); }
.tagline { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; line-height: 1.4; }
.desc { margin: 0; color: var(--text-muted); font-size: .95rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: var(--text-muted); }
.ticks li { display: flex; align-items: center; gap: 10px; }
.ticks li::before { content: "✓"; color: var(--primary); font-weight: 700; }
.card-foot { margin-top: auto; padding-top: 4px; min-height: 64px; display: flex; align-items: center; }
.play { display: inline-block; margin-left: -10px; border-radius: var(--radius-sm); }
.play img { display: block; width: 180px; height: auto; }

/* Steps: numbered circles (as on lumnon.com) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--primary);
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
}
.steps h3 { margin: 4px 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* 404 and other short pages */
.hero-message { padding: 110px 20px 120px; }

/* Footer (as on lumnon.com) */
.foot { border-top: 1px solid var(--border); color: var(--text-muted); font-size: .85rem; padding: 26px 20px 32px; }
.foot-inner { max-width: var(--content); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.foot-inner p { margin: 0; }
.foot a { color: var(--text-muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot-legal { max-width: var(--content); margin: 10px auto 0; font-size: .75rem; opacity: .8; }

/* Responsive */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .section { padding: 48px 20px; }
  .hero { padding-top: 52px; }
}
@media (max-width: 480px) {
  .brand-divider, .brand-sub { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}

/* ---------------------------------------------------------------- app pages */

.crumbs { max-width: var(--content); margin: 0 auto; padding: 18px 20px 0; font-size: .85rem; color: var(--text-muted); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { margin: 0 6px; opacity: .6; }

.card-title h3 a { color: var(--text); text-decoration: none; }
.card-title h3 a:hover { color: var(--primary); }
.card-icon-link { flex: none; border-radius: var(--radius-md); }
.card-foot { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.more { font-family: var(--font-display); font-weight: 600; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.hero-apps a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.hero-apps li:hover { border-color: rgba(59, 158, 255, .45); }

/* App hero */
.app-hero {
  position: relative; isolation: isolate;
  max-width: var(--content); margin: 0 auto; padding: 44px 20px 48px;
  display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center;
}
.app-hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: -60px; height: 420px;
  background: radial-gradient(closest-side at 22% 50%, rgba(59, 158, 255, .18), transparent);
}
.app-icon { width: 168px; height: 168px; border-radius: 38px; object-fit: cover; box-shadow: var(--shadow-2), var(--shadow-glow); }
.app-icon.tile { font-size: 4.2rem; }
.app-hero h1 { margin: 0 0 10px; font-size: clamp(2.2rem, 5vw, 3.2rem); }
.app-hero .lead { margin: 0 0 22px; text-align: left; }
.app-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.app-cta .play { margin-left: -10px; }
.app-meta { margin: 14px 0 0; color: var(--text-muted); font-size: .9rem; }

/* At-a-glance numbers */
.stats-band { max-width: var(--content); margin: 0 auto; padding: 0 20px 56px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.stats li { padding: 22px 22px 18px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.stats strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2.1rem; line-height: 1.1; color: var(--text); }
.stats span { color: var(--text-muted); font-size: .92rem; }

.section.narrow > .prose-p, .section.narrow > h2 { max-width: 46em; }
.prose-p { margin: 0 0 16px; color: var(--text-muted); font-size: 1.05rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.feature { padding: 22px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.feature h3 { margin: 0 0 8px; font-size: 1.1rem; display: flex; gap: 10px; align-items: baseline; }
.feature h3::before { content: "✓"; color: var(--primary); font-family: var(--font-body); font-weight: 700; }
.feature p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* Ask AI panel */
.ai-panel {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center;
  padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(59, 158, 255, .10), rgba(34, 211, 238, .05)), var(--surface);
  border: 1px solid rgba(59, 158, 255, .25);
}
.ai-panel .section-lead { margin-bottom: 0; }
.ticks-lg { font-size: 1rem; color: var(--text); gap: 10px; }

/* Topics */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; }

/* App information */
.info { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 32px; }
.info > div { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.info dt { flex: 0 0 110px; color: var(--text-muted); font-size: .9rem; }
.info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Closing call to action */
.cta-band { padding-bottom: 72px; }
.cta-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px;
  padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
}
.cta-inner > div { flex: 1 1 260px; }
.cta-inner h2 { margin: 0 0 4px; }
.cta-inner .section-lead { margin: 0; }
.cta-icon { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; }
.cta-icon.tile { font-size: 2rem; }

/* ---------------------------------------------------------------- policy documents */

.doc { max-width: 780px; margin: 0 auto; padding: 36px 20px 72px; }
.doc-head { margin-bottom: 24px; }
.doc-head h1 { margin: 0 0 6px; font-size: clamp(1.9rem, 4vw, 2.5rem); }
.doc-date { margin: 0; color: var(--text-muted); font-size: .9rem; }
.doc h2 { margin: 34px 0 10px; font-size: 1.35rem; scroll-margin-top: 80px; }
.doc h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.doc p, .doc li { color: #c9d1de; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc ul.ticks { padding-left: 0; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--text); }
.doc code { font-size: .88em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.doc-summary { margin: 24px 0 8px; padding: 20px 22px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.doc-summary h2 { margin: 0 0 12px; font-size: 1.1rem; }
.doc-summary .ticks { color: var(--text); font-size: .95rem; gap: 8px; }
.doc-summary .ticks li { align-items: flex-start; }
.options { display: grid; gap: 14px; margin: 18px 0 8px; }
.option { display: flex; gap: 16px; padding: 20px 22px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.option h2 { margin: 2px 0 8px; font-size: 1.15rem; }
.option p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .app-hero { grid-template-columns: 1fr; gap: 22px; padding-top: 28px; }
  .app-icon { width: 120px; height: 120px; border-radius: 28px; }
  .app-icon.tile { font-size: 3rem; }
  .ai-panel { grid-template-columns: 1fr; padding: 24px; }
  .info dt { flex-basis: 90px; }
}

/* ---------------------------------------------------------------- help and FAQ */

.help-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin: 8px 0 30px; }
.help-link {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; text-decoration: none;
  border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s ease;
}
.help-link:hover { border-color: rgba(59, 158, 255, .45); }
.help-link strong { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.help-link span { color: var(--text-muted); font-size: .85rem; overflow-wrap: anywhere; }
.faq-group { margin-bottom: 26px; }
.faq-group h2 { margin: 0 0 12px; }
.faq { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 8px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 44px 14px 16px; position: relative;
  font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--primary); font-size: 1.3rem; font-weight: 400;
}
.faq[open] summary::after { content: "−"; }
.faq[open] summary { border-bottom: 1px solid var(--border); }
.faq p { margin: 0; padding: 14px 16px 16px; }
.help-contact { margin-top: 30px; }
.help-contact p { margin: 0; }

/* ---------------------------------------------------------------- home: compact app grid (fits 10+ apps) */

.hero-strip { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; }
.hero-strip a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; color: var(--text-muted); text-decoration: none; font-size: .78rem; text-align: center; }
.hero-strip a:hover { color: var(--text); }
.hero-strip span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-icon { width: 56px; height: 56px; border-radius: 15px; object-fit: cover; box-shadow: var(--shadow-2); transition: transform .15s ease; }
.strip-icon.tile { font-size: 1.4rem; }
.hero-strip a:hover .strip-icon { transform: translateY(-2px); }

.grid-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: 16px; }
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 18px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.app-card:hover { border-color: rgba(59, 158, 255, .45); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.app-card.is-soon { border-style: dashed; }
.app-card-link { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.app-card-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow-2); }
.app-card-icon.tile { font-size: 1.35rem; }
.app-card-text { display: flex; flex-direction: column; min-width: 0; }
.app-card-text strong { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card-meta { color: var(--text-muted); font-size: .8rem; }
.app-card-tagline {
  margin: 0; color: var(--text-muted); font-size: .9rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em;
}
.app-card-pill { position: absolute; top: 14px; right: 14px; }
.app-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.play-sm { margin-left: -8px; }
.play-sm img { width: 140px; }
.soon-label { color: var(--text-muted); font-size: .85rem; font-weight: 600; padding: 8px 0; }
.app-card .more { font-size: .9rem; }
.app-card-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }

/* ---------------------------------------------------------------- header links and plugins */

.top-links { display: flex; gap: 6px; }
.top-links a {
  padding: 8px 14px; border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none;
  font-family: var(--font-display); font-weight: 500; font-size: .95rem;
}
.top-links a:hover { color: var(--text); background: var(--surface-2); }

.section-first { border-top: 0; padding-top: 28px; }
.page-title { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.4rem); }

.wp-btn { gap: 8px; padding: 8px 12px; font-size: .88rem; }
.wp-mark {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text); color: var(--bg); font-family: Georgia, serif; font-weight: 700; font-size: .78rem;
}

.banner-band { max-width: var(--content); margin: 0 auto; padding: 0 20px 48px; }
.plugin-banner { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.faq-list { max-width: 780px; }
.privacy-box { margin: 0 0 20px; padding: 18px 20px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); max-width: 780px; }
.privacy-box h3 { margin: 0 0 6px; font-size: 1.05rem; }
.privacy-box p { margin: 0; color: var(--text-muted); }
@media (max-width: 480px) { .top-links a { padding: 8px 10px; } }

.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats li { padding: 16px 14px 14px; }
  .stats strong { font-size: 1.5rem; overflow-wrap: anywhere; }
}

/* ---------------------------------------------------------------- /apps page */
.cat-links { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 28px; }
.cat-links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .88rem;
}
.cat-links a:hover { border-color: rgba(59, 158, 255, .45); }
.cat-links span { color: var(--text-muted); font-size: .8rem; }
.cat-group { margin-bottom: 30px; scroll-margin-top: 80px; }
.cat-title { margin: 0 0 14px; font-size: 1.2rem; color: var(--text-muted); }
