/*
 * AssureMesh marketing site — design system v2 ("Evidence Instrument").
 * Dark ink instrument surfaces, ice-blue structure lines, signal magenta for
 * root cause, amber for forecasts, green for verified, warm paper sections.
 *
 * Every page links this file. Class names used by the inner pages and the
 * insight articles (site-head, shell, hero, section, card, grid, article,
 * callout, site-foot ...) are kept, so long-form pages restyle from here.
 */
:root {
  color-scheme: dark;
  --ink: #0a0e14;
  --ink-2: #0d131c;
  --surface: #111824;
  --surface-2: #162132;
  --line: #233044;
  --line-2: #2e3e56;
  --text: #e6edf5;
  --muted: #8a99ad;
  --faint: #66768c;
  --ice: #8ccbff;
  --ice-deep: #3d8fe0;
  --mag: #ff3d8b;
  --mag-deep: #e01f6f;
  --amber: #ffb547;
  --ok: #5be3a6;
  --paper: #f3f0e9;
  --paper-2: #e9e4d8;
  --paper-ink: #0f141c;
  --paper-muted: #4a5464;
  --paper-line: #d6cfbf;
  --max: 1200px;
  --radius: 14px;
  --display: "Inter Tight", "Inter", "Segoe UI", system-ui, sans-serif;
  --body: "Inter Tight", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas, video { max-width: 100%; display: block; }
a { color: var(--ice); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--display); color: #fff; margin: 0; letter-spacing: -.025em; line-height: 1.06; }
h1 { font-size: clamp(42px, 6.4vw, 92px); font-weight: 800; letter-spacing: -.04em; }
h2 { font-size: clamp(32px, 4.2vw, 58px); font-weight: 750; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0; }
::selection { background: var(--mag); color: #fff; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--mag); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 12px; }

.shell, .wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

/* ---------- type helpers ---------- */
.eyebrow, .label, .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ice);
}
.eyebrow::before, .label::before, .kicker::before {
  content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7;
}
.lede, .lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.fine, .fine-print, .small { font-size: 13.5px; color: var(--faint); }
.mono { font-family: var(--mono); }
.grad {
  background: linear-gradient(92deg, var(--ice) 0%, #c9b8ff 45%, var(--mag) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hl-mag { color: var(--mag); }
.hl-amber { color: var(--amber); }
.hl-ok { color: var(--ok); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-head.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--ink) 88%, transparent); }
.site-head .shell { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font: 750 19px var(--display); letter-spacing: -.02em; text-decoration: none; }
.logo:hover { color: #fff; }
/* Brand mark: the production interlocking-rings logo (same artwork as favicon.svg). */
.logo-mark { flex: none; width: 34px; height: 34px; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none'><defs><linearGradient id='ra' x1='11' y1='21' x2='61' y2='71' gradientUnits='userSpaceOnUse'><stop offset='0' stop-color='%232c4f86'/><stop offset='1' stop-color='%23f3cf96'/></linearGradient><linearGradient id='rb' x1='44' y1='32' x2='84' y2='72' gradientUnits='userSpaceOnUse'><stop offset='0' stop-color='%23f3cf96'/><stop offset='1' stop-color='%238fc4f5'/></linearGradient></defs><rect width='100' height='100' rx='22' fill='%2303060c'/><circle cx='36' cy='46' r='25' stroke='url(%23ra)' stroke-width='7'/><circle cx='53' cy='30' r='7' fill='%2303060c'/><circle cx='64' cy='52' r='20' stroke='url(%23rb)' stroke-width='7'/><circle cx='49' cy='68' r='7' fill='%2303060c'/><path d='M56,64 Q49,73 41,71.5' stroke='url(%23ra)' stroke-width='7' stroke-linecap='round' fill='none'/></svg>") center / contain no-repeat; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s; }
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.site-nav a[aria-current="page"] { color: #fff; }
.site-nav .nav-cta, .nav-cta {
  color: #fff; background: var(--mag); margin-left: 8px; padding: 9px 16px; font-weight: 650;
  box-shadow: 0 8px 24px -10px rgba(255,61,139,.75);
}
.site-nav .nav-cta:hover { background: var(--mag-deep); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: #fff; border-radius: 10px; width: 42px; height: 42px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 1.5px; background: #fff; margin: 0 auto; position: relative; content: ""; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }
@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .site-nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; background: var(--ink-2); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 6px; }
  .site-nav .nav-cta { margin: 10px 0 0; text-align: center; }
}

/* ---------- buttons ---------- */
.btn, .button, button.primary, a.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 650 15.5px/1 var(--body); padding: 15px 22px; border-radius: 12px; cursor: pointer;
  text-decoration: none; border: 1px solid var(--line-2); color: #fff; background: rgba(255,255,255,.03);
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn:hover, .button:hover { border-color: var(--ice); color: #fff; transform: translateY(-1px); }
.btn.primary, .button.primary, button.primary, a.primary {
  background: linear-gradient(135deg, var(--mag) 0%, #ff6aa8 100%); border-color: transparent; color: #fff;
  box-shadow: 0 12px 34px -12px rgba(255,61,139,.8), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.btn.primary:hover, .button.primary:hover { box-shadow: 0 16px 44px -10px rgba(255,61,139,.95); color: #fff; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.hero-actions, .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ---------- surfaces & sections ---------- */
.gridlines {
  background-image:
    linear-gradient(to right, rgba(140,203,255,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140,203,255,.06) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hero {
  position: relative; padding: clamp(72px, 10vw, 128px) 0 clamp(56px, 8vw, 96px); overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(140,203,255,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140,203,255,.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 900px; height: 600px; right: -260px; top: -220px;
  background: radial-gradient(closest-side, rgba(255,61,139,.16), transparent 70%);
  pointer-events: none;
}
.hero h1 { margin-top: 18px; max-width: 18ch; }
.hero .lede { margin-top: 24px; }
.hero .article h1 { font-size: clamp(36px, 4.6vw, 60px); max-width: 24ch; }

.section { position: relative; padding: clamp(72px, 9vw, 120px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.paper, .paper {
  background: var(--paper); color: var(--paper-ink); border-top: 0;
}
.paper h1, .paper h2, .paper h3, .paper h4 { color: var(--paper-ink); }
.paper .lede, .paper .lead, .paper .muted, .paper p { color: var(--paper-muted); }
.paper .eyebrow, .paper .label { color: var(--mag-deep); }
.paper a { color: var(--mag-deep); }
.paper .card { background: #fff; border-color: var(--paper-line); color: var(--paper-ink); }
.paper .card p { color: var(--paper-muted); }
.section.deep { background: var(--ink-2); }
.intro { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.intro.center { text-align: center; margin-inline: auto; justify-items: center; }
.intro p { color: var(--muted); font-size: 18.5px; }

/* ---------- cards & grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.grid.g2, .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid.g2, .two, .grid.g4 { grid-template-columns: 1fr; } }
.card, .kvcard {
  position: relative; background: linear-gradient(180deg, var(--surface) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  display: grid; gap: 12px; align-content: start; overflow: hidden;
  transition: border-color .3s, transform .35s var(--ease);
}
.card p, .kvcard p { color: var(--muted); font-size: 15.5px; }
.card h3 { color: #fff; }
.card .tag, .tag {
  justify-self: start; font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ice); border: 1px solid rgba(140,203,255,.3); border-radius: 999px; padding: 6px 10px;
}
.tag.mag { color: var(--mag); border-color: rgba(255,61,139,.35); }
.tag.amber { color: var(--amber); border-color: rgba(255,181,71,.35); }
.tag.ok { color: var(--ok); border-color: rgba(91,227,166,.35); }
a.card { text-decoration: none; color: inherit; }
a.card:hover, .card.lift:hover { border-color: rgba(140,203,255,.45); transform: translateY(-3px); }
.card .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(140,203,255,.08); border: 1px solid rgba(140,203,255,.22); color: var(--ice); }
.card .ico.mag { background: rgba(255,61,139,.1); border-color: rgba(255,61,139,.3); color: var(--mag); }
.card .ico.amber { background: rgba(255,181,71,.1); border-color: rgba(255,181,71,.3); color: var(--amber); }
.card .ico.ok { background: rgba(91,227,166,.1); border-color: rgba(91,227,166,.3); color: var(--ok); }
.card .more { font: 600 14px var(--body); color: var(--ice); margin-top: 4px; }

.list, .card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list li, .card ul li { position: relative; padding-left: 26px; color: var(--muted); }
.list li::before, .card ul li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 1.5px; background: var(--ice);
}
.paper .list li, .paper .card ul li { color: var(--paper-muted); }
.paper .list li::before, .paper .card ul li::before { background: var(--mag-deep); }

.kv { display: grid; gap: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.kv dt, .kv b { font: 500 13px var(--mono); color: var(--muted); }

/* ---------- article / long-form ---------- */
.article { max-width: 760px; }
.article > p, .article > ul, .article > ol { color: #c9d4e2; margin: 0 0 22px; font-size: 18px; line-height: 1.75; }
.article > ul, .article > ol { padding-left: 22px; }
.article > ul li, .article > ol li { margin: 6px 0; }
.article h2 { font-size: clamp(26px, 2.6vw, 34px); margin: 52px 0 18px; }
.article h3 { margin: 34px 0 12px; }
.article strong { color: #fff; }
.article code, code { font: 500 .9em var(--mono); background: rgba(140,203,255,.08); border: 1px solid rgba(140,203,255,.18); color: var(--ice); padding: 2px 6px; border-radius: 6px; }
.byline { margin-top: 22px; font: 500 13px var(--mono); color: var(--faint); letter-spacing: .04em; }
.callout {
  margin: 28px 0; padding: 20px 22px; border-radius: 12px; color: #d5deea;
  background: linear-gradient(90deg, rgba(255,61,139,.09), rgba(140,203,255,.04));
  border: 1px solid rgba(255,61,139,.28); border-left: 3px solid var(--mag);
}
.callout strong { color: #fff; }
.doc h2 { font-size: 24px; margin: 40px 0 12px; }
.doc p, .doc li { color: #c9d4e2; }
.nf { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 18px; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--line); }
details summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font: 650 19px/1.35 var(--display); color: #fff;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; position: absolute; right: 4px; top: 18px; font: 400 26px var(--mono); color: var(--ice); transition: transform .3s var(--ease);
}
details[open] summary::after { transform: rotate(45deg); color: var(--mag); }
details p { color: var(--muted); padding: 0 0 22px; max-width: 70ch; }
.paper details { border-color: var(--paper-line); }
.paper details summary { color: var(--paper-ink); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
input, textarea, select {
  width: 100%; font: 400 16px var(--body); color: #fff; background: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 13px 14px; transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px rgba(140,203,255,.15); }
textarea { min-height: 120px; resize: vertical; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-msg { color: var(--mag); font-size: 14.5px; min-height: 1.2em; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 64px 0 36px; background: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot-grid p { color: var(--faint); font-size: 14.5px; margin-top: 14px; max-width: 34ch; }
.foot-grid h2 { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.foot-grid a:not(.logo) { display: block; color: var(--muted); text-decoration: none; font-size: 15px; padding: 4px 0; }
.foot-grid a:not(.logo):hover { color: #fff; }
.site-foot > .fine { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- motion ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
@keyframes pulse-ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes dash { to { stroke-dashoffset: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes float { 50% { transform: translateY(-8px); } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; display: inline-block; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: pulse-ring 1.8s ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- fixes ---------- */
/* [hidden] must win over component display rules (.form, .dlg-in are display:grid). */
[hidden] { display: none !important; }
.article > p.byline { font-size: 13px; line-height: 1.5; color: var(--faint); }
/* long-form pages: the article body follows its hero directly */
.hero:has(.article) + .section { padding-top: 0; }
/* paper sections: component colours that otherwise stay light-on-light */
.paper .card h3, .paper .card h4 { color: var(--paper-ink); }
.paper .intro p { color: var(--paper-muted); }
/* shared motion utilities */
@keyframes flow { to { stroke-dashoffset: -28; } }
.trace { stroke-dasharray: 6 8; animation: flow 1.2s linear infinite; }
.draw { stroke-dasharray: 400; stroke-dashoffset: 400; animation: dash 2.6s var(--ease) forwards infinite alternate; }
.blink { animation: blink 1s steps(1) infinite; }
