/*
 * Knowmine homepage. Aylith family type (Space Grotesk headings, DM Sans body)
 * on warm paper with Knowmine's honey-amber accent. Light/dark follows the
 * system unless [data-theme] is set by the theme control.
 */
:root {
  color-scheme: light;
  --bg: oklch(97.9% 0.008 85);
  --fg: oklch(19% 0.016 65);
  --muted: oklch(43% 0.022 70);
  --faint: oklch(55% 0.022 75);
  --line: oklch(88.5% 0.018 82);
  --soft: oklch(95.3% 0.016 84);
  --card: oklch(99.4% 0.005 85);
  --accent: oklch(52% 0.12 68);
  --accent-strong: oklch(45% 0.11 66);
  --accent-tint: oklch(94% 0.045 85);
  --accent-fg: oklch(99% 0.01 85);
  --good-tint: oklch(93% 0.05 150);
  --good-text: oklch(40% 0.1 150);
  --term-bg: oklch(20% 0.014 65);
  --shadow:
    0 34px 70px -34px oklch(30% 0.05 70 / 0.32),
    0 2px 6px oklch(30% 0.05 70 / 0.06);
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: oklch(14.8% 0.01 65);
    --fg: oklch(95% 0.01 85);
    --muted: oklch(76% 0.018 80);
    --faint: oklch(63% 0.018 78);
    --line: oklch(29.5% 0.016 68);
    --soft: oklch(18.8% 0.013 66);
    --card: oklch(21.5% 0.014 66);
    --accent: oklch(79% 0.13 78);
    --accent-strong: oklch(85% 0.11 82);
    --accent-tint: oklch(31% 0.06 72);
    --accent-fg: oklch(19% 0.04 70);
    --good-tint: oklch(30% 0.06 150);
    --good-text: oklch(84% 0.11 150);
    --term-bg: oklch(11% 0.008 65);
    --shadow:
      0 34px 70px -34px oklch(0% 0 0 / 0.65), 0 2px 6px oklch(0% 0 0 / 0.3);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(14.8% 0.01 65);
  --fg: oklch(95% 0.01 85);
  --muted: oklch(76% 0.018 80);
  --faint: oklch(63% 0.018 78);
  --line: oklch(29.5% 0.016 68);
  --soft: oklch(18.8% 0.013 66);
  --card: oklch(21.5% 0.014 66);
  --accent: oklch(79% 0.13 78);
  --accent-strong: oklch(85% 0.11 82);
  --accent-tint: oklch(31% 0.06 72);
  --accent-fg: oklch(19% 0.04 70);
  --good-tint: oklch(30% 0.06 150);
  --good-text: oklch(84% 0.11 150);
  --term-bg: oklch(11% 0.008 65);
  --shadow:
    0 34px 70px -34px oklch(0% 0 0 / 0.65), 0 2px 6px oklch(0% 0 0 / 0.3);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
html,
body {
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
:where(a, button, select):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection {
  background: var(--accent-tint);
}
.wrap {
  width: min(100% - 48px, 1240px);
  margin-inline: auto;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 30px;
  height: 30px;
}
.brand-mark .box {
  fill: none;
  stroke: var(--fg);
  stroke-width: 2;
  stroke-linejoin: round;
}
.brand-mark .lid {
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
}
nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
nav a:hover {
  color: var(--fg);
}
.theme select {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font: 500 13px var(--sans);
  cursor: pointer;
}
.theme select:hover {
  border-color: var(--accent);
  color: var(--fg);
}

/* Shared */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}
h2 {
  margin-top: 16px;
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 500;
}
h3 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-head {
  max-width: 720px;
}
.section-head > p:last-child:not(.eyebrow) {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}
.link {
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.link:hover {
  text-decoration-color: var(--accent);
}
.band {
  background: var(--soft);
  border-block: 1px solid var(--line);
}
.num {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
  padding-block: clamp(56px, 8vw, 112px) clamp(72px, 9vw, 128px);
}
h1 {
  margin-top: 26px;
  font-size: clamp(44px, 5.8vw, 84px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}
.lead {
  max-width: 540px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 20px);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12.5px;
}
.facts li {
  padding-left: 12px;
  border-left: 2px solid var(--accent-tint);
}

/* App illustration */
.shot {
  margin: 0;
}
.app {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.app p {
  margin: 0;
}
.scan,
.inv {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.label {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  padding: 3px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 11.5px;
  font-weight: 600;
}
.tabs span {
  flex: 1;
  padding: 5px 4px;
  border-radius: 6px;
  color: var(--faint);
  text-align: center;
  white-space: nowrap;
}
.tabs .on {
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 1px 2px oklch(30% 0.03 70 / 0.12);
}
.photo {
  display: grid;
  place-items: center;
  height: 150px;
  margin-top: 12px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 46%, var(--accent-tint), transparent 62%),
    var(--soft);
}
.lamp {
  width: 112px;
  height: 112px;
}
.lamp .shade {
  fill: var(--accent);
  opacity: 0.9;
}
.lamp .stem {
  stroke: var(--fg);
  stroke-width: 4;
  stroke-linecap: round;
}
.lamp .bulb {
  fill: var(--card);
}
.suggest {
  margin-top: 12px;
}
.s-name {
  font-weight: 600;
  font-size: 14.5px;
}
.s-meta {
  color: var(--muted);
  font-size: 12px;
}
.suggest .s-conf {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--good-tint);
  color: var(--good-text);
  font-size: 11.5px;
  font-weight: 600;
}
.inv {
  display: grid;
  align-content: start;
  gap: 12px;
}
.inv-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.crumb {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}
.crumb span {
  color: var(--faint);
}
.total {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.ico {
  display: grid;
  place-items: center;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent);
}
.ico svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile b {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tile small {
  color: var(--faint);
  font-size: 11px;
}
.tile i {
  color: var(--accent);
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags span {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
}
figcaption {
  margin-top: 16px;
  color: var(--faint);
  font-size: 13px;
}

/* Capture */
.capture {
  padding-block: clamp(72px, 9vw, 120px);
}
.ways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.ways article {
  padding: 26px 26px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.ways h3 {
  margin-top: 16px;
}
.ways p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Features */
.features {
  padding-block: clamp(80px, 10vw, 136px);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 40px;
  margin-top: 52px;
}
.feature-grid article {
  padding-top: 20px;
  border-top: 2px solid var(--line);
}
.feature-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Limits */
.limits {
  padding-block: clamp(72px, 9vw, 120px);
}
.limits-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 7vw, 110px);
}
.limit-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.limit-list h3 {
  font-size: 18px;
}
.limit-list p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Get */
.get {
  padding-block: clamp(80px, 10vw, 144px);
}
.get-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: 48px;
}
.terminal {
  overflow: hidden;
  border-radius: 10px;
  background: var(--term-bg);
  color: oklch(93% 0.01 85);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .terminal {
  border: 1px solid var(--line);
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid oklch(31% 0.014 65);
  color: oklch(74% 0.015 75);
  font-family: var(--mono);
  font-size: 12px;
}
.copy {
  padding: 5px 12px;
  border: 1px solid oklch(38% 0.014 65);
  border-radius: 6px;
  background: transparent;
  color: oklch(93% 0.01 85);
  font: 600 12px var(--sans);
  cursor: pointer;
}
.copy:hover {
  border-color: oklch(79% 0.13 78);
}
.terminal pre {
  margin: 0;
  padding: 18px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.85;
}
.comment {
  color: oklch(70% 0.07 75);
}
.copy-status {
  margin: 0;
  padding: 0 16px 14px;
  color: oklch(68% 0.014 75);
  font-size: 12.5px;
}
.needs {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.needs h3 {
  font-size: 18px;
}
.needs p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.follow {
  margin: 48px 0 0;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer span {
  font-family: var(--display);
  font-weight: 600;
  color: var(--fg);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 1020px) {
  .hero,
  .get-grid,
  .limits-inner {
    grid-template-columns: 1fr;
  }
  .shot {
    max-width: 700px;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .site-header {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding-block: 14px;
  }
  nav {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 0;
    justify-content: space-between;
  }
  nav a {
    padding: 8px 0;
  }
  .theme {
    margin-left: auto;
  }
  .app {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .scan {
    display: none;
  }
  .ways,
  .feature-grid,
  .limit-list {
    grid-template-columns: 1fr;
  }
  .terminal pre {
    font-size: 11.5px;
  }
  .site-footer {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button {
    transition: none;
  }
  .button:hover {
    transform: none;
  }
}
