/* DuoShell website. Apple system fonts only (no web-font requests). Dark by design, to sit
   with the app's own dark screens. */

[hidden] { display: none !important; }

:root {
  --bg: #08090b;
  --bg-raised: #0d0f12;
  --surface: #121418;
  --surface-2: #181b20;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f1ec;
  --text-2: #c3c0b8;
  --muted: #8f8c85;
  --accent: #5fd4c6;
  --accent-ink: #03110f;
  --warn: #f0b45a;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-serif, "New York", "Iowan Old Style", Charter, "Times New Roman", Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1160px;
  --gutter: 24px;
  --radius: 18px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--sans); letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(95, 212, 198, 0.3); }
code, kbd, pre { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 0.08em 0.38em; border-radius: 6px; overflow-wrap: anywhere; color: var(--text); }
strong { font-weight: 600; color: var(--text); }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
h1, h2, .display { font-family: var(--display); font-weight: 500; letter-spacing: -0.022em; line-height: 1.04; margin: 0; color: var(--text); }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.3rem); line-height: 1.55; color: var(--text-2); max-width: 40em; }
.eyebrow { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--accent); margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 9, 11, 0.72); backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; gap: 26px; margin-right: auto; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 0.93rem; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--text); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 0.98rem/1 var(--sans); letter-spacing: -0.005em; text-decoration: none;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.button:hover { background: #20242a; border-color: rgba(255, 255, 255, 0.24); }
.button.primary { background: var(--text); color: #0a0b0d; border-color: transparent; }
.button.primary:hover { background: #ffffff; }
.button.small-pill { min-height: 36px; padding: 0 16px; font-size: 0.88rem; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link::after { content: " →"; }

/* Device frames: real screenshots inside a drawn bezel */
.device { position: relative; flex: 0 0 auto; }
.device img { width: 100%; }
.phone { width: var(--w, 300px); padding: calc(var(--w, 300px) * 0.034); border-radius: calc(var(--w, 300px) * 0.165); background: linear-gradient(160deg, #2a2d33, #0d0e10 40%, #1c1e22); box-shadow: 0 0 0 1px rgba(255,255,255,0.10) inset, 0 40px 80px -30px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,0,0,0.6); }
.phone img { border-radius: calc(var(--w, 300px) * 0.135); }
.tablet { width: var(--w, 520px); padding: calc(var(--w, 520px) * 0.026); border-radius: calc(var(--w, 520px) * 0.06); background: linear-gradient(160deg, #2a2d33, #0d0e10 45%, #1c1e22); box-shadow: 0 0 0 1px rgba(255,255,255,0.10) inset, 0 40px 90px -30px rgba(0,0,0,0.9); }
.tablet img { border-radius: calc(var(--w, 520px) * 0.038); }
.window { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 40px 80px -30px rgba(0,0,0,0.85); }
figure { margin: 0; }
figcaption { font-size: 0.84rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* Home: hero */
.hero { position: relative; padding: 96px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 55%; top: 34%; width: 900px; height: 700px; transform: translate(-50%, -20%);
  background: radial-gradient(closest-side, rgba(95, 212, 198, 0.13), rgba(95, 212, 198, 0) 70%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 26px; }
.hero .lead { margin-bottom: 34px; }
.hero .meta { margin-top: 22px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.01em; }
.hero-stage { position: relative; height: 740px; }
.hero-stage .tablet { --w: 600px; position: absolute; left: 200px; top: 0; }
.hero-stage .phone { --w: 320px; position: absolute; left: 0; top: 70px; }

/* Home: sections */
.band { padding: 128px 0; border-top: 1px solid var(--line); }
.band.raised { background: var(--bg-raised); }
.band-head { max-width: 760px; margin-bottom: 64px; }
.band-head h2 { margin-bottom: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split.top { align-items: start; }
.split.top > :first-child { position: sticky; top: 120px; }

.steps-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps-list > li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 4px 18px; padding: 26px 0; border-top: 1px solid var(--line); }
.steps-list > li:last-child { border-bottom: 1px solid var(--line); }
.steps-list > li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--mono); font-size: 0.85rem; color: var(--accent); padding-top: 3px; }
.steps-list h3 { margin: 0; font-size: 1.15rem; }
.steps-list p { margin: 0; color: var(--text-2); }

.pair-stage { position: relative; min-height: 560px; }
.pair-stage .window { position: absolute; left: 0; top: 30px; width: 88%; }
.pair-stage .phone { --w: 230px; position: absolute; right: 0; bottom: 0; }

.duo-row { display: flex; gap: 36px; justify-content: center; align-items: flex-start; }
.duo-row .phone { --w: 300px; }
.duo-row figure:nth-child(2) { margin-top: 80px; }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; margin-top: 72px; }
.feature-list p { margin: 0; color: var(--text-2); }

.spec { margin: 0; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 4px; }
.spec dd { margin: 0; color: var(--text-2); }
.spec dd strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

.mac-figure .window { max-width: 760px; margin: 0 auto; }
.closing { text-align: center; }
.closing h2 { margin: 0 auto 20px; max-width: 14em; }
.closing .lead { margin: 0 auto 36px; }
.closing .buttons { justify-content: center; }

/* Inner pages */
.page-head { padding: 88px 0 48px; border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 18px; }
.prose { color: var(--text-2); }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 64px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--muted); }

/* Help */
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 72px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: 0.9rem; }
.toc p { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 0; color: var(--text-2); text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 0.75rem; color: var(--muted); padding-top: 2px; }
.toc a:hover, .toc a.current { color: var(--text); }
.toc a.current::before { color: var(--accent); }
.guide { padding: 0 0 72px; margin: 0 0 72px; border-bottom: 1px solid var(--line); max-width: 760px; }
.guide:last-child { border-bottom: 0; }
.guide h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 18px; }
.guide h2 .num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); display: block; letter-spacing: 0.04em; margin-bottom: 12px; }
.guide p, .guide li { color: var(--text-2); }
.steps { list-style: none; margin: 18px 0; padding: 0; counter-reset: s; }
.steps > li { counter-increment: s; position: relative; padding-left: 40px; margin: 12px 0; color: var(--text-2); }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--text); font: 600 0.8rem/24px var(--sans); text-align: center; }
.figures { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; margin: 32px 0 8px; }
.figures .phone { --w: 236px; }
.figures .tablet { --w: 400px; }
.note { border: 1px solid var(--line); background: var(--surface); padding: 16px 20px; border-radius: 14px; margin: 20px 0; color: var(--text-2); }
.note.warn { border-color: rgba(240, 180, 90, 0.35); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 500; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.03em; background: var(--surface); }
td:first-child { color: var(--text); min-width: 200px; }

/* FAQ */
.faq-group { margin-bottom: 56px; }
.faq-group h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 12px; }
details { border-bottom: 1px solid var(--line); }
.faq-group h2 + details { border-top: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; font-weight: 600; font-size: 1.04rem; color: var(--text); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; display: inline-block; font: 300 1.5rem/1 var(--sans); color: var(--muted); transition: transform 0.25s; flex: 0 0 auto; }
details[open] summary::after { transform: rotate(45deg); color: var(--text); }
details > p { margin: -4px 0 22px; color: var(--text-2); max-width: 46em; }

/* Mac page */
.download-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 28px 32px; margin: 48px 0 72px; }
.download-card .meta { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); line-height: 1.7; }
.checksum { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 64px; margin-top: 0; color: var(--muted); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.04em; color: var(--muted); margin: 4px 0 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0 0 10px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-note { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Reveal on scroll (only when JS runs, and never with reduced motion) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1); }
.js [data-reveal].shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* Responsive */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { height: 640px; max-width: 640px; }
  .hero-stage .tablet { --w: 480px; left: 180px; }
  .split { grid-template-columns: 1fr; gap: 56px; }
  .split.flip > :first-child { order: 0; }
  .split.top > :first-child { position: static; }
  .help-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 56px; }
}
@media (max-width: 720px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  .header-inner { flex-wrap: wrap; gap: 0 16px; padding-top: 10px; }
  .header-inner .button { margin-left: auto; }
  .nav { order: 3; width: 100%; gap: 22px; padding: 6px 0 10px; }
  .hero { padding: 56px 0 24px; }
  .hero-stage { height: 560px; }
  .hero-stage .tablet { display: none; }
  .hero-stage .phone { --w: 260px; left: 50%; transform: translateX(-50%); }
  .band { padding: 88px 0; }
  .band-head { margin-bottom: 40px; }
  .pair-stage { min-height: 0; display: grid; gap: 24px; }
  .pair-stage .window, .pair-stage .phone { position: static; width: 100%; }
  .pair-stage .phone { --w: 220px; margin: 0 auto; }
  .duo-row { gap: 16px; }
  .duo-row .phone { --w: 46vw; }
  .duo-row figure:nth-child(2) { margin-top: 40px; }
  .feature-list { grid-template-columns: 1fr; gap: 28px; margin-top: 48px; }
  .spec > div { grid-template-columns: 1fr; gap: 6px; }
  .figures { gap: 20px; }
  .figures .phone { --w: 42vw; }
  .figures .tablet { --w: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .download-card { padding: 22px; }
  .page-head { padding: 56px 0 36px; margin-bottom: 40px; }
}

/* FAQ tools: search and topic chips (shown only when site.js runs) */
.faq-tools { margin: -8px 0 48px; }
.faq-tools .search { position: relative; color: var(--muted); }
.faq-tools .search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); }
#faq-search { width: 100%; height: 52px; padding: 0 20px 0 48px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 400 1rem var(--sans); outline: none; -webkit-appearance: none; appearance: none; }
#faq-search::placeholder { color: var(--muted); }
#faq-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(95, 212, 198, 0.18); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font: 500 0.88rem var(--sans); cursor: pointer; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.28); }
.chip[aria-pressed="true"] { background: var(--text); color: #0a0b0d; border-color: transparent; }
.faq.filtering .faq-group h2 { display: none; }
.faq.filtering .faq-group { margin-bottom: 0; }
.faq.filtering .faq-group h2 + details { border-top: 0; }
.faq-empty { color: var(--text-2); padding: 24px 0; }
.faq-group[data-group="top"] h2 { color: var(--accent); }
@media (max-width: 720px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 16px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
}

/* Changelog: a timeline, newest first */
.changelog { padding-bottom: 96px; }
.tl-filter { margin: 0 0 40px; }
.timeline { position: relative; padding-left: 36px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 24px; width: 2px; border-radius: 2px; background: linear-gradient(to bottom, var(--accent), var(--line-strong) 18%, var(--line) 100%); }
.tl-group + .tl-group { margin-top: 56px; }
.tl-day { position: relative; font: 500 0.78rem/1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.tl-day::before { content: ""; position: absolute; left: -33px; top: 50%; width: 14px; height: 2px; margin-top: -1px; background: var(--line-strong); }
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-entry { position: relative; margin: 0 0 18px; padding: 22px 24px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tl-entry::before { content: ""; position: absolute; left: -33px; top: 27px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); }
.tl-entry[data-kind="app"]::before { border-color: var(--accent); }
.tl-entry[data-kind="mac"]::before { border-color: #a9b4ff; }
.tl-entry[data-kind="web"]::before { border-color: var(--warn); }
.tl-entry.latest::before { background: var(--accent); box-shadow: 0 0 0 6px rgba(95, 212, 198, 0.16); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; font: 500 0.78rem/1.2 var(--mono); color: var(--muted); }
.tl-tag { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); }
.tl-tag.app { border-color: rgba(95, 212, 198, 0.4); color: var(--accent); }
.tl-tag.mac { border-color: rgba(169, 180, 255, 0.4); color: #a9b4ff; }
.tl-tag.web { border-color: rgba(240, 180, 90, 0.4); color: var(--warn); }
.tl-entry h3 { font-size: 1.22rem; color: var(--text); margin: 0 0 10px; }
.tl-entry ul { margin: 0; padding-left: 1.2em; color: var(--text-2); }
.tl-entry li { margin: 7px 0; }
.tl-entry li::marker { color: var(--muted); }
.tl-entry code { font-size: 0.86em; }
.tl-empty { color: var(--muted); }
@media (max-width: 720px) {
  .tl-filter { margin: 0 calc(-1 * var(--gutter)) 32px; }
  .timeline { padding-left: 26px; }
  .timeline::before { left: 5px; }
  .tl-day::before { left: -23px; width: 10px; }
  .tl-entry { padding: 18px 18px 16px; }
  .tl-entry::before { left: -26px; top: 23px; }
}
