/* FLEx Scratchpad's site. The tokens and components follow LingTeX Tools' site
   (rulingAnts/LingTeX-Tools docs/assets/site.css) so the two read as one family;
   its animated mocks are left out: this page shows a recording of the real program
   (tools/record_demo.py). */

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

:root {
  --blue-50:   #eff6ff;
  --blue-100:  #dbeafe;
  --blue-200:  #bfdbfe;
  --blue-500:  #3b82f6;
  --blue-600:  #2563eb;
  --blue-700:  #1d4ed8;
  --blue-800:  #1e40af;
  --blue-900:  #1e3a8a;
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --teal-50:   #f0fdfa;
  --teal-100:  #ccfbf1;
  --teal-600:  #0d9488;
  --teal-700:  #0f766e;
  --green-600: #16a34a;
  --amber-200: #fde68a;
  --amber-900: #78350f;

  --font:  system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:  ui-monospace, 'Cascadia Code', 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --serif: 'Charis SIL', 'Doulos SIL', Cambria, 'Times New Roman', Georgia, serif;
  --r:     8px;
  --r-lg:  14px;
  --max-w: 1100px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--slate-100);
  color: var(--slate-900);
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: 0.85em; background: var(--slate-200); padding: 1px 5px; border-radius: 4px; }
main { flex: 1; }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.site-nav {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--slate-200);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 26px; height: 26px; border-radius: 6px; background: #fff; border: 1px solid var(--slate-200); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--slate-600);
  padding: 6px 11px;
  border-radius: 6px;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--slate-100); color: var(--slate-900); text-decoration: none; }
.nav-links a.active { color: var(--blue-700); background: var(--blue-50); font-weight: 600; }
.nav-links a.nav-gh { border: 1px solid var(--slate-200); color: var(--slate-700); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(59,130,246,0.55), transparent 60%),
    linear-gradient(160deg, var(--blue-900) 0%, var(--blue-800) 45%, var(--blue-600) 100%);
  color: #fff;
  padding: 44px 20px 104px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  max-width: 820px;
  margin: 0 auto 14px;
}
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--blue-100);
  max-width: 660px;
  margin: 0 auto;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--blue-100);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--amber-200);
  color: var(--amber-900);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r);
  font: 650 0.94rem var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue-700); color: #fff; box-shadow: 0 6px 16px -8px rgba(29,78,216,.8); }
.btn-primary:hover { background: var(--blue-800); }
.btn-teal { background: var(--teal-700); color: #fff; box-shadow: 0 6px 16px -8px rgba(15,118,110,.8); }
.btn-teal:hover { background: #115e59; }
.btn-light { background: #fff; color: var(--blue-800); }
.btn-light:hover { background: var(--blue-50); }
.btn-glass { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-glass:hover { background: rgba(255,255,255,0.24); }
.btn-outline { background: #fff; color: var(--slate-800); border-color: var(--slate-300); }
.btn-outline:hover { background: var(--slate-50); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Media slots: a recording when the file exists, the mock until then ── */
.media-slot {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--blue-900);
  container-type: inline-size;
}
.media-slot.wide { aspect-ratio: 16 / 10; }
.media-slot > video, .media-slot > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #fff;
}
.media-slot.has-media .placeholder { display: none; }

/* ── Word page sections ─────────────────────────────────────────────────── */
.hero-media {
  max-width: 940px; margin: -84px auto 0; padding: 0 20px; position: relative;
}
.hero-media .media-slot, .hero-media .carousel { border-radius: 16px; box-shadow: 0 34px 60px -30px rgba(2,6,23,.6); border: 1px solid rgba(255,255,255,.6); }
.hero .btn-row { justify-content: center; margin-top: 22px; }

.section { max-width: var(--max-w); margin: 0 auto; padding: 64px 20px 8px; }
.section h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 10px; }
.section .lead { color: var(--slate-600); max-width: 680px; margin-bottom: 30px; font-size: 1.02rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.step .media-slot { border-bottom: 1px solid var(--slate-200); background: var(--blue-50); }
.step-body { padding: 16px 18px 20px; }
.step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-700); color: #fff; font-size: 0.8rem; font-weight: 750; margin-bottom: 8px; }
.step h3 { font-size: 1.08rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.step p { color: var(--slate-600); font-size: 0.93rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--r-lg); padding: 18px 18px 20px; }
.feature img { width: 36px; height: 36px; margin-bottom: 10px; border-radius: 8px; border: 1px solid var(--slate-200); }
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { color: var(--slate-600); font-size: 0.92rem; }

.install { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.install-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--r-lg); padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.install-card h3 { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.install-card ol { padding-left: 1.2rem; display: grid; gap: 8px; color: var(--slate-700); font-size: 0.94rem; }
.install-card .note { font-size: 0.86rem; color: var(--slate-500); }
.install-card .btn-row { margin-top: auto; }

.beta-band {
  max-width: var(--max-w); margin: 56px auto 0; padding: 0 20px;
}
.beta-band > div { background: linear-gradient(135deg, var(--blue-50), #fff); border: 1px solid var(--blue-100); border-radius: var(--r-lg); padding: 22px 24px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.beta-band p { color: var(--slate-700); max-width: 640px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer { margin-top: 64px; border-top: 1px solid var(--slate-200); background: #fff; padding: 22px 20px 26px; text-align: center; font-size: 0.82rem; color: var(--slate-500); display: grid; gap: 6px; }
.footer-links { display: flex; gap: 6px 18px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--slate-600); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .steps, .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-nav { padding: 8px 14px 0; gap: 4px; }
  .nav-links { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 8px; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .hero { padding: 48px 18px 104px; }
  .steps, .features, .install { grid-template-columns: 1fr; }
  .nav-links a { padding: 5px 8px; font-size: 0.82rem; }
}

/* ── This page ──────────────────────────────────────────────────────────── */
.nav-brand img { padding: 1px; }
.placeholder { position: absolute; inset: 0; }
.placeholder img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-slot.wide.still { background: #fff; }
.media-slot.wide.still > img, .media-slot.wide.still .placeholder img { object-fit: cover; object-position: left top; }
.feature .ico { width: 36px; height: 36px; margin-bottom: 10px; border-radius: 9px; display: grid; place-items: center;
  background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue-700); }
.feature .ico svg { width: 20px; height: 20px; }
.req-list { display: grid; gap: 6px; color: var(--slate-700); font-size: 0.94rem; padding-left: 1.2rem; }
.kbd { font: 600 0.8rem var(--mono); background: var(--slate-100); border: 1px solid var(--slate-200); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; }
.hero .ver { font-variant-numeric: tabular-nums; }
.btn .ver, .btn [data-dl$="version"] { font-weight: 500; opacity: .8; margin-left: 2px; font-variant-numeric: tabular-nums; }

/* The comparison table (Seth, 2026-10-20: "show and explain right up front what it can do that you
   can't do with just FLEx or with just a word document"). */
.compare-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--r-lg); box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
.compare { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 720px; }
.compare th, .compare td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--slate-200); }
.compare thead th { background: var(--slate-50); color: var(--slate-600); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.compare thead th:last-child { color: var(--blue-800); background: var(--blue-50); }
.compare tbody th { font-weight: 600; color: var(--slate-900); width: 28%; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare td { color: var(--slate-600); width: 24%; }
.compare td.yes { color: var(--slate-800); background: var(--blue-50); }
.compare td.yes::before { content: "✓ "; color: var(--green-600); font-weight: 700; }
.compare td.part::before { content: "◐ "; color: var(--slate-400); }
.compare td.no { color: var(--slate-500); }
.compare td.no::before { content: "— "; color: var(--slate-400); }
.compare td.yes:last-child { border-left: 3px solid var(--blue-200); }
.compare em { font-family: var(--serif); font-style: italic; color: var(--blue-800); }
@media (max-width: 640px) { .compare { font-size: 0.86rem; } }

/* ── The hero carousel: the loop video and one picture per feature, auto-advancing, the feature named in a
   band under the picture (Seth, 2026-10-20: "a rotating carousel with the screenshots, starting with the
   video … and each feature for those screenshots as a caption underneath that also changes with the
   carousel media") ── */
.carousel { position: relative; overflow: hidden; background: #fff; outline: none; }
.carousel:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 34px 60px -30px rgba(2,6,23,.6); }
.car-view { position: relative; overflow: hidden; background: var(--blue-900); }
.car-track { display: flex; transition: transform .6s cubic-bezier(.22,.61,.36,1); will-change: transform; }
.car-slide { flex: 0 0 100%; min-width: 100%; margin: 0; }
.car-slide .media-slot { aspect-ratio: 16 / 9; }
.hero-media .car-slide .media-slot { border-radius: 0; box-shadow: none; border: 0; }
.car-slide.still .media-slot > img { object-fit: contain; background: #f6f8fb; }
.car-caption { margin: 0; padding: 12px 56px 12px 18px; min-height: 3.4em; display: flex; align-items: center; font-size: 0.95rem; line-height: 1.35; color: var(--slate-700); background: #fff; border-top: 1px solid var(--slate-200); }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); color: var(--blue-900); font-size: 1.7rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; display: grid; place-items: center; padding: 0 0 3px; }
.car-btn.prev { left: 12px; } .car-btn.next { right: 12px; }
.car-btn:hover { background: #fff; }
.carousel:hover .car-btn, .carousel:focus-within .car-btn { opacity: 1; }
.car-dots { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 3; display: flex; justify-content: center; gap: 6px; }
.car-dot { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: rgba(255,255,255,.55); cursor: pointer; transition: width .2s, background .2s; box-shadow: 0 0 0 1px rgba(2,6,23,.25); }
.car-dot[aria-selected="true"] { width: 22px; background: #fff; }
.car-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.car-count { position: absolute; right: 14px; bottom: 12px; font-size: 0.75rem; color: var(--slate-500); }
@media (hover: none) { .car-btn { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .car-track { transition: none; } }
@media (max-width: 640px) { .car-caption { font-size: 0.84rem; padding: 10px 44px 10px 12px; } .car-btn { width: 34px; height: 34px; font-size: 1.3rem; } }
