/* Landing page. Brand tokens mirror tailwind.config.js and
   scripts/store-assets/base.css - keep the three in sync. */

:root {
  --fb: #0866ff;
  --fb-hover: #0653cc;
  --fb-soft: #e7f0ff;
  --ink: #0b1220;
  --muted: #5b6577;
  --line: #e3e8f0;
  --card: #fff;
  --page: #fbfcff;
  --radius: 16px;
  --wrap: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Unicode sample text needs a font with math-alphanumeric coverage. */
.uni {
  font-family: "Apple Symbols", "STIX Two Math", "Segoe UI Symbol",
    "DejaVu Sans", serif;
}

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

a { color: var(--fb); }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid var(--fb);
  border-radius: 10px;
  background: var(--fb);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover { background: var(--fb-hover); border-color: var(--fb-hover); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.ghost:hover { background: #fff; border-color: #c9d3e2; }

/* Header ----------------------------------------------------------------- */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  /* Was an inline style attribute; the deployed CSP blocks those. */
  color: inherit;
  text-decoration: none;
}

.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--fb);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

header nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
header nav a { color: var(--muted); text-decoration: none; }
header nav a:hover { color: var(--ink); }
header .btn { padding: 8px 16px; font-size: 14px; }

/* Header CTA inverts on hover: white fill, blue label, blue border. */
header .btn:hover {
  background: #fff;
  color: var(--fb);
  border-color: var(--fb);
}

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 76px 0 64px;
  overflow: hidden;
  background: #f2f6fd;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 780;
  max-width: 18ch;
}

.hero h1 em { font-style: normal; color: var(--fb); }

.hero p.lede {
  margin-top: 20px;
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 58ch;
}

.hero .cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero .fineprint {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Hero: copy left, product shot right. Single column below 900px, where the
   shot would be too small to read anyway. */
.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
}

.hero-shot img {
  /* The PNG carries 56px of transparent shadow margin on each side. */
  width: 560px;
  margin: -28px;
  max-width: 100%;
  height: auto;
}

@media (max-width: 980px) {
  .hero-top { grid-template-columns: 1fr; gap: 32px; }
  .hero-shot { display: none; }
}

/* Live demo -------------------------------------------------------------- */

.demo {
  margin-top: 44px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.05),
    0 26px 60px -30px rgba(11, 18, 32, 0.4);
  overflow: hidden;
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.demo-head h2 { font-size: 15px; font-weight: 680; }
.demo-head .hint { font-size: 13px; color: var(--muted); }
.demo-label { font-size: 13px; }

.demo-body { padding: 18px; display: grid; gap: 14px; }

#demo-input {
  width: 100%;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  resize: vertical;
  outline: none;
}

#demo-input:focus { border-color: var(--fb); box-shadow: 0 0 0 3px var(--fb-soft); }

.styles { display: flex; flex-wrap: wrap; gap: 8px; }

.styles button {
  padding: 8px 14px;
  border: 1px solid rgba(8, 102, 255, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--fb);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.styles button:hover { background: var(--fb-soft); border-color: var(--fb); }

.styles button[aria-pressed="true"] {
  background: var(--fb-soft);
  border-color: var(--fb);
  font-weight: 650;
}

.styles button.plain { border-color: var(--line); color: var(--muted); }

.demo-out {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  background: #f5f8fd;
  border: 1px solid var(--line);
}

#demo-output {
  font-size: 19px;
  line-height: 1.5;
  word-break: break-word;
  min-height: 1.5em;
}

.demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.count b { color: var(--ink); font-weight: 650; }

#copy {
  padding: 8px 18px;
  border: 1px solid var(--fb);
  border-radius: 8px;
  background: var(--fb);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

#copy:hover { background: var(--fb-hover); }

/* Sections --------------------------------------------------------------- */

section { padding: 72px 0; }
section.alt { background: #fff; border-block: 1px solid var(--line); }

.section-head { max-width: 62ch; }

.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 740;
}

.section-head p { margin-top: 14px; font-size: 18px; color: var(--muted); }

.grid { margin-top: 34px; display: grid; gap: 18px; }
.grid.faq-grid { margin-top: 28px; }
.grid.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

section.alt .card { background: var(--page); }

.card h3 { font-size: 19px; font-weight: 680; letter-spacing: -0.01em; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

.card .ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--fb-soft);
  color: var(--fb);
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 14px;
}

figure { margin-top: 34px; }

figure img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 22px 50px -30px rgba(11, 18, 32, 0.5);
}

figcaption {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--muted);
  text-align: center;
}

/* Table ------------------------------------------------------------------ */

.table-scroll { margin-top: 30px; overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 560px; }

th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }

thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

tbody td:first-child { font-weight: 600; }

.yes { color: #0a7a3d; font-weight: 650; }
.no { color: #98a2b3; }

/* FAQ -------------------------------------------------------------------- */

details {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

section.alt details { background: var(--page); }

details + details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 650; font-size: 17px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: " +"; color: var(--fb); }
details[open] summary::after { content: " −"; }
details p { margin-top: 12px; color: var(--muted); }

/* Closing CTA ------------------------------------------------------------ */

.final {
  padding: 74px 24px;
  text-align: center;
  color: #fff;
  background: var(--ink);
}

.final h2 {
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.026em;
  font-weight: 760;
}

.final p { margin: 16px auto 0; max-width: 52ch; color: rgba(255, 255, 255, 0.84); font-size: 18px; }
.final .btn { margin-top: 28px; background: #fff; color: var(--fb); border-color: #fff; }
.final .btn:hover { background: #eaf1ff; border-color: #eaf1ff; }

footer { padding: 34px 0 46px; font-size: 14.5px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
footer a { color: var(--muted); }

@media (max-width: 720px) {
  header nav a:not(.btn) { display: none; }
  section { padding: 56px 0; }
  .hero { padding: 52px 0 48px; }
}
