/* Greater — product page
   Palette mirrors the app itself (app/ui/styles.css). */

:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-raised: #12151a;
  --bg-soft: #171b21;
  --border: #232833;
  --text: #e8ebf0;
  --text-dim: #8b93a1;
  --accent: #4f8cff;
  --accent-strong: #3f7bf0;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --ok: #3ecf8e;
  --warn: #f0b429;
  --danger: #f2555a;
  --violet: #a78bfa;
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: "hidden" makes <body> its own scroll container */
  overflow-x: clip;
}

/* soft ambient glow behind the hero */
body::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -280px;
  height: 720px;
  background:
    radial-gradient(58% 60% at 22% 42%, rgba(79, 140, 255, 0.16), transparent 70%),
    radial-gradient(45% 55% at 82% 18%, rgba(62, 207, 142, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 650; }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 650; }
h4 { font-size: 1.02rem; font-weight: 650; }

p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; position: relative; z-index: 1; }
.wrap.narrow { max-width: 820px; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

.dim { color: var(--text-dim); }

/* ---------------- header ---------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }

.nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}
.nav a {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); text-decoration: none; }

.head-actions { display: flex; align-items: center; gap: 10px; }

.lang-btn {
  font: inherit;
  font-size: 0.86rem;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.lang-btn:hover { color: var(--text); border-color: #3a4152; background: rgba(255, 255, 255, 0.04); }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s, box-shadow .18s, background .18s, border-color .18s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(79, 140, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(79, 140, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:active { transform: translateY(0); }

.btn-sm { padding: 7px 14px; font-size: 0.88rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 12px; }

/* ---------------- hero ---------------- */

.hero { padding: clamp(48px, 8vw, 92px) 0 clamp(30px, 5vw, 54px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  gap: clamp(28px, 4vw, 54px);
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 { margin-bottom: 18px; text-wrap: balance; }

.lead {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: #b7bfcc;
  max-width: 46ch;
  margin-bottom: 26px;
}

.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

.meta { font-size: 0.82rem; color: var(--text-dim); margin: 0; }

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.hero-badges li {
  font-size: 0.78rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
}
.hero-badges li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 700;
  margin-inline-end: 6px;
}

/* screenshot frame */
.frame {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-raised);
  padding: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.frame img { border-radius: 9px; width: 100%; height: auto; }

.hero-shot .frame {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(79, 140, 255, 0.12);
}

/* ---------------- proof strip ---------------- */

.proof {
  border-block: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
  padding: 30px 0;
}

.proof-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  margin: 0 0 18px;
}

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

.proof-item { text-align: center; }
.proof-item b {
  display: block;
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.proof-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin-top: 4px;
}

/* ---------------- sections ---------------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border-block: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title { text-align: center; margin-bottom: 12px; text-wrap: balance; }
.section-sub {
  text-align: center;
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 auto clamp(34px, 5vw, 52px);
}

.sub-title { margin-top: clamp(48px, 7vw, 72px); text-align: center; }

/* ---------------- features ---------------- */

.feature {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(26px, 4vw, 52px);
  align-items: center;
  padding-block: clamp(26px, 4vw, 44px);
}
.feature.reverse .feature-copy { order: 2; }
.feature.reverse .frame { order: 1; }

.feature-copy p { color: #b7bfcc; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.tag-blue { color: #9cc0ff; background: rgba(79, 140, 255, 0.15); border: 1px solid rgba(79, 140, 255, 0.3); }
.tag-green { color: #7fe0b0; background: rgba(62, 207, 142, 0.13); border: 1px solid rgba(62, 207, 142, 0.3); }
.tag-amber { color: #ffd166; background: rgba(240, 180, 41, 0.13); border: 1px solid rgba(240, 180, 41, 0.3); }
.tag-purple { color: #c4b1ff; background: rgba(167, 139, 250, 0.14); border: 1px solid rgba(167, 139, 250, 0.32); }

.ticks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 9px;
}
.ticks li {
  position: relative;
  padding-inline-start: 26px;
  font-size: 0.93rem;
  color: #aab3c1;
}
.ticks li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 0.05em;
  color: var(--ok);
  font-weight: 700;
  font-size: 0.9em;
}
.ticks b { color: var(--text); font-weight: 600; }

/* ---------------- safety cards ---------------- */

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

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 20px 18px;
  transition: border-color .18s, transform .18s;
}
.card:hover { border-color: #2e3543; transform: translateY(-2px); }
.card h4 { margin-bottom: 8px; color: var(--text); }
.card p { margin: 0; font-size: 0.9rem; color: var(--text-dim); }

/* ---------------- table ---------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
}
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: start; padding: 14px 18px; }
thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
tbody tr + tr td { border-top: 1px solid rgba(255, 255, 255, 0.045); }
tbody td b { font-variant-numeric: tabular-nums; }

/* ---------------- install ---------------- */

.install-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  align-items: start;
}

.steps { display: grid; gap: 4px; }

.step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding-block: 14px;
}
.step .num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 140, 255, 0.34);
  color: #9cc0ff;
  font-weight: 700;
  font-size: 0.9rem;
}
.step h4 { margin-bottom: 4px; }
.step p { margin: 0; font-size: 0.9rem; color: var(--text-dim); }

.steps .btn { justify-self: start; margin-block: 18px 8px; }

.req {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
}
.req h4 { margin-bottom: 12px; }
.req h4 + ul { margin-bottom: 22px; }
.req .ticks { margin: 0; }
.req p { font-size: 0.88rem; color: var(--text-dim); margin: 0; }

/* ---------------- "expect a Windows warning" box ---------------- */

.warn {
  margin-top: 26px;
  background: rgba(240, 180, 41, 0.05);
  border: 1px solid rgba(240, 180, 41, 0.26);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.warn h4 { color: #ffd166; margin-bottom: 10px; }
.warn p { font-size: 0.9rem; color: #b7bfcc; margin: 0 0 10px; }
.warn p:last-child { margin-bottom: 0; }
.warn .ticks { margin: 4px 0 14px; }
.warn .ticks li { font-size: 0.88rem; }
.warn .ticks li::before { color: #ffd166; }

.warn pre {
  margin: 0 0 10px;
  padding: 11px 13px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow-x: auto;
}
.warn pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.82rem;
  white-space: pre;
}

.hashline { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.warn code.hash {
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  word-break: break-all;
  white-space: normal;
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
}

/* ---------------- downloads table ---------------- */

.dl-table td { vertical-align: top; }
.dl-table td b { font-variant-numeric: tabular-nums; }
.dl-table .badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fe0b0;
  background: rgba(62, 207, 142, 0.13);
  border: 1px solid rgba(62, 207, 142, 0.3);
  border-radius: 100px;
  padding: 1px 7px;
  margin-inline-start: 7px;
  vertical-align: 1px;
}
.dl-table .file {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  word-break: break-all;
}
.dl-table code.sum {
  display: block;
  max-width: 34ch;
  font-size: 0.68rem;
  line-height: 1.5;
  word-break: break-all;
  white-space: normal;
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-dim);
}
.dl-table .btn { white-space: nowrap; }
.dl-note { font-size: 0.82rem; color: var(--text-dim); margin: 16px 0 0; }

/* Phones: the five-column table squeezes the hash into a sliver, so each
   release becomes a card with the column names as labels. */
@media (max-width: 640px) {
  .dl-table { border: 0; background: none; overflow: visible; }
  .dl-table table, .dl-table tbody, .dl-table tr, .dl-table td { display: block; width: 100%; }
  .dl-table thead { display: none; }
  .dl-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-raised);
    padding: 14px 16px;
    margin-bottom: 12px;
  }
  .dl-table tbody tr + tr td { border-top: 0; }
  .dl-table td { padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, 0.045); }
  .dl-table td:first-child { padding-top: 0; border-top: 0; }
  .dl-table td:last-child { padding-bottom: 0; }
  .dl-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 3px;
  }
  .dl-table td:first-child::before { display: none; }
  .dl-table code.sum { max-width: none; }
  .dl-table .btn { display: inline-block; }
}

/* ---------------- faq ---------------- */

details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  margin-bottom: 10px;
  overflow: hidden;
}
details[open] { border-color: #2e3543; }
summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  color: var(--text-dim);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  flex: none;
}
details[open] summary::after { content: "−"; }
summary:hover { background: rgba(255, 255, 255, 0.025); }
details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------------- final cta ---------------- */

.cta {
  padding: clamp(60px, 8vw, 100px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(79, 140, 255, 0.14), transparent 70%),
    var(--bg);
}
.cta-inner { text-align: center; display: grid; justify-items: center; }
.cta-icon { border-radius: 16px; margin-bottom: 20px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); }
.cta h2 { margin-bottom: 10px; text-wrap: balance; }
.cta p { color: var(--text-dim); margin-bottom: 26px; }
.cta .meta { margin-top: 16px; }

/* ---------------- footer ---------------- */

.site-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 28px 0;
  background: var(--bg-raised);
}
.foot-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--text); }
.foot-brand img { border-radius: 6px; }
.foot-copy { margin: 0; }
.foot-copy a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.foot-copy a:hover { color: var(--accent); }
.foot-links { margin: 0; display: flex; gap: 18px; }
.foot-links a { color: var(--text-dim); }
.foot-links a:hover { color: var(--text); text-decoration: none; }

/* ---------------- rtl ---------------- */

html[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif; }
html[dir="rtl"] .eyebrow { letter-spacing: normal; }
html[dir="rtl"] .proof-item b,
html[dir="rtl"] td b { font-variant-numeric: normal; }
html[dir="rtl"] .ticks li::before { content: "✓"; }
html[dir="rtl"] code { direction: ltr; display: inline-block; }

/* ---------------- responsive ---------------- */

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-shot { order: -1; }
  .hero-copy .lead { max-width: none; }
  .feature, .feature.reverse { grid-template-columns: 1fr; }
  .feature.reverse .feature-copy { order: 0; }
  .feature.reverse .frame { order: 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .install-grid { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; }
  .nav { display: none; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .cards { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .head-inner { height: 58px; }
  .lang-btn { padding: 6px 9px; font-size: 0.8rem; }
}

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