/* ============================================================
   Lunicle marketing site — styles
   ------------------------------------------------------------
   Fresh, light, product-marketing look. A cool near-white
   neutral base + a single indigo/violet accent (--accent),
   easy to reskin from the tokens at the top. No terminal
   aesthetic; no external fonts or assets.
   ============================================================ */

/* ---------- design tokens ---------- */
:root {
  /* neutrals — a touch cool, to read as "moonlight" rather than beige */
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #e5e8f1;
  --border-strong: #d5d9e6;
  --text: #171a26;
  --text-muted: #565d73;
  --text-faint: #878da3;

  /* one accent — swap these three to reskin the whole site */
  --accent: #5b57e0;
  --accent-strong: #4a44cf;
  --accent-2: #8b6ff2;
  --accent-ink: #3d38b0;
  --accent-wash: #eef0fe;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 24, 45, 0.05),
    0 1px 3px rgba(20, 24, 45, 0.05);
  --shadow-md: 0 6px 18px -6px rgba(28, 32, 60, 0.14),
    0 2px 6px rgba(28, 32, 60, 0.06);
  --shadow-lg: 0 30px 60px -22px rgba(37, 32, 90, 0.32),
    0 12px 28px -14px rgba(28, 32, 60, 0.18);

  --sidebar-w: 248px;
  --content-max: 1080px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset-ish ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* soft ambient wash so the flat light bg has some life */
  background-image:
    radial-gradient(1100px 520px at 78% -8%, rgba(139, 111, 242, 0.10), transparent 60%),
    radial-gradient(900px 460px at -6% 4%, rgba(91, 87, 224, 0.08), transparent 55%);
  background-attachment: fixed;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 16px 20px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 4px;
  margin-bottom: 14px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  box-shadow: 0 3px 10px -2px rgba(91, 87, 224, 0.5);
}
.brand-mark svg { width: 18px; height: 18px; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-tag {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

.nav-group { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--border); }
.nav-group-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 4px 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active {
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-weight: 600;
}
.nav-link .nav-icon { width: 18px; height: 18px; flex: none; opacity: 0.9; }
.nav-link.active .nav-icon { opacity: 1; }
.nav-label { flex: 1; }

/* the little "→" affordance for the tab that embeds the live tracker */
.nav-link .nav-ext {
  font-size: 12px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.nav-link:hover .nav-ext,
.nav-link.active .nav-ext { opacity: 1; }

/* ---------- mobile drawer chrome ---------- */
.nav-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(23, 26, 38, 0.42);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

/* ============================================================
   CONTENT / ROUTER
   ============================================================ */
.content { margin-left: var(--sidebar-w); min-height: 100vh; }

.page { display: none; }
.page.is-active { display: block; }

/* the standard reading column for text pages */
.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 72px 40px 96px;
}

/* ---------- shared bits ---------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-wash);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.15s var(--ease),
    background 0.15s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  box-shadow: 0 8px 22px -8px rgba(74, 68, 207, 0.7);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(74, 68, 207, 0.8); }
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-1px); }

/* ============================================================
   ABOUT — HERO
   ============================================================ */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 84px 40px 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 6px 0 20px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero .lede {
  max-width: 660px;
  margin: 0 auto 30px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
}
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* the framed board screenshot — square corners (the browser window in the
   shot has its own frame; CSS rounding on top of it read as clipped/ugly) */
.hero-shot {
  max-width: 1080px;
  margin: 0 auto;
  border-radius: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.hero-shot::after {
  /* subtle top sheen so the frame doesn't read as a flat rectangle */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 12%);
  pointer-events: none;
}
.hero-shot img { width: 100%; display: block; }

/* graceful fallback shown when the screenshot file isn't present yet */
.hero-shot.is-missing {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(-45deg, var(--surface-2) 0 14px, var(--surface) 14px 28px);
  color: var(--text-faint);
  font-size: 14px;
}
.hero-shot.is-missing::before { content: "Board screenshot"; }

/* ============================================================
   ABOUT — FEATURES
   ============================================================ */
.section-head {
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 14px;
}
.section-head .lede { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

.features { padding: 96px 40px; scroll-margin-top: 24px; }
.features-inner { max-width: var(--content-max); margin: 0 auto; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card.wide {
  grid-column: span 2;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background:
    linear-gradient(150deg, var(--accent-wash), var(--surface) 65%);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
}
.card.wide .feat-icon { margin-top: 2px; }

.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: var(--accent-wash);
  color: var(--accent-ink);
}
.card.wide .feat-icon { flex: none; margin-bottom: 0; }
.feat-icon svg { width: 23px; height: 23px; }

.card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.card p { margin: 0; color: var(--text-muted); font-size: 0.96rem; }
.card.wide h3 { font-size: 1.25rem; }
.card.wide p { font-size: 1rem; }

/* ---------- "In the works" (experimental / roadmap) ---------- */
.features.roadmap { padding-top: 0; }
.roadmap .feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 440px));
  justify-content: center;
}
.roadmap-card {
  border-style: dashed;
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.roadmap-card .feat-icon { background: var(--surface); color: var(--text-muted); }
.roadmap-card:hover { transform: none; box-shadow: var(--shadow-sm); }

.tag-exp {
  display: inline-block;
  vertical-align: middle;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a5a12;
  background: #fdf1dc;
  border: 1px solid #f2ddb4;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  position: relative;
  top: -1px;
}

/* ============================================================
   ABOUT — CLOSING CTA
   ============================================================ */
.closing { padding: 20px 40px 110px; }
.closing-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
  padding: 60px 40px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(700px 300px at 20% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(140deg, var(--accent-strong), var(--accent) 55%, var(--accent-2));
  box-shadow: var(--shadow-lg);
}
.closing-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.closing-inner p {
  max-width: 520px;
  margin: 0 auto 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
}
.closing-ctas {
  display: flex;
  gap: 16px 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cta-note {
  display: inline-block;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.01em;
  max-width: 30ch;
  text-align: center;
  text-wrap: balance;
}
.closing-inner .btn {
  background: #fff;
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
}
.closing-inner .btn:hover { background: #fff; transform: translateY(-1px); }
.closing-inner .btn-on-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}
.closing-inner .btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

/* ============================================================
   PLACEHOLDER PAGES (Demo / Docs / News / Discuss)
   ============================================================ */
.placeholder { text-align: center; max-width: 640px; margin: 0 auto; padding: 40px 0; }
.placeholder h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.placeholder p { color: var(--text-muted); font-size: 1.08rem; margin: 0 auto 26px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 26px;
}
.status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

/* a big soft placeholder canvas under the intro */
.placeholder-canvas {
  margin-top: 44px;
  height: 300px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  background:
    radial-gradient(500px 220px at 50% 0%, var(--accent-wash), transparent 70%),
    var(--surface);
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 14px;
}

/* ============================================================
   GITHUB (intentionally blank)
   ============================================================ */
#page-github .wrap { min-height: 40vh; }

/* ============================================================
   ISSUES — embedded tracker (chromeless, full height)
   ============================================================ */
body.issues-active .content,
body.demo-active .content { min-height: 100vh; }
.issues-frame,
.demo-frame {
  position: fixed;
  inset: 0 0 0 var(--sidebar-w);
  border: 0;
  width: auto;
  height: 100%;
  background: var(--surface);
}
.issues-frame iframe,
.demo-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============================================================
   CREDITS
   ============================================================ */
.credit-groups { display: flex; flex-direction: column; gap: 14px; margin-top: 40px; }
.credit-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}
.credit-group h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
}
.credit-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.credit-item:first-of-type { border-top: 0; }
.credit-name { font-weight: 600; font-size: 1.02rem; }
.credit-role { color: var(--text-muted); font-size: 0.92rem; }

/* cross-promo for Lunamux — a dark "terminal window" that echoes the
   lunamux site (near-black navy ground, cyan glow, monospace). Its own
   local tokens so the light theme around it is untouched. */
.lmx-promo {
  --lmx-bg: #070f1a;
  --lmx-bar: #0b1626;
  --lmx-cyan: #4dc8f5;
  --lmx-cyan-hi: #66d9ff;
  --lmx-dim: #7f95ad;
  --lmx-border: rgba(77, 200, 245, 0.22);

  display: block;
  margin-top: 40px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--lmx-bg);
  border: 1px solid var(--lmx-border);
  box-shadow: 0 18px 40px -20px rgba(6, 20, 38, 0.55),
    0 0 0 1px rgba(77, 200, 245, 0.04) inset;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color: var(--lmx-dim);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.lmx-promo:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--border-hi, rgba(77, 200, 245, 0.45));
  box-shadow: 0 24px 48px -20px rgba(6, 20, 38, 0.6),
    0 0 24px -6px rgba(77, 200, 245, 0.35);
}

/* the title bar with traffic-light dots */
.lmx-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--lmx-bar);
  border-bottom: 1px solid var(--lmx-border);
}
.lmx-bar-title {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lmx-dim);
}

.lmx-body { display: block; padding: 20px 22px 22px; }
.lmx-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lmx-icon {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--lmx-cyan);
  filter: drop-shadow(0 0 6px rgba(77, 200, 245, 0.5));
}
.lmx-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #eaf6ff;
  letter-spacing: 0.01em;
}
.lmx-tagline {
  display: block;
  font-size: 0.98rem;
  color: var(--lmx-cyan-hi);
  margin-bottom: 8px;
}
.lmx-desc { display: block; font-size: 0.88rem; color: var(--lmx-dim); line-height: 1.55; }
.lmx-cta {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--lmx-cyan-hi);
}
.lmx-promo:hover .lmx-cta { text-shadow: 0 0 12px rgba(102, 217, 255, 0.6); }

/* discreet Framna line at the foot of the Credits page (outside the boxes) */
.credits-framna {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  padding: 0 6px;
}
.credits-framna-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--text-muted);
  transition: color 0.15s var(--ease);
}
.credits-framna-mark:hover { color: var(--accent); }
.credits-framna-mark svg { display: block; width: 100%; height: 100%; }
.credits-framna p { margin: 0; font-size: 0.9rem; color: var(--text-faint); }
.credits-framna a { color: var(--text-muted); font-weight: 500; }

/* ============================================================
   FRAMNA
   ============================================================ */
.back-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 40px;
}
.back-link:hover { color: var(--accent); }

.framna-logo {
  display: inline-block;
  color: var(--text);
  margin-bottom: 34px;
  transition: color 0.15s var(--ease);
}
.framna-logo:hover { color: var(--accent); }
.framna-wordmark { display: block; height: 52px; width: auto; }
.framna-body { font-size: 1.12rem; color: var(--text-muted); max-width: none; margin: 0 0 40px; }
.framna-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.framna-point {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.framna-point h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.framna-point p { margin: 0 0 16px; color: var(--text-muted); font-size: 0.95rem; flex: 1; }
.framna-point a { font-weight: 600; font-size: 0.95rem; }
.framna-disclaimer {
  margin-top: 34px;
  font-size: 0.85rem;
  color: var(--text-faint);
  max-width: none;
  line-height: 1.5;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 0px; }

  .nav-toggle { display: grid; }

  .sidebar {
    width: 264px;
    transform: translateX(-100%);
    transition: transform 0.26s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }

  .scrim { display: block; pointer-events: none; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }

  .content { margin-left: 0; }

  /* the embedded tracker / demo fills the whole viewport on mobile */
  .issues-frame,
  .demo-frame { inset: 0; }

  .hero { padding-top: 92px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .card.wide { grid-column: span 2; }
  .framna-points { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .wrap { padding: 60px 22px 80px; }
  .hero { padding: 88px 22px 32px; }
  .features { padding: 68px 22px; }
  .closing { padding: 10px 22px 80px; }
  .closing-inner { padding: 44px 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .card.wide { grid-column: span 1; flex-direction: column; }
  .card.wide .feat-icon { margin-bottom: 16px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}
