/* ==========================================================================
   AssureIT Networks — marketing site
   One stylesheet, no external dependencies (no CDN, no webfont fetch), so the
   page paints on first byte even on a cold cache.

   Direction: cinematic dark stage, AssureIT blue/cyan. The headline voice is a
   LIGHT line paired with a HEAVY accent line — the weight contrast does the
   work, not decoration. Motion carries the narrative: the page reveals itself
   section by section and the product panel lays back to flat as you scroll in.

   Motion policy: every animation is decorative. Content is complete and
   legible with animation disabled — see the prefers-reduced-motion block at
   the bottom, which is deliberately aggressive.
   ========================================================================== */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg:          #05070e;
  --bg-soft:     #080c17;
  --bg-lift:     #0d1420;

  --surface:     rgba(255, 255, 255, 0.038);
  --surface-hi:  rgba(255, 255, 255, 0.068);
  --line:        rgba(255, 255, 255, 0.082);
  --line-hi:     rgba(56, 189, 248, 0.32);

  --text:        #f4f7fc;
  --text-soft:   #a6b1c4;
  /* Lifted from #6b7890: that measured 4.3:1 on the dash's tinted card
     surfaces, and every use is small text (KPI captions, device rows,
     tier subtitles). #75839c clears 5.0:1 on those backdrops. */
  --text-mute:   #75839c;

  --cyan:        #38bdf8;
  --accent:      #2563eb;
  --accent-hi:   #3b82f6;
  --violet:      #8b5cf6;
  --amber:       #fbbf24;
  --red:         #f87171;

  --radius-sm: 9px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shell:  1200px;
  --gutter: clamp(20px, 5vw, 44px);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

/* ==========================================================================
   Ambient layers
   ========================================================================== */
.grain {
  position: fixed; inset: -50%; z-index: 1;
  pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 620px; height: 620px; margin: -310px 0 0 -310px;
  border-radius: 50%; z-index: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(56,189,248,0.07), transparent 62%);
  transform: translate3d(var(--mx, 50vw), var(--my, 50vh), 0);
  transition: opacity 0.7s;
}
.cursor-glow.on { opacity: 1; }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 120;
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  pointer-events: none;
}

/* ---------- layout ---------- */
.shell {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--shell);
  margin-inline: auto; padding-inline: var(--gutter);
}
section { position: relative; z-index: 2; }

.band       { padding-block: clamp(80px, 12vw, 150px); }
.band-tight { padding-block: clamp(54px, 8vw, 92px); }
.band-soft  { background: var(--bg-soft); }

.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* ==========================================================================
   Typography — the light/heavy pairing is the whole voice
   ========================================================================== */
h1, h2, h3, h4 { line-height: 1.06; }

/* Light line: airy, wide, low contrast */
.t-light {
  display: block;
  font-weight: 300;
  letter-spacing: -0.028em;
  color: var(--text);
}
/* Heavy line: black weight, neon, tight */
.t-heavy {
  display: block;
  font-weight: 900;
  letter-spacing: -0.045em;
  background: linear-gradient(96deg, var(--cyan) 8%, #7dd3fc 42%, var(--cyan) 74%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: sheen 8s linear infinite;
}
@keyframes sheen { to { background-position: 220% 50%; } }

.h-hero    { font-size: clamp(2.5rem, 7.6vw, 5.4rem); }
.h-section { font-size: clamp(1.9rem, 4.4vw, 3.4rem); }
.h-card    { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.015em; }

.lede {
  font-size: clamp(0.98rem, 1.45vw, 1.09rem);
  color: var(--text-soft);
  line-height: 1.72;
  max-width: 58ch;
}

.section-head { max-width: 760px; margin-bottom: clamp(42px, 6vw, 74px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }
.section-head .lede { margin-top: 20px; }

/* ---------- micro label ---------- */
.micro {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.19em; text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 22px;
}
.micro::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 var(--cyan);
  animation: ping 2.6s var(--ease-out) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(56,189,248,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(56,189,248,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,189,248,0); }
}
.micro.center { justify-content: center; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 0.92rem;
  cursor: pointer; white-space: nowrap;
  overflow: hidden; isolation: isolate;
  transform: translate(var(--mag-x, 0), var(--mag-y, 0));
  transition: transform 0.28s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.3s, color 0.25s;
}
.btn:active { transform: translate(var(--mag-x, 0), var(--mag-y, 0)) scale(0.98); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.3) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 0.7s var(--ease);
}
.btn:hover::after { transform: translateX(130%); }

.btn-primary {
  background: linear-gradient(100deg, var(--cyan), #3b82f6 55%, var(--accent));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 34px -12px rgba(56,189,248,0.6);
}
.btn-primary:hover { box-shadow: 0 18px 48px -14px rgba(56,189,248,0.78); }

.btn-ghost {
  background: rgba(255,255,255,0.045);
  border-color: var(--line);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--line-hi); }

.btn-sm { padding: 10px 20px; font-size: 0.83rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header — tiny tracked-out nav
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.site-header.stuck {
  background: rgba(2, 5, 6, 0.78);
  backdrop-filter: blur(22px) saturate(160%);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; height: 116px; }

/* Brand — the registered AssureIT Networks lockup, used exactly as supplied.
   It is a stacked mark-over-wordmark file, so the header is sized to give the
   wordmark room rather than squashing it into a standard 72px bar. */
.brand { display: flex; align-items: center; }
.brand img { height: 84px; width: auto; }
.brand-lg img { height: 132px; }

.nav-links { display: flex; gap: 30px; margin-inline: auto; }
.nav-links a {
  position: relative;
  font-size: 0.685rem; font-weight: 600;
  letter-spacing: 0.17em; text-transform: uppercase;
  color: var(--text-soft);
  padding-block: 6px;
  white-space: nowrap;
  transition: color 0.24s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--cyan);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.accent { color: var(--cyan); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; padding: 0; place-items: center;
}
.nav-toggle span { display: block; width: 17px; height: 1.5px; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle span + span { margin-top: 4.5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Hero — centred, product visual beneath
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(128px, 15vw, 176px);
  padding-bottom: clamp(40px, 6vw, 70px);
  text-align: center;
  overflow: hidden;
}

/* Cinematic light field behind the headline */
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 120%;
  z-index: 0; pointer-events: none;
  filter: blur(80px); opacity: 0.85;
}
.hero-glow i { position: absolute; display: block; border-radius: 50%; mix-blend-mode: screen; }
.hero-glow i:nth-child(1) { width: 52vw; height: 40vw; top: -6%; left: 24%; background: radial-gradient(circle, rgba(37,99,235,0.95), transparent 66%); animation: drift1 21s ease-in-out infinite; }
.hero-glow i:nth-child(2) { width: 30vw; height: 30vw; top: 10%; left: 8%;  background: radial-gradient(circle, rgba(56,189,248,0.24), transparent 66%); animation: drift2 25s ease-in-out infinite; }
.hero-glow i:nth-child(3) { width: 28vw; height: 28vw; top: 18%; right: 8%; background: radial-gradient(circle, rgba(139,92,246,0.5), transparent 66%);  animation: drift3 29s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5%, 5%) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8%, -6%) scale(0.9); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-7%, -8%) scale(1.15); } }

/* Faint instrumentation grid */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 22%, #000 4%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 22%, #000 4%, transparent 74%);
  pointer-events: none;
}

.hero h1 { margin-bottom: 26px; }
.hero .lede { margin-inline: auto; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { font-size: 0.79rem; color: var(--text-mute); }

/* Line-by-line mask reveal. JS wraps each line in .w; without JS the heading
   simply renders normally because both mask and animation live on .w. */
.hero h1 .w { display: block; overflow: hidden; }
.hero h1 .w > span {
  transform: translateY(106%);
  animation: lineUp 1s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 110ms + 120ms);
}
@keyframes lineUp { to { transform: translateY(0); } }

/* ==========================================================================
   Dashboard visual — the product shot
   ========================================================================== */
.stage {
  position: relative;
  margin-top: clamp(46px, 6vw, 78px);
  perspective: 1800px;
}
/* Neon floor-glow under the panel */
.stage::before {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: -8%;
  height: 46%;
  background: radial-gradient(ellipse at 50% 50%, rgba(56,189,248,0.2), transparent 68%);
  filter: blur(52px);
  pointer-events: none;
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

.dash {
  position: relative;
  text-align: left;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(168deg, rgba(255,255,255,0.07), rgba(255,255,255,0.014) 46%, rgba(2,5,6,0.6));
  backdrop-filter: blur(20px);
  box-shadow: 0 60px 130px -50px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,0.07);
  overflow: hidden;
  /* --dash-rx/--dash-s are driven by SCROLL (the panel lays back to flat as it
     enters), --dash-ry by the POINTER. Both feed one transform so they compose
     instead of overwriting each other. */
  transform: perspective(1800px)
             rotateX(var(--dash-rx, 0deg))
             rotateY(var(--dash-ry, 0deg))
             scale(var(--dash-s, 1));
  transform-origin: 50% 0;
  will-change: transform;
}

.dash-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.tl { display: flex; gap: 6px; margin-right: 6px; }
.tl i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.14); display: block; }
.dash-tabs { display: flex; gap: 4px; }
.dash-tabs span {
  font-size: 0.72rem; padding: 5px 12px; border-radius: 999px;
  color: var(--text-mute);
}
.dash-tabs span.on { background: rgba(56,189,248,0.12); color: var(--cyan); }
.dash-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.68rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cyan);
}
.dash-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.dash-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
}
.dash-main, .dash-side { background: rgba(2,5,6,0.35); padding: 20px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 13px 14px; border-radius: var(--radius); background: rgba(255,255,255,0.028); border: 1px solid var(--line); }
.kpi .k { font-size: 0.67rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.kpi .v { font-size: 1.55rem; font-weight: 750; letter-spacing: -0.03em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.kpi .v.mint { color: var(--cyan); }
.kpi .v.amber { color: var(--amber); }
.kpi .d { font-size: 0.68rem; color: var(--text-mute); margin-top: 1px; }

.chart { border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,0.018); padding: 14px; }
.chart-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.chart-head .t { font-size: 0.78rem; color: var(--text-soft); }
.chart-head .n { margin-left: auto; font-size: 0.72rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.chart svg { width: 100%; height: 108px; overflow: visible; }
.chart path.line { fill: none; stroke: url(#gLine); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.6s var(--ease-out) 0.6s forwards; }
.chart path.area { fill: url(#gArea); opacity: 0; animation: fadeIn 1.4s ease 1.9s forwards; }
.chart .gridline { stroke: rgba(255,255,255,0.05); stroke-width: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

.dash-side h4 { font-size: 0.67rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 12px; font-weight: 600; }
.devices { display: grid; gap: 7px; }
.device {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.022); border: 1px solid transparent;
  font-size: 0.775rem;
  transition: background 0.25s, border-color 0.25s;
}
.device:hover { background: rgba(255,255,255,0.05); border-color: var(--line); }
.device .nm { font-family: var(--mono); font-size: 0.73rem; color: var(--text-soft); }
.device .st { margin-left: auto; font-size: 0.67rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.sdot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.sdot.ok { background: var(--cyan); box-shadow: 0 0 8px rgba(56,189,248,0.6); }
.sdot.warn { background: var(--amber); }
.sdot.off { background: var(--text-mute); }

.alerts { margin-top: 16px; display: grid; gap: 6px; }
.alert-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.735rem; color: var(--text-soft);
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.018);
  animation: rowIn 0.5s var(--ease-out) backwards;
}
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } }
.alert-row time { margin-left: auto; color: var(--text-mute); font-size: 0.67rem; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee {
  position: relative; overflow: hidden;
  padding-block: 20px;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 44px; animation: scrollX 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollX { to { transform: translateX(-50%); } }
.marquee-item {
  display: flex; align-items: center; gap: 11px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-mute); white-space: nowrap; transition: color 0.25s;
}
.marquee-item:hover { color: var(--cyan); }
.marquee-item::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); opacity: 0.5; }

/* ==========================================================================
   Proof strip
   ========================================================================== */
.proof-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 26px; text-align: center; }
.proof-num {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 300; letter-spacing: -0.035em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.proof-num em { font-style: normal; color: var(--cyan); font-weight: 500; }
.proof-lbl { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); margin-top: 8px; }

/* ==========================================================================
   Cards + spotlight
   ========================================================================== */
.grid   { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.4s, background 0.4s;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-hi); background: var(--surface-hi); }

.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(340px circle at var(--sx, 50%) var(--sy, 50%), rgba(56,189,248,0.1), transparent 62%);
  pointer-events: none;
}
.spot:hover::before { opacity: 1; }

.card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: scaleX(0); transition: transform 0.55s var(--ease);
}
.card:hover::after { transform: scaleX(1); }

.card h3 { margin-bottom: 9px; }
.card p { color: var(--text-soft); font-size: 0.9rem; }

.icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(56,189,248,0.09);
  border: 1px solid rgba(56,189,248,0.2);
  transition: transform 0.45s var(--ease), background 0.4s;
}
.card:hover .icon, .sector:hover .icon { transform: translateY(-2px) scale(1.07); background: rgba(56,189,248,0.15); }
.icon svg { width: 19px; height: 19px; stroke: var(--cyan); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- numbered feature rows (the narrative section) ---------- */
.story { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.story-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 26px; align-items: center;
  padding: 30px 28px;
  background: var(--bg-soft);
  transition: background 0.4s;
}
.story-row:hover { background: var(--bg-lift); }
.story-n { font-family: var(--mono); font-size: 0.78rem; color: var(--cyan); letter-spacing: 0.08em; }
.story-row h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.022em; margin-bottom: 7px; }
.story-row p { color: var(--text-soft); font-size: 0.9rem; }
.story-viz { display: grid; gap: 7px; }
.viz-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.024); border: 1px solid var(--line);
  font-size: 0.755rem; color: var(--text-soft);
}
.viz-row .lbl { min-width: 58px; }
.viz-row .val { margin-left: auto; font-family: var(--mono); font-size: 0.71rem; color: var(--text-mute); }
.bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.07); overflow: hidden; max-width: 90px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--accent)); animation: barPulse 3.6s var(--ease) infinite; }
@keyframes barPulse { 0%,100% { width: 32%; } 50% { width: 86%; } }
.viz-row:nth-child(2) .bar i { animation-delay: 0.55s; }
.viz-row:nth-child(3) .bar i { animation-delay: 1.1s; }

/* ==========================================================================
   Problems
   ========================================================================== */
.problems { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.problem {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.problem:hover { border-color: rgba(248,113,113,0.28); background: var(--surface-hi); transform: translateX(4px); }
.problem .x { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(248,113,113,0.12); margin-top: 1px; }
.problem .x svg { width: 10px; height: 10px; stroke: var(--red); stroke-width: 2.4; }
.problem p { font-size: 0.875rem; color: var(--text-soft); }
.problem strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; font-size: 0.92rem; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; align-items: start; }
.tier {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px 26px;
  display: flex; flex-direction: column;
  transition: transform 0.45s var(--ease), border-color 0.4s;
}
.tier:hover { transform: translateY(-5px); border-color: var(--line-hi); }
.tier-featured {
  background: linear-gradient(168deg, rgba(56,189,248,0.09), rgba(255,255,255,0.02));
  border-color: transparent;
  box-shadow: 0 28px 70px -36px rgba(56,189,248,0.55);
}
.tier-featured::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: conic-gradient(from var(--angle), transparent 60%, var(--cyan), #7dd3fc, transparent 92%);
  animation: spin 5.5s linear infinite;
}
@keyframes spin { to { --angle: 360deg; } }

.tier-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
.tier h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.tag { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }
.tier-sub { color: var(--text-mute); font-size: 0.845rem; margin-bottom: 22px; }
.tier ul { list-style: none; padding: 0; display: grid; gap: 11px; margin-bottom: 26px; }
.tier li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; color: var(--text-soft); }
.tier li svg { flex: none; width: 15px; height: 15px; margin-top: 3px; stroke: var(--cyan); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tier .btn { margin-top: auto; }
.price-note { margin-top: 24px; text-align: center; font-size: 0.845rem; color: var(--text-mute); }

/* ==========================================================================
   Industries
   ========================================================================== */
.sector {
  position: relative; display: flex; gap: 15px; align-items: flex-start;
  padding: 23px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.35s;
}
.sector:hover { transform: translateY(-4px); border-color: var(--line-hi); }
.sector .icon { margin-bottom: 0; width: 38px; height: 38px; }
.sector h3 { font-size: 1rem; font-weight: 650; margin-bottom: 5px; letter-spacing: -0.015em; }
.sector p { font-size: 0.865rem; color: var(--text-soft); }

/* ==========================================================================
   Enquiry
   ========================================================================== */
.enquire-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 62px); align-items: start; }
.contact-list { display: grid; gap: 14px; margin-top: 30px; }
.contact-item { display: flex; gap: 13px; align-items: flex-start; }
.contact-item .icon { width: 37px; height: 37px; margin-bottom: 0; border-radius: 10px; }
.contact-item .k { font-size: 0.66rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.13em; }
.contact-item .v { font-size: 0.93rem; font-weight: 550; }
.contact-item a.v { transition: color 0.22s; }
.contact-item a.v:hover { color: var(--cyan); }

.form-card {
  position: relative;
  background: linear-gradient(168deg, rgba(255,255,255,0.062), rgba(255,255,255,0.016));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 3.4vw, 36px);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 90px -50px rgba(0,0,0,1);
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; margin-bottom: 8px; color: var(--text-mute); }
.field .req { color: var(--cyan); font-style: normal; }

.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(2,5,6,0.6);
  border: 1px solid var(--line);
  color: var(--text); font-size: 0.92rem;
  transition: border-color 0.22s, background 0.22s, box-shadow 0.22s;
}
.field textarea { resize: vertical; min-height: 102px; line-height: 1.6; }
.field select {
  appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%235f6c6c' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field select option { background: #04090c; color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-mute); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan);
  background: rgba(2,5,6,0.85);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.13);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); }

.field-err { display: none; font-size: 0.76rem; color: var(--red); margin-top: 6px; font-style: normal; }
.field-err.show { display: block; animation: shakeIn 0.35s var(--ease); }
@keyframes shakeIn { 0% { opacity: 0; transform: translateX(-5px); } 100% { opacity: 1; transform: none; } }

/* Honeypot — bots fill it, humans never see it. Not display:none, which some
   bots detect; positioned off-canvas instead. */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.skip { position: absolute; left: -9999px; z-index: 200; padding: 12px 20px; border-radius: var(--radius-sm); background: var(--accent); color: #fff; font-weight: 700; }
.skip:focus { left: 16px; top: 16px; }

.form-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; }
.form-consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--cyan); flex: none; }
.form-consent label { font-size: 0.79rem; color: var(--text-mute); line-height: 1.6; }

.form-status { display: none; margin-top: 15px; padding: 13px 16px; border-radius: var(--radius-sm); font-size: 0.87rem; }
.form-status.show { display: block; animation: shakeIn 0.4s var(--ease); }
.form-status.ok  { background: rgba(56,189,248,0.1);  border: 1px solid rgba(56,189,248,0.3);  color: var(--cyan); }
.form-status.err { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: var(--red); }

.btn[data-busy="true"] { opacity: 0.68; pointer-events: none; }
.spin { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: spinner 0.7s linear infinite; display: none; }
.btn[data-busy="true"] .spin { display: block; }
@keyframes spinner { to { transform: rotate(360deg); } }

/* ==========================================================================
   Final CTA
   ========================================================================== */
.cta-panel {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl); border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(37,99,235,0.55), rgba(56,189,248,0.05) 55%, rgba(255,255,255,0.02));
  padding: clamp(42px, 6.5vw, 84px) clamp(24px, 5vw, 56px);
  text-align: center;
}
.cta-panel::after {
  content: ""; position: absolute; inset: auto -20% -75% -20%; height: 155%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(56,189,248,0.16), transparent 70%);
  pointer-events: none; animation: breathe 9s ease-in-out infinite;
}
.cta-panel > * { position: relative; z-index: 1; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); padding-block: 54px 28px; background: var(--bg-soft); position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 38px 26px; padding-bottom: 36px; }
.footer-grid h4 { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-mute); margin-bottom: 16px; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-grid li a, .footer-grid li { font-size: 0.875rem; color: var(--text-soft); }
.footer-grid li a { transition: color 0.22s; }
.footer-grid li a:hover { color: var(--cyan); }
.footer-about p { font-size: 0.875rem; color: var(--text-soft); margin-top: 14px; max-width: 34ch; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-mute); }

/* ==========================================================================
   Scroll reveal
   Content is visible by DEFAULT. The hidden start state only applies once JS
   has confirmed it is running and will animate it back (html.js-anim, set
   synchronously in <head>). If scripting is off, blocked, or throws, the page
   still renders in full rather than showing dozens of invisible elements.
   ========================================================================== */
.reveal { opacity: 1; transform: none; }
.js-anim .reveal {
  opacity: 0; transform: translateY(28px); filter: blur(7px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out), filter 0.85s var(--ease-out);
}
.js-anim .reveal.in { opacity: 1; transform: none; filter: none; }


/* ==========================================================================
   LIGHT THEME
   The whole page is driven by the tokens in :root, so light mode is a token
   swap plus a handful of effects that only make sense on a dark stage (grain,
   aurora, glow) being dialled down. data-theme is set on <html> by the inline
   script in <head>, before first paint, so there is no flash.
   Accent colours are DARKENED here — #38bdf8 on white is only ~1.9:1 and would
   fail contrast; the light palette uses #0284c7 / #1d4ed8 instead.
   ========================================================================== */
:root[data-theme="light"] {
  --bg:          #ffffff;
  --bg-soft:     #f4f7fb;
  --bg-lift:     #e9eef6;

  --surface:     rgba(2, 6, 23, 0.028);
  --surface-hi:  rgba(2, 6, 23, 0.055);
  --line:        rgba(2, 6, 23, 0.11);
  --line-hi:     rgba(37, 99, 235, 0.4);

  --text:        #0a1222;
  --text-soft:   #4a5a70;
  /* Not the mirror of the dark theme's mute (#6b7890): on white that lands at
     3.76:1 and every use of it here is SMALL text (micro labels, form labels,
     KPI captions, marquee), which needs 4.5:1. #5a6a7e measures 5.5:1 on white,
     5.3:1 on --surface and 5.2:1 on --bg-soft, so it passes on every backdrop
     it actually sits on. */
  --text-mute:   #4f5f73;

  /* #0284c7 reads at only 4.1:1 on white and 3.6:1 on the panel's tinted
     chips, and this accent is used for SMALL text (.story-n, .dash-live,
     the active tab). #0369a1 clears 5.2-5.9:1 everywhere it lands. */
  --cyan:        #0369a1;
  --accent:      #2563eb;
  --accent-hi:   #1d4ed8;
  --violet:      #7c3aed;
  --amber:       #b45309;
  --red:         #dc2626;
}

/* Effects that only read on a dark stage */
:root[data-theme="light"] .grain { opacity: 0.018; }
:root[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(37,99,235,0.05), transparent 62%);
}
:root[data-theme="light"] .hero-glow { opacity: 0.5; filter: blur(90px); }
:root[data-theme="light"] .hero-glow i:nth-child(1) { background: radial-gradient(circle, rgba(37,99,235,0.28), transparent 66%); }
:root[data-theme="light"] .hero-glow i:nth-child(2) { background: radial-gradient(circle, rgba(2,132,199,0.22), transparent 66%); }
:root[data-theme="light"] .hero-glow i:nth-child(3) { background: radial-gradient(circle, rgba(124,58,237,0.18), transparent 66%); }
:root[data-theme="light"] .hero::after {
  background-image:
    linear-gradient(rgba(2,6,23,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2,6,23,0.045) 1px, transparent 1px);
}

:root[data-theme="light"] .site-header.stuck {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: var(--line);
}
:root[data-theme="light"] .nav-links { background: rgba(255,255,255,0.98); }

/* The product panel needs a real surface on white, not a translucent film */
:root[data-theme="light"] .dash {
  background: linear-gradient(168deg, #ffffff, #f7fafd);
  box-shadow: 0 40px 90px -46px rgba(10,18,34,0.4), 0 2px 8px rgba(10,18,34,0.05);
}
:root[data-theme="light"] .dash-bar   { background: rgba(2,6,23,0.022); }
:root[data-theme="light"] .dash-main,
:root[data-theme="light"] .dash-side  { background: transparent; }
:root[data-theme="light"] .kpi,
:root[data-theme="light"] .chart      { background: rgba(2,6,23,0.02); }
:root[data-theme="light"] .device,
:root[data-theme="light"] .alert-row  { background: rgba(2,6,23,0.026); }
:root[data-theme="light"] .chart .gridline { stroke: rgba(2,6,23,0.07); }
:root[data-theme="light"] .stage::before  { opacity: 0.35; }

:root[data-theme="light"] .field input,
:root[data-theme="light"] .field select,
:root[data-theme="light"] .field textarea { background: #fff; }
:root[data-theme="light"] .field input:focus,
:root[data-theme="light"] .field select:focus,
:root[data-theme="light"] .field textarea:focus { background: #fff; }
:root[data-theme="light"] .field select option { background: #fff; color: var(--text); }
:root[data-theme="light"] .form-card,
:root[data-theme="light"] .cta-panel { background: linear-gradient(168deg, #ffffff, #f4f8fd); }
:root[data-theme="light"] .cta-panel { border-color: var(--line); }
:root[data-theme="light"] .story-row { background: #fff; }
:root[data-theme="light"] .story-row:hover { background: var(--bg-soft); }
:root[data-theme="light"] .btn-primary { color: #fff; }
:root[data-theme="light"] .skip { color: #fff; }
:root[data-theme="light"] .spin { border-color: rgba(255,255,255,0.4); border-top-color: #fff; }

/* ---------- logo variant swap ---------- */
/* Dark-stage logo (light wordmark) is the default; the supplied light-stage
   logo takes over in light mode. Both are the same registered lockup. */
.brand .logo-light { display: none; }
:root[data-theme="light"] .brand .logo-dark  { display: none; }
:root[data-theme="light"] .brand .logo-light { display: block; }

/* ---------- theme toggle ---------- */
.theme-toggle {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-soft);
  cursor: pointer; padding: 0;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.theme-toggle:hover { background: var(--surface-hi); border-color: var(--line-hi); color: var(--text); transform: rotate(18deg); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun  { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .dash-body { grid-template-columns: 1fr; }
  .enquire-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .story-row { grid-template-columns: 44px minmax(0,1fr); gap: 18px; }
  .story-viz { grid-column: 1 / -1; margin-top: 6px; }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 116px 0 auto 0;
    flex-direction: column; gap: 0; margin: 0;
    padding: 12px var(--gutter) 22px;
    background: rgba(2,5,6,0.98);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity 0.26s, transform 0.26s var(--ease), visibility 0.26s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 14px 0; font-size: 0.78rem; }
  .nav-toggle { display: grid; }
  .nav-cta .btn-ghost { display: none; }
  .grid-3, .tiers, .problems, .grid-2 { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 30px 18px; }
  .cursor-glow { display: none; }   /* touch devices have no pointer to follow */
  .kpis { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-actions, .cta-actions { flex-direction: column; }
  .nav-cta .btn { width: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .dash-main, .dash-side { padding: 15px; }
  .story-row { padding: 22px 18px; }
  /* The full tab set does not fit a phone; the panel clips it, which reads as a
     rendering fault rather than a design. Show only what fits. */
  .dash-tabs span:nth-child(n+3) { display: none; }
}

/* ==========================================================================
   Reduced motion — decorative movement off, everything still legible.
   Deliberately broad: this page leans hard on motion, so the safe default for
   anyone who asks for less is to remove essentially all of it.
   ========================================================================== */
@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;
    animation-delay: 0ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero h1 .w > span { transform: none !important; }
  .grain, .cursor-glow, .hero-glow { display: none; }
  .dash { transform: none !important; }
  .marquee-track { animation: none; transform: none; }
  .chart path.line { stroke-dashoffset: 0; }
  .chart path.area { opacity: 1; }
  .t-heavy { animation: none; }
}

@media print {
  .site-header, .nav-toggle, .cta-panel, .form-card, .grain, .cursor-glow, .hero-glow, .marquee { display: none; }
  body { background: #fff; color: #000; }
}
