/* Terminal palette mirrored from ImageAscii2/TerminalDesign.swift (Theme). */
:root {
  --bg: #000000;
  --surface: #070A08;
  --surface-raised: #0E1410;
  --line: #24382B;
  --text-hi: #E4F2E8;
  --text-mid: #93A998;
  --text-lo: #6C8272;
  --accent: #4DF28A;
  --amber: #F2A93B;
  --accent-soft: rgba(77, 242, 138, 0.12);
  --on-accent: #021207;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--text-hi); font-family: var(--mono);
  font-size: 15px; line-height: 1.6; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--mono); font-weight: 700; letter-spacing: -0.03em; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.08; }
h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.12; }
h3 { font-size: 18px; line-height: 1.3; }
.accent { color: var(--accent); }
.cursor::after { content: "\2590"; color: var(--accent); animation: blink 1.1s steps(1) infinite; margin-left: 4px; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor::after { animation: none; } }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.eyebrow::before { content: "> "; color: var(--text-lo); }
.lede { font-size: 16px; color: var(--text-mid); max-width: 520px; margin-top: 18px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }

nav { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.brand-mark { display: block; width: 30px; height: 30px; border-radius: 0; border: 1px solid var(--line); }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 13px; color: var(--text-mid); }
.nav-links a:hover { color: var(--text-hi); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 21px; border-radius: 0;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-family: var(--mono);
  font-size: 14px; font-weight: 700; transition: transform .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn.small { padding: 7px 13px; font-size: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.final .btn-row { justify-content: center; margin-top: 0; }
.store {
  flex: 0 1 232px; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 16px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  transition: transform .2s ease, filter .2s ease;
}
.store:hover { transform: translateY(-2px); filter: brightness(1.08); }
.store.alt { background: transparent; color: var(--accent); }
.store svg { width: 26px; height: 26px; flex-shrink: 0; }
.store .kicker { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.store .name { display: block; font-size: 16px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.nav-links .btn:hover { color: var(--on-accent); }

/* Placeholder device frame (iPhone proportions):
   956px body, 11px bezel, 934px screen; every length is a cqw/percentage of the device width. */
.device {
  container-type: inline-size; position: relative; flex-shrink: 0;
  width: min(100%, 300px); aspect-ratio: 956 / 2052;
  border-radius: 14.23% / 6.63%; background: #090b0e;
  box-shadow: inset 0 0 0 0.105cqw #4d5159, 0 0 0 0.209cqw #1f2227, 0 24px 60px rgba(0, 0, 0, 0.5);
}
.screen {
  position: absolute; left: 1.151cqw; top: 0.536%; width: 97.699%; height: 98.928%;
  border-radius: 13.38% / 6.16%; background: var(--bg); overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4cqw;
}
.screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.screen pre {
  margin: 0; font-family: var(--mono); font-size: 2.6cqw; line-height: 1.05; letter-spacing: 0;
  color: var(--accent); text-align: left; white-space: pre; user-select: none;
}
.screen .ph {
  position: absolute; bottom: 9cqw; left: 50%; transform: translateX(-50%);
  font-size: 3.2cqw; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-lo);
  border: 1px dashed var(--line); padding: 1.2cqw 3cqw; border-radius: 0; white-space: nowrap;
}
.device .isl, .device .home, .device .hw { position: absolute; display: block; }
.device .isl {
  z-index: 2; top: 1.81%; left: 50%; transform: translateX(-50%);
  width: 25.2%; height: 4.11%; border-radius: 100px; background: #020304;
}
.device .home {
  z-index: 2; left: 50%; transform: translateX(-50%); bottom: 2.929cqw;
  width: 31.76%; height: 0.837cqw; border-radius: 100px; background: #b7bcc6; opacity: 0.7;
}
.device .hw { width: 0.628cqw; background: #363a42; border: 1px solid #777b82; border-radius: 3px; }
.device .action { left: -0.733cqw; top: 16%; height: 2.9%; }
.device .vol-up { left: -0.733cqw; top: 23%; height: 5.35%; }
.device .vol-down { left: -0.733cqw; top: 30%; height: 5.35%; }
.device .power { right: -0.733cqw; top: 25%; height: 7.56%; }

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding-block: 40px 96px; }
.hero-note { margin-top: 16px; font-size: 12px; color: var(--text-mid); }
.hero-devices { display: flex; justify-content: center; align-items: flex-start; gap: 20px; }
.hero-devices .device { width: min(46%, 300px); }
.hero-devices .device:nth-child(2) { margin-top: 56px; }
.hero > *, .split > * { min-width: 0; }

section.block { padding-block: 80px; }
.section-head.center .lede { margin-inline: auto; max-width: 600px; }

/* Device lineup: the laptop, iPad and iPhone are sized as percentages of the lineup so the whole group scales as one. */
.lineup { container-type: inline-size; position: relative; max-width: 1040px; margin: 0 auto; aspect-ratio: 100 / 52; }
.laptop { container-type: inline-size; position: absolute; left: 0; top: 0; width: 76%; filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.55)); }
.lid { padding: 0.9cqw; border-radius: 2cqw 2cqw 0.4cqw 0.4cqw; background: #050607; box-shadow: inset 0 0 0 0.12cqw #4a4f58, 0 0 0 0.2cqw #23272d; }
.display { aspect-ratio: 16 / 10; display: flex; flex-direction: column; overflow: hidden; border-radius: 0.8cqw;
  background: radial-gradient(70% 90% at 15% 0%, #2b1752, transparent), radial-gradient(60% 80% at 100% 100%, #0d3a28, transparent), #07080b; }
.menubar { height: 1.8cqw; background: rgba(0, 0, 0, 0.4); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.desk { flex: 1; display: grid; place-items: center; min-height: 0; }
.base { width: 108%; height: 1.6cqw; margin-left: -4%; border-radius: 0 0 2.4cqw 2.4cqw;
  background: linear-gradient(#aeb3bb, #5d626b); box-shadow: inset 0 0.15cqw 0 #d8dce2; }
.tablet { --k: 0.31; container-type: inline-size; position: absolute; right: 0; top: 4%; width: calc(var(--k) * 100%); aspect-ratio: 100 / 75.7;
  padding: calc(1.38cqw * var(--k)); border-radius: calc(3.78cqw * var(--k)); background: #090b0e;
  box-shadow: inset 0 0 0 calc(0.2cqw * var(--k)) #4d5159, 0 0 0 calc(0.3cqw * var(--k)) #1f2227, 0 24px 60px rgba(0, 0, 0, 0.6); }
.tablet-screen { height: 100%; border-radius: 2.4cqw; overflow: hidden; background: var(--bg); }
.tablet-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lineup .lineup-phone { position: absolute; left: 77%; bottom: 0; width: 13.5%; z-index: 2; }

/* Mac window proportions from the App Store Mac slide (AppStore/screenshots/template/config.json):
   56px title bar, 30px corner radius and 16px traffic lights on a 1560px-wide window. */
.mac-window {
  container-type: inline-size; width: 78%; overflow: hidden;
  border-radius: 1.923cqw; background: var(--line);
  box-shadow: 0 0 0 1px #3a404d, 0 12px 30px rgba(0, 0, 0, 0.5);
}
.mac-window .titlebar {
  height: 3.59cqw; background: #1c1f24; border-bottom: 1px solid #000;
  display: flex; align-items: center; gap: 0.897cqw; padding-left: 1.41cqw;
}
.mac-window .titlebar i { display: block; width: 1.026cqw; height: 1.026cqw; border-radius: 50%; }
.mac-window .titlebar i:nth-child(1) { background: #ff5f57; }
.mac-window .titlebar i:nth-child(2) { background: #febc2e; }
.mac-window .titlebar i:nth-child(3) { background: #28c840; }
.mac-window img { display: block; width: 100%; height: auto; }

.platforms { list-style: none; padding: 0; margin: 56px auto 0; max-width: 720px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--surface); }
.platforms li { padding: 16px 20px; display: grid; gap: 2px; }
.platforms li + li { border-left: 1px solid var(--line); }
.platforms b { font-size: 14px; }
.platforms span { font-size: 12px; color: var(--text-mid); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.flip > :first-child { order: 2; }
.stage { display: flex; justify-content: center; }
.stage .device { width: min(70%, 320px); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-inline: auto; }

.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; max-width: 520px; }
.points li { color: var(--text-mid); padding-left: 22px; position: relative; }
.points li::before { content: "$"; position: absolute; left: 0; color: var(--accent); }
.points b { color: var(--text-hi); font-weight: 700; }

.tag-pro { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(242, 169, 59, 0.55); background: rgba(242, 169, 59, 0.14); padding: 1px 8px; border-radius: 0; vertical-align: 1px; margin-left: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip { padding: 6px 12px; border-radius: 0; font-size: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text-mid); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: 32px; }
.plan.pro { border-color: var(--accent); }
.plan .sub { font-size: 13px; color: var(--text-mid); margin-top: 6px; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; font-size: 14px; color: var(--text-mid); }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.plan li::before { content: "+"; color: var(--accent); font-weight: 700; }
.plan li b { color: var(--text-hi); font-weight: 700; }
.plan-note { margin-top: 20px; font-size: 12px; color: var(--text-lo); text-align: center; }

.final { text-align: center; padding-block: 88px 96px; border-top: 1px solid var(--line); }
.final .lede { margin: 16px auto 32px; }
.final-icon { display: block; width: 96px; height: 96px; margin: 0 auto 32px; border: 1px solid var(--line); }

footer { border-top: 1px solid var(--line); padding-block: 28px 44px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 12px; color: var(--text-mid); }
footer .links { display: flex; gap: 20px; }
footer a:hover { color: var(--text-hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 0; }

/* Document pages (privacy, support) */
.doc { max-width: 720px; margin: 0 auto; padding: 24px 24px 64px; }
.doc h1 { font-size: 30px; margin-bottom: 8px; }
.doc h2 { font-size: 20px; margin: 40px 0 8px; color: var(--accent); }
.doc h3 { font-size: 15px; margin: 24px 0 4px; }
.doc p, .doc ul { margin: 0 0 12px; color: var(--text-mid); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--text-hi); }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc .meta { color: var(--text-lo); margin-bottom: 24px; }
.doc .summary { background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: 16px 20px; }
.doc .summary ul { margin: 0; }
.doc .todo { background: var(--accent-soft); color: var(--accent); padding: 0 4px; border-radius: 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--text-hi); }
.faq details p { margin-top: 10px; }

@media (max-width: 880px) {
  .hero, .split, .compare { grid-template-columns: 1fr; }
  .split { gap: 40px; }
  .split.flip > :first-child { order: 0; }
  .hero { padding-top: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .stage .device { width: min(72%, 300px); }
  .platforms { margin-top: 32px; }
  .platforms li { padding: 12px 14px; }
  .hero-devices .device:nth-child(2) { margin-top: 32px; }
}

@media (max-width: 600px) {
  .lineup { aspect-ratio: auto; display: grid; grid-template-columns: 66% 1fr; gap: 24px 4%; align-items: end; }
  .lineup .laptop, .lineup .tablet, .lineup .lineup-phone { position: relative; inset: auto; }
  .lineup .laptop { grid-column: 1 / -1; grid-row: 1; width: 100%; }
  .lineup .tablet { --k: 0.66; grid-column: 1; grid-row: 2; width: 100%; }
  .lineup .lineup-phone { grid-column: 2; grid-row: 2; width: 100%; }
}

@media (max-width: 520px) {
  .store { flex-basis: 100%; }
}
