/* ==========================================
   1. CORE THEME SYSTEM
   One brand (EmbedAI), nine verticals. Every vertical repaints the
   accent through CSS variables; nothing below hardcodes a colour.
   ========================================== */
:root {
  /* ---- Shared architecture baseline ---- */
  --bg-primary: #07080d;
  --bg-surface: #0f111a;
  --bg-surface-hover: #151824;
  --bg-deep: #04050a;

  /* Thin-border scale. Borders are hairlines, never thick strokes. */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.10);
  --border-active: rgba(255, 255, 255, 0.15);

  --text-main: #f3f4f6;
  --text-soft: #b6bcc9;
  --text-muted: #888f9e;
  --text-faint: #626877;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* ---- Motion ---- */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Navigation geometry (the fixed bar measures itself from these) ---- */
  --nav-height: 64px;
  --nav-line: 1px;
  --nav-glass: rgba(8, 10, 16, 0.66);
  --nav-glass-solid: rgba(8, 10, 16, 0.94);
  --nav-blur: blur(12px) saturate(150%);
  --nav-gap: 20px;
  --nav-inset: 24px;

  /* Fallback clearance — the script syncs the exact value to --nav-clearance. */
  --nav-clearance: 88px;
}

/* ---- The nine vertical accents ----
   Each block sets the full accent set, so a vertical can never inherit a
   half-swapped palette from the one before it. */
[data-vertical="manufacturing"] {
  --accent-neon: #ffa23a;
  --accent-glow: rgba(255, 162, 58, 0.12);
  --accent-soft: rgba(255, 162, 58, 0.05);
  --accent-line: rgba(255, 162, 58, 0.30);
}
[data-vertical="automotive"] {
  --accent-neon: #7c9cff;
  --accent-glow: rgba(124, 156, 255, 0.12);
  --accent-soft: rgba(124, 156, 255, 0.05);
  --accent-line: rgba(124, 156, 255, 0.30);
}
[data-vertical="productivity"] {
  --accent-neon: #ff4d7e;
  --accent-glow: rgba(255, 77, 126, 0.12);
  --accent-soft: rgba(255, 77, 126, 0.05);
  --accent-line: rgba(255, 77, 126, 0.30);
}
[data-vertical="interior-design"] {
  --accent-neon: #ffc857;
  --accent-glow: rgba(255, 200, 87, 0.12);
  --accent-soft: rgba(255, 200, 87, 0.05);
  --accent-line: rgba(255, 200, 87, 0.30);
}
[data-vertical="chatbot"] {
  --accent-neon: #b98cff;
  --accent-glow: rgba(185, 140, 255, 0.12);
  --accent-soft: rgba(185, 140, 255, 0.05);
  --accent-line: rgba(185, 140, 255, 0.30);
}
[data-vertical="sports"] {
  --accent-neon: #3ddc97;
  --accent-glow: rgba(61, 220, 151, 0.12);
  --accent-soft: rgba(61, 220, 151, 0.05);
  --accent-line: rgba(61, 220, 151, 0.30);
}
[data-vertical="marketing"] {
  --accent-neon: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.12);
  --accent-soft: rgba(0, 212, 255, 0.05);
  --accent-line: rgba(0, 212, 255, 0.30);
}
[data-vertical="education"] {
  --accent-neon: #5fd38a;
  --accent-glow: rgba(95, 211, 138, 0.12);
  --accent-soft: rgba(95, 211, 138, 0.05);
  --accent-line: rgba(95, 211, 138, 0.30);
}
[data-vertical="erp"] {
  --accent-neon: #c9a227;
  --accent-glow: rgba(201, 162, 39, 0.12);
  --accent-soft: rgba(201, 162, 39, 0.05);
  --accent-line: rgba(201, 162, 39, 0.30);
}

/* Base Styling Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Clearance for the fixed bar; --nav-clearance is sync'd by the script. */
  padding-top: calc(var(--nav-clearance) + 16px);
}
svg { display: block; }
a { color: inherit; }
button { font: inherit; }

/* ==========================================
   2. FIXED BLUR-GLASS NAVIGATION BAR
   ========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.premium-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
  padding: 10px var(--nav-inset);
  /* Translucent fill plus a top sheen. The solid layer lives in ::before so
     engines without backdrop-filter still get an opaque dark bar. */
  background: var(--nav-glass);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 100%);
  -webkit-backdrop-filter: var(--nav-blur);
  backdrop-filter: var(--nav-blur);
  border: 0;
  border-bottom: var(--nav-line) solid var(--border-subtle);
  border-radius: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 24px 60px rgba(0, 0, 0, 0.42);
}
.premium-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--nav-glass-solid);
  pointer-events: none;
}
/* A single hairline of accent light, tinted by the active vertical. */
.premium-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line) 18%, var(--accent-line) 82%, transparent);
  opacity: 0.55;
  pointer-events: none;
  transition: background 0.6s var(--ease-out);
}

/* ---- Brand: logo mark + wordmark ---- */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  min-width: 0;
}
/* The supplied artwork is a stacked lockup: monogram on top, wordmark below,
   on an opaque navy field with no alpha. Scaled whole into a header tile the
   mark shrinks to about 14px and the wordmark duplicates the one beside it,
   which is why only text was legible. `embedai-mark.png` is that file cropped
   to the monogram alone, so the mark is the whole tile. The dark field stays
   because the source has no transparency to knock out. */
.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 6px 18px rgba(0, 0, 0, 0.45);
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  cursor: default;
}
.logo span { color: var(--accent-neon); transition: var(--transition-smooth); }

/* ---- Centre slot: the vertical controller ---- */
.nav-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.switcher-track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  /* Nine verticals will not fit a phone; scroll rather than shrink the
     targets below a comfortable tap size. */
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.switcher-track::-webkit-scrollbar { display: none; }

/* The visual highlight wrapper. It is the first child of the track and is
   moved by the script; it is never a control and never focusable. */
.switcher-highlight {
  position: absolute;
  top: 3px;
  left: 0;
  border-radius: 7px;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.45s var(--ease-out), width 0.45s var(--ease-out), opacity 0.3s linear;
}
.switcher-highlight::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 1px;
  background: var(--accent-neon);
  opacity: 0.9;
  transition: background 0.6s var(--ease-out);
}

.switcher-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 12px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.switcher-btn svg { width: 14px; height: 14px; flex: none; opacity: 0.75; transition: opacity 0.3s var(--ease-out); }
.switcher-btn:hover { color: var(--text-main); }
.switcher-btn:active { color: var(--text-main); }

/* The active control is driven by the root data-vertical attribute — the
   same attribute the CSS palette reads, so tab and theme can never disagree. */
html[data-vertical="manufacturing"] .btn-manufacturing,
html[data-vertical="automotive"] .btn-automotive,
html[data-vertical="productivity"] .btn-productivity,
html[data-vertical="interior-design"] .btn-interior-design,
html[data-vertical="chatbot"] .btn-chatbot,
html[data-vertical="sports"] .btn-sports,
html[data-vertical="marketing"] .btn-marketing,
html[data-vertical="education"] .btn-education,
html[data-vertical="erp"] .btn-erp {
  color: var(--accent-neon);
}
html[data-vertical="manufacturing"] .btn-manufacturing svg,
html[data-vertical="automotive"] .btn-automotive svg,
html[data-vertical="productivity"] .btn-productivity svg,
html[data-vertical="interior-design"] .btn-interior-design svg,
html[data-vertical="chatbot"] .btn-chatbot svg,
html[data-vertical="sports"] .btn-sports svg,
html[data-vertical="marketing"] .btn-marketing svg,
html[data-vertical="education"] .btn-education svg,
html[data-vertical="erp"] .btn-erp svg { opacity: 1; }

/* ---- Right slot: nav CTA ---- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  margin-left: auto;
}
.cta-button.ghost {
  padding: 9px 16px;
  margin-top: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border-color: var(--border-strong);
  color: var(--text-main);
  white-space: nowrap;
}
.cta-button.ghost:hover {
  border-color: var(--accent-neon);
  color: var(--accent-neon);
  background: var(--accent-soft);
}

/* ==========================================
   2b. HERO
   ========================================== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  column-gap: 56px;
  row-gap: 28px;
  padding: 52px 0 56px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border-subtle);
}
.hero-backdrop {
  position: absolute;
  inset: -1px -1px 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 18px;
  background: radial-gradient(38rem 22rem at 12% -30%, var(--accent-glow), transparent 65%);
  transition: background 0.6s var(--ease-out);
}
/* Placement is pinned, not left to auto-flow: the hero stays a two-column
   typographic grid at every width in this breakpoint. */
.hero-lead { grid-column: 1; grid-row: 1; min-width: 0; }
.hero-meta {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 26px;
  min-width: 0;
}
.hero > * { position: relative; z-index: 1; }

/* Mono eyebrow: hairline tick, tracked uppercase. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1;
  color: var(--accent-neon);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 22px;
  transition: var(--transition-smooth);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
  max-width: 15ch;
  margin: 0;
}
.hero-title .accent-text { color: var(--accent-neon); }

.hero-desc {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 46ch;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-actions .cta-button { margin-top: 0; }


/* ==========================================
   3. THE PRODUCT SECTION
   A grid of nine premium cards. Each card is a control for the vertical
   engine and, at the same time, a readable summary of that product line.
   ========================================== */
.verticals {
  margin-bottom: 88px;
}
.verticals-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 22px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-subtle);
}
.verticals-head__lead { min-width: 0; }
.verticals-head h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.verticals-head p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 62ch;
}
.verticals-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  padding-bottom: 4px;
}

.vertical-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* A card is a full-bleed control: no default button chrome, but the whole
   surface takes focus so the vertical is reachable from the keyboard. */
.vertical-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  padding: 26px 24px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)) , var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--text-main);
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-smooth);
  /* Resting position of the pointer glow — see .card-glow below. */
  --glow-x: -25%;
  --glow-y: -25%;
  --glow-o: 0;
}
.vertical-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
}
/* The active card is the visual highlight, in the card grid as well as the
   nav — both read the same root attribute, so they cannot drift apart. */
.vertical-card[aria-pressed="true"] {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, 0)) , var(--bg-surface-hover);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45), 0 0 34px var(--accent-glow);
  /* The chosen line keeps a low glow at rest, so the selection is legible
     without a pointer being anywhere near it. */
  --glow-o: 0.55;
  --glow-x: 50%;
  --glow-y: 0%;
}
.vertical-card[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-neon) 40%, var(--accent-neon) 60%, transparent);
  opacity: 0.75;
  pointer-events: none;
}

.vertical-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vertical-card__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border: 1px solid var(--vertical-dot, var(--accent-neon));
  transform: rotate(45deg);
}
.vertical-card__count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.vertical-card__name {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
}
.vertical-card__proposition {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  flex: 1 1 auto;
}
/* Product names, as chips. These are the products the vertical ships. */
.vertical-card__products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}
.vertical-card__products li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  /* The colour of the line this product belongs to - the same variable the
     dot at the top of the card reads, so a card cannot show two colours. */
  color: var(--vertical-dot, var(--accent-neon));
  /* No fill of its own: the chip shows the card underneath it, so the only
     thing marking it out is the hairline. A tint here read as a second
     surface stacked on the card. */
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  transition: var(--transition-smooth);
}
.vertical-card:hover .vertical-card__products li,
.vertical-card[aria-pressed="true"] .vertical-card__products li { border-color: var(--border-active); }

/* ==========================================
   4. VERTICAL DETAIL — bento grid
   ========================================== */
.vertical-detail {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.vertical-detail__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin-bottom: 14px;
}
.vertical-detail h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0 0 12px;
  max-width: 24ch;
}
.vertical-detail__desc {
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 62ch;
  text-wrap: pretty;
}
.vertical-detail__index {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-faint);
  white-space: nowrap;
  line-height: 1;
  padding-bottom: 6px;
}
.vertical-detail__index em {
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-left: 4px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(190px, auto);
  align-content: start;
  gap: 18px;
  margin-bottom: 96px;
}

.bento-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  /* Resting position of the pointer glow: parked just off the top-left so it
     cannot tint the card until a pointer actually reports a position. */
  --glow-x: -25%;
  --glow-y: -25%;
  --glow-o: 0;
}
.bento-card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-glow);
}

/* ------------------------------------------------------------------
   Pointer-tracked accent glow — the "AI glow" under the cursor.

   Two soft pools of var(--accent-glow) sit in one background layer, and
   the pointer only moves `background-position`. That matters: a gradient
   cannot be interpolated, but background-position can, so the pool glides
   to the cursor under a real CSS transition instead of teleporting. The
   layer is always painted and only its opacity animates.

   The fade is keyed to `.is-pointer`, set by the script, rather than to
   `:hover`. `:hover` is a poor trigger for a pointer-driven effect: it
   cannot be exercised without a real mouse, and on a touch device it sticks
   after a tap. `pointerover`/`pointerout` describe the same condition and
   are what the coordinate tracking already listens to.

   The element is never focusable and never receives pointer events; it is
   decorative only, and sits above the card's own background but below any
   content that establishes position (see .card-head/.card-foot).
   ------------------------------------------------------------------ */
.card-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  /* Resting value: 0 on an idle card, 0.16 on the selected one. The pointer
     raises it to full without discarding what the card already had. */
  opacity: var(--glow-o, 0);
  background-repeat: no-repeat;
  /* Two pools of var(--accent-glow). The colour is the shared token, but its
     0.12 alpha is tuned for a hairline, not for a 26rem pool: overlapping
     pools compound, and at full strength this lifted the card body's mean
     luminance by ~52%, which read as a flat wash over the whole card rather
     than a glow under the cursor. Hence the small pools and the low level. */
  background-image:
    radial-gradient(11rem 11rem at 50% 50%, var(--accent-glow), transparent 62%),
    radial-gradient(28rem 28rem at 50% 50%, var(--accent-glow), transparent 70%);
  background-position:
    var(--glow-x, -25%) var(--glow-y, -25%),
    var(--glow-x, -25%) var(--glow-y, -25%);
  /* background-position is the animated property; opacity carries the fade. */
  transition: background-position 0.45s var(--ease-out), opacity 0.4s var(--ease-out);
}
/* The pointer raises the level, rather than a second rule overriding the
   opacity. One variable stays the single source of truth for how bright the
   glow is, and the fade is just that variable's own transition. */
.vertical-card.is-pointer,
.bento-card.is-pointer { --glow-o: 2.2; }

/* Content must clear the glow. Cards that already lift their own blocks do
   this themselves; this covers the card type that does not. */
.vertical-card > *:not(.card-glow) { position: relative; z-index: 1; }

/* Bento explicit column spans (no framework required) */
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-neon);
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}
.bento-card:hover .card-icon {
  border-color: var(--accent-neon);
  background: rgba(255, 255, 255, 0.05);
}
.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.3;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

/* Headline figure on the flagship card */
.metric-display {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 5.4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-main);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.metric-display em {
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  max-width: 28ch;
  line-height: 1.4;
}

/* Compact figure, for the single-column cards */
.metric-sm {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.metric-sm em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--accent-neon);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

/* Capability chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* The colour of the vertical on show. This panel repaints with the
     selection, so unlike a card in the grid it has no fixed colour of its
     own to read - the live accent is it. */
  color: var(--accent-neon);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  padding: 6px 12px;
  transition: var(--transition-smooth);
}
.bento-card:hover .chip { border-color: var(--border-active); }

/* Terminal prompt simulation view */
.terminal-view {
  background: #040508;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
}
.terminal-line { color: var(--text-muted); margin-bottom: 4px; }
.terminal-line:last-child { margin-bottom: 0; }
.terminal-line span.accent { color: var(--accent-neon); transition: var(--transition-smooth); }

/* Load bars, for the deployment posture card */
.bar-list { margin-top: 18px; display: grid; gap: 14px; }
.bar-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 2.6rem;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.bar-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--accent-neon);
  opacity: 0.85;
  transition: width 0.9s var(--ease-out), background 0.6s var(--ease-out);
}
.bar-val { font-family: var(--font-mono); color: var(--text-main); text-align: right; }

/* Live status dot */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-neon);
  margin-right: 8px;
  vertical-align: middle;
  flex: none;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50%      { opacity: 0.55; box-shadow: 0 0 0 6px transparent; }
}

/* Call to action */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 22px;
  border-radius: 99px;
  border: 1px solid var(--accent-neon);
  background: transparent;
  color: var(--accent-neon);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.cta-button:hover {
  background: var(--accent-neon);
  color: var(--bg-primary);
  transform: translateX(2px);
}
.cta-button svg { transition: var(--transition-smooth); }
.cta-button:hover svg { transform: translateX(3px); }

/* Frosted-glass variant, used by the flagship and CTA cards */
.bento-card.is-glass {
  background: rgba(15, 17, 26, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

/* A hairline of accent light across the card's top edge, on hover only.
   The pointer-tracked pool is now the shared .card-glow layer, so this
   pseudo-element is free to do a different job rather than repeat it. */
.bento-card::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: -1px;
  height: 1px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent-neon) 50%, transparent);
  transition: opacity 0.4s var(--ease-out);
}
.bento-card:hover::after { opacity: 0.6; }

.card-head { position: relative; z-index: 1; }
.card-foot { position: relative; z-index: 1; }

/* ==========================================
   5. COMPLETION LAYER
   Ambient field, accessibility and motion safety.
   ========================================== */

/* Ambient accent field behind the whole page — repaints on vertical switch */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 40rem at 15% -10%, var(--accent-glow), transparent 60%),
    radial-gradient(50rem 35rem at 90% 0%, var(--accent-glow), transparent 55%);
  opacity: 0.9;
  transition: background 0.6s var(--ease-out);
}
/* Hairline engineering grid — static geometry, no animation, so it stays
   cheap and survives prefers-reduced-motion. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(100% 70% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(100% 70% at 50% 0%, #000 0%, transparent 78%);
  opacity: 0.75;
}
/* Only .container needs lifting above the ambient field. .premium-nav is
   `position: fixed; z-index: 1000`, so it is deliberately not named here. */
.container { position: relative; z-index: 1; }

/* Keyboard focus — never rely on hover alone */
.switcher-btn:focus-visible,
.vertical-card:focus-visible,
.cta-button:focus-visible {
  outline: 2px solid var(--accent-neon);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Entrance reveal — only applied once the script confirms support */
.js-reveal .vertical-card,
.js-reveal .bento-card,
.js-reveal .vertical-detail > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js-reveal .is-revealed { opacity: 1; transform: none; }

/* Vertical morph — retriggered by the script on every control change, so the
   copy swap reads as one deliberate transition instead of a text flash. */
@keyframes vertical-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.is-morphing .vertical-detail > *,
.is-morphing .card-head,
.is-morphing .card-foot {
  animation: vertical-in 0.5s var(--ease-out) both;
}
.is-morphing .card-head { animation-delay: 0.03s; }
.is-morphing .card-foot { animation-delay: 0.08s; }

/* Footer note */
.page-foot {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0 60px;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-foot code {
  font-family: var(--font-mono);
  color: var(--accent-neon);
}

/* ==========================================
   6. RESPONSIVE
   ========================================== */
@media (max-width: 1180px) {
  :root { --nav-inset: 18px; --nav-gap: 14px; }
  .switcher-btn { padding: 7px 10px; font-size: 0.74rem; }
  .vertical-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  /* The bar stacks into two rows (brand + CTA, then the controller), so it is
     taller. The script syncs the exact clearance; this is the no-JS floor. */
  :root { --nav-clearance: 122px; }
  .premium-nav {
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 12px var(--nav-inset);
  }
  .nav-center {
    order: 3;
    flex: 1 0 100%;
    justify-content: stretch;
  }
  .switcher-track { width: 100%; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    row-gap: 26px;
    padding: 34px 0 40px;
    margin-bottom: 36px;
  }
  /* Single-column stack: release the pinned two-column placement. Row
     auto-placement then follows DOM order, which is this layout's order. */
  .hero-lead { grid-column: 1; grid-row: auto; }
  .hero-meta { grid-column: 1; grid-row: auto; gap: 20px; }
  .hero-title { font-size: clamp(2.1rem, 8vw, 2.9rem); max-width: 20ch; }
  .hero-desc { max-width: none; }

  .verticals-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .vertical-grid { grid-template-columns: 1fr; }
  .vertical-detail { flex-direction: column; align-items: flex-start; gap: 16px; }
  .vertical-detail__index { font-size: 1.6rem; }
  .bento-grid { grid-template-columns: 1fr; margin-bottom: 64px; }
  .span-2, .span-3 { grid-column: span 1; }
  .bar-row { grid-template-columns: 5.5rem 1fr 3rem; }
}

@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .nav-brand { flex: 0 1 auto; }
  .logo { font-size: 0.94rem; }
  .switcher-btn span { display: none; }
  .switcher-btn { padding: 9px 12px; }
  .switcher-btn svg { width: 16px; height: 16px; }
  .nav-actions { gap: 8px; min-width: 0; }
  .premium-nav .cta-button.ghost { padding: 9px 13px; font-size: 0; gap: 0; }
  .premium-nav .cta-button.ghost::before { content: attr(data-short); font-size: 0.78rem; }
  .hero-title { font-size: clamp(1.9rem, 9.5vw, 2.4rem); }
  .hero-desc { font-size: 0.95rem; }
  .vertical-card { padding: 22px 20px 18px; }
  .bento-card { padding: 24px 20px; }
}

/* Motion safety — honour the OS setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .bento-card:hover,
  .vertical-card:hover { transform: none; }
  .switcher-highlight { transition: none; }
  /* The glow still appears on hover — it just snaps to the cursor instead
     of gliding, so the cue survives without the movement. */
  .card-glow { transition: none; }
  .js-reveal .vertical-card,
  .js-reveal .bento-card,
  .js-reveal .vertical-detail > * { opacity: 1; transform: none; }
  .is-morphing .vertical-detail > *,
  .is-morphing .card-head,
  .is-morphing .card-foot { animation: none; }
}

/* Print — the reveal gate is lifted here too, so a page printed before the
   observer runs is never blank. */
@media print {
  body { background: #fff; color: #000; padding-top: 0; }
  body::after,
  .premium-nav, body::before, .bento-card::after,
  .hero-backdrop, .switcher-highlight, .card-glow { display: none !important; }
  .bento-card, .vertical-card { border-color: #ccc; break-inside: avoid; }
  .js-reveal .vertical-card,
  .js-reveal .bento-card,
  .js-reveal .vertical-detail > * { opacity: 1 !important; transform: none !important; }
  .bar-fill { width: var(--print-load, 100%); }
}


/* ==========================================
   SKIP LINK
   Visible only on keyboard focus. The nav is fixed and the vertical
   switcher is a long tab strip, so a keyboard user would otherwise walk
   nine controls before reaching the content.
   ========================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.9rem;
  text-decoration: none;
}

.skip-link:focus-visible,
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ==========================================
   CONTACT
   A form rather than a pair of addresses. Nothing is posted anywhere — the
   submit handler composes the message and hands it to the visitor's own mail
   client — so there is no server to run and no relay to trust.
   ========================================== */
.contact-fallback {
  margin: 0;
  padding: 24px 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-surface);
  color: var(--text-soft);
  line-height: 1.6;
}

.contact-form {
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-surface);
  padding: 28px;
}

.contact-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field--wide { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.field__hint {
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.65;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  transition: var(--transition-smooth);
}

.field textarea { min-height: 132px; line-height: 1.55; resize: vertical; }

.field input:hover,
.field textarea:hover { border-color: var(--border-strong); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* `:user-invalid`, not `:invalid`: a required field is invalid from the first
   paint, and marking it before the visitor has typed anything is a scold.
   Kept in its own rule so an engine that does not know the selector drops
   only this. */
.field input:user-invalid,
.field textarea:user-invalid { border-color: rgba(255, 92, 122, 0.5); }

.contact-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}
.contact-form__foot .cta-button { margin-top: 0; flex: none; }

/* The four routes sit on one line and wrap together, so no single one of them
   reads as the button and the rest as an afterthought. */
.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 100%;
}

/* Mono, because it is an address to be read character by character and
   possibly typed out by hand. */
.contact-form__address,
.page-foot__address {
  font-family: var(--font-mono);
  color: var(--text-soft);
  /* Nothing else on the page is worth selecting by accident; this is. */
  user-select: all;
}
.page-foot__address { font-size: 0.82rem; }

.contact-form__note {
  flex: 1 1 260px;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Never display:none — it is a live region, and a region hidden at the moment
   it gains text is a region some screen readers never announce. An empty
   block generates no line box, so it costs no height. */
.contact-form__status {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--accent-neon);
}
.contact-form__status:not(:empty) { margin-top: 20px; }

.contact-form noscript .contact-form__note { margin-top: 20px; }

.page-foot__links a {
  color: var(--text-muted);
  text-decoration: none;
}

.page-foot__links a:hover,
.page-foot__links a:focus-visible {
  color: var(--accent-neon);
}

@media (max-width: 620px) {
  .contact-fallback,
  .contact-form { padding: 22px 18px; }
  .contact-form__fields { grid-template-columns: 1fr; }
  .contact-form__actions { flex-direction: column; align-items: stretch; }
  .contact-form__actions .cta-button { justify-content: center; }
}

/* ==========================================
   SUB-PAGES (Services, Privacy)
   These carry prose rather than a product surface, so they reuse the
   hero and section furniture and add one card shape of their own.
   They do not load app.js: there is no switcher and nothing to reveal,
   so the page is complete the moment the HTML lands.
   ========================================== */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.doc-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-surface);
}

.doc-card__index {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-neon);
}

.doc-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--text-main);
}

.doc-card p {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.doc-card p:last-child { margin-bottom: 0; }

.doc-card dl {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.doc-card dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.doc-card dd {
  margin: 4px 0 12px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.doc-card dd:last-child { margin-bottom: 0; }

.doc-prose {
  max-width: 68ch;
}

.doc-prose h2 {
  margin: 40px 0 12px;
  font-size: 1.3rem;
  color: var(--text-main);
}

.doc-prose h2:first-child { margin-top: 0; }

.doc-prose p {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.75;
}

.doc-prose a { color: var(--accent-neon); }

/* The global reset zeroes padding everywhere, which takes the indent off a
   list and leaves its markers hanging outside the box. Put both back here
   rather than exempting ul from the reset, so nothing else shifts. */
.doc-prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}
.doc-prose li {
  margin-bottom: 10px;
  color: var(--text-soft);
  line-height: 1.75;
}
.doc-prose li::marker { color: var(--text-faint); }
.doc-prose strong { color: var(--text-main); font-weight: 650; }

.doc-updated {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

@media (max-width: 900px) {
  .doc-grid { grid-template-columns: 1fr; }
}


/* ==========================================
   PER-VERTICAL DOT COLOURS
   These were inline style attributes on each card. The Content-Security-Policy
   this site is served under sets style-src 'self', which blocks style
   attributes outright -- every card silently fell back to the shared accent
   and the console filled with nine violations. Declaring them here keeps the
   policy strict rather than loosening it to 'unsafe-inline'.

   They cannot come from the :root theme: all nine cards are on screen at once,
   each in its own colour, so this is per-card and not per-active-vertical.
   ========================================== */
.vertical-card[data-vertical="manufacturing"] { --vertical-dot: #ffa23a; }
.vertical-card[data-vertical="automotive"] { --vertical-dot: #7c9cff; }
.vertical-card[data-vertical="productivity"] { --vertical-dot: #ff4d7e; }
.vertical-card[data-vertical="interior-design"] { --vertical-dot: #ffc857; }
.vertical-card[data-vertical="chatbot"] { --vertical-dot: #b98cff; }
.vertical-card[data-vertical="sports"] { --vertical-dot: #3ddc97; }
.vertical-card[data-vertical="marketing"] { --vertical-dot: #00d4ff; }
.vertical-card[data-vertical="education"] { --vertical-dot: #5fd38a; }
.vertical-card[data-vertical="erp"] { --vertical-dot: #c9a227; }
