/* Marketing landing page ("/") -- deliberately its own stylesheet, separate
   from app.css (the dashboard's stylesheet), since this page shares only a
   color/type language with the app, not any dashboard-specific CSS (tiles,
   modals, grid packing, etc.). Palette below is pulled directly from
   app.css's own base tokens so the two pages read as one site. */
:root {
  color-scheme: dark;
  --bg-1: #1b2735;
  --bg-2: #090a0f;
  --text: #e8ecf1;
  --text-dim: #aab4c0;
  --text-dimmer: #5a6472;
  --accent: #3fa9f5;
  --accent-ink: #06131f;
  --accent-soft: #8fbfe8;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --panel: rgba(255, 255, 255, 0.03);
  --panel-strong: rgba(255, 255, 255, 0.05);
  /* Same 5 semantic tile colors the dashboard itself uses (app.js's
     FALLBACK_COLORS) -- reused here only for the illustrative mock board. */
  --on: #2e7d32;
  --off: #455a64;
  --warning: #f9a825;
  --error: #c62828;
  --stable: #1565c0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, var(--bg-1), var(--bg-2) 70%) fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* -- Nav ---------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(9, 10, 15, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; border-radius: 8px; }

/* -- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #59b7f7; }
.btn-secondary { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.btn-sm { padding: 8px 15px; font-size: 0.86rem; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }

/* -- Hero ----------------------------------------------------------------- */
.hero { padding: 64px 24px 32px; }
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-soft);
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.12;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.lede { font-size: 1.08rem; line-height: 1.55; color: var(--text-dim); margin: 0 0 28px; max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* -- Hero mock board illustration ------------------------------------------ */
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(63, 169, 245, 0.16), transparent 65%);
  z-index: 0;
}
.mock-board {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.mock-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 0 2px; }
.mock-board-name { font-weight: 700; font-size: 0.9rem; }
.mock-status { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; color: var(--text-dimmer); }
.mock-dot { width: 7px; height: 7px; border-radius: 50%; background: #8fd3a3; display: inline-block; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-tile {
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #fff;
  text-align: center;
  padding: 6px;
}
.mock-icon { opacity: 0.95; }
.mock-label { font-size: 0.68rem; font-weight: 600; line-height: 1.2; }
.mock-sub { font-size: 0.6rem; opacity: 0.8; }

/* -- Generic section scaffolding -------------------------------------------- */
.section { padding: 60px 24px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 14px; letter-spacing: -0.01em; }
.section-lede { color: var(--text-dim); font-size: 1rem; max-width: 64ch; line-height: 1.6; margin: 0 0 32px; }
.section-divider { max-width: 1100px; margin: 0 auto; border: none; border-top: 1px solid var(--line); }

/* -- Feature cards ---------------------------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(63, 169, 245, 0.12);
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--text-dim); font-size: 0.92rem; line-height: 1.55; }

/* -- Integration chips -------------------------------------------------------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  font-size: 0.9rem;
  font-weight: 600;
}
.chip-primary { background: rgba(63, 169, 245, 0.14); border-color: rgba(63, 169, 245, 0.4); color: #bfe0fb; }
.chip-more { opacity: 0.7; font-weight: 500; }
.fine-print { font-size: 0.82rem; color: var(--text-dimmer); max-width: 68ch; line-height: 1.6; }

/* -- Permission cards (sharing section) --------------------------------------- */
.perm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.perm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.perm-name {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(63, 169, 245, 0.14);
  color: #bfe0fb;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.perm-card p { margin: 0; font-size: 0.88rem; color: var(--text-dim); line-height: 1.5; }

/* -- Final CTA band ----------------------------------------------------------- */
.cta-band {
  margin: 12px 24px 64px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(63, 169, 245, 0.14), rgba(63, 169, 245, 0.03));
  border: 1px solid rgba(63, 169, 245, 0.25);
  padding: 56px 24px;
  text-align: center;
}
.cta-band h2 { margin: 0 0 22px; font-size: clamp(1.4rem, 2.6vw, 2rem); }

/* -- Footer (mirrors app.css's .site-footer) ---------------------------------- */
.site-footer { text-align: center; padding: 28px 10px 40px; font-size: 0.72rem; color: var(--text-dimmer); }
.site-footer a { color: var(--text-dimmer); }
.footer-ios-link { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }

/* -- Responsive ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .mock-board { max-width: 320px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .feature-grid, .perm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-ctas .btn { flex: 1 1 auto; text-align: center; }
}
