/* Swoop landing page. Every value comes from tokens.css. */

.sprite { display: none; }
.wrap { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }

.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); background: var(--ink); color: var(--ink-inverse);
}
.skip:focus { top: var(--s-3); }

/* ---------- brand mark ---------- */
.mark { width: 28px; height: 28px; flex: none; }
.mark-tile { fill: var(--accent); }
.mark-line { fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: var(--s-6); height: 100%; max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 650; font-size: var(--text-md); letter-spacing: var(--tracking-title); text-decoration: none; }
.nav-links { display: flex; gap: var(--s-1); }
.nav-links a {
  padding: var(--s-1) var(--s-3); border-radius: var(--r-full); color: var(--ink-2);
  font-size: var(--text-sm); font-weight: 500; text-decoration: none; transition: color var(--t-fast), background-color var(--t-fast);
}
.nav-links a:hover { color: var(--ink); background: var(--bg-sunken); }
.nav-end { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.nav-cta { --h: 34px; padding: 0 var(--s-4); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-full); color: var(--ink-2);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--ink); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* GitHub star: an outlined split pill, the same height as the Download button; the count sits in its own segment */
.star {
  display: inline-flex; align-items: stretch; height: 34px;
  border-radius: var(--r-full); overflow: hidden; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--text-sm); font-weight: 550; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-fast), transform var(--t-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.star:hover { background: var(--bg-sunken); }
.star:active { transform: scale(0.97); }
.star:focus-visible { border-radius: var(--r-full); }
.star-mark { width: 16px; height: 16px; align-self: center; margin-left: var(--s-3); fill: currentColor; flex: none; }
.star-text { display: inline-flex; align-items: center; padding: 0 var(--s-3) 0 6px; }
.star-n {
  display: none; align-items: center; justify-content: center; min-width: 34px; padding: 0 var(--s-3) 0 10px;
  border-left: 1px solid var(--line-strong); color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums;
}
.star.has-count .star-n { display: inline-flex; animation: star-in 360ms var(--ease-out) both; }
@keyframes star-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .star.has-count .star-n { animation: none; } }
@media (max-width: 760px) {
  .star-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .star-mark { margin-right: var(--s-3); }
  .star.has-count .star-mark { margin-right: var(--s-2); }
}
@media (max-width: 420px) {
  .nav-in { gap: var(--s-3); }
  .nav-cta { display: none; }
}

/* ---------- hero ---------- */
/* text widths are in em, not ch: a ch is the width of "0" in whichever font is showing, so ch widths
   jump when Geist replaces the fallback font and the text re-wraps (layout shift) */
.hero { padding: var(--s-20) 0 var(--s-16); }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: var(--s-5); padding: var(--s-1) var(--s-3); border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent-text); font-size: var(--text-sm); font-weight: 550;
}
.hero h1 {
  max-width: 10.3em; font-size: var(--text-2xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); font-weight: 650;
}
.lede { max-width: 39.8em; margin-top: var(--s-5); color: var(--ink-2); font-size: var(--text-lg); line-height: var(--leading-snug); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-8); }

.demo-wrap { margin-top: var(--s-12); }
.demo {
  border-radius: var(--r-xl); background: var(--bg-raised); box-shadow: var(--shadow-float); overflow: hidden; overflow: clip;
  outline: 1px solid var(--line); outline-offset: -1px;
}
.demo-head { display: flex; align-items: center; gap: var(--s-3); height: 40px; padding: 0 var(--s-4); background: var(--bg-sunken); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.demo-title { color: var(--ink-3); font-size: var(--text-xs); font-weight: 500; }
.demo-editor { height: clamp(440px, 68vh, 660px); }
.demo-editor:not(.se) { display: grid; place-items: center; background: var(--stage); }
.demo-cap { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--text-sm); text-align: center; }
@media (max-width: 640px) {
  .hero { padding-top: var(--s-12); }
  .demo-editor { height: 460px; }
  .demo-wrap { padding: 0 var(--s-3); }
}

/* ---------- bands ---------- */
.band { padding: var(--s-24) 0; }
.band-alt { background: var(--bg-sunken); }
.band-ink { background: var(--ink); color: var(--ink-inverse); }
.band h2 { font-size: var(--text-xl); line-height: 1.1; letter-spacing: var(--tracking-display); max-width: 12.3em; }
.band-ink .kicker, .band-ink .text-link { color: var(--accent-on-inverse); }
.band-ink p { color: color-mix(in srgb, var(--ink-inverse) 78%, transparent); }
.band-ink ::selection { color: var(--ink-inverse); }
@media (max-width: 640px) { .band { padding: var(--s-16) 0; } }

.kicker {
  display: inline-flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3);
  color: var(--accent-text); font-size: var(--text-sm); font-weight: 600;
}
.kicker .ico { width: 18px; height: 18px; }
.head-center { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: var(--s-12); }
.head-center h2 { max-width: 15em; }
.sub { margin-top: var(--s-3); max-width: 37em; color: var(--ink-2); font-size: var(--text-md); }
.text-link { color: var(--accent-text); font-weight: 550; text-underline-offset: 3px; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-16); align-items: center; }
.split-rev > :first-child { order: 2; }
.split-copy > p { margin-top: var(--s-4); max-width: 37em; color: var(--ink-2); font-size: var(--text-md); }
.band-ink .split-copy > p { color: color-mix(in srgb, var(--ink-inverse) 78%, transparent); }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--s-10); }
  .split-rev > :first-child { order: 0; }
}

.checks { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
.checks li { display: flex; gap: var(--s-3); color: var(--ink-2); }
.checks strong { color: var(--ink); font-weight: 600; }
.checks .ico { margin-top: 2px; color: var(--good); stroke-width: 2; }

/* how it works */
.steps { display: grid; gap: var(--s-3); counter-reset: none; }
.steps li {
  display: flex; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); background: var(--bg-raised); box-shadow: var(--shadow-panel);
}
.step-n {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 650; font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: var(--text-md); }
.steps p { margin-top: var(--s-1); color: var(--ink-2); }

/* the frozen-screen picture (desktop) */
.screen { display: flex; flex-direction: column; gap: var(--s-4); }
.screen-frozen {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(160deg, #5b6cff 0%, #9b5bff 45%, #ff7a59 100%); box-shadow: var(--shadow-float);
}
.win { position: absolute; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.9); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.win::before { content: ""; position: absolute; inset: 0 0 auto; height: 14%; border-radius: var(--r-sm) var(--r-sm) 0 0; background: rgba(20, 18, 16, 0.08); }
.w1 { left: 6%; top: 10%; width: 52%; height: 62%; }
.w2 { left: 46%; top: 30%; width: 46%; height: 56%; }
.w3 { left: 14%; top: 60%; width: 26%; height: 28%; background: rgba(255, 255, 255, 0.75); }
.sel {
  position: absolute; left: 30%; top: 24%; width: 44%; height: 42%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45); outline: 1.5px solid var(--accent);
}
.sel-size {
  position: absolute; left: 0; top: -26px; padding: 2px 7px; border-radius: var(--r-xs);
  background: rgba(12, 12, 14, 0.82); color: #fff; font-family: var(--font-mono); font-size: 11px;
}
.sel-arrow {
  position: absolute; left: 18%; top: 22%; width: 46%; height: 3px; border-radius: 2px; background: #ff3b30; transform: rotate(24deg); transform-origin: left center;
}
.sel-arrow::after {
  content: ""; position: absolute; right: -3px; top: -6px; border-left: 12px solid #ff3b30; border-top: 7.5px solid transparent; border-bottom: 7.5px solid transparent;
}
.sel-bar {
  position: absolute; right: 0; bottom: -40px; display: flex; gap: 5px; padding: 6px; border-radius: 10px;
  background: var(--bg-raised); box-shadow: var(--shadow-float);
}
.sel-bar i { width: 18px; height: 18px; border-radius: 5px; background: var(--bg-sunken); }
.sel-bar i.go { background: var(--accent); width: 26px; }
.screen-keys { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-2); color: var(--ink-2); font-size: var(--text-sm); }
.screen-keys .ico { width: 16px; height: 16px; color: var(--ink-3); }

/* tools */
.tools { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-3); }
@media (max-width: 1100px) { .tools { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) { .tools { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .tools { grid-template-columns: repeat(2, 1fr); } }
.tools li {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md);
  background: var(--bg-raised); box-shadow: var(--shadow-panel); font-weight: 550;
}
.tools kbd { min-width: 2.2em; text-align: center; }

/* privacy facts */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.facts li { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-5); border-radius: var(--r-lg); background: color-mix(in srgb, var(--ink-inverse) 7%, transparent); }
.facts strong { font-size: var(--text-md); font-weight: 600; }
.facts span { color: color-mix(in srgb, var(--ink-inverse) 72%, transparent); }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* questions */
#questions h2 { margin-bottom: var(--s-8); }
.faq { display: grid; gap: var(--s-2); }
.faq details { border-radius: var(--r-md); background: var(--bg-raised); box-shadow: var(--shadow-panel); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); cursor: pointer; list-style: none; font-weight: 550; font-size: var(--text-md);
  border-radius: var(--r-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-top: -4px; border-right: 1.75px solid var(--ink-3); border-bottom: 1.75px solid var(--ink-3);
  transform: rotate(45deg); transition: transform var(--t-base) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { padding: 0 var(--s-5) var(--s-5); color: var(--ink-2); max-width: 42.4em; }
code { font-family: var(--font-mono); font-size: 0.88em; padding: 0.1em 0.35em; border-radius: var(--r-xs); background: var(--bg-sunken); }

/* downloads */
.downloads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
/* each card shares the grid's rows (icon, title, line, action, note), so every part lines up across the cards */
.dl {
  display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: var(--s-2); justify-items: start; align-content: start;
  padding: var(--s-6); border-radius: var(--r-xl); background: var(--bg-raised); box-shadow: var(--shadow-panel);
}
.dl.is-yours { box-shadow: 0 0 0 2px var(--accent), var(--shadow-panel); }
.dl-ico { width: 28px; height: 28px; color: var(--ink-2); margin-bottom: var(--s-2); }
.dl h3 { font-size: var(--text-lg); }
.dl > p { color: var(--ink-2); }
.dl .btn { margin-top: var(--s-3); }
.dl-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.dl-row .btn { margin-top: 0; }
.soon {
  display: inline-flex; align-items: center; min-height: 40px; margin-top: var(--s-3); padding: 0 var(--s-5);
  border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent-text); font-size: var(--text-sm); font-weight: 600;
}
.dl .dl-note { padding-top: var(--s-3); color: var(--ink-3); font-size: var(--text-sm); }
.all-releases { margin-top: var(--s-8); text-align: center; }
@media (max-width: 1100px) { .downloads { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .downloads { grid-template-columns: 1fr; } }

/* more projects: the other tools, each with its own icon */
.more { padding: var(--s-16) 0; }
.more-title { font-size: var(--text-md); font-weight: 600; color: var(--ink-2); letter-spacing: var(--tracking-ui); margin-bottom: var(--s-5); }
.more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.more-card {
  display: flex; align-items: center; gap: var(--s-3); height: 100%; padding: var(--s-4);
  border-radius: var(--r-lg); background: var(--bg-raised); box-shadow: var(--shadow-panel);
  color: var(--ink); text-decoration: none;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.more-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-float); }
.more-card:focus-visible { outline-offset: 3px; }
.more-ico { width: 40px; height: 40px; flex: none; border-radius: 11px; overflow: hidden; }
.more-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.more-name { font-weight: 600; font-size: var(--text-base); }
.more-desc { color: var(--ink-3); font-size: var(--text-sm); line-height: var(--leading-snug); }
.more-go { width: 18px; height: 18px; color: var(--ink-3); flex: none; transition: transform var(--t-base) var(--ease-out), color var(--t-fast); }
.more-card:hover .more-go { transform: translateX(3px); color: var(--accent-text); }
@media (max-width: 1000px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .more-grid { grid-template-columns: 1fr; } }

/* footer */
.foot { padding: var(--s-10) 0 calc(var(--s-10) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--text-sm); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.foot a { color: var(--ink-2); text-underline-offset: 3px; }
.foot a:hover { color: var(--ink); }

/* ---------- privacy page ---------- */
.doc { padding: var(--s-16) 0 var(--s-24); }
.doc h1 { font-size: var(--text-xl); letter-spacing: var(--tracking-display); line-height: 1.1; }
.doc .updated { margin-top: var(--s-3); color: var(--ink-3); }
.doc h2 { margin-top: var(--s-10); font-size: var(--text-lg); }
.doc p, .doc li { margin-top: var(--s-3); color: var(--ink-2); font-size: var(--text-md); max-width: 45em; }
.doc ul { padding-left: var(--s-5); }
.doc .summary { margin-top: var(--s-8); padding: var(--s-5) var(--s-6); border-radius: var(--r-lg); background: var(--accent-soft); color: var(--ink); font-size: var(--text-md); }
.doc a { color: var(--accent-text); text-underline-offset: 3px; }
