/*
 * Kytmerge site. Colors follow the app (src/renderer/src/styles/theme.css): near-black and
 * cool grays in dark, white and slate in light, one blue accent, the Bauhaus lane colors for
 * the graph drawings. System fonts only.
 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-2: #f4f6f9;
  --panel: #ffffff;
  --border: #d8dde5;
  --border-strong: #b9c1cd;
  --text: #0a0d12;
  --text-dim: #3a4352;
  --text-faint: #5f6a7b;
  --accent: #1f6fd6;
  --accent-hover: #185cb3;
  --primary: #0a0d12;
  --primary-hover: #000000;
  --primary-ink: #ffffff;
  --danger: #c22f2f;
  --ok: #1a7f4b;
  --field: #ffffff;
  --shadow: 0 18px 50px rgba(10, 20, 40, 0.12);
  /* Lane colors, Bauhaus palette, light theme. */
  --lane-0: #708ab4;
  --lane-1: #ab0009;
  --lane-2: #a78c02;
  --lane-3: #6a6a6a;
  --lane-4: #00616d;
  --lane-5: #017b37;
  --ink-on-lane-1: #ffffff;
  --graph-bg: #f6f8fa;
  --graph-row: rgba(10, 30, 70, 0.035);
  --graph-bar: #d3d9e2;
  --graph-bar-strong: #b9c1cd;
  --dot-ring: #f6f8fa;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
  --wrap: 1120px;
  --gutter: 16px;
  --radius: 2px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07080b;
    --bg-2: #0b0d11;
    --panel: #0e1015;
    --border: #1b1f27;
    --border-strong: #2f3642;
    --text: #f4f7fb;
    --text-dim: #aab3c2;
    --text-faint: #8590a2;
    --accent: #7cc4ff;
    --accent-hover: #a3d6ff;
    --primary: #f4f7fb;
    --primary-hover: #ffffff;
    --primary-ink: #07080b;
    --danger: #ff8a8a;
    --ok: #74d39c;
    --field: #040507;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    --lane-0: #b7d2fe;
    --lane-1: #ed4b40;
    --lane-2: #fbd530;
    --lane-3: #a4a4a4;
    --lane-4: #2196a7;
    --lane-5: #4cb86a;
    --ink-on-lane-1: #ffffff;
    --graph-bg: #0b0d11;
    --graph-row: rgba(200, 220, 255, 0.025);
    --graph-bar: #1f242d;
    --graph-bar-strong: #2c333f;
    --dot-ring: #0b0d11;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-hover);
}

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

code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
}
kbd {
  padding: 0 0.3em;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius);
  font-size: 0.85em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--primary);
  color: var(--primary-ink);
  text-decoration: none;
}
.skip:focus {
  top: 12px;
  color: var(--primary-ink);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--text);
}
.brand img {
  width: 30px;
  height: 30px;
}
.site-nav ul {
  display: flex;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--text);
}
@media (max-width: 640px) {
  .site-nav {
    display: none;
  }
}

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

.hero {
  padding: 56px 0 72px;
}
.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero {
    padding: 80px 0 96px;
  }
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 56px;
  }
}
.descriptor {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
}
.descriptor img {
  width: 22px;
  height: 22px;
}
.hero h1 {
  font-size: clamp(2.05rem, 1.35rem + 3vw, 3.35rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.06;
  max-width: 15ch;
}
.h1-line {
  display: block;
}
.lede {
  margin-top: 20px;
  font-size: 18px;
  color: var(--text-dim);
  max-width: 36em;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin-top: 18px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 550;
  color: var(--text);
}
.facts,
.footer-links {
  /* Every item has its dot; the dot that starts a line falls in the clipped margin. */
  margin-left: -22px;
  clip-path: inset(0 0 0 22px);
}
.facts li::before,
.footer-links li::before {
  content: '·';
  display: inline-block;
  width: 22px;
  text-align: center;
  color: var(--text-faint);
}

/* ---------- Waitlist form ---------- */

.waitlist {
  margin-top: 32px;
  max-width: 34em;
  scroll-margin-top: 120px;
}
.waitlist label.field-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.field-row input[type='email'] {
  flex: 1 1 220px;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.field-row input[type='email']::placeholder {
  color: var(--text-faint);
}
.field-row input[type='email']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.field-row input[aria-invalid='true'] {
  border-color: var(--danger);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-ink);
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}
.btn-quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-quiet:hover {
  background: var(--bg-2);
  border-color: var(--text-faint);
  color: var(--text);
}
@media (max-width: 479px) {
  .field-row .btn {
    flex: 1 1 100%;
  }
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
}
.check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.fine {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-faint);
  line-height: 1.5;
}
.form-error {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 550;
  color: var(--danger);
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.notice {
  margin-top: 32px;
  max-width: 34em;
  padding: 18px 20px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 16px;
}
.notice:focus {
  outline: none;
}
.notice:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- The clip slot (illustration until the recording exists) ---------- */

.clip {
  margin: 0;
}
.clip-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--graph-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.clip-frame svg,
.clip-frame video {
  width: 100%;
  height: 100%;
}
.clip figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-faint);
}

/* Graph drawing, shared by the hero and the feature glyphs. */
.g-row {
  fill: var(--graph-row);
}
.g-bar {
  fill: var(--graph-bar);
}
.g-bar-strong {
  fill: var(--graph-bar-strong);
}
.g-lane {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.g-ghost {
  fill: none;
  stroke-width: 2.5;
  stroke-dasharray: 5 5;
  stroke-linecap: round;
}
.l0 {
  stroke: var(--lane-0);
}
.l1 {
  stroke: var(--lane-1);
}
.l2 {
  stroke: var(--lane-2);
}
.l4 {
  stroke: var(--lane-4);
}
.f0 {
  fill: var(--lane-0);
}
.f1 {
  fill: var(--lane-1);
}
.f2 {
  fill: var(--lane-2);
}
.f4 {
  fill: var(--lane-4);
}
.g-dot {
  stroke: var(--dot-ring);
  stroke-width: 3;
}
.g-ghost-dot {
  fill: var(--graph-bg);
  stroke-width: 2.5;
  stroke-dasharray: 4 3.5;
}
.g-chip {
  fill: var(--graph-bg);
  stroke-width: 1.5;
}
.g-chip-text {
  font-family: var(--mono);
  font-size: 14.5px;
  fill: var(--text-dim);
}
.g-chip-lifted {
  fill: var(--lane-1);
}
.g-chip-lifted-text {
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 600;
  fill: var(--ink-on-lane-1);
}
.g-chip-slot {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.g-card {
  fill: var(--panel);
  stroke: var(--border-strong);
  stroke-width: 1;
}
.g-card-title {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 650;
  fill: var(--text);
}
.g-card-sub {
  font-family: var(--font);
  font-size: 14.5px;
  fill: var(--text-dim);
}
.g-card-file {
  font-family: var(--mono);
  font-size: 13.5px;
  fill: var(--text);
}
.g-conflict {
  fill: var(--lane-1);
}
.g-cursor {
  fill: var(--text);
  stroke: var(--graph-bg);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.g-shadow {
  fill: #000;
  opacity: 0.1;
}
@media (prefers-color-scheme: dark) {
  .g-shadow {
    opacity: 0.4;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .g-drag {
    animation: drag-float 3.2s ease-in-out infinite;
  }
  .g-pulse {
    animation: ghost-pulse 3.2s ease-in-out infinite;
  }
}
@keyframes drag-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(3px, -3px);
  }
}
@keyframes ghost-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}
@media (min-width: 960px) {
  .section {
    padding: 96px 0;
  }
}
.section h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  font-weight: 700;
}
.section-alt {
  background: var(--bg-2);
}

.features {
  display: grid;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 860px) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }
}
.feature svg {
  width: 72px;
  height: 48px;
  margin-bottom: 20px;
}
.feature h3 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.feature p {
  margin-top: 10px;
  color: var(--text-dim);
}

.beta {
  display: grid;
  gap: 40px;
}
@media (min-width: 900px) {
  .beta {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 64px;
  }
}
.beta-intro p {
  margin-top: 16px;
  color: var(--text-dim);
}
.beta-intro .btn {
  margin-top: 28px;
}
.beta h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
}
.beta-lists > div + div {
  margin-top: 28px;
}
.ticks {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding: 8px 0 8px 26px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}
.ticks li:last-child {
  border-bottom: 1px solid var(--border);
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.95em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lane-0);
}
.ticks-lanes li:nth-child(5n + 2)::before {
  background: var(--lane-1);
}
.ticks-lanes li:nth-child(5n + 3)::before {
  background: var(--lane-2);
}
.ticks-lanes li:nth-child(5n + 4)::before {
  background: var(--lane-4);
}
.ticks-lanes li:nth-child(5n + 5)::before {
  background: var(--lane-5);
}

.pricing p {
  max-width: 44em;
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-dim);
}

.faq-list {
  max-width: 50em;
  margin-top: 24px;
}
.faq-cta {
  margin-top: 40px;
}
.faq details {
  border-top: 1px solid var(--border);
}
.faq details:last-child {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  position: relative;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg);
}
.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}
.faq details p {
  padding: 0 0 20px;
  color: var(--text-dim);
}

/* ---------- Simple pages (confirmation, 404, legal) ---------- */

.page {
  padding: 64px 0 88px;
}
.page-narrow {
  max-width: 42em;
}
.page h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.page .lead {
  margin-top: 14px;
  font-size: 19px;
  color: var(--text-dim);
}
.page .block {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.page .block p {
  color: var(--text-dim);
}
.page .block p strong {
  color: var(--text);
}
.page .block .btn {
  margin-top: 22px;
}

.prose {
  max-width: 44em;
}
.prose h1 {
  margin-bottom: 8px;
}
.prose h2 {
  margin-top: 40px;
  font-size: 22px;
  font-weight: 650;
}
.prose h3 {
  margin-top: 28px;
  font-size: 18px;
  font-weight: 650;
}
.prose p,
.prose ul,
.prose ol,
.prose table,
.prose blockquote {
  margin-top: 14px;
}
.prose p,
.prose li {
  color: var(--text-dim);
}
.prose strong {
  color: var(--text);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 6px;
}
.prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.prose blockquote {
  margin-left: 0;
  padding-left: 16px;
  border-left: 3px solid var(--border-strong);
}
.prose .table-scroll {
  overflow-x: auto;
}
.prose table {
  border-collapse: collapse;
  font-size: 15px;
  min-width: 100%;
}
.prose th,
.prose td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.prose th {
  color: var(--text);
}
.prose code {
  overflow-wrap: anywhere;
}
.prose a {
  overflow-wrap: anywhere;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
  font-size: 14px;
  color: var(--text-faint);
}
.site-footer p + p,
.site-footer ul + p,
.site-footer p + ul {
  margin-top: 10px;
}
.site-footer .footer-id {
  color: var(--text-dim);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  color: var(--text-dim);
}
.footer-links a:hover {
  color: var(--text);
}
.site-footer .legal-note {
  margin-top: 20px;
  max-width: 60em;
  font-size: 12.5px;
  line-height: 1.5;
}
