/* Xpert WorX — parent brand site.
   Design language follows intelxpert.com and xpertradar.com: near-black ground,
   thin uppercase editorial headings, mono micro-labels, numbered sections.
   The accent is the blue from the Xpert WorX mark; each product card carries
   its own product accent so the family reads as a family. */

:root {
  --ink: #06080b;
  --ink-2: #090c11;
  --ink-3: #0d1116;
  --paper: #eef4f7;
  --muted: #93a3ad;
  --muted-dim: #6c7a84;
  --line: rgba(190, 214, 228, 0.16);
  --line-strong: rgba(190, 214, 228, 0.30);
  --brand: #17a3dc;
  --brand-bright: #4ec6f2;
  --intelxpert: #58d8f2;
  --xpertradar: #22e05a;
  --medrecord: #17b3ac;
  --corridor: #d0568f;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --shell: min(1320px, calc(100% - 10vw));
  --header-h: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); background: var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 300; letter-spacing: -0.035em; }
p { margin: 0; }
.shell { width: var(--shell); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 99; padding: 10px 16px; background: var(--paper); color: var(--ink); }

/* --- shared type ------------------------------------------------------- */
.kicker { margin: 0 0 26px; color: var(--brand-bright); font: 500 0.64rem/1.3 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; }
.kicker span { color: var(--muted-dim); margin-right: 10px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 34px; color: var(--muted); font: 500 0.63rem/1.3 var(--mono); letter-spacing: 0.17em; text-transform: uppercase; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-bright); box-shadow: 0 0 12px rgba(78,198,242,.9); }
.sub { max-width: 44rem; margin-top: 22px; color: var(--muted); line-height: 1.75; }
.section { padding: clamp(84px, 11vw, 160px) 0; border-top: 1px solid var(--line); }
.section-head h2 { font-size: clamp(2.1rem, 4.2vw, 4.1rem); line-height: 1.02; text-transform: uppercase; }
.section-head.wide { max-width: 52rem; margin-bottom: clamp(48px, 6vw, 84px); }
.split { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 7vw, 120px); }
.prose .big { margin-bottom: 26px; color: var(--paper); font-size: clamp(1.25rem, 2vw, 1.85rem); font-weight: 300; line-height: 1.35; letter-spacing: -0.02em; }
.prose p { color: var(--muted); line-height: 1.8; }

/* --- buttons ----------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 22px; border-radius: 6px; font: 450 0.82rem/1 var(--sans); white-space: nowrap; transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease; }
.btn-primary { background: var(--paper); color: #0b1116; font-weight: 500; }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-line { border: 1px solid var(--line-strong); color: var(--paper); }
.btn-line:hover { border-color: var(--brand-bright); color: var(--brand-bright); }
.btn-ghost { border: 1px solid var(--line-strong); font: 500 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.btn-ghost:hover { border-color: var(--brand-bright); color: var(--brand-bright); }

/* --- header ------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 40; min-height: var(--header-h); display: flex; align-items: center; background: rgba(6,8,11,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand img { width: 168px; }
.desktop-nav { display: flex; gap: clamp(20px, 2.4vw, 40px); }
.desktop-nav a { color: #c3d1d9; font: 500 .68rem/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid transparent; }
.desktop-nav a:hover { color: var(--paper); border-color: var(--brand-bright); }
.menu-toggle { display: none; }
.mobile-menu { display: none; }

/* --- hero -------------------------------------------------------------- */
.hero { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; padding: clamp(70px, 9vw, 130px) 0; overflow: hidden; isolation: isolate; }
.hero-grid { position: absolute; inset: 0; z-index: -3;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 78px 78px; opacity: .5;
  mask-image: radial-gradient(ellipse 78% 68% at 30% 45%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 30% 45%, #000 20%, transparent 100%); }
.hero-glow { position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse 60% 70% at 78% 42%, rgba(23,163,220,.20), transparent 62%); }
.hero-mark { position: absolute; z-index: -1; right: -6%; top: 50%; width: min(680px, 52%); transform: translateY(-50%); opacity: .30; filter: saturate(.85) brightness(.95); pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 42%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 42%, transparent 100%); }
.hero-inner { position: relative; max-width: 60rem; }
.hero h1 { font-size: clamp(2.9rem, 6.6vw, 6rem); line-height: .98; text-transform: uppercase; letter-spacing: -0.045em; }
.hero h1 em { font-style: normal; color: var(--brand-bright); }
.hero h1 .period { color: var(--brand-bright); }
.hero .lead { max-width: 40rem; margin-top: clamp(28px, 3.6vw, 44px); color: #bccbd4; font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.72; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(30px, 3.6vw, 44px); }
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 68px); margin: clamp(46px, 6vw, 76px) 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-stats div { margin: 0; }
.hero-stats dt { color: var(--paper); font-size: clamp(1.7rem, 2.6vw, 2.5rem); font-weight: 250; letter-spacing: -0.05em; line-height: 1; }
.hero-stats dd { margin: 10px 0 0; color: var(--muted-dim); font: 500 .62rem/1.4 var(--mono); letter-spacing: .13em; text-transform: uppercase; }

/* --- product cards ----------------------------------------------------- */
.solutions { background: var(--ink-2); }
.stage-label { margin: 0 0 22px; color: var(--muted-dim); font: 500 .64rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; }
.stage-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stage-label.soon { margin-top: clamp(44px, 5vw, 72px); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.card { position: relative; display: flex; flex-direction: column; min-height: 340px; padding: clamp(26px, 2.6vw, 40px); border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.008)); overflow: hidden; transition: border-color .22s ease, transform .22s ease, background .22s ease; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--card-accent, var(--brand)); opacity: .85; }
.card::after { content: ""; position: absolute; z-index: 0; right: -30%; bottom: -55%; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--card-accent, var(--brand)), transparent 66%); opacity: .10; transition: opacity .3s ease; }
.card > * { position: relative; z-index: 1; }
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--card-accent, var(--brand)) 55%, transparent); background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.012)); }
.card:hover::after { opacity: .2; }
.card[data-accent="intelxpert"] { --card-accent: var(--intelxpert); }
.card[data-accent="xpertradar"] { --card-accent: var(--xpertradar); }
.card[data-accent="medrecord"]  { --card-accent: var(--medrecord); }
.card[data-accent="corridor"]   { --card-accent: var(--corridor); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: clamp(30px, 3.6vw, 52px); }
.card-logo { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: .95; }
.card[data-accent="xpertradar"] .card-logo { height: 40px; filter: none; }
.wordmark { color: var(--paper); font-size: 1.12rem; font-weight: 300; letter-spacing: -0.02em; }
.wordmark b { font-weight: 600; color: var(--card-accent, var(--brand)); }
.badge { padding: 6px 11px; border: 1px solid color-mix(in srgb, var(--card-accent, var(--brand)) 40%, transparent); border-radius: 100px; color: var(--card-accent, var(--brand)); font: 500 .56rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.badge-soon { border-style: dashed; color: var(--muted); border-color: var(--line-strong); }
.card h3 { font-size: clamp(1.32rem, 1.9vw, 1.75rem); font-weight: 400; letter-spacing: -0.025em; margin-bottom: 14px; }
.card p { color: var(--muted); line-height: 1.7; font-size: .96rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.tags li { padding: 5px 11px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted-dim); font: 500 .58rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.card-go { margin-top: auto; padding-top: 26px; display: inline-flex; align-items: center; gap: 10px; color: var(--card-accent, var(--brand)); font: 500 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.card-go i { font-style: normal; transition: transform .2s ease; }
.card:hover .card-go i { transform: translateX(5px); }

/* --- principles / sectors ---------------------------------------------- */
.principle-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principle-grid article { min-height: 250px; padding: clamp(24px, 2.4vw, 38px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle-grid span { color: var(--brand-bright); font: 500 .64rem/1 var(--mono); letter-spacing: .14em; }
.principle-grid h3 { margin: 46px 0 12px; font-size: 1.16rem; font-weight: 450; text-transform: uppercase; letter-spacing: -0.015em; }
.principle-grid p { color: var(--muted); font-size: .93rem; line-height: 1.7; }

.sectors { background: var(--ink-2); }
.sector-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sector-list li { display: grid; grid-template-columns: 58px 1fr; gap: 22px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.sector-list span { color: var(--brand-bright); font: 500 .64rem/1.9 var(--mono); letter-spacing: .14em; }
.sector-list h3 { font-size: clamp(1.1rem, 1.5vw, 1.4rem); font-weight: 450; letter-spacing: -0.02em; }
.sector-list p { margin-top: 8px; color: var(--muted); font-size: .95rem; line-height: 1.7; }

/* --- company facts ------------------------------------------------------ */
.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; margin-top: 46px; background: var(--line); border: 1px solid var(--line); }
.fact-grid div { padding: clamp(20px, 2.2vw, 30px); background: var(--ink); }
.fact-grid dt { color: var(--muted-dim); font: 500 .58rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.fact-grid dd { margin: 12px 0 0; color: var(--paper); font-size: .95rem; line-height: 1.6; }

/* --- contact ------------------------------------------------------------ */
.contact { background: var(--ink-3); border-top: 1px solid var(--line); }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(44px, 6vw, 96px); align-items: start; }
.contact h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.04; text-transform: uppercase; }
.contact-direct { margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.contact-direct a { color: var(--brand-bright); font: 500 .8rem/1.5 var(--mono); letter-spacing: .04em; width: fit-content; border-bottom: 1px solid transparent; }
.contact-direct a:hover { border-color: var(--brand-bright); }
.contact-direct p { margin-top: 8px; color: var(--muted-dim); font-size: .84rem; line-height: 1.7; }

/* --- form --------------------------------------------------------------- */
.lead-form { display: grid; gap: 18px; padding: clamp(24px, 2.6vw, 38px); border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.008)); }
.field { display: flex; flex-direction: column; gap: 9px; }
.field label { color: var(--muted); font: 500 .6rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.field label em { font-style: normal; color: var(--muted-dim); text-transform: none; letter-spacing: .04em; }
.field input, .field textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px; background: rgba(5,8,11,.7); color: var(--paper); font-family: var(--sans); font-size: .95rem; line-height: 1.5; transition: border-color .16s ease; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand-bright); }
.field input[aria-invalid="true"] { border-color: #e8836f; }
.decoy { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; pointer-events: none; }
.lead-form .btn { justify-content: center; border: 0; cursor: pointer; width: 100%; }
.lead-form .btn[disabled] { opacity: .6; cursor: default; }
.form-status { min-height: 1.3em; margin: 0; font: 500 .66rem/1.5 var(--mono); letter-spacing: .08em; }
.form-status.error { color: #ff9d88; }
.form-status.success { color: var(--brand-bright); }

/* --- footer -------------------------------------------------------------- */
.site-footer { padding: clamp(56px, 6vw, 86px) 0 34px; border-top: 1px solid var(--line); background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: clamp(28px, 4vw, 60px); }
.footer-logo { width: 158px; margin-bottom: 18px; }
.footer-grid > div > p { max-width: 24rem; color: var(--muted-dim); font-size: .86rem; line-height: 1.7; }
.footer-grid h2 { margin-bottom: 16px; color: var(--paper); font: 500 .6rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.footer-grid > div > a { display: block; padding: 6px 0; color: var(--muted); font-size: .88rem; }
.footer-grid > div > a:hover { color: var(--brand-bright); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(44px, 5vw, 70px); padding-top: 24px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; color: var(--muted-dim); font: 500 .6rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 1100px) {
  .split, .contact-layout { grid-template-columns: 1fr; }
  .principle-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-mark { opacity: .2; width: 62%; right: -14%; }
}

@media (max-width: 820px) {
  :root { --shell: calc(100% - 44px); }
  .desktop-nav, .nav-actions { display: none; }
  .menu-toggle { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 6px; background: none; cursor: pointer; }
  .menu-toggle span { display: block; width: 18px; height: 1px; background: var(--paper); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .mobile-menu { display: grid; padding: 8px 0 18px; border-top: 1px solid var(--line); background: rgba(6,8,11,.97); }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu a { width: var(--shell); margin-inline: auto; padding: 14px 0; border-bottom: 1px solid var(--line); color: #dce7ec; font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
  .mobile-menu a:last-child { border-bottom: 0; color: var(--brand-bright); }
  .site-header { display: block; }
  .nav-shell { min-height: var(--header-h); }
  .card-grid { grid-template-columns: 1fr; }
  .principle-grid { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-mark { opacity: .14; width: 100%; right: -30%; }
  .hero-stats { gap: 24px 40px; }
  .btn { width: 100%; justify-content: center; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --- 3D hero canvas ------------------------------------------------------
   The static PNG mark shows immediately and is the fallback for reduced
   motion or no WebGL; the canvas cross-fades over it once the first frame
   has actually rendered, so there is never an empty gap. */
.hero-3d { position: absolute; z-index: -1; right: -6%; top: 50%; width: min(760px, 58%); aspect-ratio: 1 / 1; transform: translateY(-50%); opacity: 0; transition: opacity 900ms ease; pointer-events: none; }
.hero-3d.is-live { opacity: 1; }
.hero-3d canvas { width: 100% !important; height: 100% !important; display: block; }
.hero-mark { transition: opacity 700ms ease; }
.hero-mark.is-replaced { opacity: 0; }

@media (max-width: 1100px) {
  .hero-3d { width: 68%; right: -14%; }
}
@media (max-width: 820px) {
  .hero-3d { width: 108%; right: -34%; opacity: 0; }
  .hero-3d.is-live { opacity: .55; }
}

/* --- product logos on cards ---------------------------------------------
   Both product logos ship as dark navy artwork intended for light grounds
   (their own sites whiten them with a filter). Painting them as a mask lets
   us fill each with its own product accent, so they stay legible on the dark
   card and carry the right brand colour instead of flat white. */
.card-logo {
  display: block; flex: none;
  background-color: var(--card-accent, var(--brand));
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: left center; mask-position: left center;
  -webkit-mask-size: contain; mask-size: contain;
}
/* The IntelXpert accent (#58d8f2) is light enough to read as white at logo
   size, so the mark is filled with a slightly deeper cyan; XpertRadar is
   widened so the two read as the same optical size beside each other. */
.logo-intelxpert { width: 248px; height: 50px; background-color: #3fc6ee; -webkit-mask-image: url("assets/logo-intelxpert-trim.png"); mask-image: url("assets/logo-intelxpert-trim.png"); }
.logo-xpertradar { width: 236px; height: 64px; -webkit-mask-image: url("assets/logo-xpertradar-trim.png"); mask-image: url("assets/logo-xpertradar-trim.png"); }
.wordmark { font-size: 1.5rem; }

@media (max-width: 520px) {
  .logo-intelxpert { width: 190px; height: 38px; }
  .logo-xpertradar { width: 155px; height: 42px; }
  .wordmark { font-size: 1.25rem; }
  .card-top { flex-wrap: wrap; gap: 12px; }
}

/* --- patent / IP references ---------------------------------------------
   Held back until the granted package is returned from examination.
   Delete this one rule to show every [data-ip] element again. */
[data-ip] { display: none !important; }
/* --- legal pages (privacy policy, terms) --------------------------------- */
.legal { padding: clamp(70px, 8vw, 120px) 0 clamp(70px, 9vw, 130px); }
.legal-inner { max-width: 52rem; }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.04; text-transform: uppercase; margin-bottom: 14px; }
.legal-body h2 { margin: clamp(38px, 4vw, 56px) 0 14px; font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 400; letter-spacing: -0.02em; }
.legal-body h3 { margin: 32px 0 10px; color: var(--paper); font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em; }
.legal-body p { margin: 0 0 14px; color: var(--muted); line-height: 1.8; }
.legal-body ul { margin: 0 0 18px; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.legal-body li { margin-bottom: 8px; }
.legal-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 34px; color: var(--brand-bright); font: 500 .66rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.legal-updated { color: var(--muted-dim); font: 500 .62rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
