/* Spetch website — one light "whiteboard" theme, RTL-aware via logical properties. */

@font-face {
  font-family: "Tajawal";
  src: url("fonts/Tajawal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("fonts/Tajawal-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #fbfbf8;
  --bg-alt: #f2f1ec;
  --surface: #ffffff;
  --text: #1c1e26;
  --muted: #5d6170;
  --line: #e3e1d9;
  --accent: #5b5bd6;
  --accent-strong: #4646c2;
  --accent-soft: #ececfb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 30, 38, 0.06), 0 8px 24px rgba(28, 30, 38, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; text-align: center; margin-bottom: 1.2em; }
h3 { font-size: 1.15rem; font-weight: 800; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.8em 1.4em;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 0.45em 1.1em; font-size: 0.9rem; }

/* ── top bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 251, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  font: inherit;
  font-size: 0.9rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  color: var(--text);
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); }

/* ── hero ── */
.hero { padding: 72px 0 56px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.8em; }
[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero-note { color: var(--muted); font-size: 0.9rem; }

/* The drawing demo: the artwork is uncovered by a growing zigzag stroke while
   the hand follows the stroke's end, as in the app. */
.board {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.board-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.reveal-path { fill: none; stroke: #fff; stroke-width: 46; stroke-linecap: round; stroke-linejoin: round; }
.board-hand {
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  pointer-events: none;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s;
}

.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.35em 0.9em;
  border-radius: 999px;
}
/* A real export from Spetch, when config.js names one. */
.board-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }

/* ── sections ── */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { text-align: center; color: var(--muted); margin-top: -1.4em; margin-bottom: 2em; }
.grid { display: grid; gap: 20px; }
.features { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card p { color: var(--muted); margin: 0; font-size: 0.97rem; }
.icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 14px;
}

/* ── what's different ── */
.diffs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.diff {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}
.diff h3 { font-size: 1.3rem; }
.diff p { color: var(--muted); margin: 0; }
.diff-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
}

/* ── checklist ── */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  padding-inline-start: 54px;
  margin-bottom: 10px;
  font-weight: 800;
}
.checklist li::before { inset-inline-start: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; }

/* ── pricing ── */
.plans { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
}
.plan-pro { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan .price { font-size: 2.2rem; font-weight: 800; margin: 0.2em 0 0.6em; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; flex: 1; }
.plan li { padding-inline-start: 28px; position: relative; margin-bottom: 10px; }
/* Same tick as the checklist: drawn upright, so it reads the same in RTL. */
.plan li::before, .checklist li::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.plan li::before { inset-inline-start: 0; top: 0.3em; width: 18px; height: 18px; }
.badge {
  position: absolute;
  top: -13px;
  inset-inline-start: 30px;
  margin: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
}
.plan-note { color: var(--muted); font-size: 0.88rem; margin: 12px 0 0; text-align: center; }

/* ── download ── */
.downloads { grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; }
.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.download:hover, .download.is-yours { border-color: var(--accent); box-shadow: var(--shadow); }
.download.is-disabled { opacity: 0.5; pointer-events: none; }
.os { width: 44px; height: 44px; fill: var(--text); }
.download-name { font-weight: 800; font-size: 1.2rem; }
.download-meta { color: var(--muted); font-size: 0.9rem; text-align: center; }
.fine { color: var(--muted); font-size: 0.9rem; text-align: center; margin-top: 18px; }

/* ── FAQ / legal ── */
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 20px;
  margin-bottom: 10px;
}
summary { cursor: pointer; font-weight: 800; padding: 16px 0; }
details p { color: var(--muted); margin: 0 0 16px; }

.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.legal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: start; }
.legal details { font-size: 0.9rem; }
.footer-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 0.9rem; margin: 20px 0 0; }

/* ── small screens ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .diffs { grid-template-columns: 1fr; }
  .nav { display: none; }
  .topbar-actions { margin-inline-start: auto; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding-top: 40px; }
  .features, .plans, .downloads, .legal { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── what's new (scripts/release-bot.py) ── */
.whats-new-list { color: var(--muted); margin: 0.6em 0 0; padding-inline-start: 1.2em; font-size: 0.97rem; }
.whats-new-list li { margin: 0.25em 0; }
#whats-new .card p + p { margin-top: 0.6em; }
html[lang="ar"] .whats-new-en, html:not([lang="ar"]) .whats-new-ar { display: none; }
