/* KEHEM IT — shared foundation.
   Tokens, reset, site chrome (skip link, navigation, footer, buttons, cookie bar)
   and the type scale used by every service page. Loaded before service-page.css. */

:root {
  /* Brand. Teal is the only accent; everything else is a neutral. */
  --teal: #1b7c83;
  --teal-dark: #12565b;
  --teal-deep: #0d3f43;
  --teal-light: #e8f2f2;
  --teal-wash: #f1f6f6;

  /* Neutrals */
  --ink: #101a1c;
  --ink-soft: #1d292c;
  --body: #46585b;
  --muted: #5d6f72;
  --faint: #647680;
  --warm-white: #faf9f7;
  --paper: #ffffff;
  --smoke: #f5f6f4;
  --line: #e2e8e7;
  --line-strong: #cfd8d7;

  /* Type */
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs-micro: 0.72rem;
  --fs-xs: 0.8rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: 1.06rem;
  --fs-lg: 1.2rem;
  --fs-xl: 1.5rem;
  --h1: clamp(2.35rem, 1.35rem + 3.1vw, 3.9rem);
  --h2: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem);
  --h3: clamp(1.12rem, 1rem + 0.35vw, 1.34rem);

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1200px;
  --max-text: 62ch;
  --section-y: clamp(3.75rem, 6vw, 6.5rem);

  /* Radii and shadows — restrained: 2px controls, 10px surfaces */
  --r-sm: 2px;
  --r-md: 6px;
  --r-lg: 10px;
  --shadow-soft: 0 1px 2px rgba(16, 26, 28, 0.04), 0 12px 28px -18px rgba(16, 26, 28, 0.22);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--body);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--teal);
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

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

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

.section {
  padding-block: var(--section-y);
}

.section--paper {
  background: var(--paper);
}

.section--wash {
  background: var(--teal-wash);
}

.section--tight {
  padding-block: clamp(2.75rem, 4.5vw, 4.25rem);
}

.eyebrow {
  display: block;
  margin: 0 0 1rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.lede {
  max-width: var(--max-text);
  margin-top: 1.1rem;
  font-size: var(--fs-md);
  line-height: 1.72;
  color: var(--muted);
}

.h2 {
  font-size: var(--h2);
  max-width: 24ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn--primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

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

.btn--secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn--secondary:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.btn--ghost {
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--teal-dark);
  font-weight: 650;
}

.btn--ghost:hover {
  color: var(--teal);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

/* ---------- Navigation ---------- */

/* Floating bar, matching the site's existing navigation identity — same
   translucent surface and rounded form, with the blur and shadow held back so
   it reads as a strip rather than an object. */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 0.9rem var(--gutter) 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max);
  min-height: 4rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2vw, 1.5rem);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--r-md);
  box-shadow: 0 1px 2px rgba(16, 26, 28, 0.04), 0 10px 30px -22px rgba(16, 26, 28, 0.35);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

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

.nav-links a {
  position: relative;
  padding-block: 0.35rem;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 550;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-links a[aria-current="page"] {
  color: var(--teal-dark);
}

/* Inside the Company dropdown the current page is a <li>, so the trigger
   carries the state instead of the link. */
.nav-drop__btn[data-current="true"] {
  color: var(--teal-dark);
}

.nav-drop {
  position: relative;
}

.nav-drop__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-block: 0.35rem;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 550;
}

.nav-drop__btn:hover {
  color: var(--teal-dark);
}

.nav-drop__menu {
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 50%;
  min-width: 12.5rem;
  padding: 0.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0.16s;
}

.nav-drop:hover .nav-drop__menu,
.nav-drop:focus-within .nav-drop__menu,
.nav-drop.is-open .nav-drop__menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-drop__menu a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  text-decoration: none;
}

.nav-drop__menu a:hover {
  background: var(--teal-wash);
  color: var(--teal-dark);
}

.nav-drop__menu a::after {
  display: none;
}

.nav-cta {
  padding: 0.62rem 1.15rem;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--r-sm);
  color: #fff !important;
  font-weight: 650;
  text-decoration: none;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
}

.nav-toggle span + span {
  margin-top: 5px;
}

@media (max-width: 860px) {
  .nav-inner {
    flex-wrap: wrap;
    padding-block: 0.6rem;
    border-radius: var(--r-md);
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 0.5rem 0.9rem;
    border-top: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 0.8rem;
    text-align: center;
  }
}

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

.site-footer {
  position: relative;
  padding-block: clamp(3rem, 5vw, 4.5rem) 1.75rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--fs-sm);
}

/* The signature sits behind the footer content, not under it, so the columns
   still start at the top of the footer. */
.footer-main {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.footer-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-brand-mark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.footer-note {
  max-width: 34ch;
  margin-top: 1.1rem;
  line-height: 1.7;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.footer-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #46c88a;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer-cols h2 {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.footer-cols li + li {
  margin-top: 0.55rem;
}

.footer-cols a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.footer-cols a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.footer-legal a:hover {
  color: #fff;
}

/* Oversized wordmark: the house signature closing the page. Decorative, so it
   is hidden from assistive technology and never intercepts a click. */
/* The mark is a backdrop behind the footer content rather than a band beneath
   it. The wrapper is the sizing container, so the type can be a fraction of the
   column width and span exactly 100% of it; absolute positioning keeps it out
   of the footer's flow and behind .footer-main. */
.footer-wordmark-wrap {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  container-type: inline-size;
  overflow: hidden;
  pointer-events: none;
}

/* The size is derived from the type rather than guessed. Manrope 800 shapes
   "KEHEM IT" to 4.545em of advance; the -0.045em tracking removes 8 gaps and
   the ink then runs from 0.070em to 4.220em, so the mark is 4.150em wide.
   100 / 4.150 = 24.096cqi, which fits it to exactly 100% of the column. */
.footer-wordmark {
  /* Browsers without container units keep this one. The later declaration
     wins only where 24.096cqi parses as valid. */
  font-size: clamp(3.5rem, 13vw, 11rem);
  font-size: 24.096cqi;
  font-weight: 800;
  /* Line-height 1 keeps the baseline inside the line box. At 0.72 (one cap
     height) the descent pushes the baseline below the box and the overflow
     guard would shave the bottom off every letter. */
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
  /* Cancel the K's left side bearing so the ink starts on the column edge. */
  text-indent: -0.07em;
  /* Trim the leading above the caps so the caps meet the footer's bottom edge;
     the descent is allowed to fall outside and is clipped by the wrapper. */
  margin-bottom: -0.117em;
  color: rgba(255, 255, 255, 0.055);
  user-select: none;
}

/* Light footer variant: the same mark reads as ink rather than light. */
.site-footer--light .footer-wordmark {
  color: rgba(16, 26, 28, 0.06);
}

@media (max-width: 780px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

@media (max-width: 460px) {
  .footer-cols {
    grid-template-columns: 1fr;
  }
}

/* ---------- Cookie bar ---------- */

.cookie-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: none;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: 46rem;
  margin-inline: auto;
  padding: 0.9rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  font-size: var(--fs-xs);
  color: var(--body);
}

/* Hidden until site.js reveals it, so the bar never flashes or blocks a
   no-JavaScript reader. */
.cookie-bar.is-visible {
  display: flex;
}

.cookie-bar p {
  margin: 0;
}

.cookie-bar .actions {
  display: flex;
  flex: none;
  gap: 0.5rem;
}

.cookie-bar button {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 650;
}

.cookie-bar .accept {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dropdown collapses into the mobile list */
@media (max-width: 860px) {
  .nav-drop {
    display: block;
  }

  .nav-drop__btn {
    padding-block: 0.7rem;
    width: 100%;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }

  .nav-drop__menu {
    position: static;
    min-width: 0;
    padding: 0.25rem 0 0.5rem 0.75rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .nav-drop.is-open .nav-drop__menu {
    display: block;
    transform: none;
  }

  .nav-drop__menu a {
    padding-block: 0.55rem;
    border-bottom: 1px solid var(--line);
  }
}
