/* roundtrip website. One idea carries the page: a request is a ticket with an
   outbound half (the file) and a return half (the response). Everything else stays quiet. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-display: swap;
}
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #eceff6;      /* page */
  --card: #ffffff;       /* ticket stock */
  --stub: #e3e8f7;       /* tinted stub side */
  --ink: #151a2e;
  --ink2: #474f66;
  --rule: #c9d0e0;
  --brand: #3b56e6;
  --on-brand: #ffffff;
  --ok: #12703a;
  --get: #12703a;
  --key: #4338ca;
  --str: #12703a;
  --num: #9a5b00;
  --del: #b42318; --del-bg: #fde8e6;
  --add: #12703a; --add-bg: #e3f5e9;
  --lift: 0 1px 0 rgba(21, 26, 46, 0.04), 0 18px 40px -18px rgba(21, 26, 46, 0.25);
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1017; --card: #161b26; --stub: #1d2433;
    --ink: #e8ebf2; --ink2: #a9b1c2; --rule: #2e3647;
    --brand: #8aa4ff; --on-brand: #0d1017;
    --ok: #4ade80; --get: #4ade80; --key: #a5b4fc; --str: #86efac; --num: #fcd34d;
    --del: #fca5a5; --del-bg: rgba(248, 113, 113, 0.13);
    --add: #86efac; --add-bg: rgba(74, 222, 128, 0.12);
    --lift: 0 1px 0 rgba(0, 0, 0, 0.3), 0 24px 50px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }
a { color: var(--brand); text-underline-offset: 2px; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.88em; background: var(--stub); padding: 0.08em 0.35em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
section { padding-block: clamp(56px, 8vw, 104px); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--rule); background: var(--card); color: var(--ink);
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink2); }
.btn.primary { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn kbd { font-size: 12px; opacity: 0.7; }
.btn.pending { cursor: default; color: var(--ink2); background: transparent; border-style: dashed; font-weight: 500; }
.btn.pending:hover { border-color: var(--rule); }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.mark { width: 28px; height: 28px; flex: none; }
.mark rect { fill: var(--brand); }
.mark path { fill: none; stroke: var(--on-brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a:not(.btn) { color: var(--ink2); text-decoration: none; font-size: 15px; }
.nav nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) { .nav nav a:not(.btn) { display: none; } }

/* hero */
.hero { padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 88px); }
.hero h1 {
  font-size: clamp(44px, 7.6vw, 96px); line-height: 0.95; letter-spacing: -0.045em; font-weight: 800;
  max-width: 11ch; text-wrap: balance;
}
.lede { margin-top: 24px; max-width: 34em; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* the ticket */
.ticket { margin: clamp(44px, 6vw, 72px) 0 0; background: var(--card); border-radius: 18px; box-shadow: var(--lift); overflow: hidden; }
.ticket-route {
  display: flex; align-items: center; gap: 14px; padding: 14px 22px;
  border-bottom: 1px solid var(--rule); font: 500 13px/1 var(--mono); color: var(--ink2);
}
.route { position: relative; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--rule) 0 6px, transparent 6px 11px); }
.route::before, .route::after { content: ""; position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink2); }
.route::before { left: 0; } .route::after { right: 0; }
.plane { position: absolute; top: -5px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); opacity: 0; }
.send { margin-left: 8px; }

.halves { display: grid; grid-template-columns: 1fr 34px 1fr; }
.half { padding: 22px 26px 28px; min-width: 0; }
.back { background: var(--stub); }
.leg { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; font-weight: 650; font-size: 15px; margin-bottom: 14px; }
.file, .status { font: 400 13px/1.4 var(--mono); color: var(--ink2); }
.status b { color: var(--ok); font-weight: 600; margin-right: 6px; }
.code { margin: 0; font-size: clamp(13px, 1.25vw, 15px); line-height: 1.7; white-space: pre; overflow-x: auto; color: var(--ink); }
.k { color: var(--key); } .s { color: var(--str); } .n { color: var(--num); } .m-get { color: var(--get); font-weight: 600; }
.checks { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--rule); font: 14px/1.9 var(--mono); }
.tick { color: var(--ok); font-weight: 600; margin-right: 6px; }

/* perforation: dashed tear line with a notch punched at each edge */
.perf { position: relative; background: linear-gradient(90deg, var(--card) 50%, var(--stub) 50%); }
.perf::before { content: ""; position: absolute; inset: 0 auto 18px 50%; border-left: 2px dashed var(--rule); transform: translateX(-1px); }
.perf::after {
  content: ""; position: absolute; left: 50%; width: 28px; height: 28px; bottom: -14px; transform: translateX(-50%);
  background: radial-gradient(circle, var(--paper) 13px, transparent 14px);
}

/* the one moment: the response arrives */
.ticket.waiting .back .leg .status, .ticket.waiting .reveal { opacity: 0; transform: translateY(6px); }
.ticket .back .leg .status, .ticket .reveal { transition: opacity 0.45s ease, transform 0.45s ease; }
.ticket .checks.reveal { transition-delay: 0.18s; }
.ticket.flying .plane { opacity: 1; animation: trip 1.1s cubic-bezier(.55, 0, .45, 1) forwards; }
@keyframes trip { 0% { left: 0; } 50% { left: calc(100% - 12px); } 100% { left: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ticket.flying .plane { animation: none; opacity: 0; }
  .ticket .back .leg .status, .ticket .reveal { transition: none; }
}

@media (max-width: 760px) {
  .ticket-route .stop:last-of-type { display: none; }
  .send kbd { display: none; }
  .halves { grid-template-columns: 1fr; grid-template-rows: auto 30px auto; }
  .perf { background: linear-gradient(180deg, var(--card) 50%, var(--stub) 50%); }
  .perf::before { inset: 50% 14px auto 14px; border-left: 0; border-top: 2px dashed var(--rule); transform: translateY(-1px); }
  .perf::after {
    left: -14px; right: -14px; top: 50%; bottom: auto; width: auto; height: 28px; transform: translateY(-50%);
    background: radial-gradient(circle, var(--paper) 13px, transparent 14px) left / 28px 28px no-repeat,
                radial-gradient(circle, var(--paper) 13px, transparent 14px) right / 28px 28px no-repeat;
  }
  .half { padding: 20px; }
}

/* three differences, separated like ticket coupons */
.differences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding-top: 0; }
.differences .row { padding: 28px 28px 0 0; border-top: 2px dashed var(--rule); }
.differences .row + .row { padding-left: 28px; border-left: 1px solid var(--rule); }
.differences p { margin-top: 10px; color: var(--ink2); max-width: 34em; }
@media (max-width: 860px) {
  .differences { grid-template-columns: 1fr; gap: 28px; }
  .differences .row, .differences .row + .row { padding: 24px 0 0; border-left: 0; }
}

/* how it works */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; border-top: 1px solid var(--rule); }
.how-text > p { margin-top: 16px; color: var(--ink2); max-width: 32em; }
.facts { margin: 32px 0 0; display: grid; gap: 18px; }
.facts dt { font-weight: 650; }
.facts dd { margin: 4px 0 0; color: var(--ink2); }
.how-files { display: grid; gap: 16px; }
.tree, .diff { margin: 0; background: var(--card); border-radius: 14px; padding: 20px 22px; font-size: 14px; line-height: 1.75; overflow-x: auto; box-shadow: var(--lift); }
.dir { font-weight: 600; }
.note { color: var(--ink2); font-size: 12.5px; }
.diff { padding: 0 0 12px; white-space: pre; }
.diff .ln { display: inline-block; width: 100%; padding-inline: 22px; }
.diff .meta { padding-block: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); color: var(--ink2); font-size: 13px; }
.diff .del { background: var(--del-bg); color: var(--del); }
.diff .add { background: var(--add-bg); color: var(--add); }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; } }

/* postman */
.postman { border-top: 1px solid var(--rule); }
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 52px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font: 600 15px/1 var(--mono); color: var(--brand); border: 2px solid var(--brand);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: 48px; right: -16px; border-top: 2px dashed var(--rule); }
.steps p { margin-top: 8px; color: var(--ink2); }
.aside { margin-top: 36px; max-width: 46em; color: var(--ink2); font-size: 15px; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .steps li:not(:last-child)::after { display: none; }
}

/* download: each platform is a ticket stub */
.download { border-top: 1px solid var(--rule); }
.os-note { margin-top: 14px; color: var(--ink2); }
.stubs { display: grid; gap: 16px; margin-top: 32px; }
.stub { display: grid; grid-template-columns: minmax(0, 1fr) 190px; background: var(--card); border-radius: 16px; box-shadow: var(--lift); overflow: hidden; }
.stub-main { padding: 24px 28px; }
.stub-main > p { margin-top: 6px; color: var(--ink2); max-width: 40em; }
.stub-main .req { margin-top: 10px; font: 13px/1.4 var(--mono); }
.cmd { margin: 16px 0 0; padding: 12px 16px; background: var(--stub); border-radius: 10px; font-size: 15px; overflow-x: auto; width: fit-content; max-width: 100%; }
.cmd code { background: none; padding: 0; font-size: inherit; }
.stub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.stub-side {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px;
  padding: 20px 24px; background: var(--stub); border-left: 2px dashed var(--rule);
}
.state { font: 600 13px/1 var(--mono); padding: 7px 10px; border-radius: 999px; border: 1.5px solid currentColor; }
.state.now { color: var(--ok); }
.state.next { color: var(--brand); }
.state.later { color: var(--ink2); }
.ver { font: 13px/1 var(--mono); color: var(--ink2); }
.stub.yours { box-shadow: 0 0 0 2px var(--brand), var(--lift); }
.stub.yours h3::after { content: "Your computer"; margin-left: 10px; font: 500 12px/1 var(--mono); color: var(--brand); vertical-align: 3px; }
.stub:not([data-os="chrome"]) h3, .stub:not([data-os="chrome"]) .stub-main > p { color: var(--ink2); }
.stub:not([data-os="chrome"]) h3 { color: var(--ink); }
.cli { margin-top: 28px; color: var(--ink2); max-width: 46em; }
@media (max-width: 640px) {
  .stub { grid-template-columns: minmax(0, 1fr); }
  .stub-actions .btn { white-space: normal; height: auto; min-height: 44px; padding-block: 10px; line-height: 1.3; }
  .stub-side { flex-direction: row; align-items: center; border-left: 0; border-top: 2px dashed var(--rule); padding: 14px 28px; }
  .stub-main { padding: 22px; }
}

.install { margin-top: 16px; max-width: 46em; }
.install summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 15px; width: fit-content; }
.install > p:first-of-type { margin-top: 12px; }
.install ol { margin: 10px 0 0; padding-left: 22px; color: var(--ink2); }
.install li + li { margin-top: 6px; }
.install strong { color: var(--ink); }
.install p { margin-top: 10px; color: var(--ink2); font-size: 15px; }

/* faq */
.faq { border-top: 1px solid var(--rule); max-width: 820px; margin-inline: auto; }
.faq h2 { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative; font-weight: 650; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 26px/1 var(--mono); color: var(--ink2); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink2); max-width: 40em; }

/* footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 36px 48px; border-top: 1px solid var(--rule); color: var(--ink2); font-size: 14px; }
.brand.small { font-size: 15px; gap: 8px; }
.brand.small .mark { width: 22px; height: 22px; }
.foot nav { display: flex; gap: 20px; }
.foot nav a { color: var(--ink2); }
.fine { flex-basis: 100%; font-size: 13px; }

/* privacy page */
.doc { max-width: 720px; padding-block: 32px 80px; }
.doc h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.035em; line-height: 1; font-weight: 800; }
.doc .updated { margin-top: 14px; color: var(--ink2); font: 14px/1.4 var(--mono); }
.doc h2 { font-size: 24px; margin-top: 44px; }
.doc p, .doc ul { margin-top: 12px; color: var(--ink2); }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--ink); }
