/* ==========================================================================
   KINANA ICT — components.css
   Reusable UI: buttons, cards, header + mega menu, hero, footer, forms,
   badges, stats, AI network visual, and page-level building blocks.
   ========================================================================== */

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--k-font-display);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  padding: 15px 26px;
  border-radius: var(--k-r-pill);
  border: 1px solid transparent;
  transition: transform 0.18s var(--k-ease), box-shadow 0.25s var(--k-ease),
              background 0.25s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--k-grad-brand);
  color: #fff;
  box-shadow: var(--k-shadow-glow);
}
.btn--primary:hover { color: #fff; box-shadow: 0 26px 60px -18px rgba(22, 166, 222, 0.6); }

.btn--dark { background: var(--k-navy-900); color: #fff; }
.btn--dark:hover { background: var(--k-navy-800); color: #fff; }

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255,255,255,0.5); }

.btn--outline {
  background: transparent;
  color: var(--k-blue-700);
  border-color: var(--k-slate-200);
}
.btn--outline:hover { border-color: var(--k-blue-500); color: var(--k-blue-600); background: var(--k-bg-soft); }

.btn--sm { padding: 11px 18px; font-size: 0.9rem; }
.btn--lg { padding: 17px 32px; font-size: 1.05rem; }

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--k-font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--k-blue-600);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.22s var(--k-ease); }
.link-arrow:hover svg { transform: translateX(5px); }

/* ---------- Badges / pills ---------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--k-font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 7px 14px;
  border-radius: var(--k-r-pill);
  background: var(--k-bg-alt);
  color: var(--k-blue-700);
  border: 1px solid var(--k-line);
}
.badge--ai {
  background: rgba(47, 211, 232, 0.12);
  color: var(--k-blue-700);
  border-color: rgba(23, 196, 224, 0.35);
}
.badge--glass {
  background: rgba(255, 255, 255, 0.08);
  color: #cfeefb;
  border-color: rgba(255, 255, 255, 0.18);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--k-cyan-400); box-shadow: 0 0 0 4px rgba(47,211,232,0.18); }

/* ---------- Cards -------------------------------------------------------- */
.card {
  background: var(--k-bg);
  border: 1px solid var(--k-line);
  border-radius: var(--k-r-lg);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--k-shadow-sm);
  transition: transform 0.3s var(--k-ease), box-shadow 0.3s var(--k-ease), border-color 0.3s ease;
  height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--k-shadow-md); border-color: var(--k-blue-300); }

.card__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--k-grad-brand);
  color: #fff;
  margin-bottom: 20px;
  box-shadow: var(--k-shadow-glow);
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.card p { color: var(--k-slate-500); font-size: 1rem; }
.card__link { margin-top: 20px; }

/* Card that is a full clickable block */
a.card { display: block; color: inherit; }
a.card:hover h3 { color: var(--k-blue-600); }

/* Solution card variant with top accent */
.card--accent { position: relative; overflow: hidden; }
.card--accent::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--k-grad-brand); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--k-ease);
}
.card--accent:hover::before { transform: scaleX(1); }

/* Glass card (on dark) */
.card--glass {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: none;
}
.card--glass:hover { border-color: rgba(47, 211, 232, 0.4); background: rgba(255,255,255,0.07); }
.card--glass h3 { color: #fff; }
.card--glass p { color: var(--k-slate-400); }

/* Feature list inside cards */
.check-list li {
  position: relative;
  padding-left: 30px;
  margin-top: 12px;
  color: var(--k-slate-600);
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--k-grad-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.section--ink .check-list li { color: var(--k-slate-300); }

/* ---------- Stats -------------------------------------------------------- */
.stat { text-align: left; }
.stat__num {
  font-family: var(--k-font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--k-grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__label { margin-top: 10px; color: var(--k-slate-500); font-weight: 500; }
.section--ink .stat__label { color: var(--k-slate-400); }

/* ---------- Header + navigation ----------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--k-header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header__inner {
  width: 100%;
  max-width: var(--k-maxw);
  margin-inline: auto;
  padding-inline: var(--k-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* Transparent over dark hero, solid on scroll */
.site-header--transparent { background: transparent; }
/* The glass lives on a pseudo-element, NOT on .site-header itself: a
   backdrop-filter on the header would make it the containing block for the
   position:fixed mobile drawer, collapsing the drawer into the header box. */
.site-header--solid::before,
.site-header.is-scrolled::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(170%) blur(16px);
  box-shadow: 0 8px 30px -20px rgba(11,42,64,0.3);
}
/* No hairline under the header — the strip's own light thread carries it */
/* Compacts a touch once you start scrolling */
.site-header.is-scrolled { height: calc(var(--k-header-h) - 10px); }
.site-header.is-scrolled .brand__logo-img { height: 44px; }
.site-header.is-scrolled .nav-strip { height: 50px; }
.site-header.is-scrolled .nav__link { padding-block: 9px; }

.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand__logo { height: 50px; width: auto; flex: none; filter: drop-shadow(0 4px 10px rgba(11,42,64,.18)); }
/* Real KINANA logo presented in a clean white lockup so the dark wordmark
   stays legible over the dark hero, glass header and dark footer. */
.brand--lockup { background: #fff; padding: 8px 15px; border-radius: 14px; box-shadow: var(--k-shadow-sm); border: 1px solid rgba(14,23,34,.06); transition: box-shadow .25s ease; }
.brand--lockup:hover { box-shadow: var(--k-shadow-md); }
.brand__logo-img { height: 52px; width: auto; display: block; transition: height 0.3s ease; }
/* On the white header the logo needs no card around it — the box is only
   there to keep the dark wordmark legible on dark surfaces (footer, hero). */
.site-header--solid .brand--lockup,
.site-header.is-scrolled .brand--lockup {
  background: transparent; border-color: transparent; box-shadow: none; padding: 0;
}
.footer-brand .brand--lockup { display: inline-flex; }
.footer-brand .brand__logo-img { height: 50px; }
@media (max-width: 560px) { .brand--lockup { padding: 6px 11px; } .brand__logo-img { height: 36px; } }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--k-font-display); font-weight: 800; font-size: 1.56rem; letter-spacing: 0.03em; color: var(--k-ink); }
.brand__tag { font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--k-slate-400); margin-top: 4px; }
.footer-brand .brand__logo { height: 54px; }
.site-header--transparent:not(.is-scrolled) .brand__name { color: #fff; }
.site-header--transparent:not(.is-scrolled) .brand__tag { color: rgba(255,255,255,0.6); }

/* ---------- The logo strip — black band carrying the menu ----------------
   The KINANA mark ends in an arrow; that arrow is extended across the header
   as a charcoal band (#383737, sampled from the artwork) which runs off the
   right edge of the screen. The menu and the call to action live inside it,
   with the original site's #D4E8FF labels. Same look and feel as the logo,
   just doing a job. */
.nav-strip {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 56px;
  margin-left: 12px;
  padding-left: 54px;
  transition: height 0.3s ease;
}
/* The band is a pseudo-element so the arrow clip never crops the mega menus */
.nav-strip::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0; right: -50vw;
  background: linear-gradient(90deg, #2E2D2D 0%, var(--k-logo-ink) 34%, #302F2F 100%);
  /* the logo's arrowhead, pointing back into the wordmark */
  clip-path: polygon(0 50%, 42px 0, 100% 0, 100% 100%, 42px 100%);
  filter: drop-shadow(0 10px 20px rgba(14,23,34,0.28));
}
/* A thread of brand light along the underside of the band */
.nav-strip::after {
  content: "";
  position: absolute;
  left: 42px; right: -50vw; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--k-cyan-400), var(--k-blue-500) 45%, rgba(22,166,222,0));
  opacity: 0.85;
}
.nav-strip > * { position: relative; z-index: 1; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav__item { position: relative; }
.nav__link {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--k-font-display);
  font-weight: 500; font-size: 0.93rem; letter-spacing: 0.005em;
  color: var(--k-menu-text);
  padding: 11px 15px; border-radius: var(--k-r-pill);
  line-height: 1.1; white-space: nowrap;
  transition: color 0.22s ease, background 0.22s ease;
}
/* Gradient underline that draws in from the center on hover */
.nav__link::after {
  content: "";
  position: absolute; left: 15px; right: 15px; bottom: 6px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--k-cyan-400), var(--k-blue-400));
  transform: scaleX(0);
  transition: transform 0.28s var(--k-ease);
}
.nav__link svg.caret { width: 13px; height: 13px; transition: transform 0.25s ease; opacity: 0.65; }
.nav__link:hover, .nav__item.is-open .nav__link {
  color: #fff;
  background: rgba(255,255,255,0.09);
}
.nav__link:hover::after, .nav__item.is-open .nav__link::after { transform: scaleX(1); }
.nav__item.is-open .nav__link svg.caret { transform: rotate(180deg); opacity: 1; }

/* Current section: lit chip in the brand gradient.
   Drawer only. From 901px up the menu lives inside the charcoal band, where
   the selected item is the bevelled azure block instead — see the header
   geometry block further down. Keeping this at all widths would win on
   specificity (0,3,1) over that block's rules and paint a pill inside the
   band, so it is fenced to the mobile breakpoint deliberately. */
@media (max-width: 900px) {
  body[data-page="home"] .nav__link[data-nav="home"],
  body[data-page="solutions"] .nav__link[data-nav="solutions"],
  body[data-page="industries"] .nav__link[data-nav="industries"],
  body[data-page="about"] .nav__link[data-nav="about"],
  body[data-page="insights"] .nav__link[data-nav="insights"],
  body[data-page="contact"] .nav__link[data-nav="contact"] {
    color: #fff;
    background: var(--k-grad-brand);
    box-shadow: 0 8px 20px -10px rgba(22,166,222,0.85), inset 0 1px 0 rgba(255,255,255,0.25);
  }
  body[data-page="home"] .nav__link[data-nav="home"]::after,
  body[data-page="solutions"] .nav__link[data-nav="solutions"]::after,
  body[data-page="industries"] .nav__link[data-nav="industries"]::after,
  body[data-page="about"] .nav__link[data-nav="about"]::after,
  body[data-page="insights"] .nav__link[data-nav="insights"]::after,
  body[data-page="contact"] .nav__link[data-nav="contact"]::after { display: none; }
}

.header-actions { display: flex; align-items: center; gap: 12px; }
/* Drawer-only CTA — hidden on desktop, revealed in responsive.css */
.header-cta-mobile { display: none; }

/* The old laptop step (max-width:1160px) that tightened the band lived here.
   It is gone: every value in it was superseded by the header geometry block
   below plus its own 901-1200px step, which now apply on every page. */

/* ==========================================================================
   HEADER GEOMETRY — strip aligned to the wordmark
   --------------------------------------------------------------------------
   Rolled out to every page (was a home-page pilot). Still fenced to desktop
   widths: below 901px responsive.css dissolves the band into the mobile
   drawer, so none of this applies there.

   The geometry is derived from the artwork, not guessed. kinana-logo.svg is
   cropped (viewBox "27 23 1413 559") so that:
     - the "KINANA" cap band, 182 of those 559 units, is centered vertically,
       so centring logo and strip in the same row aligns them at any size;
     - the box ends exactly on the A, so the band can meet the letter.
   The A's leg runs at 0.2647 dx per dy; the band and the blocks inside it
   are cut to that same angle, which is why they all look parallel.
   ========================================================================== */
@media (min-width: 901px) {
  :root {
    --k-logo-h: 100px;
    --k-header-h: 112px;   /* logo + 6px breathing room top and bottom */
    /* Menu bar height = the cap height of the wordmark, i.e. exactly the height
       of the A in KINANA. The cap band is 182 of the artwork's 559 units, so
       deriving it this way makes the band's top and bottom edges line up with
       the letter at any logo size. Raise --k-logo-h to get a taller bar. */
    --k-cap-h: calc(var(--k-logo-h) * 182 / 559);
    --k-band-bevel: calc(var(--k-cap-h) * 0.2647);       /* parallel to the A */
    --k-inner-bevel: calc((var(--k-cap-h) - 6px) * 0.2647);
    /* The header runs full-bleed (see .site-header__inner below), so the logo
       sits exactly this far from the viewport edge at every width, instead of
       drifting 48-132px as it did when pulled back from the centered content
       column. */
    --k-brand-gutter: 18px;
  }
  .site-header__inner {
    gap: 0;
    /* Full-bleed: the logo anchors to the viewport edge, not to the centered
       1240px column, so its position no longer changes with window width. */
    max-width: none;
    padding-left: var(--k-brand-gutter);
    padding-right: var(--k-gutter);
  }
  .brand { margin-left: 0; flex: none; }
  /* flex:none on both — without it the flex row shrinks the logo image to make
     room for the menu, so the logo rendered smaller on narrower laptops. */
  .brand__logo-img { height: var(--k-logo-h); flex: none; }

  /* FIXED header: these proportions no longer change on scroll, so the
     overrides below simply neutralise the global is-scrolled shrink. */
  .site-header.is-scrolled { height: var(--k-header-h); }
  .site-header.is-scrolled .brand__logo-img { height: var(--k-logo-h); }
  .site-header.is-scrolled .nav-strip { height: var(--k-cap-h); }
  .site-header.is-scrolled .nav__link { padding-block: 0; }
  .site-header.is-scrolled .header-actions .btn { padding-block: 0; }

  .nav-strip {
    height: var(--k-cap-h);
    /* Pulled back by exactly one bevel so the band's slanted edge lies on
       the A's leg, then nudged 2px clear of it so the letter stays legible. */
    margin-left: calc(2px - var(--k-band-bevel));
    padding-left: 22px;
  }
  /* Straight band — no arrowhead. The lower-left bevel is cut to the A's
     own angle, so the two edges run parallel. */
  .nav-strip::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, var(--k-band-bevel) 100%);
  }
  .nav-strip::after { left: var(--k-band-bevel); }

  /* Menu fills the band's full height so the selection block can too */
  .nav { gap: 0; height: 100%; }
  .nav__item { height: 100%; }
  .nav__link {
    height: 100%;
    font-size: 0.8rem;
    padding: 0 15px;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .nav__link svg.caret { width: 12px; height: 12px; }
  .nav__link::after { display: none; }  /* replaced by the block */

  /* HOVER — a plain rectangle, inset from the band's edges so it reads as a
     highlight rather than a second band. The bevelled shape is reserved for
     the selected item alone. */
  .nav__link::before {
    content: "";
    position: absolute; inset: 3px 0; z-index: -1;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .nav__link:hover::before,
  .nav__item.is-open .nav__link::before { opacity: 1; }
  .nav__link:hover,
  .nav__item.is-open .nav__link { background: none; }

  /* SELECTED — the iconic shape: flat azure, square right edge, bevelled
     lower left. Sits inside the band, top and bottom, so the dark strip
     frames it. One pair per section: the body's data-page must match the
     link's data-nav, both of which partials.js writes. */
  body[data-page="home"] .nav__link[data-nav="home"],
  body[data-page="solutions"] .nav__link[data-nav="solutions"],
  body[data-page="industries"] .nav__link[data-nav="industries"],
  body[data-page="about"] .nav__link[data-nav="about"],
  body[data-page="insights"] .nav__link[data-nav="insights"],
  body[data-page="contact"] .nav__link[data-nav="contact"] {
    color: #fff; background: none; box-shadow: none;
  }
  body[data-page="home"] .nav__link[data-nav="home"]::before,
  body[data-page="solutions"] .nav__link[data-nav="solutions"]::before,
  body[data-page="industries"] .nav__link[data-nav="industries"]::before,
  body[data-page="about"] .nav__link[data-nav="about"]::before,
  body[data-page="insights"] .nav__link[data-nav="insights"]::before,
  body[data-page="contact"] .nav__link[data-nav="contact"]::before {
    background: var(--k-blue-500);
    clip-path: polygon(0 0, 100% 0, 100% 100%, var(--k-inner-bevel) 100%);
    opacity: 1;
  }

  /* CTA: same bevelled block, but modeled as a physical button — lit along
     the top edge, shaded along the bottom, so it reads as raised. Inset
     shadows, because clip-path crops an outer box-shadow to the same shape.
     No hover lift either: the block sits inside the band and must stay
     there, so it brightens and the shading tightens instead. */
  .header-actions { height: 100%; }
  .header-actions .btn {
    height: calc(100% - 6px);
    font-size: 0.76rem;
    padding: 0 18px;
    border-radius: 0;
    background: linear-gradient(180deg, #4FC4F0 0%, var(--k-blue-500) 52%, #0E86C3 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, var(--k-inner-bevel) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      inset 0 -2px 0 rgba(6, 58, 90, 0.55),
      inset 2px 0 0 rgba(255, 255, 255, 0.12);
    text-shadow: 0 1px 1px rgba(6, 44, 70, 0.35);
  }
  .header-actions .btn:hover {
    transform: none;
    background: linear-gradient(180deg, #6FD3F7 0%, var(--k-blue-400) 52%, #1194D2 100%);
  }
  .header-actions .btn:active {
    background: linear-gradient(180deg, #0E86C3 0%, var(--k-blue-500) 60%, #3FBBEA 100%);
    box-shadow: inset 0 2px 4px rgba(6, 44, 70, 0.45);
  }
  .header-actions .btn svg { width: 13px; height: 13px; }

  /* Dropdown blended into the strip: flush against its underside, square
     shoulders, and no turquoise cap. */
  .mega {
    top: 100%;
    border-radius: 0 0 var(--k-r-lg) var(--k-r-lg);
  }
  .mega::after { display: none; }
}

/* ---------- Mega menu ----------------------------------------------------
   Anchored to the rail (not the individual item) so every panel drops as one
   composed sheet beneath the menu bar — the same gesture as the original
   site's submenu, rebuilt with a pale-blue wash and a gradient cap. */
.nav { position: relative; }
@media (min-width: 901px) { .nav__item { position: static; } }
.mega {
  position: absolute;
  top: calc(100% + 13px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: min(1040px, 94vw);
  background: linear-gradient(180deg, #F1F7FD 0%, #FFFFFF 110px);
  border: 1px solid var(--k-line);
  border-radius: var(--k-r-lg);
  box-shadow: var(--k-shadow-lg), 0 2px 0 rgba(11,42,64,0.03);
  padding: 26px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--k-ease), transform 0.22s var(--k-ease), visibility 0.22s;
  z-index: 120;
}
/* Gradient cap tying the panel back to the rail above it */
.mega::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--k-grad-brand);
  border-radius: var(--k-r-lg) var(--k-r-lg) 0 0;
}
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega::before {
  content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px;
}
.mega__grid { display: grid; grid-template-columns: 1.85fr 1fr; gap: 22px; }
.mega__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.mega__link {
  position: relative;
  display: flex; gap: 13px; align-items: center;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--k-ease);
}
.mega__link:hover {
  background: #fff;
  border-color: var(--k-line);
  box-shadow: var(--k-shadow-sm);
  transform: translateX(2px);
}
.mega__link:hover .mega__t { color: var(--k-blue-700); }
.mega__ico {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--k-bg-alt); color: var(--k-blue-600);
}
.mega__ico svg { width: 21px; height: 21px; }
.mega__link:hover .mega__ico { background: var(--k-grad-brand); color: #fff; }
.mega__link > span:not(.mega__ico) { display: flex; flex-direction: column; }
.mega__t { display: block; font-family: var(--k-font-display); font-weight: 600; font-size: 0.98rem; color: var(--k-ink); transition: color 0.2s ease; }
.mega__d { display: block; font-size: 0.84rem; color: var(--k-slate-500); margin-top: 3px; line-height: 1.4; }
.mega__feature {
  background: var(--k-grad-hero);
  border-radius: var(--k-r-md);
  padding: 24px;
  color: #fff;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.mega__feature .badge { align-self: flex-start; margin-bottom: 14px; }
.mega__feature h4 { color: #fff; font-size: 1.15rem; }
.mega__feature p { color: var(--k-slate-300); font-size: 0.9rem; margin: 8px 0 18px; }
.mega__feature .link-arrow { color: var(--k-cyan-300); margin-top: auto; }
.mega__feature .link-arrow:hover { color: #fff; }

/* Mobile nav toggle */
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; align-items: center; justify-content: center; color: var(--k-ink); }
.site-header--transparent:not(.is-scrolled) .nav-toggle { color: #fff; }
.nav-toggle span { position: relative; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.25s ease; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero --------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--k-grad-hero);
  color: #fff;
  min-height: 100vh;
  padding-top: calc(var(--k-header-h) + clamp(20px, 3vw, 40px));
  padding-bottom: clamp(36px, 4.5vw, 64px);
  overflow: hidden;
}
.hero__grid-lines { position: absolute; inset: 0; opacity: 0.5; pointer-events: none; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; min-height: calc(100vh - var(--k-header-h) - clamp(60px, 8vw, 110px)); }
.hero h1 { color: #fff; }
.hero h1 .text-gradient { background: linear-gradient(120deg, var(--k-cyan-300), var(--k-blue-400)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__lead { color: var(--k-slate-300); font-size: clamp(1.05rem, 1.6vw, 1.28rem); margin-top: 16px; max-width: 42ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero__trust { margin-top: 26px; }
.hero__trust span { display: block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--k-slate-400); margin-bottom: 14px; }

/* Simple page hero (interior pages) */
.page-hero {
  position: relative;
  isolation: isolate;
  background: var(--k-grad-hero);
  color: #fff;
  padding-top: calc(var(--k-header-h) + clamp(28px, 4vw, 56px));
  padding-bottom: clamp(44px, 6vw, 80px);
  overflow: hidden;
}
.page-hero__inner { position: relative; z-index: 2; max-width: 820px; }
/* Optional photographic backdrop (injected on solution/industry pages) */
.page-hero__bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.9;
}
.page-hero:has(.page-hero__bg)::before,
.page-hero.has-bg::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(115deg, rgba(5,18,31,.92) 0%, rgba(7,27,46,.78) 48%, rgba(11,42,64,.55) 100%);
}
.page-hero h1 { color: #fff; margin-top: 18px; }
.page-hero p { color: var(--k-slate-300); margin-top: 20px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 62ch; }
.page-hero .hero__cta { margin-top: 30px; }

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--k-slate-400); }
.breadcrumb a { color: var(--k-slate-300); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: 0.5; }

/* ---------- AI network visual (SVG-driven, animated) -------------------- */
.ai-orb { position: relative; display: grid; place-items: center; }
.ai-orb svg { width: 100%; height: auto; overflow: visible; }
/* Nodes are square tiles (echoing the Kinana logo mesh), not dots */
.ai-orb .node { fill: var(--k-cyan-300); }
.ai-orb .node-pulse { transform-box: fill-box; transform-origin: center; animation: nodePulse 3.4s ease-in-out infinite; }
.ai-orb .edge { stroke: rgba(127, 210, 241, 0.35); stroke-width: 1; fill: none; }
.ai-orb .edge-flow { stroke: var(--k-cyan-400); stroke-width: 1.6; fill: none; stroke-dasharray: 5 10; animation: dashFlow 2.2s linear infinite; }
.ai-orb path { fill: none; } /* safety: never let orb line paths fill */
@keyframes nodePulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes dashFlow { to { stroke-dashoffset: -60; } }

/* ---------- Logos / marquee --------------------------------------------- */
.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(24px, 4vw, 56px); }
.logo-row .logo-chip {
  font-family: var(--k-font-display); font-weight: 600; font-size: 1.02rem;
  color: var(--k-slate-500); opacity: 0.9; letter-spacing: 0.01em;
  white-space: nowrap;
}
.section--ink .logo-chip { color: var(--k-slate-400); }

/* Client logos.
   Each chip carries an <img> AND the client's name. If the logo file is not
   there yet, the img's onerror handler removes it and flags the chip, and the
   name shows instead — so the row keeps reading correctly while logos are
   still being collected, with no broken-image icons. Drop a file into
   assets/img/clients/ (see the README there) and it takes over automatically.
   Logos are set in grayscale so a row of mixed brand colors still reads as
   one band; they come up to full color on hover. */
.logo-chip { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* Every logo is fitted into an IDENTICAL BOX rather than matched on height.
   Height-matching looks wrong on a mixed row: these marks run from about 1:1
   (the Arab Academy crest) to about 4.5:1 (the Intercom wordmark), so equal
   heights made the wordmarks roughly four times the visual mass of the
   crests. With one box plus object-fit:contain, a wide mark is limited by the
   box width and a square mark by its height, which brings the range down to
   roughly 1.5x — about as even as a row of real client logos ever gets.
   The box is ~2.7:1, near the middle of the aspect range, so neither extreme
   is starved. Per-logo optical corrections follow below. */
.logo-chip__img {
  width: clamp(104px, 12vw, 150px);
  height: clamp(38px, 4.4vw, 56px);
  object-fit: contain;
  object-position: center;
  filter: grayscale(1);
  opacity: 0.62;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
/* Optical corrections. Fitting to one box equalises the SPACE each mark
   occupies, not the ink inside it: a bold wordmark that fills its box still
   reads heavier than an outline mark or a logo with a lot of built-in white
   space. These are small, deliberate nudges judged by eye against the row,
   which is how logo walls are balanced — there is no formula for it.
   Keep them within roughly 0.85-1.15, and re-check the row after changing a
   file, because a nudge is tuned to one specific piece of artwork. */
.logo-chip__img[src*="intercom"]          { transform: scale(0.86); }  /* bold, fills its box */
.logo-chip__img[src*="titan"]             { transform: scale(0.94); }  /* heavy slab wordmark */
.logo-chip__img[src*="saint-gobain"]      { transform: scale(1.14); }  /* sparse: skyline over small type */
.logo-chip__img[src*="juhayna"]           { transform: scale(1.10); }  /* stacked, so the wordmark lands small */
.logo-chip__img[src*="decco"]             { transform: scale(1.05); }  /* outline letterforms read light */
.logo-chip__img[src*="mcit-egypt"]        { transform: scale(1.06); }
/* The AAIB lockup is ~5.9:1 — the widest mark in the set — so the shared box
   limits it on width and it lands shorter than its neighbours. A full match
   on height is not possible without making it conspicuously wider than every
   other chip, which would undo the point of the shared box; this is the
   compromise. */
.logo-chip__img[src*="arab-african"]      { transform: scale(1.12); }

.logo-chip:hover .logo-chip__img { filter: grayscale(0); opacity: 1; }
/* On dark sections flatten the mark to solid white: grayscale alone leaves
   dark logos invisible against the ink background. */
.section--ink .logo-chip__img { filter: brightness(0) invert(1); opacity: 0.72; }
.section--ink .logo-chip:hover .logo-chip__img { opacity: 1; }
.logo-chip__name { display: none; }
.logo-chip.is-missing .logo-chip__name { display: inline; }

.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 56px; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Flow / process diagram -------------------------------------- */
.flow { display: grid; gap: 16px; }
.flow__row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 14px; }
.flow__node {
  flex: 1 1 160px;
  background: var(--k-bg);
  border: 1px solid var(--k-line);
  border-radius: var(--k-r-md);
  padding: 18px 20px;
  box-shadow: var(--k-shadow-sm);
  position: relative;
}
.flow__node .k { font-family: var(--k-font-display); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--k-blue-600); }
.flow__node .v { font-family: var(--k-font-display); font-weight: 600; color: var(--k-ink); margin-top: 4px; }
.section--ink .flow__node { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.section--ink .flow__node .v { color: #fff; }

/* ---------- Split feature (image + text) -------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media {
  border-radius: var(--k-r-xl);
  background: var(--k-grad-hero);
  padding: clamp(28px, 4vw, 44px);
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: grid; place-items: center;
}

/* ---------- CTA band ----------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band .cta-inner {
  background: var(--k-grad-hero);
  border-radius: var(--k-r-xl);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; max-width: 20ch; margin-inline: auto; }
.cta-band p { color: var(--k-slate-300); max-width: 56ch; margin: 18px auto 0; }
.cta-band .hero__cta { justify-content: center; margin-top: 32px; }

/* ---------- Accordion (FAQ / details) ----------------------------------- */
.acc { border-top: 1px solid var(--k-line); }
.acc__item { border-bottom: 1px solid var(--k-line); }
.acc__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; text-align: left; padding: 22px 4px; font-family: var(--k-font-display); font-weight: 600; font-size: 1.08rem; color: var(--k-ink); }
.acc__btn .ico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--k-bg-alt); color: var(--k-blue-600); transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease; }
.acc__item.is-open .acc__btn .ico { background: var(--k-grad-brand); color: #fff; transform: rotate(45deg); }
.acc__panel { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--k-ease); }
.acc__panel-inner { padding: 0 4px 22px; color: var(--k-slate-600); max-width: 70ch; }

/* ---------- Forms -------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--k-font-display); font-weight: 600; font-size: 0.9rem; color: var(--k-slate-700); }
.field label .req { color: var(--k-blue-600); }
.field input, .field select, .field textarea {
  padding: 14px 16px;
  border: 1px solid var(--k-slate-200);
  border-radius: var(--k-r-sm);
  background: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--k-blue-500);
  box-shadow: 0 0 0 4px rgba(22, 166, 222, 0.14);
}
.form-note { font-size: 0.82rem; color: var(--k-slate-400); }
.form-success { display: none; padding: 18px 20px; border-radius: var(--k-r-md); background: rgba(31,178,90,0.1); border: 1px solid rgba(31,178,90,0.3); color: #157a41; font-weight: 500; }
.form-success.is-visible { display: block; }
.form-success a { color: inherit; text-decoration: underline; }
/* Failure state, mirroring .form-success. The form can genuinely fail now
   that it posts somewhere real, and a visitor who is told nothing assumes
   the message went through. */
.form-error {
  display: none; padding: 18px 20px; margin-bottom: 20px;
  border-radius: var(--k-r-md);
  background: rgba(200, 42, 42, 0.08);
  border: 1px solid rgba(200, 42, 42, 0.28);
  color: #9b2226; font-weight: 500;
}
.form-error.is-visible { display: block; }
.form-error a { color: inherit; text-decoration: underline; }
.form-success:empty, .form-error:empty { display: none; }

/* ---------- Contact info list ------------------------------------------- */
.contact-list { display: grid; gap: 22px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--k-bg-alt); color: var(--k-blue-600); }
.contact-item .ico svg { width: 22px; height: 22px; }
.contact-item .k { font-family: var(--k-font-display); font-weight: 600; color: var(--k-ink); }
.contact-item .v { color: var(--k-slate-500); margin-top: 2px; }
.contact-item .v a { color: var(--k-slate-600); }

/* ---------- Footer ------------------------------------------------------- */
.site-footer { background: var(--k-navy-950); color: var(--k-slate-400); padding-top: clamp(56px, 7vw, 88px); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 48px; }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: var(--k-slate-400); font-size: 0.95rem; margin-top: 18px; max-width: 34ch; }
.footer-social { display: flex; gap: 10px; margin-top: 22px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,0.06); color: var(--k-slate-300); transition: background 0.2s ease, color 0.2s ease; }
.footer-social a:hover { background: var(--k-grad-brand); color: #fff; }
.footer-col h5 { font-family: var(--k-font-display); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--k-slate-300); margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 11px; }
.footer-col a { color: var(--k-slate-400); font-size: 0.94rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 24px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: var(--k-slate-500); }
.footer-bottom .legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom a { color: var(--k-slate-500); }
.footer-bottom a:hover { color: var(--k-slate-300); }

/* ---------- Value / icon rows ------------------------------------------- */
.value-row { display: flex; gap: 16px; align-items: flex-start; }
.value-row .ico { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--k-grad-brand); color: #fff; box-shadow: var(--k-shadow-glow); }
.value-row .ico svg { width: 24px; height: 24px; }
.value-row h4 { margin-bottom: 6px; }
.value-row p { color: var(--k-slate-500); font-size: 0.98rem; }
.section--ink .value-row p { color: var(--k-slate-400); }

/* ---------- Timeline ----------------------------------------------------- */
.timeline { position: relative; display: grid; gap: 6px; }
.timeline__item { position: relative; padding: 18px 0 18px 42px; }
.timeline__item::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: -12px; width: 2px; background: var(--k-line); }
.timeline__item:last-child::before { display: none; }
.timeline__item::after { content: ""; position: absolute; left: 6px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--k-grad-brand); box-shadow: 0 0 0 5px rgba(22,166,222,0.14); }
.timeline__yr { font-family: var(--k-font-display); font-weight: 700; color: var(--k-blue-600); }
.timeline__item h4 { margin: 4px 0 6px; }
.timeline__item p { color: var(--k-slate-500); }

/* ---------- Pills / tag list -------------------------------------------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: var(--k-font-display); font-weight: 500; font-size: 0.9rem;
  padding: 9px 16px; border-radius: var(--k-r-pill);
  background: var(--k-bg-soft); border: 1px solid var(--k-line); color: var(--k-slate-700);
}
.section--ink .tag { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); color: var(--k-slate-300); }

/* ---------- Numbered steps ---------------------------------------------- */
.step { position: relative; padding-left: 4px; }
.step__n { font-family: var(--k-font-display); font-weight: 700; font-size: 1.1rem; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--k-bg-alt); color: var(--k-blue-600); margin-bottom: 16px; }
.step h4 { margin-bottom: 8px; }
.step p { color: var(--k-slate-500); font-size: 0.98rem; }

/* ---------- Cookie / note bar (optional, unused by default) ------------- */
.note-inline { padding: 14px 18px; border-radius: var(--k-r-md); background: var(--k-bg-alt); border: 1px dashed var(--k-blue-300); color: var(--k-slate-600); font-size: 0.9rem; }

/* ---------- Photographic imagery ---------------------------------------- */
/* Homepage hero backdrop (very subtle, behind the AI orb layout) */
.hero { isolation: isolate; }
/* Homepage hero photographic backdrop as a pure CSS background — decorative
   only, so it can never affect layout or push content down. Dark diagonal
   scrim keeps text readable on the left; photo shows through on the right. */
.hero--photo {
  background:
    radial-gradient(1000px 520px at 82% -12%, rgba(47,211,232,.20), transparent 60%),
    linear-gradient(115deg, rgba(5,18,31,.95) 0%, rgba(7,27,46,.82) 46%, rgba(10,37,64,.56) 100%),
    url("../img/hero-main.jpg") center / cover no-repeat;
  background-color: var(--k-navy-900);
}
.hero__inner { position: relative; z-index: 1; }
.hero__grid-lines { z-index: 1; } /* keep it position:absolute (from base) so it never pushes content */

/* Card thumbnail image (marketing solution/industry cards) */
.card__media {
  position: relative;
  height: 172px;
  border-radius: var(--k-r-md);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--k-grad-hero);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--k-ease); }
a.card:hover .card__media img, .card:hover .card__media img { transform: scale(1.06); }
.card__media .media-ico {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--k-grad-brand); color: #fff;
  box-shadow: var(--k-shadow-glow);
}
.card__media .media-ico svg { width: 24px; height: 24px; }
.card__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(7,27,46,0) 45%, rgba(7,27,46,.45) 100%);
}

/* Framed marketing image used inside split / feature sections */
.media-frame {
  position: relative;
  border-radius: var(--k-r-xl);
  overflow: hidden;
  box-shadow: var(--k-shadow-lg);
  min-height: 320px;
  background: var(--k-grad-hero);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-frame--tall { min-height: 460px; }
.media-frame__badge { position: absolute; left: 20px; bottom: 20px; z-index: 2; }
.media-frame__tint::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(5,18,31,.15), rgba(7,27,46,.55));
}

/* CTA band photographic background */
.cta-inner { isolation: isolate; }
.cta-inner .cta-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; opacity: 0.28;
}
.cta-inner > *:not(.cta-bg) { position: relative; z-index: 1; }

/* Reduce card media height on small screens */
@media (max-width: 560px) { .card__media { height: 150px; } }

/* ==========================================================================
   HEADER — laptop step (901-1200px)
   At full size the logo (253px wide) plus six menu items plus the CTA need
   ~1060px, so on a narrow laptop the CTA ran off the right edge. Scaling the
   three header variables down proportionally keeps the same proportions and
   brings it back inside the viewport. Above 1200px the full size applies.
   Applies on every page, like the geometry block it steps down.
   ========================================================================== */
@media (min-width: 901px) and (max-width: 1200px) {
  :root {
    --k-logo-h: 78px;
    --k-header-h: 90px;
    /* --k-cap-h intentionally not set: it derives from the logo above, so the
       band keeps matching the A's height at this size too. */
  }
  .nav__link { font-size: 0.72rem; padding: 0 11px; }
  .nav__link svg.caret { width: 11px; height: 11px; }
}