/* ==========================================================================
   KLAI Solutions — workwithklai.com
   Black & white editorial system. No gradients, no heavy shadows.
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --muted: #555555;      /* 7.4:1 on white */
  --soft: #6b6b6b;       /* 5.3:1 on white — small print only */
  --line: #e4e4e4;
  --line-strong: #0a0a0a;
  --tint: #f6f6f4;       /* barely-there section tint */
  --error: #b00020;

  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --max: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(80px, 12vw, 160px);
  --radius: 2px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Type ---------- */
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.display {
  font-size: clamp(3rem, 10.5vw, 8.5rem);
  line-height: .94;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.display em { letter-spacing: -0.02em; }
.display-md { font-size: clamp(2.5rem, 7vw, 5.75rem); }

.h2 {
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  max-width: 16ch;
}
.h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; font-weight: 500; letter-spacing: -0.025em; }
.h4 { font-size: 1.3rem; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; }

.eyebrow, .section-index, .card-kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow { margin-bottom: 28px; }
.section-index {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted);
  margin-bottom: 28px;
}
.section-index::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 40ch; margin-top: 24px; }
.fine { font-size: 13px; line-height: 1.5; color: var(--soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--paper); color: var(--ink); }
.btn-outline { background: var(--paper); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-light { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.btn-light:hover { background: transparent; color: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 12px; }
.btn-lg { min-height: 60px; padding: 0 28px; }
.btn-block { width: 100%; }

.btn-call { gap: 18px; }
.btn-number {
  font-family: var(--sans); font-weight: 500; letter-spacing: .02em; text-transform: none; font-size: 15px;
  padding-left: 18px; border-left: 1px solid currentColor;
}

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 44px; }
.support-line { margin-top: 18px; font-size: 15px; color: var(--muted); max-width: 46ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255,255,255,.86); backdrop-filter: blur(8px); }
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.brand { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.site-nav ul { display: flex; gap: 32px; }
.site-nav a { font-size: 14px; text-decoration: none; color: var(--muted); transition: color .2s; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.split { display: grid; gap: 56px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
}

/* 01 Hero */
.hero { position: relative; overflow: hidden; padding: clamp(72px, 13vw, 176px) 0 clamp(80px, 12vw, 160px); }
.hero-inner { position: relative; }
.hero .display { max-width: 11ch; }
.hero-sub { margin-top: 36px; font-size: clamp(1.1rem, 1.9vw, 1.35rem); line-height: 1.5; max-width: 38ch; color: #333; }
/* subtle vertical rules — abstract grid treatment */
.hero-lines {
  position: absolute; inset: 0; margin: 0 auto; max-width: var(--max);
  padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(4, 1fr); pointer-events: none;
}
.hero-lines span { border-right: 1px solid #f0f0f0; }
.hero-lines span:first-child { grid-column: 2; }
.hero-lines span:nth-child(2) { grid-column: 3; }
.hero-lines span:nth-child(3) { grid-column: 4; border-right: 0; }
.hero-lines::after {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; border-bottom: 1px solid #f0f0f0;
}

/* 02 Demo */
.demo .btn-call { margin-top: 40px; }
.demo-list { border-top: 1px solid var(--line-strong); counter-reset: none; }
.demo-list li {
  display: flex; align-items: baseline; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem); letter-spacing: -0.01em;
}
.num, .step-num { font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--soft); font-variant-numeric: tabular-nums; min-width: 22px; }

/* 03 Offer */
.offer-grid { display: grid; gap: 16px; margin-top: 56px; }
@media (min-width: 760px) { .offer-grid { grid-template-columns: 1fr 1fr; gap: 0; } .offer-card + .offer-card { border-left: 0; } }
.card { border: 1px solid var(--line-strong); padding: clamp(28px, 4vw, 48px); background: var(--paper); }
.offer-card { display: flex; flex-direction: column; min-height: 320px; }
.card-kicker { color: var(--soft); margin-bottom: 40px; }
.offer-card p:not(.card-kicker):not(.card-foot) { margin-top: 18px; color: var(--muted); max-width: 38ch; }
.card-foot { margin-top: auto; padding-top: 32px; font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.3; }

.price-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px;
  margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line);
}
.price { display: flex; align-items: baseline; gap: 12px; }
.price-amount { font-size: clamp(3rem, 7vw, 5rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.price-unit { font-size: 1.1rem; color: var(--muted); }
.price-row .fine { margin-top: 12px; max-width: 44ch; }

/* 04 How */
.how { background: var(--tint); }
.steps { display: grid; margin-top: 56px; border-top: 1px solid var(--line-strong); }
.steps li { padding: 28px 0 32px; border-bottom: 1px solid #dcdcd8; display: grid; grid-template-columns: 48px 1fr; column-gap: 8px; }
.step-title { font-size: 1.6rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.steps p { grid-column: 2; margin-top: 8px; color: var(--muted); }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { display: block; padding: 32px 28px 8px 0; border-bottom: 0; }
  .steps li + li { padding-left: 28px; border-left: 1px solid #dcdcd8; }
  .step-num { display: block; margin-bottom: 56px; }
  .step-title { font-size: 2rem; }
}

/* 05 Why */
.why-inner { display: grid; gap: 0; }
.why .h2 { max-width: none; }
.why-statement {
  margin-top: clamp(40px, 7vw, 88px);
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 6.5rem); line-height: 1; letter-spacing: -0.02em;
  padding-bottom: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line-strong);
}
.why-body { display: grid; gap: 24px; margin-top: 32px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.why-copy { display: grid; gap: 16px; color: var(--muted); max-width: 44ch; }
.why-close em { font-size: 1.5em; line-height: 1.2; }
@media (min-width: 900px) {
  .why-body { grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }
  .why-close { justify-self: end; text-align: right; }
}

/* 06 Services */
.section-head { display: grid; gap: 0; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }
  .section-head .lead { margin-top: 0; justify-self: end; }
}
.service-grid {
  display: grid; gap: 1px; margin-top: 56px;
  background: var(--line-strong); border: 1px solid var(--line-strong);
}
.service { background: var(--paper); padding: clamp(28px, 3.2vw, 40px); display: flex; flex-direction: column; min-height: 300px; }
.service p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.tags { margin-top: auto; padding-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 12.5px; line-height: 1; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
}
.service .service-note { margin-top: 16px; font-size: 13px; color: var(--soft); }
@media (min-width: 700px) { .service-grid { grid-template-columns: repeat(2, 1fr); } .service:last-child { grid-column: 1 / -1; } }
@media (min-width: 1000px) {
  .service-grid { grid-template-columns: repeat(6, 1fr); }
  .service { grid-column: span 2; }
  .service:nth-child(4), .service:nth-child(5) { grid-column: span 3; }
  .service:last-child { grid-column: span 3; }
}

/* 07 ChatGPT Ads — inverted, visually separate */
.ads { background: var(--ink); color: var(--paper); border-top: 0; padding: clamp(72px, 10vw, 128px) 0; }
.eyebrow-light { color: #bdbdbd; margin-bottom: 20px; }
.ads .h2 { font-size: clamp(2.75rem, 7vw, 5.5rem); }
.ads-inner { display: grid; gap: 32px; }
.ads-body p { color: #d4d4d4; max-width: 44ch; font-size: clamp(1.05rem, 1.6vw, 1.2rem); margin-bottom: 32px; }
@media (min-width: 900px) { .ads-inner { grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; } }

/* 09 Contact */
.contact-intro .lead { margin-bottom: 40px; }
.direct { border-top: 1px solid var(--line); }
.direct > div, .footer-contact > div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.direct dt, .footer-contact dt { font-size: 13px; color: var(--soft); }
.direct dd, .footer-contact dd { text-align: right; overflow-wrap: anywhere; }
.direct a, .footer-contact a { text-decoration: none; }
.direct a:hover, .footer-contact a:hover { text-decoration: underline; }

.form-wrap { border: 1px solid var(--line-strong); padding: clamp(24px, 4vw, 44px); }
.contact-form { display: grid; gap: 22px; }
.field-row { display: grid; gap: 22px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-size: 14px; font-weight: 500; }
.req { color: var(--ink); }
.opt { color: var(--soft); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0;
  font: inherit; font-size: 16px; /* 16px prevents iOS zoom */
  color: var(--ink); background: var(--paper);
  border: 1px solid #c9c9c9; border-radius: var(--radius);
  padding: 13px 14px;
  transition: border-color .15s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #8a8a8a; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); pointer-events: none;
}
.field select { padding-right: 40px; cursor: pointer; }
.field [aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field-error { font-size: 13px; color: var(--error); min-height: 0; }
.field-error:empty { display: none; }
.form-micro { text-align: center; margin-top: -6px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: 15px; }
.form-error { border: 1px solid var(--error); color: var(--error); padding: 14px 16px; }
.form-error a { color: inherit; }
.form-success { display: grid; gap: 14px; padding: 12px 0; }
.form-success:focus { outline: none; }
.form-success p:last-child { color: var(--muted); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* 10 Final */
.final { text-align: center; }
.final-inner { display: flex; flex-direction: column; align-items: center; }
.final .display { max-width: 14ch; }
.final .lead { margin-left: auto; margin-right: auto; }
.cta-center { justify-content: center; }

/* 11 Footer */
.site-footer { background: var(--ink); color: var(--paper); padding: 72px 0 40px; }
.footer-top { display: grid; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid #2a2a2a; }
.footer-brand { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 500; letter-spacing: -0.035em; }
.footer-tag { margin-top: 10px; color: #bdbdbd; font-size: 14px; }
.footer-contact { border-top: 1px solid #2a2a2a; }
.footer-contact > div { border-color: #2a2a2a; }
.footer-contact dt { color: #a3a3a3; }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 80px; } }
.disclaimer { margin-top: 32px; font-size: 12.5px; line-height: 1.6; color: #a3a3a3; max-width: 80ch; }
.copyright { margin-top: 20px; font-size: 12.5px; color: #8f8f8f; }

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta { display: none; }
@media (max-width: 767px) {
  .site-nav { display: none; }
  .header-inner { gap: 16px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); } /* keeps footer clear of the bar */
  .mobile-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 1px solid var(--line);
    transition: transform .25s var(--ease);
  }
  .mobile-cta .btn { min-height: 54px; }
  .mobile-cta.is-hidden { transform: translateY(110%); }
  .cta-group .btn { width: 100%; }
  .btn-call { justify-content: space-between; }
}

@media (max-width: 380px) {
  .btn-lg { padding: 0 18px; }
  .btn-call { gap: 10px; }
  .btn-number { padding-left: 10px; font-size: 14px; }
}

/* Simple pages (success / 404) */
.simple { min-height: 70vh; display: flex; align-items: center; padding: 96px 0; }
.simple .lead { margin-bottom: 40px; }

/* Call buttons: keep the number intact; stack label + number on small phones */
.btn-label, .btn-number { white-space: nowrap; }
@media (max-width: 480px) {
  .btn-call { flex-direction: column; justify-content: center; gap: 4px; padding-top: 12px; padding-bottom: 12px; min-height: 68px; }
  .btn-call .btn-number { border-left: 0; padding-left: 0; font-size: 16px; }
}

/* Small-phone header */
.brand, .header-inner .btn { white-space: nowrap; }
@media (max-width: 360px) {
  .brand { font-size: 15px; }
  .header-inner .btn-sm { padding: 0 12px; letter-spacing: .08em; }
}

/* Offer-accuracy notes (subtle) */
.cta-note { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--soft); max-width: 40ch; }
.offer .h2 + .lead { margin-top: 20px; }
.price-includes { margin-top: 14px; font-size: 15px; font-weight: 500; }
.price-row .price-includes + .fine { margin-top: 6px; }
.price-cta { display: flex; flex-direction: column; align-items: flex-start; }
@media (min-width: 760px) { .price-cta { align-items: flex-end; } .price-cta .cta-note { text-align: right; } }
@media (max-width: 759px) { .price-cta, .price-cta .btn { width: 100%; } }
.final .support-line { margin-left: auto; margin-right: auto; }

/* Why KLAI: tighter vertical rhythm (same styles, less height) */
.why { padding: clamp(48px, 6.5vw, 84px) 0; }
.why .section-index { margin-bottom: 20px; }
.why .why-statement { margin-top: clamp(20px, 3vw, 32px); padding-bottom: clamp(18px, 2.5vw, 28px); font-size: clamp(2.25rem, 6vw, 5rem); }
.why .why-body { margin-top: 20px; gap: 16px; }
.why .why-close em { font-size: 1.35em; }
.support-line-tight { margin-top: 6px; }
