/* Clear Majority landing page shell, in the KC AI Labs brand: black ground, lime highlight. Dark only.
   The race explorer inside #explorer is styled by explorer.css. */

:root {
  color-scheme: dark;
  --bg: #222b24;
  --surface: #2a332c;
  --surface-2: #323b34;
  --rule: #4f574f;
  --text: #fcfcf5;
  --muted: #b8bcb4;
  --lime: #c1db89;
  --lime-dim: #a8bf79;
  --coral: #eca48f;
  --sky: #b1d3c8;
  --sky-ink: #37645c;
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --radius: 14px;

  --gutter: clamp(1rem, 4vw, 2rem);
  --section-space: clamp(5rem, 2.5rem + 8vw, 9.5rem);
  --measure: 64ch;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p, ul, ol { margin: 0; }
strong { color: var(--text); font-weight: 600; }

a { color: var(--lime); text-underline-offset: 4px; }
a:focus-visible,
[tabindex]:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-wide { max-width: 94rem; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--lime);
  color: #293029;
  font-weight: 600;
  border-radius: 6px;
}
.skip:focus { top: 0.75rem; }
.skip:focus-visible { outline-color: var(--text); }

/* Buttons: outlined lime with an arrow, filled on hover. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--lime);
  border-radius: 6px;
  color: var(--lime);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 160ms, color 160ms;
}
.button:hover { background: var(--lime); color: #293029; }
.button .arrow {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms var(--ease-out);
}
.button:hover .arrow { transform: translateY(2px); }
.button-small { min-height: 2.75rem; padding: 0.55rem 0.95rem; font-size: 0.9375rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(34 43 36 / 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(79 87 79 / 0.6);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.brand { display: inline-flex; margin-right: auto; }
.brand img { display: block; width: 200px; height: auto; }
.header-link {
  color: var(--sky);
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.75rem 0.25rem;
}
.header-link:hover { color: var(--text); }

/* Hero: the promise on the left, one real task from the sample plan on paper on the right. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2rem + 5vw, 7.5rem) clamp(4.5rem, 3rem + 6vw, 9rem);
}
.hero::before {
  /* a faint lime glow behind the paper */
  content: "";
  position: absolute;
  z-index: -1;
  width: min(48rem, 110vw);
  aspect-ratio: 1;
  right: -10rem;
  top: -6rem;
  background: radial-gradient(closest-side, rgb(193 219 137 / 0.09), transparent);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(3rem, 2rem + 4vw, 6rem);
}
.eyebrow {
  color: var(--lime-dim);
  font-size: 0.9375rem;
  font-weight: 500;
}
.hero h1 {
  max-width: 18ch;
  margin-top: 1.25rem;
  font-size: clamp(2.5rem, 1.3rem + 3.8vw, 4.5rem);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.hl { color: var(--lime); }
.lede {
  max-width: 46ch;
  margin-top: clamp(1.5rem, 1rem + 1.5vw, 2rem);
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.6;
  color: #d3d6cd;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: 2.25rem;
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--sky);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 6px;
}
.text-link:hover { color: var(--text); }

/* The field note: dark ink on light paper, with two sheets behind it that drift on scroll. */
.note-stack {
  position: relative;
  justify-self: center;
  width: min(100%, 31rem);
}
.sheet {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  will-change: transform;
}
.sheet-far {
  rotate: 5deg;
  translate: 1.25rem 0.75rem;
  background: #d1d7c7;
  box-shadow: 3px 3px 0 var(--lime-dim);
}
.sheet-near {
  rotate: 2deg;
  translate: 0.5rem 0.25rem;
  background: #e4e9da;
}
.field-note {
  position: relative;
  rotate: -1.5deg;
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: 4px;
  color: #293029;
  background: #f0f2e9;
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.45);
}
.fn-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #293029;
  font-size: 0.875rem;
  font-weight: 500;
}
.fn-tag {
  background: var(--sky);
  padding: 0.1rem 0.5rem;
  border: 1px solid #293029;
  border-radius: 999px;
  font-size: 0.75rem;
}
.fn-task {
  margin-top: 1.25rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.fn-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.fn-dates dt { font-size: 0.8125rem; color: #576251; }
.fn-dates dd {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.fn-owner { margin-top: 1rem; font-size: 0.9375rem; color: #576251; }
.fn-why {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.6;
}
.fn-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.5rem;
  color: var(--sky-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}
.field-note a:focus-visible { outline-color: #293029; }

/* Sections: a thin rule and a small label, then one idea. */
.section {
  padding-block: var(--section-space);
  border-top: 1px solid var(--rule);
}
.section, .explorer-frame { scroll-margin-top: 4.5rem; }
.label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--lime-dim);
  font-size: 0.9375rem;
  font-weight: 500;
}
.label::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--lime-dim);
}
.section h2 {
  max-width: 22ch;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.intro {
  max-width: var(--measure);
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--muted);
}

/* Why now: three beats, each a statement of its own. */
.beats {
  list-style: none;
  padding: 0;
  margin-top: clamp(3rem, 2rem + 3vw, 4.5rem);
  display: grid;
  gap: 0;
}
.beats li {
  max-width: 44ch;
  padding-block: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  border-top: 1px solid var(--rule);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 500;
}

/* Preview: the explorer gets the full width. */
.sample-note {
  max-width: var(--measure);
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--sky);
  font-size: 0.9375rem;
  color: var(--muted);
}
.explorer-frame { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.noscript {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--muted);
}

/* What firms use today: one line per option, ours set apart. */
.rows-head,
.row {
  display: grid;
  align-items: baseline;
  padding-inline: 1.25rem; /* the same inset as our boxed row, so the columns line up */
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}
.rows-head {
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  padding-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.rows { list-style: none; padding: 0; margin: 0; }
.row {
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.row h3 { font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.015em; }
.row dl { display: contents; }
.row dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.row dd { margin: 0; }
.row-ours {
  margin-top: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--lime);
  border-radius: var(--radius);
  color: var(--text);
}
.row-ours h3 { color: var(--lime); }
.van-note {
  max-width: var(--measure);
  margin-top: 2rem;
  color: var(--muted);
}

/* Email signup */
.signup { scroll-margin-top: 4.25rem; }
.signup-grid {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.signup form { max-width: 34rem; }
.signup label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.signup-fields { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.signup-fields input {
  flex: 1 1 13rem;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--muted);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.signup-fields button {
  justify-content: center;
  background: var(--lime);
  color: var(--bg);
  font-family: inherit;
  cursor: pointer;
}
.signup-fields button:hover { background: var(--lime-dim); }
.signup-extra { display: none; }
.signup-privacy { margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.signup-privacy summary { cursor: pointer; width: fit-content; }
.signup-privacy p { margin-top: .75rem; }
.signup-privacy a { color: var(--sky); }
.site-footer .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 2rem; }

/* Footer */
.site-footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .brand img { width: 10rem; }

/* Scroll reveals. Hidden only when motion.js has run and motion is welcome, so the page reads without JS. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    transition: opacity 600ms var(--ease-out), transform 650ms var(--ease-out);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
  .js .beats li:nth-child(2),
  .js .rows > :nth-child(2) { transition-delay: 90ms; }
  .js .beats li:nth-child(3),
  .js .rows > :nth-child(3) { transition-delay: 180ms; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .button .arrow { transition: none; }
}

@media (min-width: 900px) {
  .preview-intro {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(3rem, 8vw, 8rem);
    align-items: start;
  }
  .preview-intro .intro { margin-top: 0; }
  .beats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.75rem, 3.5vw, 4rem);
  }
  .beats li { padding-bottom: 0; }
  .signup-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 899px) {
  .hero-grid { grid-template-columns: 1fr; }
  .note-stack { justify-self: start; margin-top: 1rem; }
}
@media (max-width: 759px) {
  .rows-head { display: none; }
  .row { grid-template-columns: 1fr; gap: 0.75rem; padding-inline: 0; }
  .row-ours { padding-inline: 1.25rem; }
  .row dl { display: grid; gap: 0.75rem; }
  .row dt {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    color: var(--lime-dim);
    font-size: 0.8125rem;
  }
  .rows-head + .rows { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
}
@media (max-width: 699px) {
  .note-stack { width: calc(100% - 1.5rem); }
}
@media (max-width: 420px) {
  .actions .button { width: 100%; justify-content: space-between; }
  .site-header .button { padding-inline: 0.8rem; }
  .brand img { width: 160px; }
  .header-link { display: none; }
}
