/* ==========================================================================
   Kalspark Inc — kalspark.com
   Design tokens per brand system v1.
   ========================================================================== */

:root {
  --primary: #12569C;
  --primary-dark: #0B3A6E;
  --primary-tint: #EAF1FA;
  --accent: #F26522;
  --accent-deep: #B4400C;
  --accent-tint: #FDEDE4;
  --accent-on-dark: #FF8A4C;

  --text: #0E1726;
  --muted: #5A6675;
  --border: #E2E6EC;
  --border-dark: #1E4E86;
  --surface: #F6F8FA;
  --surface-2: #FFFFFF;
  --text-on-dark: #E8EEF6;
  --muted-on-dark: #A9BDD6;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, .06);
  --shadow-md: 0 8px 24px rgba(11, 58, 110, .10);

  --font-head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container: 1140px;
  --gutter: 24px;
  --section-y: 96px;
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text);
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.5rem); line-height: 1.08; letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.25rem); line-height: 1.15; letter-spacing: -.015em; }
h3 { font-size: clamp(1.125rem, 1.7vw, 1.25rem); line-height: 1.3; letter-spacing: -.01em; font-weight: 500; }
h4 { font-size: 1.0625rem; line-height: 1.4; font-weight: 600; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

ul { margin: 0 0 1.1em; padding-left: 1.15em; }
li { margin-bottom: .4em; }

:focus-visible {
  outline: 1px solid var(--primary-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(242, 101, 34, .45);
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary-dark); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ----------------------------------------------------------- utilities -- */

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

.section { padding: var(--section-y) 0; }
.section--tight { padding: calc(var(--section-y) * .65) 0; }
.section--surface { background: var(--surface); }
.section--dark { background: var(--primary-dark); color: var(--text-on-dark); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark a { color: var(--accent-on-dark); }

.eyebrow {
  font-family: var(--font-body);
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent-deep);
  margin: 0 0 14px; display: block;
}
.section--dark .eyebrow { color: var(--accent-on-dark); }

.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--muted); }
.section--dark .lead { color: var(--muted-on-dark); }

.measure { max-width: 68ch; }
.measure-sm { max-width: 56ch; }

.section-head { margin-bottom: 48px; }
.small { font-size: .875rem; line-height: 1.5; color: var(--muted); }
.section--dark .small { color: var(--muted-on-dark); }

/* -------------------------------------------------------------- button -- */

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  line-height: 1; padding: 15px 26px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-deep); color: #fff; }

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; }

.btn--outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--outline:hover { border-color: var(--primary); background: var(--primary-tint); }

.section--dark .btn--outline { color: #fff; border-color: var(--border-dark); }
.section--dark .btn--outline:hover { background: rgba(255, 255, 255, .08); border-color: var(--muted-on-dark); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.arrow-link {
  font-weight: 600; font-size: .9375rem;
  display: inline-flex; align-items: center; gap: .35em;
}
.arrow-link::after { content: "\2192"; transition: transform .16s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* -------------------------------------------------------------- header -- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav { display: flex; align-items: center; gap: 24px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-word {
  font-family: var(--font-head); font-weight: 600; font-size: 1.28rem;
  letter-spacing: .08em; color: var(--primary-dark); line-height: 1;
}
.brand-word .kal { color: var(--primary); }

.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 9px 14px; border-radius: var(--radius);
  font-size: .9375rem; font-weight: 500; color: var(--text);
}
.nav-links a:hover { background: var(--primary-tint); color: var(--primary-dark); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--primary); font-weight: 600; }

.nav-cta { margin-left: 8px; }
.nav-cta .btn { padding: 12px 20px; font-size: .9375rem; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; cursor: pointer; color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 22px; box-shadow: var(--shadow-md);
  }
  .nav-menu.is-open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links a { padding: 13px 12px; font-size: 1rem; }
  .nav-cta { margin: 12px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; padding: 15px 20px; }
}

/* ---------------------------------------------------------------- hero -- */

.hero {
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(242, 101, 34, .10), transparent 62%),
    radial-gradient(760px 460px at 6% 0%, rgba(18, 86, 156, .09), transparent 60%),
    var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: clamp(56px, 8vw, 104px) 0 clamp(52px, 7vw, 92px);
}
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 60ch; margin-bottom: 32px; }
.hero .btn-row { margin-bottom: 18px; }

.hero--inner { padding: clamp(48px, 6vw, 76px) 0 clamp(44px, 5.5vw, 68px); }
.hero--inner h1 { max-width: 22ch; }

/* --------------------------------------------------------------- cards -- */

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 940px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.section--surface .card { background: #fff; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #CFD8E3; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 1rem; }
.card__num {
  font-family: var(--font-head); font-size: .8125rem; font-weight: 600;
  letter-spacing: .1em; color: var(--accent-deep); display: block; margin-bottom: 12px;
}
.card__rule { width: 34px; height: 3px; background: var(--accent); border-radius: 2px; margin-bottom: 18px; }

/* ------------------------------------------------------- role clusters -- */

.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 940px) { .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .roles { grid-template-columns: minmax(0, 1fr); } }

.role-group {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px 22px; background: #fff;
}
.role-group h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 12px; }
.role-group ul { list-style: none; padding: 0; margin: 0; }
.role-group li {
  font-size: .9375rem; color: var(--muted); line-height: 1.5;
  padding-left: 18px; position: relative; margin-bottom: 7px;
}
.role-group li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary-tint);
  border: 1.5px solid var(--primary);
}

/* --------------------------------------------------------------- steps -- */

.steps { display: grid; gap: 0; border-top: 1px solid var(--border); }
.step {
  display: grid; grid-template-columns: 120px minmax(0, 1fr);
  gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--border);
}
.step__num {
  font-family: var(--font-head); font-size: 1.75rem; font-weight: 600;
  color: var(--primary); letter-spacing: -.02em; line-height: 1.1;
}
.step__num span { display: block; font-family: var(--font-body); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }
.section--dark .step { border-color: var(--border-dark); }
.section--dark .step p { color: var(--muted-on-dark); }
.section--dark .step__num { color: var(--accent-on-dark); }
.section--dark .steps { border-color: var(--border-dark); }

@media (max-width: 700px) {
  .step { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 26px 0; }
  .step__num { display: flex; align-items: baseline; gap: 12px; font-size: 1.375rem; }
  .step__num span { margin-top: 0; }
}

/* --------------------------------------------------------------- split -- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

.stack { display: grid; gap: 28px; }
.stack > div h3 { margin-bottom: 6px; }
.stack > div p { color: var(--muted); margin: 0; font-size: 1rem; }
.section--dark .stack > div p { color: var(--muted-on-dark); }

/* --------------------------------------------------------------- table -- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border-dark); border-radius: var(--radius-lg); }
.handle-table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 620px; }
.handle-table th, .handle-table td { text-align: left; padding: 18px 22px; vertical-align: top; border-bottom: 1px solid var(--border-dark); }
.handle-table tr:last-child th, .handle-table tr:last-child td { border-bottom: 0; }
.handle-table th { width: 210px; font-family: var(--font-head); font-weight: 600; color: #fff; white-space: nowrap; }
.handle-table td { color: var(--muted-on-dark); }

/* ----------------------------------------------------------------- faq -- */

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 44px 22px 0; position: relative;
  font-family: var(--font-head); font-size: 1.0625rem; font-weight: 500; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 11px; height: 11px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq summary:hover { color: var(--primary); }
.faq__body { padding: 0 44px 24px 0; color: var(--muted); }
.faq__body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ callouts -- */

.callout {
  background: var(--primary-tint); border: 1px solid #D6E3F3;
  border-radius: var(--radius-lg); padding: 26px 28px;
}
.callout--accent { background: var(--accent-tint); border-color: #F6D6C4; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--muted); font-size: 1rem; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .42em; width: 11px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ------------------------------------------------------------ cta band -- */

.cta-band { text-align: center; }
.section--dark.cta-band { background: linear-gradient(158deg, #0B3A6E 0%, #12569C 100%); }
.cta-band__rule { width: 44px; height: 3px; background: var(--accent); border-radius: 2px; margin: 0 auto 26px; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band .lead { margin: 0 auto 30px; max-width: 62ch; }
.cta-band .btn-row { justify-content: center; }

/* -------------------------------------------------------------- contact -- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.addr { font-style: normal; line-height: 1.75; }
.addr strong { font-family: var(--font-head); font-weight: 600; }

.form { display: grid; gap: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 28px; box-shadow: var(--shadow-sm); }
.field { display: grid; gap: 7px; }
.field label { font-size: .875rem; font-weight: 600; color: var(--text); }
.field label .req { color: var(--accent-deep); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #C7D2E0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.form .btn { width: 100%; justify-content: center; }

/* --------------------------------------------------------------- footer -- */

.site-footer { background: var(--primary-dark); color: var(--text-on-dark); padding: 68px 0 0; }
.site-footer a { color: var(--text-on-dark); }
.site-footer a:hover { color: #fff; text-decoration-color: var(--accent-on-dark); }

.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.25fr; gap: 40px; padding-bottom: 52px; }
@media (max-width: 940px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

.footer-brand .brand-word { color: #fff; }
.footer-brand .brand-word .kal { color: var(--accent-on-dark); }
.footer-brand p { color: var(--muted-on-dark); font-size: .9375rem; margin-top: 16px; max-width: 34ch; }
.footer-brand .tagline { color: var(--text-on-dark); font-family: var(--font-head); margin-top: 10px; }

.footer-col h4 { color: #fff; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; font-family: var(--font-body); margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; font-size: .9375rem; }
.footer-col address { font-style: normal; font-size: .9375rem; line-height: 1.7; color: var(--muted-on-dark); }
.footer-col address a { color: var(--accent-on-dark); }

.footer-legal { border-top: 1px solid var(--border-dark); padding: 26px 0 34px; }
.footer-legal p { font-size: .8125rem; line-height: 1.6; color: var(--muted-on-dark); margin-bottom: 12px; }
.footer-legal p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- misc -- */

@media (max-width: 700px) { :root { --section-y: 60px; } body { font-size: 16px; } }

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

@media print {
  .site-header, .nav-toggle, .cta-band, .form { display: none; }
  body { font-size: 12pt; }
}
