/* Only a screen that's on gets color. Everything else is paper, ink and aluminum,
   so the lit screens in the drawings are the only blue on the page. */
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --switch-off: #cfcdc6;
  --cable: #3a3a3e;
  --well: #eceae4;
  --line: #e4e2dc;
  --text: #1a1a1c;
  --muted: #66666b;
  --prose: #3a3a3e;
  --underline: #b9b7b0;
  --ink: #1a1a1c;
  --ink-press: #3a3a3e;
  --on-ink: #ffffff;
  --focus: #2f6fe6;
  --key: #f3f2ee;
  --key-line: #dcdad3;
  --key-text: #3a3a3e;
  --tag-line: #ecd9a2;
  --tag-text: #7d5800;
  --tag-bg: #fbf3dc;
  --yes: #1f7a3a;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1d;
    --surface: #232326;
    --switch-off: #434348;
    --cable: #5c5c62;
    --well: #29292c;
    --line: #333337;
    --text: #ececee;
    --muted: #a0a0a6;
    --prose: #c9cacf;
    --underline: #5a5a60;
    --ink: #ececee;
    --ink-press: #ffffff;
    --on-ink: #1b1b1d;
    --focus: #6fa0ff;
    --key: #2a2a2e;
    --key-line: #3c3c41;
    --key-text: #d4d5d9;
    --tag-line: #4a3f22;
    --tag-text: #e7c46a;
    --tag-bg: #2a2413;
    --yes: #7bd389;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--underline); }
a:hover { text-decoration-color: var(--text); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 10;
  background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { left: 16px; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 20px; }
.top nav a:hover { color: var(--text); }

/* Hero: short, so the features start above the fold */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 40px 0 64px;
}
h1, h2 { font-weight: 600; text-wrap: balance; }
h1 {
  font-size: clamp(34px, 4.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
.lede { color: var(--muted); font-size: 17px; margin: 0 0 24px; max-width: 32em; }
/* Two equal ways to install: most people who want this already use Homebrew */
.install { display: grid; gap: 10px; max-width: 520px; }
.install > * { min-height: 62px; }
.btn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 12px;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 18px 10px 20px; border-radius: 14px;
  font-weight: 600; text-decoration: none; font-size: 17px; line-height: 1.3;
}
.btn svg { display: block; }
.btn small { font: 12px var(--mono); opacity: .7; }
.btn:hover { background: var(--ink-press); }
.brew {
  display: flex; align-items: center; gap: 12px;
  background: var(--well); border: 1px solid var(--line); border-radius: 14px;
  padding: 9px 10px 9px 18px;
}
.brew code { flex: 1; min-width: 0; font: 12.5px/1.5 var(--mono); color: var(--text); overflow-wrap: anywhere; }
.brew code::before { content: "$ "; color: var(--muted); }
.brew button {
  flex: none; width: 38px; height: 38px; cursor: pointer;
  display: grid; place-items: center;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; padding: 0;
}
.brew button:hover { border-color: var(--muted); }
.brew .i-done, .brew .copied .i-copy { display: none; }
.brew .copied .i-done { display: block; }

/* Demos: a MacBook and a monitor. The window moves between screens. */
.demo { display: flex; flex-direction: column; align-items: center; gap: 22px; }
#hero-demo { width: 100%; max-width: 460px; justify-self: end; }
.demo svg { width: 100%; height: auto; display: block; overflow: visible; }
.lap-lit, .scene { transition: opacity .35s ease; }
.arrive { opacity: 0; transition: opacity .15s ease; }

/* Hero: the laptop screen goes dark and its window shows up on the monitor, like macOS does. */
#hero-demo[data-mode="external"] .lap-lit { opacity: 0; }
#hero-demo[data-mode="external"] .arrive { opacity: 1; transition-delay: .2s; }

/* Unplugged: the monitor goes dark and its window comes back to the laptop, whatever the mode. */
.cable { color: var(--cable); }
.mon-lit, .mon-off, .lap-arrive { transition: opacity .35s ease; }
.mon-off, .lap-arrive { opacity: 0; }
#hero-demo[data-plugged="false"] .mon-lit { opacity: 0; }
#hero-demo[data-plugged="false"] .mon-off,
#hero-demo[data-plugged="false"] .lap-lit { opacity: 1; }
#hero-demo[data-plugged="false"] .lap-arrive { opacity: 1; transition-delay: .2s; }

.plug { display: flex; align-items: center; gap: 10px; margin-top: -6px; font-size: 15px; cursor: pointer; }
.plug input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  position: relative; width: 22px; height: 22px; border-radius: 7px;
  background: var(--surface); border: 1.5px solid var(--switch-off);
  transition: background .15s, border-color .15s;
}
.plug input:hover { border-color: var(--muted); }
.plug input::before {
  content: ""; position: absolute; left: 6.5px; top: 2.5px;
  width: 5px; height: 10px;
  border: solid var(--on-ink); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(.4); opacity: 0;
  transition: transform .15s, opacity .15s;
}
.plug input:checked { background: var(--ink); border-color: var(--ink); }
.plug input:checked::before { transform: rotate(45deg) scale(1); opacity: 1; }

/* Input: with the monitor on another device, macOS moves the whole desktop to the laptop. */
#input-demo .lap-lit, #input-demo .scene { opacity: 0; }
#input-demo:not([data-mode="mac"]) .lap-lit,
#input-demo[data-mode="console"] .scene-console,
#input-demo[data-mode="pc"] .scene-pc { opacity: 1; }
/* Going straight from one device to another: the new scene fades in fully before the old one fades out. */
#input-demo.swap[data-mode="pc"] .scene-console,
#input-demo.swap[data-mode="console"] .scene-pc { transition-delay: .35s; }

.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 5px; width: min(380px, 100%);
}
.card .seg { background: var(--bg); width: min(420px, 100%); }
.seg button {
  background: transparent; color: var(--muted); border: 0;
  border-radius: 8px; padding: 9px 10px;
  font: 600 15px var(--sans); cursor: pointer;
  transition: background .2s, color .2s;
}
.seg button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
.seg button:not([aria-checked="true"]):hover { color: var(--text); }
.seg .port { display: block; font: 500 10.5px var(--mono); opacity: .9; letter-spacing: .02em; }
.status { color: var(--muted); font-size: 15px; margin: -8px 0 0; min-height: 1.5em; text-align: center; }

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(28px, 3.2vw, 34px); letter-spacing: -0.02em; margin: 0 0 16px; line-height: 1.15; }
#features h2 { margin-bottom: 28px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px;
}
.card.wide {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px; align-items: start;
}
#input-demo {
  /* Text and switch stay together, centred beside the drawing */
  grid-template-areas: ". art" "copy art" "ctrl art" ". art";
  grid-template-rows: 1fr auto auto 1fr;
  row-gap: 0;
}
#input-demo .copy { grid-area: copy; }
#input-demo .art { grid-area: art; align-self: center; }
#input-demo .ctrl { grid-area: ctrl; padding-top: 24px; }
#input-demo .status { text-align: left; margin: 10px 0 0; }
.card h3 { font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; margin: 0 0 10px; }
.card p { color: var(--muted); margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.card .note { font-size: 14px; }
.tag {
  display: inline-block; margin-bottom: 14px;
  border: 1px solid var(--tag-line); color: var(--tag-text); background: var(--tag-bg);
  border-radius: 99px; padding: 2px 10px;
  font: 500 11px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase;
}

.card.keyed { display: flex; flex-direction: column; }
.keys { display: flex; gap: 10px; margin-top: auto; padding-top: 22px; }
.key {
  width: 58px; height: 54px; border-radius: 9px;
  background: var(--key); border: 1px solid var(--key-line);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--key-text); font-size: 10px; letter-spacing: .03em;
}

.checks { list-style: none; margin: 0; padding: 0; color: var(--muted); }
.checks li { position: relative; padding-left: 24px; margin-bottom: 10px; }
.checks li:last-child { margin-bottom: 0; }
.checks li::before {
  content: ""; position: absolute; left: 4px; top: 5px;
  width: 5px; height: 10px;
  border: solid var(--text); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.facts {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px; align-items: center; margin-top: 72px;
}
.facts figure { margin: 0; }
.facts img { width: 100%; height: auto; border-radius: 16px; display: block; }
.facts figcaption { color: var(--muted); font-size: 14px; margin-top: 12px; }
/* Spec sheet: label on the left, value on the right, hairline rows */
.specs { margin: 0; border-top: 1px solid var(--line); font-size: 15px; }
.specs div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); font: 12px/1.9 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.specs dd { margin: 0; }

/* FAQ */
.faq { max-width: 760px; }
.faq h2 { margin-bottom: 20px; }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 18px 32px 18px 0;
  font-weight: 600; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 24px;
  width: 7px; height: 7px;
  border: solid var(--muted); border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); transition: transform .2s;
}
details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
details p { margin: 0 0 20px; color: var(--muted); max-width: 40em; }

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer .row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--muted); }
footer p { margin: 0 0 8px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Guide */
.crumbs { color: var(--muted); font-size: 14px; margin: 24px 0 0; }
.crumbs a { color: var(--muted); }
.prose { max-width: 720px; padding: 32px 0 72px; }
.prose h1 { font-size: clamp(32px, 4.4vw, 44px); }
.prose .meta { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.prose h2 { font-size: 26px; margin: 48px 0 12px; }
.prose h3 { font-size: 19px; margin: 28px 0 6px; }
.prose p, .prose li { color: var(--prose); }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose figure { margin: 28px 0; }
.prose img { width: 100%; height: auto; border-radius: 16px; display: block; }
.prose figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--muted); font-weight: 600; font-size: 13px; background: var(--surface); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }
td.yes { color: var(--yes); }
td.no { color: var(--muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 24px 0 48px; }
  #hero-demo { justify-self: center; }
  .features { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .card.wide { grid-template-columns: 1fr; gap: 28px; }
  #input-demo { grid-template-areas: "copy" "art" "ctrl"; grid-template-rows: auto; row-gap: 28px; }
  #input-demo .ctrl { padding-top: 0; }
  .facts { grid-template-columns: 1fr; gap: 40px; }
  section { padding: 48px 0; }
  .card h3 { font-size: 19px; }
  .top nav a { margin-left: 16px; }
  .top nav a[href="#features"] { display: none; }
}
@media (max-width: 520px) {
  /* Version line moves under the label */
  .btn { grid-template-columns: auto 1fr; }
  .btn svg { grid-row: span 2; }
  .specs div { grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.halo { opacity: .55; }
@media (prefers-color-scheme: dark) { .halo { opacity: .6; } }
