/* KA7 Technologies — design tokens from the brand brief */
:root {
  --navy: #101D35;
  --navy-900: #0A1426;
  --navy-700: #1A2A4A;
  --blue: #2563EB;
  --blue-light: #60A5FA;
  --amber: #F5A623;
  --amber-dark: #B45309;
  --slate: #94A3B8;
  --slate-600: #475569;
  --offwhite: #F8FAFC;
  --white: #FFFFFF;
  --line: #E2E8F0;
  --line-dark: rgba(148, 163, 184, 0.18);

  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --container: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--navy);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.text-amber { color: var(--amber); }
.text-blue { color: var(--blue); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--navy); padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: var(--navy); }
.btn-amber:hover { background: #F7B84A; box-shadow: 0 8px 24px -8px rgba(245, 166, 35, .6); }
.btn-outline { border-color: rgba(255, 255, 255, .5); color: var(--white); }
.btn-outline:hover { border-color: var(--white); background: rgba(255, 255, 255, .06); }
.btn-small { padding: 9px 18px; font-size: .9375rem; }

.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 29, 53, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line-dark); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: block; padding: 4px 0; }
.brand img { height: 48px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu a:not(.btn) {
  color: #CBD5E1; text-decoration: none; font-weight: 500; font-size: .9375rem;
  transition: color .2s;
}
.nav-menu a:not(.btn):hover { color: var(--white); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  position: relative; border-radius: 8px;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--white); border-radius: 2px;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .8125rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--amber); }
.eyebrow-dark { color: var(--blue-light); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 85% 0%, #17305E 0%, var(--navy) 45%, var(--navy-900) 100%);
  color: var(--white);
  padding: clamp(80px, 13vw, 150px) 0 clamp(120px, 16vw, 200px);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-grid, .section-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%);
}
/* Planet-horizon glow, echoing the brand board */
.hero-horizon {
  position: absolute; left: 50%; bottom: -1020px;
  width: 1900px; height: 1200px; margin-left: -700px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, #0E2A5C 0%, var(--navy-900) 55%);
  box-shadow:
    0 -2px 0 0 rgba(147, 197, 253, .85),
    0 -10px 40px 0 rgba(37, 99, 235, .55),
    0 -40px 140px 10px rgba(37, 99, 235, .28);
  pointer-events: none;
}
.hero-horizon::after {
  content: ""; position: absolute; left: 32%; top: -40px; width: 360px; height: 80px;
  background: radial-gradient(ellipse at center, rgba(255, 214, 140, .55), rgba(245, 166, 35, .18) 40%, transparent 70%);
  filter: blur(6px);
}
.hero-inner { position: relative; max-width: var(--container); }
.hero h1 { max-width: 20ch; margin-bottom: 24px; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: #CBD5E1; max-width: 34em; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Pillars strip ---------- */
.pillars { background: var(--navy-900); color: var(--white); border-top: 1px solid var(--line-dark); }
.pillars-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.pillar { display: flex; gap: 16px; padding: 34px 26px; border-left: 1px solid var(--line-dark); }
.pillar:first-child { border-left: 0; padding-left: 0; }
.pillar h2 { font-size: 1.125rem; margin: 2px 0 6px; }
.pillar p { margin: 0; color: var(--slate); font-size: .9375rem; line-height: 1.5; }
.icon {
  flex: none; width: 34px; height: 34px;
  fill: none; stroke: var(--blue-light); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon .icon-amber { stroke: var(--amber); }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 10vw, 128px) 0; position: relative; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--navy); color: var(--white); overflow: hidden; isolation: isolate; }
.section-dark .section-grid { z-index: -1; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-sub { font-size: 1.125rem; color: var(--slate-600); margin: 0; }
.section-dark .section-sub { color: #CBD5E1; }

/* What we do tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.tile {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 34px 30px;
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.tile::before {
  content: ""; position: absolute; left: 34px; top: 0; width: 44px; height: 3px;
  background: var(--blue); border-radius: 0 0 3px 3px; transition: width .3s var(--ease);
}
.tile:hover { border-color: #BFD3FB; box-shadow: 0 18px 40px -24px rgba(16, 29, 53, .35); transform: translateY(-2px); }
.tile:hover::before { width: 88px; }
.tile-num { display: block; font: 700 .8125rem/1 var(--font-head); color: var(--slate); letter-spacing: .08em; margin-bottom: 18px; }
.tile p { color: var(--slate-600); }
.checklist { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 24px; font-size: .9688rem; color: var(--navy); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px;
  border: 2px solid var(--blue); border-radius: 2px; transform: rotate(45deg);
}

/* Approach steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 70%, var(--amber) 100%);
  opacity: .6;
}
.step { position: relative; padding: 0 28px 0 0; }
.step-num {
  position: relative; display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; margin-bottom: 26px;
  background: var(--navy); border: 1.5px solid var(--blue-light); color: var(--white);
  font: 700 .875rem/1 var(--font-head);
  box-shadow: 0 0 0 6px var(--navy), 0 0 24px rgba(37, 99, 235, .45);
}
.step-num-amber { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 0 6px var(--navy), 0 0 24px rgba(245, 166, 35, .35); }
.step h3 { font-size: 1.375rem; }
.step p { color: #CBD5E1; font-size: 1rem; margin: 0; }

/* Why */
.why { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.why-copy p { color: var(--slate-600); font-size: 1.125rem; }
.why-copy .link-arrow { display: inline-block; margin-top: 8px; }
.why-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.why-item { padding: 28px 24px 26px 0; border-bottom: 1px solid var(--line); }
.why-item:nth-child(even) { padding-left: 24px; padding-right: 0; border-left: 1px solid var(--line); }
.why-item h3 { position: relative; padding-left: 18px; }
.why-item h3::before { content: ""; position: absolute; left: 0; top: .32em; width: 6px; height: 14px; background: var(--amber); border-radius: 2px; transform: skewX(-14deg); }
.why-item p { color: var(--slate-600); margin: 0; font-size: 1rem; }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.about-copy p { color: var(--slate-600); font-size: 1.125rem; }
.essence { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.essence > div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.essence dt { font: 700 1.0625rem/1.5 var(--font-head); color: var(--blue); }
.essence dd { margin: 0; color: var(--navy); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: #EEF2F7; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: .9063rem; font-weight: 500; }

/* Contact */
.contact { padding-bottom: clamp(110px, 13vw, 160px); }
.hero-horizon-low { bottom: -1120px; z-index: -1; opacity: .8; }
.contact-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: rgba(10, 20, 38, .7); border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.field { display: grid; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9375rem; color: #E2E8F0; }
.optional { font-weight: 400; color: var(--slate); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--white);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(148, 163, 184, .35); border-radius: 10px;
  padding: 12px 14px; transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-light); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 3px rgba(96, 165, 250, .3); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #F87171; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { margin: 0; font-size: .9375rem; color: #CBD5E1; }
.form-status.error { color: #FCA5A5; }
.form-status.ok { color: #86EFAC; }

/* Footer */
.site-footer { background: var(--navy-900); color: var(--slate); border-top: 1px solid var(--line-dark); padding: 40px 0; font-size: .9375rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.footer-inner img { height: 44px; width: auto; }
.footer-tag { margin: 0; color: #CBD5E1; font-weight: 500; }
.footer-copy { margin: 0 0 0 auto; }

/* ---------- Reveal motion ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .pillars-inner { grid-template-columns: repeat(2, 1fr); }
  .pillar { padding: 28px 20px; }
  .pillar:nth-child(odd) { border-left: 0; padding-left: 0; }
  .pillar:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .steps::before { display: none; }
  .why, .about, .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); border-bottom: 1px solid var(--line-dark);
    padding: 8px 24px 24px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line-dark); font-size: 1.0625rem; }
  .nav-menu .btn { margin-top: 18px; justify-content: center; padding: 13px 18px; }
  .tiles { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --header-h: 68px; }
  .container { padding: 0 16px; }
  .brand img { height: 42px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .pillars-inner { grid-template-columns: 1fr; }
  .pillar, .pillar:nth-child(odd) { padding: 22px 0; border-left: 0; }
  .pillar + .pillar { border-top: 1px solid var(--line-dark); }
  .tile { padding: 30px 22px 24px; }
  .tile::before { left: 22px; }
  .steps { grid-template-columns: 1fr; row-gap: 36px; }
  .step { padding: 0; }
  .why-list { grid-template-columns: 1fr; }
  .why-item, .why-item:nth-child(even) { padding: 22px 0; border-left: 0; }
  .essence > div { grid-template-columns: 1fr; gap: 6px; }
  .contact-form { grid-template-columns: 1fr; }
  .footer-copy { margin-left: 0; }
}

/* ---------- SMS consent ---------- */
.consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--amber); cursor: pointer; }
.consent label { font-size: .8438rem; line-height: 1.55; color: var(--slate); font-weight: 400; cursor: pointer; }
.consent a { color: var(--blue-light); }

/* ---------- Footer links ---------- */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { color: #CBD5E1; text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Legal pages ---------- */
.legal-hero { background: var(--navy); color: var(--white); padding: clamp(56px, 8vw, 88px) 0 clamp(40px, 6vw, 64px); position: relative; overflow: hidden; isolation: isolate; }
.legal-hero .section-grid { z-index: -1; }
.legal-hero h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); margin-bottom: 12px; }
.legal-hero p { color: #CBD5E1; margin: 0; }
.legal { padding: clamp(48px, 7vw, 80px) 0 clamp(72px, 9vw, 112px); }
.legal .container { max-width: 820px; }
.legal h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 2.2em 0 .6em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.legal h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { margin: 1.6em 0 .5em; }
.legal p, .legal li { color: #334155; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: .45em; }
.legal .callout { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; padding: 18px 22px; margin: 1.2em 0; }
.legal .callout p:last-child { margin: 0; }
.legal .toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 26px; margin-bottom: 48px; }
.legal .toc p { font-weight: 600; margin-bottom: .4em; color: var(--navy); }
.legal .toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.legal .toc li { margin: 0 0 .3em; break-inside: avoid; }
@media (max-width: 600px) { .legal .toc ol { columns: 1; } }
