/* ==========================================================================
   Knob - landing & privacy pages

   Type tokens are fixed by brand spec:
     h1    48px / 48px / 400 / #292524
     h2    24px / 29px / 400 / #292524
     body  14px / 21px / 400 / #57534E

   Shape rule: interactive things (buttons, chips, knob dial) are fully round.
   Static containers (cards, media frames) are 14px. Nothing else.

   No divider rules between sections. Rhythm comes from space alone.
   ========================================================================== */

:root {
  /* Color */
  --bg: #f4f4f4;
  --ink: #292524;
  --body: #57534e;
  --muted: #6f6a65;
  --accent: #ea541e;
  --hover: #44403c;
  --line: #d6d3d1;
  --surface: #fafaf9;
  --surface-2: #e7e5e4;

  /* Type */
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-h1: 48px;
  --lh-h1: 48px;
  --fs-h2: 24px;
  --lh-h2: 29px;
  --fs-body: 14px;
  --lh-body: 21px;

  /* Shape */
  --r-card: 14px;
  --r-pill: 999px;

  /* Space */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --s10: 112px;

  /* Layout */
  --col: 560px;
  --gutter: 24px;

  /* Motion */
  --fast: 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 900px) {
  :root {
    --gutter: 32px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 400;
  margin: 0;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: -0.022em;
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: -0.011em;
}

h3 {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.008em;
  font-weight: 500;
}

h4 {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 500;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--ink);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 1px 5px;
}

strong {
  font-weight: 500;
  color: var(--ink);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
  max-width: var(--col);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--s8);
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s5);
}

.nav a {
  color: var(--body);
  font-size: var(--fs-body);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--fast);
}

.nav a:hover {
  color: var(--ink);
}

@media (max-width: 560px) {
  .nav {
    gap: var(--s4);
  }

  .nav a[data-optional] {
    display: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-block: var(--s8) var(--s8);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s5);
}

.hero h1 {
  max-width: 16ch;
}

.lede {
  margin-top: var(--s5);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  justify-content: flex-start;
  margin-top: var(--s6);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  justify-content: flex-start;
  list-style: none;
  margin: var(--s6) 0 0;
  padding: 0;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--r-pill);
  padding: 4px 12px;
}

/* ==========================================================================
   Buttons - fully round
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 36px;
  padding: 0 var(--s3);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--fast), background-color var(--fast), color var(--fast),
    border-color var(--fast);
}

.btn--primary {
  background: var(--ink);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--hover);
}

.btn--secondary {
  background: #d6d3d1;
  color: #57534e;
}

.btn--secondary:hover {
  background: var(--hover);
  color: #ffffff;
}

.btn:active {
  transform: translateY(1px);
}

.btn--sm {
  min-height: 36px;
  padding: 0 var(--s3);
}

/* ==========================================================================
   The knob - a real, working control, not a picture of one
   ========================================================================== */

.knob {
  --size: 250px;
  --angle: 45deg;
  position: relative;
  width: var(--size);
  height: var(--size);
  margin: var(--s10) auto 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.knob__dial {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: #f4f4f4;
  cursor: pointer;
  box-shadow: -14px -14px 26px rgba(255, 255, 255, 0.95),
    16px 20px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(41, 37, 36, 0.07),
    4px 6px 10px rgba(0, 0, 0, 0.07);
  transition: box-shadow var(--slow);
}

.knob__dial:hover {
  box-shadow: -16px -16px 30px rgba(255, 255, 255, 0.95),
    18px 24px 36px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(41, 37, 36, 0.07),
    4px 6px 10px rgba(0, 0, 0, 0.07);
}

.knob__surface {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #f2f2f2 45%, #dfdfdf 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 1),
    inset 0 -6px 10px rgba(0, 0, 0, 0.13);
}

/* Knurled rim */
.knob__surface::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background-image: repeating-conic-gradient(from 0deg,
      rgba(41, 37, 36, 0.055) 0deg 1.6deg,
      rgba(255, 255, 255, 0) 1.6deg 4.5deg);
  mask-image: radial-gradient(circle, transparent 0 82%, #000 82.5% 100%);
  -webkit-mask-image: radial-gradient(circle, transparent 0 82%, #000 82.5% 100%);
}

/* Tick marks at the three positions */
.knob__arc {
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  pointer-events: none;
}

.knob__arc span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 7px;
  margin-left: -0.5px;
  background: var(--line);
  transform-origin: 50% calc(var(--size) / 2 + 26px);
}

.knob__arc span:nth-child(1) {
  transform: rotate(0deg);
}

.knob__arc span:nth-child(2) {
  transform: rotate(45deg);
  height: 11px;
  width: 1.5px;
  background: var(--ink);
}

.knob__arc span:nth-child(3) {
  transform: rotate(90deg);
}

.knob__rotor {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: rotate(var(--angle));
  transition: transform var(--slow);
  pointer-events: none;
}

.knob__indicator {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 15px;
  height: 32.5%;
  margin-left: -7.5px;
  border-radius: var(--r-pill);
  background: linear-gradient(0deg, #d0450f 0%, #ea541e 58%, #f27350 100%);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.4),
    inset 0 -3px 5px rgba(0, 0, 0, 0.28), 0 2px 4px rgba(0, 0, 0, 0.22);
}

.knob__labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.knob__label {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--fast);
}

.knob__label[data-angle="0"] {
  transform: rotate(0deg) translateY(calc(var(--size) / -2 - 48px)) translate(-50%, -50%);
}

.knob__label[data-angle="45"] {
  transform: rotate(45deg) translateY(calc(var(--size) / -2 - 46px)) translate(-50%, -50%) rotate(-45deg);
}

.knob__label[data-angle="90"] {
  transform: rotate(90deg) translateY(calc(var(--size) / -2 - 46px)) translate(-50%, -50%) rotate(-90deg);
}

.knob[data-mode="light"] .knob__label[data-angle="0"],
.knob[data-mode="system"] .knob__label[data-angle="45"],
.knob[data-mode="off"] .knob__label[data-angle="90"] {
  color: var(--accent);
}

.knob__caption {
  margin-top: var(--s7);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  min-height: 1.5em;
}

.knob__caption b {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 700px) {
  .knob {
    --size: 208px;
  }
}

/* ==========================================================================
   Media frames - grey slots awaiting real artwork
   ========================================================================== */

.frame {
  position: relative;
  margin-top: var(--s6);
  aspect-ratio: 16 / 10;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: repeating-linear-gradient(-45deg,
      rgba(41, 37, 36, 0.028) 0 8px,
      rgba(255, 255, 255, 0) 8px 16px),
    var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.frame--square {
  aspect-ratio: 4 / 3;
}

.frame--wide {
  aspect-ratio: 16 / 10;
}

/* The library screenshot carries more detail than the text column allows, so it
   breaks out to 720px. Everything else keeps the 560px measure. */
@media (min-width: 900px) {
  .frame--wide {
    width: 720px;
    margin-inline: calc((100% - 720px) / 2);
  }
}

.frame__label {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}

/* Side-by-side comparison */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  margin-top: var(--s7);
}

.compare figure {
  margin: 0;
}

.compare .frame {
  margin-top: 0;
  aspect-ratio: 4 / 3;
}

.compare figcaption {
  margin-top: var(--s3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 620px) {
  .compare {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.stat__value {
  font-size: 40px;
  line-height: 44px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stat__label {
  margin-top: var(--s2);
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
}

@media (max-width: 620px) {
  .stats {
    grid-template-columns: 1fr;
    gap: var(--s6);
  }
}

/* ==========================================================================
   Rows - modes and permission tables
   ========================================================================== */

.rows {
  margin-top: var(--s6);
  display: grid;
}

.row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: var(--s5);
  padding-block: var(--s5);
}

.row+.row,
.prose .row {
  border-top: 1px solid var(--line);
}

.rows>.row:first-child {
  border-top: 0;
  padding-top: 0;
}

.row__key {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: var(--lh-body);
  letter-spacing: 0.04em;
  color: var(--ink);
  padding-top: 2px;
}

.row__val {
  color: var(--body);
}

.row__note {
  color: var(--muted);
}

@media (max-width: 560px) {
  .row {
    grid-template-columns: 1fr;
    gap: var(--s1);
  }
}

/* The permission rows name a host, which is longer than the shared 116px key
   column and would otherwise bleed into the value text. */
@media (min-width: 561px) {
  .prose .row {
    grid-template-columns: 140px 1fr;
  }
}

/* ==========================================================================
   Cards - install steps
   ========================================================================== */

.cards {
  display: grid;
  gap: var(--s4);
  margin-top: var(--s6);
}

.card {
  padding: var(--s5);
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s3);
}

.card__status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.steps {
  margin: var(--s4) 0 0;
  padding-left: 18px;
  color: var(--body);
}

.steps li {
  margin-top: var(--s2);
}

.steps li::marker {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq {
  margin-top: var(--s6);
  display: grid;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding-block: var(--s3);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.008em;
  cursor: pointer;
  list-style: none;
  transition: color var(--fast);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--accent);
}

.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform var(--fast);
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq__body {
  padding-bottom: var(--s3);
  max-width: 54ch;
}

/* ==========================================================================
   Privacy callout
   ========================================================================== */

.note {
  margin-top: var(--s5);
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.note p+p {
  margin-top: var(--s3);
}

/* ==========================================================================
   Prose - privacy page body
   ========================================================================== */

.prose {
  padding-block: var(--s8) var(--s9);
}

.prose h2 {
  margin-top: var(--s7);
}

.prose h2:first-of-type {
  margin-top: var(--s8);
}

.prose h3 {
  margin-top: var(--s5);
}

.prose p,
.prose ul,
.prose .rows {
  margin-top: var(--s4);
}

.prose ul {
  padding-left: 18px;
}

.prose li {
  margin-top: var(--s2);
}

.prose li::marker {
  color: var(--muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s6) var(--s7);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4) var(--s5);
  align-items: center;
  justify-content: space-between;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
}

.footer a {
  color: var(--body);
  text-decoration: none;
  transition: color var(--fast);
}

.footer a:hover {
  color: var(--ink);
}

.footer__note {
  flex-basis: 100%;
  max-width: 54ch;
  font-size: 12px;
  line-height: 19px;
  color: var(--muted);
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 560px) {
  :root {
    --gutter: 18px;
    --fs-h1: 34px;
    --lh-h1: 38px;
    --fs-h2: 21px;
    --lh-h2: 26px;
  }

  .section {
    padding-block: var(--s7);
  }

  .hero {
    padding-block: var(--s8) var(--s7);
  }

  .btn {
    width: 100%;
  }

  .knob__caption {
    margin-top: var(--s6);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .knob__rotor,
  .knob__dial {
    transition: none;
  }
}