/* ==========================================================================
   Klearsk.ai — shared stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  --bg: oklch(98% 0.004 95);
  --bg-alt: oklch(96% 0.006 95);
  --surface: oklch(100% 0 0);
  --border: oklch(90% 0.006 95);
  --text: oklch(22% 0.015 260);
  --text-muted: oklch(46% 0.02 260);
  --navy: oklch(28% 0.05 260);
  --navy-2: oklch(35% 0.05 260);
  --accent: oklch(62% 0.13 195);
  --accent-dark: oklch(50% 0.13 195);
  --accent-bright: oklch(75% 0.13 195);
  --accent-tint: oklch(94% 0.03 195);
  --accent-tint-border: oklch(80% 0.06 195);

  --container-max: 1240px;
  --gutter: clamp(20px, 5vw, 100px);
  --section-pad: clamp(48px, 8vw, 100px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Manrope', system-ui, sans-serif; margin: 0; }
p { margin: 0; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }

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

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

.section { padding-block: var(--section-pad); }
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--navy); }

.eyebrow {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 28px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 15.5px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, background-color .15s ease;
}
.btn-sm { padding: 11px 22px; font-size: 14.5px; gap: 8px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-muted); background: var(--bg-alt); }
.btn-accent { background: var(--accent); color: var(--navy); }
.btn-accent:hover { background: var(--accent-bright); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}
.link-arrow:hover { gap: 10px; color: var(--accent-dark); }
.link-arrow svg { transition: transform .15s ease; }

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  height: 88px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo:hover { color: inherit; }
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { color: var(--navy); }
.logo-mark svg circle { fill: var(--accent-dark); }
.logo-word {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo-word span { color: var(--accent-dark); }

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color .15s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.header-cta { flex-shrink: 0; }

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

.hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 100px);
}
.hero-content { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: block; }

.hero h1 {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 840px;
  color: var(--text);
}
.hero-sub {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }

.page-hero { padding: clamp(56px, 8vw, 88px) 0 clamp(40px, 6vw, 64px); }
.page-hero .container { display: flex; flex-direction: column; gap: 18px; }
.page-hero h1 {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--text);
  max-width: 760px;
}
.page-hero p { font-size: 17px; line-height: 1.6; color: var(--text-muted); max-width: 680px; }

/* ---------- Section headers ---------- */

.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.5vw, 36px); font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.section-head p { font-size: 16.5px; line-height: 1.6; color: var(--text-muted); }

/* ---------- Card grid ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -16px rgba(20, 30, 55, 0.2);
  border-color: var(--accent);
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
}
.card h3 { font-size: 19px; font-weight: 700; color: var(--text); }
.card p { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.card .link-arrow { margin-top: auto; font-size: 14.5px; }

/* ---------- Products ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -16px rgba(20, 30, 55, 0.2);
  border-color: var(--accent);
}
.product-card.is-coming-soon { opacity: 0.75; }
.product-card.is-coming-soon:hover { transform: none; box-shadow: none; border-color: var(--border); }
.product-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}
.product-status.is-live { background: var(--accent-tint); color: var(--accent-dark); }
.product-status.is-soon { background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border); }
.product-card h3 { font-size: 20px; font-weight: 800; color: var(--text); }
.product-tagline { font-size: 14px; font-weight: 600; color: var(--accent-dark); }
.product-card p.product-desc { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.product-features { display: flex; flex-wrap: wrap; gap: 8px; }
.product-features span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}
.product-card .link-arrow { margin-top: auto; font-size: 14.5px; }

/* ---------- Steps ---------- */

.steps { display: flex; flex-wrap: wrap; gap: 40px; }
.step { display: flex; flex-direction: column; gap: 12px; flex: 1 1 200px; }
.step-num { font-family: 'Manrope', sans-serif; font-size: 32px; font-weight: 800; color: var(--accent); }
.step h4 { font-size: 17px; font-weight: 700; color: var(--text); }
.step p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }

/* ---------- Differentiators (icon + text, 3-up) ---------- */

.diff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.diff-item { display: flex; flex-direction: column; gap: 14px; }
.diff-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--accent-dark);
}
.diff-item h4 { font-size: 17px; font-weight: 700; color: var(--text); }
.diff-item p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }

/* ---------- CTA banner ---------- */

.cta-banner {
  padding-block: clamp(56px, 8vw, 80px);
}
.cta-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-banner h2 { font-size: clamp(26px, 3.5vw, 32px); font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.cta-banner p { font-size: 16px; color: oklch(80% 0.02 260); line-height: 1.6; margin-top: 10px; }
.cta-banner-text { max-width: 600px; }

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

.site-footer { background: var(--navy); padding: 64px 0 40px; }
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid oklch(40% 0.04 260 / 0.6);
}
.footer-brand { max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.footer-brand .logo-mark { background: var(--accent-tint); width: 30px; height: 30px; border-radius: 7px; }
.footer-brand .logo-word { color: #fff; font-size: 18px; }
.footer-brand .logo-word span { color: var(--accent-bright); }
.footer-brand p { color: oklch(78% 0.02 260); font-size: 14.5px; line-height: 1.6; }
.footer-cols { display: flex; gap: 80px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col-title {
  color: oklch(65% 0.02 260);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col a, .footer-col span { color: oklch(85% 0.015 260); font-size: 14.5px; text-decoration: none; }
.footer-col a:hover { color: var(--accent-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
}
.footer-bottom span { color: oklch(60% 0.02 260); font-size: 13px; }

/* ---------- Services: detail blocks ---------- */

.service-block {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  padding: 52px 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: none; }
.service-block-head { display: flex; flex-direction: column; gap: 16px; }
.service-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark);
}
.service-block-head h3 { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.25; }
.service-block-body { display: flex; flex-direction: column; gap: 22px; }
.service-block-body > p { font-size: 16.5px; line-height: 1.7; color: var(--text-muted); max-width: 640px; }
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
  max-width: 640px;
}
.check-item { display: flex; align-items: center; gap: 10px; }
.check-item svg { color: var(--accent-dark); flex-shrink: 0; }
.check-item span { font-size: 14.5px; color: var(--text); }

/* ---------- Entry-offer callout ---------- */

.callout {
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border);
  border-radius: 16px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.callout-text { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.callout-text .eyebrow { font-size: 13px; }
.callout-text h3 { font-size: 22px; font-weight: 800; color: var(--text); }
.callout-text p { font-size: 15px; line-height: 1.6; color: var(--text-muted); }

/* ---------- About: principles ---------- */

.principle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.principle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.principle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -16px rgba(20, 30, 55, 0.2);
  border-color: var(--accent);
}
.principle-card h4 { font-size: 18px; font-weight: 700; color: var(--text); }
.principle-card p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

.two-col { display: grid; grid-template-columns: 280px 1fr; gap: 60px; }
.two-col .label { font-size: 13.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.mission-statement { padding-top: 48px; border-top: 1px solid var(--border); }
.mission-statement p { font-size: 22px; line-height: 1.55; color: var(--text); font-weight: 500; max-width: 760px; }
.body-copy { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.body-copy p { font-size: 17px; line-height: 1.7; color: var(--text-muted); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 380px; gap: 60px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.form-field input,
.form-field textarea {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 15px;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
  transition: border-color .15s ease;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); }
.form-note {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.form-note.is-success { color: var(--accent-dark); font-weight: 600; }
.form-note.is-error { color: oklch(55% 0.18 25); font-weight: 600; }

.contact-side { display: flex; flex-direction: column; gap: 24px; }
.info-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.info-card h4 { font-size: 16px; font-weight: 700; color: var(--text); }
.info-row { display: flex; flex-direction: column; gap: 6px; }
.info-row .info-label {
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.info-row .info-value { font-size: 15px; color: var(--text); }
.plain-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plain-card h4 { font-size: 16px; font-weight: 700; color: var(--text); }
.plain-card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }

/* ---------- 404 ---------- */
.error-page {
  min-height: calc(100vh - 88px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--gutter);
}
.error-page .container { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.error-page h1 { font-size: clamp(48px, 8vw, 96px); font-weight: 800; color: var(--accent); }
.error-page h2 { font-size: 24px; font-weight: 700; color: var(--text); }
.error-page p { font-size: 16px; color: var(--text-muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diff-grid { grid-template-columns: 1fr; }
  .service-block { grid-template-columns: 1fr; gap: 24px; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .principle-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-cta { display: none; }

  .site-header.is-open .nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px var(--gutter) 24px;
  }
  .site-header.is-open .header-cta {
    display: inline-flex;
    position: absolute;
    top: 88px;
    left: var(--gutter);
    margin-top: 248px;
  }
  .site-header.is-open .nav-link { padding: 10px 0; width: 100%; }

  .card-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-banner .container { flex-direction: column; align-items: flex-start; }
  .callout { flex-direction: column; align-items: flex-start; }
  .footer-cols { gap: 40px; }
  .footer-bottom { flex-direction: column; }
}
