/* Knobly website. The same system as Luca's other app sites (Lanes, Waxnote, Ate): one quiet
   ground, soft raised surfaces lifted or pressed by light and shadow, Apple type, a floating
   capsule for navigation, and the indigo of the Knobly icon as the one accent. Plain CSS, no
   build step. Light and dark follow the system. */

:root {
  --ground: #eceaf4;
  --ink: #1d1d1f;
  --muted: #6b6a78;
  --accent: #4a3fc4;
  --accent-deep: #3a2fa8;
  --accent-bright: #6c63ff;
  --light: rgba(255, 255, 255, 0.95);
  --dark: rgba(170, 166, 200, 0.6);
  --hairline: rgba(29, 29, 31, 0.08);
  --raise: 10px 10px 26px var(--dark), -10px -10px 26px var(--light);
  --raise-sm: 5px 5px 12px var(--dark), -5px -5px 12px var(--light);
  --press: inset 6px 6px 14px var(--dark), inset -6px -6px 14px var(--light);
  --press-sm: inset 3px 3px 7px var(--dark), inset -3px -3px 7px var(--light);
  --radius: 28px;
  --measure: 72rem;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1e1d26;
    --ink: #f5f5f7;
    --muted: #a3a2b0;
    --accent: #9b93ff;
    --accent-deep: #4a3fc4;
    --accent-bright: #c2bdff;
    --light: rgba(48, 47, 60, 0.9);
    --dark: rgba(8, 8, 12, 0.75);
    --hairline: rgba(245, 245, 247, 0.08);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; }
img, video { display: block; }
p, ul, ol { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

.wrap { width: min(var(--measure), 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 60;
  padding: 10px 16px; border-radius: 999px; background: var(--ground); color: var(--ink);
  font-weight: 600; box-shadow: var(--raise-sm);
}
.skip:focus { top: 12px; text-decoration: none; }

/* ---------- Navigation: one raised capsule that floats over the page ---------- */

.nav {
  position: sticky; top: 14px; z-index: 50;
  width: min(var(--measure), 100% - 24px); margin: 14px auto 0;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--raise-sm);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 30px; height: 30px; flex: none; display: block; }
.brand-icon picture, .brand-icon img { display: block; width: 100%; height: 100%; }
.nav-links { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--muted); font-size: 15px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  transition: color .2s, box-shadow .25s var(--ease);
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); box-shadow: var(--press-sm); }
@media (max-width: 760px) {
  .nav { top: 10px; margin-top: 10px; padding: 6px; gap: 4px; }
  .nav .brand-name, .nav .nav-links .nav-home { display: none; }
  .nav-links a { padding: 8px 11px; font-size: 14.5px; }
}

/* ---------- Buttons: raised, and pressed in while held ---------- */

.actions, .cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 30px; }
.btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 0;
  font: 600 16px/1.2 var(--font); color: var(--ink); background: var(--ground); text-align: center;
  box-shadow: var(--raise-sm); cursor: pointer;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), color .2s;
}
.btn:hover, .button:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active, .button:active { box-shadow: var(--press-sm); transform: none; }
.button:not(.quiet), .btn-accent {
  color: #fff; background: linear-gradient(135deg, var(--accent-bright), var(--accent) 55%, var(--accent-deep));
}
@media (prefers-color-scheme: dark) {
  .button:not(.quiet), .btn-accent { background: linear-gradient(135deg, #8a82ff, #5a50d8 55%, #3a2fa8); }
}

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.05; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 72px); letter-spacing: -0.04em; }
.hero h1 { font-size: clamp(44px, 7.4vw, 88px); letter-spacing: -0.045em; }
h2 { font-size: clamp(32px, 4.8vw, 56px); }
h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.lede { font-size: clamp(19px, 2.2vw, 23px); color: var(--muted); line-height: 1.45; max-width: 38rem; margin-top: 24px; }
.fine { margin-top: 18px; color: var(--muted); font-size: 15px; }
.lede a, .fine a { color: var(--accent); }

/* ---------- Page heads (the first block on every page) ---------- */

.band { padding-top: clamp(56px, 9vw, 120px); }
.band:not(.hero) .lede { margin-bottom: 0; }

/* ---------- Hero ---------- */

.hero { padding-bottom: clamp(40px, 6vw, 80px); }
.hero .wrap { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; } }
.hero-device { margin: 0 auto; width: min(320px, 70vw); }
/* Apple's product frames are shown as Apple supplies them: no shadow, tilt, crop or filter. */
.hero-device img { width: 100%; height: auto; }

/* ---------- Sections and raised surfaces ---------- */

.section { padding-top: clamp(64px, 10vw, 128px); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { margin-top: 18px; font-size: clamp(19px, 2.2vw, 23px); color: var(--muted); line-height: 1.45; }

.panel {
  background: var(--ground); border-radius: var(--radius); box-shadow: var(--raise);
  padding: clamp(24px, 3.4vw, 40px);
}
.panel p, .panel li { color: var(--muted); }
.panel h3 + p, .panel h3 + ul { margin-top: 10px; }
.panel .more { margin-top: 14px; }

.cards { display: grid; gap: clamp(20px, 2.6vw, 32px); padding: 0; list-style: none; grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .cards.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cards, .cards.four { grid-template-columns: 1fr; } }

.symbol {
  display: block; width: 30px; height: 30px; margin-bottom: 18px;
  color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.steps { counter-reset: step; }
.steps > li { counter-increment: step; }
.steps > li::before {
  content: counter(step); display: block; margin-bottom: 14px;
  font-size: 48px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--accent);
}

.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 22px; margin-top: 10px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.note { margin-top: 24px; color: var(--muted); max-width: 46rem; }
.split { display: grid; gap: clamp(20px, 2.6vw, 32px); }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }

.closing { text-align: center; }
.closing .panel { box-shadow: none; padding-inline: 0; }
.closing h2 { font-size: clamp(34px, 5.2vw, 60px); }
.closing p { max-width: 38rem; margin: 18px auto 0; font-size: clamp(19px, 2.2vw, 23px); line-height: 1.45; }
.closing .actions { justify-content: center; }

/* ---------- Devices: the app's own screens in Apple's product frames ---------- */

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(260px, 64vw); gap: 32px;
  margin: 0 -16px; padding: 8px 16px 32px; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots li { scroll-snap-align: start; }
.shots img { width: 100%; height: auto; }
.shots p { margin-top: 18px; color: var(--muted); font-size: 16px; text-align: center; }
.shots-wide { grid-auto-columns: min(560px, 86vw); margin-top: 8px; }

/* ---------- Long text: help, privacy, terms ---------- */

.prose { max-width: 46rem; }
.prose h2 { margin-top: 56px; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.025em; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 30px; font-size: 19px; letter-spacing: -0.01em; }
.prose p, .prose ul, .prose ol { margin-top: 14px; color: color-mix(in srgb, var(--ink) 82%, var(--ground)); }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 22px; }
.prose ul > li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.prose ol { padding-left: 1.3em; }
.prose li { margin-top: 8px; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose .panel { margin-top: 28px; }
.prose .panel > :first-child { margin-top: 0; }
.prose .panel h2 { font-size: 22px; }
.prose code { font: 14.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; padding: 2px 6px; border-radius: 6px; box-shadow: var(--press-sm); overflow-wrap: anywhere; }

.contents { columns: 2 16em; column-gap: 32px; }
.prose .contents > li { margin-top: 0; padding-block: 4px; break-inside: avoid; }

/* ---------- Comparison table on the download page ---------- */

.table-scroll { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { padding: 16px 20px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { color: var(--ink); font-weight: 650; }
tbody th { width: 38%; color: var(--ink); font-weight: 600; }
td { color: var(--muted); }
@media (max-width: 520px) { th, td { padding: 12px 10px; font-size: 15px; } }

/* ---------- Footer ---------- */

footer { padding: 48px 0 56px; margin-top: clamp(64px, 10vw, 120px); }
.foot { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; padding-top: 28px; border-top: 1px solid var(--hairline); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--muted); font-size: 15px; }
.foot a:hover { color: var(--ink); }
.foot small { color: var(--muted); font-size: 14px; }
.foot-apps { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; padding-top: 18px; }
.foot-apps > span { color: var(--ink); font-size: 14px; font-weight: 600; }
.foot-apps nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-apps a { color: var(--muted); font-size: 15px; }
.foot-apps a:hover { color: var(--ink); }
.foot-apps a span { font-size: 13px; opacity: 0.8; margin-left: 4px; }
.disclaimer { color: var(--muted); font-size: 14px; max-width: 46rem; padding-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .button:hover { transform: none; }
}

@media (prefers-contrast: more) {
  .panel { outline: 1px solid var(--ink); }
}

/* ---------- Hero recording: Apple's MacBook Pro and iPhone frames, played as recorded ---------- */

.hero-demo { margin: 0 auto; width: 100%; max-width: 620px; }
.hero-demo video, .hero-demo img { display: block; width: 100%; height: auto; }
.hero-demo [hidden] { display: none; }
