/*
 * Lexleaf product site.
 *
 * Plain CSS, no build step. The colours and type follow the application's own
 * tokens (src/renderer/src/styles/tokens.css in the app repository): a black
 * page, near-black raised surfaces, a mint accent and Segoe UI, so the site
 * looks like the app a visitor is about to download.
 */

:root {
  --background: #000000;
  --surface: #0d0d0d;
  --raised: #1c1c1c;
  --hover: #2b2b2b;
  --text: #ededed;
  --muted: #a3a3a3;
  --border: #262626;
  --border-strong: #7a7a7a;
  --accent: #63c99b;
  --accent-hover: #7ad6ab;
  --on-accent: #0c1f17;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 10px;
  --page: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--raised);
  padding: 12px 18px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}

.skip:focus {
  left: 0;
}

/* --- Navigation ------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand img {
  width: 30px;
  height: 30px;
  /* The logo is drawn in the app's dark greens; a pale tile keeps it
     legible on the black page, as on the app's own icon. */
  background: #f7f5ed;
  border-radius: 8px;
  padding: 3px;
}

.links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
}

.links a {
  color: var(--muted);
}

.links a:hover {
  color: var(--text);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  font-size: 15px;
  transition: background 120ms ease;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.button.ghost {
  background: var(--raised);
  border-color: var(--border-strong);
  color: var(--text);
}

.button.ghost:hover {
  background: var(--hover);
}

.button.small {
  min-height: 38px;
  padding: 8px 15px;
  font-size: 14px;
}

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

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
  max-width: var(--page);
  margin: 0 auto;
  padding: 84px 24px 96px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--accent);
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
}

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

.lede {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 18px;
}

.micro {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* --- Screenshots ------------------------------------------------------ */

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.hero-shot img {
  box-shadow:
    0 24px 64px #000000a8,
    0 0 0 1px #ffffff10;
}

.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

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

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: 88px 24px;
  border-top: 1px solid var(--border);
}

.tinted {
  max-width: none;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* Line the contents up with the untinted sections. */
  padding-inline: max(24px, calc((100% - var(--page)) / 2 + 24px));
}

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

.section h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.section p {
  color: var(--muted);
}

.section-head p {
  font-size: 17px;
}

/* --- Feature cards ---------------------------------------------------- */

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

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

.card .num {
  color: var(--accent);
  font: 600 12px var(--mono);
  letter-spacing: 0.14em;
}

.card h3 {
  margin: 14px 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  font-size: 15px;
}

/* --- Also line -------------------------------------------------------- */

.also {
  max-width: 76ch;
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* --- How it works ----------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.steps {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.steps b {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font: 600 13px var(--mono);
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.steps p {
  margin: 0;
  font-size: 15px;
}

.steps strong {
  color: var(--text);
  font-weight: 600;
}

/* --- Downloads -------------------------------------------------------- */

.platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 44px 0 26px;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--raised);
}

.download-card h3 {
  margin: 0;
  font-size: 20px;
}

.download-card p {
  margin: 0;
  font-size: 14px;
}

.download-card .muted {
  color: var(--text);
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.download-card .button {
  align-self: flex-start;
}

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

/* --- Footer ----------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--page);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  background: #f7f5ed;
  border-radius: 6px;
  padding: 2px;
}

.footer-brand small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 14px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

/* --- Narrow screens --------------------------------------------------- */

@media (max-width: 900px) {
  .nav {
    padding: 12px 20px;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .hero-shot {
    order: -1;
  }

  .cards,
  .platforms,
  .facts {
    grid-template-columns: 1fr;
  }

  .links {
    display: none;
  }

  .nav {
    gap: 16px;
  }

  .section {
    padding: 64px 20px;
  }

  .tinted {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

/* --- Facts ------------------------------------------------------------ */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.facts b {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
}

.facts span {
  color: var(--muted);
  font-size: 14px;
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--raised);
  font: 0.92em var(--mono);
}

/* Two screenshots stacked beside the steps, a little smaller than the page
   width so they do not tower over the text. */
.shot-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.shot-stack figcaption {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .facts {
    grid-template-columns: 1fr 1fr;
  }
}
