/*
  Forma's website styles: light and dark follow the system, the blue of
  the app icon, system fonts.

  Author: Alexius Academia
  Date: 2026-10-26
*/
:root {
  --bg: #ffffff;
  --bg-tint: #f3f6fb;
  --text: #16202e;
  --muted: #5a6677;
  --line: #dde3ec;
  --accent: #1c5fd6;
  --accent-strong: #1549b4;
  --accent-soft: #e6eefc;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(16, 32, 64, 0.06), 0 8px 28px rgba(16, 32, 64, 0.10);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --bg-tint: #141b25;
    --text: #e6ebf2;
    --muted: #9aa6b6;
    --line: #273142;
    --accent: #5c9bff;
    --accent-strong: #8ab6ff;
    --accent-soft: #19273e;
    --card: #182130;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 28px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
kbd {
  font: 0.85em ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-tint);
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
nav a { color: var(--muted); }
nav a:hover { color: var(--text); text-decoration: none; }
nav .pill { color: #fff; background: var(--accent); padding: 6px 14px; border-radius: 999px; }
nav .pill:hover { color: #fff; background: var(--accent-strong); }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; }
.hero-icon { margin: 0 auto 18px; border-radius: 24px; }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}
h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -0.02em; margin: 12px 0 18px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.015em; margin: 8px 0 10px; }
h3 { font-size: 21px; line-height: 1.3; margin: 0 0 8px; }
.lead { max-width: 760px; margin: 0 auto; font-size: 19px; color: var(--muted); }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 44px; }
.button {
  display: inline-block; padding: 11px 20px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--text); background: var(--card); font-weight: 600;
}
.button:hover { text-decoration: none; border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-strong); }
.hero-shot img, .shot img { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* Sections */
section { padding: 84px 0; }
section.tint { background: var(--bg-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.heads { text-align: center; margin-bottom: 48px; }
.sub { color: var(--muted); margin: 0; }

.step { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; margin-bottom: 72px; }
.step:last-child { margin-bottom: 0; }
.step.flip .words { order: 2; }
.step .words p { color: var(--muted); }
.mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 10px;
}
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 56px; }

/* Formats */
.formats { width: 100%; border-collapse: collapse; font-size: 16px; }
.formats th, .formats td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.formats th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.formats td:nth-child(2), .formats td:nth-child(3), .formats th:nth-child(2), .formats th:nth-child(3) { text-align: center; width: 90px; }
.formats td:first-child { font-weight: 600; white-space: nowrap; }
.formats td:last-child { color: var(--muted); }

/* Download (filled by main.js from downloads.json) */
[hidden] { display: none !important; }
#download .heads { margin-bottom: 32px; }
.downloads { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.button.big { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 24px; width: 290px; max-width: 100%; border-radius: 12px; }
.button.big strong { font-size: 18px; }
.button.big span { font-size: 14px; font-weight: 500; opacity: 0.85; }
#download .alt { text-align: center; margin: 14px 0 0; color: var(--muted); }
#download .pending { font-size: 18px; color: var(--muted); text-align: center; margin: 0; }
#download .notes { margin: 36px 0 0; padding-left: 20px; color: var(--muted); }
#download .notes li { margin-bottom: 10px; }
#download .notes strong { color: var(--text); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--muted); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Plain pages (privacy) */
.page { padding: 56px 0 72px; }
.page h1 { font-size: 40px; }
.page h2 { font-size: 24px; margin-top: 32px; }
.page p, .page li { color: var(--muted); }

@media (max-width: 900px) {
  .step, .pair { grid-template-columns: 1fr; gap: 24px; }
  .step.flip .words { order: 0; }
  .cards { grid-template-columns: 1fr; }
  nav a:not(.pill) { display: none; }
  .formats td:first-child { white-space: normal; }
  section { padding: 60px 0; }
}
@media (max-width: 560px) {
  .formats th:nth-child(4), .formats td:nth-child(4) { display: none; }
}
