/* Electron — product site. No frameworks, no CDN, no fonts to fetch:
   the page should render instantly on a cold load over a bad connection. */

:root {
  --bg: #0a0a0b;
  --bg-2: #101013;
  --bg-3: #16161a;
  --line: #24242a;
  --text: #ececf1;
  --muted: #9a9aa4;
  --dim: #6e6e78;
  --accent: #1db954;
  --accent-dim: #14833b;
  --warn: #ffb020;
  --radius: 14px;
  --maxw: 880px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(10 10 11 / 82%);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-brand { font-weight: 650; letter-spacing: -0.01em; color: var(--text); }
.nav-brand:hover { text-decoration: none; }

.nav-links { display: flex; gap: 20px; margin-left: auto; overflow-x: auto; }
.nav-links a { color: var(--muted); font-size: 14px; white-space: nowrap; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero { padding: 76px 0 40px; text-align: center; }

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero .tag {
  margin: 0 auto 26px;
  max-width: 620px;
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--muted);
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 30px; }

.pill {
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 12px;
  background: var(--bg-2);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #05140a; }
.btn-primary:hover { background: #22d363; text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--bg-2); }
.btn-ghost:hover { border-color: #3a3a44; text-decoration: none; }

.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--dim); }

.shot {
  margin: 44px auto 0;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
  box-shadow: 0 30px 70px -30px rgb(0 0 0 / 90%);
}

/* ── Sections ────────────────────────────────────────────────────────── */

section { padding: 52px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

h2 {
  font-size: clamp(25px, 4vw, 31px);
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  font-weight: 680;
}

.lede { color: var(--muted); margin: 0 0 28px; font-size: 16.5px; }

h3 {
  font-size: 18px;
  margin: 32px 0 10px;
  letter-spacing: -0.012em;
  font-weight: 640;
}

h4 { font-size: 15px; margin: 22px 0 8px; font-weight: 640; }

p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 7px; }
li::marker { color: var(--dim); }

/* ── Feature grid ────────────────────────────────────────────────────── */

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 14px; }

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

.card h3 { margin: 0 0 10px; font-size: 16.5px; display: flex; align-items: center; gap: 9px; }
.card ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--muted); }
.card li { margin-bottom: 6px; }
.card strong { color: var(--text); font-weight: 600; }

.new {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #05140a;
  background: var(--accent);
  border-radius: 5px;
  padding: 2px 7px;
}

/* ── Code ────────────────────────────────────────────────────────────── */

.code {
  position: relative;
  background: #08080a;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 16px;
}

.code pre {
  margin: 0;
  padding: 15px 60px 15px 16px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.75;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  color: #d7d7e0;
}

.code .cmt { color: var(--dim); }

.copy {
  position: absolute;
  top: 9px;
  right: 9px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
}

.copy:hover { color: var(--text); border-color: #3a3a44; }
.copy.done { color: var(--accent); border-color: var(--accent-dim); }

code:not(pre code) {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1.5px 6px;
  font-size: 13.5px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  color: #e4e4ec;
}

/* ── Media ───────────────────────────────────────────────────────────── */

.media {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
  background: #000;
}

.clip {
  margin: 0 0 12px;
  box-shadow: 0 24px 60px -28px rgb(0 0 0 / 90%);
  /* Pinned to the clip's own ratio. The poster is a 16:10 still and the clip
     is wider, so without this the block resizes the moment playback starts
     and everything below it jumps. */
  aspect-ratio: 1640 / 848;
  object-fit: cover;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 13px;
  margin-bottom: 8px;
}

figure { margin: 0; }

figcaption {
  margin-top: 7px;
  font-size: 13px;
  color: var(--dim);
}

figcaption b { color: var(--muted); font-weight: 600; }

/* The notch panel is captured on transparency, so it needs something behind
   it or the rounded underside is invisible against the page. */
.notch-shot {
  background: linear-gradient(180deg, #000 0%, #101014 100%);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 0 0 18px;
  overflow: hidden;
  margin-bottom: 12px;
}

.notch-shot img { width: 100%; display: block; }

/* ── Callouts ────────────────────────────────────────────────────────── */

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  border-radius: 0 10px 10px 0;
  padding: 15px 18px;
  margin: 0 0 18px;
  font-size: 15px;
}

.note.warn { border-left-color: var(--warn); }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note .lbl { font-weight: 650; display: block; margin-bottom: 4px; }
.note.warn .lbl { color: var(--warn); }
.note .lbl { color: var(--accent); }

/* ── Steps ───────────────────────────────────────────────────────────── */

.steps { list-style: none; padding: 0; counter-reset: s; }

.steps > li {
  counter-increment: s;
  position: relative;
  padding-left: 44px;
  margin-bottom: 26px;
}

.steps > li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* :first-child, not every <strong> in the step. Without it, any bold word in
   a step's body became a block and broke its own line — "About This Mac" was
   splitting off mid-sentence and orphaning the full stop after it. */
.steps > li > strong:first-child { display: block; margin-bottom: 5px; font-size: 16.5px; }

/* ── Details / FAQ ───────────────────────────────────────────────────── */

details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  margin-bottom: 9px;
  overflow: hidden;
}

summary {
  cursor: pointer;
  padding: 14px 17px;
  font-weight: 560;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.8px solid var(--dim);
  border-bottom: 1.8px solid var(--dim);
  transform: rotate(-45deg);
  transition: transform 160ms ease;
  flex: none;
  margin-left: 2px;
}

details[open] summary::before { transform: rotate(45deg); }
summary:hover { background: var(--bg-3); }
.details-body { padding: 2px 17px 16px; border-top: 1px solid var(--line); }
.details-body > :first-child { margin-top: 13px; }
.details-body > :last-child { margin-bottom: 0; }

/* ── Table ───────────────────────────────────────────────────────────── */

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 460px; }
th, td { text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* ── Footer ──────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 52px;
  color: var(--dim);
  font-size: 14px;
}

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

@media (max-width: 640px) {
  .nav-links { gap: 15px; }
  .hero { padding: 50px 0 30px; }
  section { padding: 40px 0; }
}
