/* JK Automation Solutions — monochrome, high-contrast, type-led. */

:root {
  --black: #000000;
  --off-black: #0b0b0b;
  --white: #ffffff;
  --paper: #f4f4f4;
  --ink: #111111;
  --grey: #6b6b6b;
  --grey-dim: #9a9a9a;
  --line-dark: rgba(255, 255, 255, 0.16);
  --line-light: rgba(0, 0, 0, 0.14);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 46rem;
  --max: 84rem;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, .display {
  font-family: "Barlow Semi Condensed", Inter, system-ui, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.005em;
  margin: 0;
}

h1 { font-size: clamp(2.75rem, 8.5vw, 7rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); letter-spacing: 0.04em; }

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--grey);
  margin: 0 0 1.5rem;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  max-width: 34rem;
  color: var(--grey);
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section {
  padding: clamp(4.5rem, 11vh, 9rem) 0;
  border-top: 1px solid var(--line-light);
}

.dark {
  background: var(--black);
  color: var(--white);
  border-top-color: var(--line-dark);
}

.dark h1, .dark h2, .dark h3 { color: var(--white); }
.dark .eyebrow, .dark .lede, .dark p { color: var(--grey-dim); }

.narrow { max-width: var(--measure); }
.wrap > .narrow { margin-left: 0; }

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  background: transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line-dark);
}

.brand {
  font-family: "Barlow Semi Condensed", Inter, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.nav .nav-link {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.nav .nav-link:hover { color: var(--white); }

@media (max-width: 52rem) {
  .nav .nav-link { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 1.9rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-solid { background: var(--white); color: var(--black); }
.btn-solid:hover { background: var(--grey-dim); }

.btn-ghost { background: transparent; color: var(--white); border-color: var(--line-dark); }
.btn-ghost:hover { border-color: var(--white); }

.on-light .btn-solid { background: var(--black); color: var(--white); }
.on-light .btn-solid:hover { background: #2a2a2a; }
.on-light .btn-ghost { color: var(--black); border-color: var(--line-light); }
.on-light .btn-ghost:hover { border-color: var(--black); }

.btn-sm { padding: 0.72rem 1.2rem; font-size: 0.68rem; }
.btn:disabled { opacity: 0.55; cursor: default; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2.25rem 0 0;
}

@media (max-width: 30rem) {
  .actions { flex-direction: column; align-items: stretch; }
}

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

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding: 8rem 0 clamp(3rem, 8vh, 6rem);
  background: var(--black);
  color: var(--white);
  border-top: 0;
  overflow: hidden;
}

/* A faint horizon glow keeps the black from reading as a dead flat field. */
.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% -20%;
  height: 90%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(255, 255, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 16ch; margin-bottom: 1.75rem; }
.hero .lede { color: rgba(255, 255, 255, 0.78); }
.hero .eyebrow { color: rgba(255, 255, 255, 0.55); }

/* ---------- Stat band ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
  background: var(--black);
}

.stats > div {
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--gutter);
  border-left: 1px solid var(--line-dark);
}

.stats > div:first-child { border-left: 0; }

.stat-num {
  font-family: "Barlow Semi Condensed", Inter, sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  color: var(--white);
  display: block;
}

.stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-dim);
  margin: 0.6rem 0 0;
}

@media (max-width: 40rem) {
  .stats { grid-template-columns: 1fr; }
  .stats > div { border-left: 0; border-top: 1px solid var(--line-dark); }
  .stats > div:first-child { border-top: 0; }
}

/* ---------- Section head ---------- */

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 60rem) {
  .section-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 3rem;
  }
  .section-head .lede { margin: 0; }
}

/* ---------- Outcome groups ---------- */

.group-label {
  font-family: "Barlow Semi Condensed", Inter, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 2.75rem 0 0;
}

.group-label:first-of-type { margin-top: 0; }

/* ---------- Numbered list ---------- */

.items {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.items li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line-light);
}

.dark .items li { border-top-color: var(--line-dark); }
.items li:last-child { border-bottom: 1px solid var(--line-light); }
.dark .items li:last-child { border-bottom-color: var(--line-dark); }

.items .num {
  font-family: "Barlow Semi Condensed", Inter, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--grey);
  padding-top: 0.25rem;
}

.items .body { margin: 0; color: var(--ink); font-size: 1.05rem; }
.dark .items .body { color: rgba(255, 255, 255, 0.86); }

@media (max-width: 34rem) {
  .items li { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- Figure callout ---------- */

.figure {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 60rem) {
  .figure { grid-template-columns: auto minmax(0, 1fr); gap: 3.5rem; }
}

.figure-num {
  font-family: "Barlow Semi Condensed", Inter, sans-serif;
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 600;
  line-height: 0.85;
  color: var(--white);
  white-space: nowrap;
}

.figure-note {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 1.25rem 0 0;
}

/* ---------- FAQ ---------- */

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

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

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 0;
  cursor: pointer;
  list-style: none;
  font-family: "Barlow Semi Condensed", Inter, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--grey);
  line-height: 1;
  flex: none;
}

.faq-item[open] summary::after { content: "\2212"; }
.faq-item > p { padding: 0 0 1.6rem; max-width: var(--measure); color: var(--grey); }

/* ---------- Form ---------- */

.form { max-width: 30rem; }
.field { margin: 0 0 1.5rem; }

.field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 0.6rem;
}

.field .opt { color: var(--grey); letter-spacing: 0.1em; }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--white);
  background: transparent;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  transition: border-color 0.18s ease;
}

.field textarea { resize: vertical; padding-top: 0.6rem; }
.field input::placeholder,
.field textarea::placeholder { color: #5e5e5e; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--white);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-bottom-color: #ff6b6b; }

.err {
  color: #ff8a8a;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.fineprint {
  font-size: 0.85rem;
  color: var(--grey);
  margin: 1.5rem 0 0;
  max-width: 30rem;
}

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

.site-footer {
  background: var(--black);
  color: var(--grey-dim);
  border-top: 1px solid var(--line-dark);
  padding: 3rem 0;
  font-size: 0.8rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer a { color: var(--grey-dim); text-decoration: none; }
.site-footer a:hover { color: var(--white); }

/* ---------- Focus ---------- */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  background: var(--white);
  color: var(--black);
  padding: 0.75rem 1rem;
  border-radius: 2px;
}
