/* ============================================================
   KleverDeck — Finalist version 5
   The first final version restyled to the premium near-black
   design language of the reference screenshots:
   - Canvas #06060e with a faint blue radial wash at the top.
   - Titillium Web (thin display weights) with JetBrains Mono
     for technical accents (eyebrows, chips, table headers).
   - White headlines with a soft blue glow; lavender body copy.
   - Blue-to-violet gradient buttons (rounded rectangles).
   - Subtle gradient accents: hairline under the slogan,
     gradient card borders, coral/lavender semantic labels.
   ============================================================ */

:root {
  --bg: #06060e;
  --bg-raise: #0a0a16;
  --bg-card: #0b0b19;
  --bg-deep: #030308;
  --line: rgba(120, 140, 220, 0.16);

  --text: #eef2ff;
  --text-dim: #aab0d8;

  --cyan: #2dd4ff;
  --blue: #5b7cff;
  --violet: #8b3df5;
  --magenta: #e23ad9;
  --coral: #ff6b5b;
  --lavender: #b48bff;

  --grad: linear-gradient(100deg, var(--cyan), var(--blue) 40%, var(--violet) 70%, var(--magenta));
  --grad-btn: linear-gradient(135deg, #637cff 0%, #8b3df5 100%);
  --grad-line: linear-gradient(90deg, #2dd4ff, #8b3df5, #e23ad9);

  --danger: #ff5f8f;
  --success: #35e0c3;

  --font: "Titillium Web", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --radius: 16px;
  --container: 1240px;
  --header-h: 88px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  background:
    radial-gradient(circle at top center, rgba(39, 87, 255, 0.08), transparent 700px),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- Typography ---------- */

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }

/* Thin luminous display type: white core with a soft blue radiance */
h1 {
  font-size: clamp(2.1rem, 3.3vw, 3rem);
  font-weight: 200;
  letter-spacing: -0.01em;
  color: #f2f6ff;
  text-shadow:
    0 0 12px rgba(160, 185, 255, 0.28),
    0 0 30px rgba(130, 160, 255, 0.18),
    0 0 56px rgba(110, 135, 255, 0.12);
}
/* Hero heading: break the H1 at the "&" on tablet/desktop so it reads as two
   balanced lines; stays inline below 640px so narrow phones wrap naturally
   without stranding a word */
.h1-break { display: inline; }
@media (min-width: 640px) {
  .h1-break { display: block; }
}
h2 {
  font-size: clamp(1.7rem, 3.1vw, 2.4rem);
  font-weight: 300;
  color: #f2f6ff;
  text-shadow:
    0 0 12px rgba(160, 185, 255, 0.2),
    0 0 28px rgba(130, 160, 255, 0.12);
}
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }

.lead { font-size: 1.02rem; color: var(--text-dim); max-width: 54ch; }

/* Technical monospace eyebrows, as in the reference section labels */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9fb0e8;
  margin-bottom: 0.9em;
}

/* Hero slogan sits under the headline, lavender-blue */
.hero-slogan {
  font-size: 1.08rem;
  font-weight: 400;
  color: #bccfff;
  margin: 0.2rem 0 0.9rem;
}

/* Thin cyan-violet-magenta hairline under the slogan */
.accent-line {
  width: 150px;
  height: 2px;
  border-radius: 999px;
  margin: 0 0 1.4rem;
  background: var(--grad-line);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.78rem 1.7rem;
  border-radius: 14px; /* rounded rectangle, per the reference buttons */
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

/* Blue-to-violet gradient with a soft indigo glow */
.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow:
    0 10px 28px rgba(99, 88, 255, 0.24),
    0 0 22px rgba(110, 98, 255, 0.14);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 14px 34px rgba(99, 88, 255, 0.32),
    0 0 28px rgba(110, 98, 255, 0.2);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(120, 140, 220, 0.32);
}
.btn-ghost:hover {
  background: rgba(91, 124, 255, 0.1);
  border-color: rgba(91, 124, 255, 0.5);
}

.btn-lg { padding: 0.95rem 2.3rem; font-size: 1.02rem; }

/* ---------- Header ---------- */

/* Transparent at the top so the hero flows seamlessly behind it;
   picks up the page background only once content scrolls underneath. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  transition: background 0.3s ease;
}
.site-header.scrolled {
  background: rgba(5, 5, 13, 0.94);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 82px;
  height: auto;
}

/* Wordmark styled after the logo lettering: thin, uniform weight,
   wide tracking, silvery white-to-lavender sheen */
.brand-name {
  font-size: 1.6rem;
  font-weight: 200;
  letter-spacing: 0.05em;
  background: linear-gradient(100deg, #aab6f0, #ffffff 45%, #dbe2ff 70%, #a8b4ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-name span { font-weight: inherit; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.05rem;
}

.site-nav a:not(.btn) {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.site-nav a:not(.btn):hover,
.site-nav a:not(.btn).active { color: var(--text); }

.nav-cta { padding: 0.5rem 1.1rem; font-size: 0.85rem; }

/* Logged-in user menu: My Account / Dashboard / Log out under the name. */
.nav-user-menu { position: relative; display: inline-block; }
.nav-user-caret { font-size: 0.7em; opacity: 0.8; }
.nav-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  z-index: 320;
}
.nav-user-dropdown[hidden] { display: none; }
.nav-user-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.nav-user-item:hover { background: rgba(120, 140, 220, 0.12); color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 9px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  /* extend up behind the transparent header so the glow runs edge to edge */
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + clamp(3rem, 6vw, 5rem)) 0 clamp(3rem, 6vw, 5rem);
}

.hero-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.13; /* softer on the near-black canvas */
  pointer-events: none;
}
.hero-glow-cyan { background: var(--cyan); top: -220px; left: -140px; }
.hero-glow-magenta { background: var(--magenta); bottom: -260px; right: -140px; }

/* Ribbon brand accent: the logo mark as a slow-floating watermark */
.hero-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(880px, 80vw);
  transform: translate(-50%, -50%);
  opacity: 0.07;
  pointer-events: none;
  animation: markFloat 12s ease-in-out infinite;
}

@keyframes markFloat {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 16px)); }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.8rem 0 2rem;
}

/* All three chips on a single row; sized to fit the hero column */
.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
}

/* Technical chips: monospace, squared corners, as in the reference */
.hero-badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 400;
  white-space: nowrap;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(8, 8, 22, 0.8);
  border-radius: 8px;
  padding: 0.42rem 0.7rem;
}
.hero-badges svg { width: 14px; height: 14px; color: var(--cyan); flex-shrink: 0; }

/* ---------- Application Workspace window ---------- */

.hero-workspace { min-width: 0; }

.workspace {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  border: 1px solid rgba(120, 140, 220, 0.28);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-deep);
  box-shadow:
    0 24px 70px rgba(0, 0, 15, 0.65),
    0 0 40px rgba(91, 124, 255, 0.12);
}

.workspace-sidebar {
  padding: 1.3rem 0.85rem;
  background: rgba(3, 3, 30, 0.85);
  border-right: 1px solid var(--line);
}

.workspace-label {
  margin: 0 0 1rem 0.4rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9fb0e8;
}

.ws-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(85, 120, 190, 0.14);
  border-radius: 10px;
  background: rgba(5, 8, 30, 0.7);
  color: rgba(140, 152, 205, 0.55);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.ws-tab svg { width: 17px; height: 17px; flex-shrink: 0; }

.ws-tab:hover {
  color: var(--text);
  border-color: rgba(45, 212, 255, 0.35);
}

.ws-tab.active {
  color: #9beeff;
  border-color: rgba(45, 212, 255, 0.6);
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 255, 0.16), transparent 50%),
    rgba(10, 14, 40, 0.9);
  box-shadow:
    0 0 18px rgba(45, 212, 255, 0.22),
    inset 0 0 14px rgba(45, 212, 255, 0.07);
}

.workspace-main {
  padding: 1.3rem 1.4rem 1.4rem;
  min-width: 0;
}

.ws-title {
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

.ws-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.9rem;
  min-height: 2.4em;
}

.ws-stage {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #020318;
}

/* --- Module A: assistant chat demo --- */

.chat-demo {
  display: flex;
  flex-direction: column;
  height: 300px;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 22, 0.8);
}
.chat-head strong { font-size: 0.78rem; font-weight: 500; }
.chat-head .chat-meta { font-size: 0.66rem; color: var(--text-dim); }

.chat-scroll {
  flex: 1;
  overflow: hidden;
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
}

.chat-msg {
  max-width: 88%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.chat-msg.shown { opacity: 1; transform: none; }

.chat-msg.from-assistant {
  align-self: flex-start;
  background: rgba(10, 16, 40, 0.85);
  border: 1px solid rgba(45, 212, 255, 0.18);
  border-bottom-left-radius: 4px;
}
.chat-msg.from-user {
  align-self: flex-end;
  background: linear-gradient(120deg, rgba(91, 124, 255, 0.4), rgba(139, 61, 245, 0.35));
  border: 1px solid rgba(139, 61, 245, 0.3);
  border-bottom-right-radius: 4px;
}
.chat-msg .chat-time {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.6rem;
  color: rgba(170, 176, 216, 0.7);
}

.chat-typing {
  align-self: flex-start;
  display: none;
  gap: 4px;
  padding: 0.55rem 0.8rem;
  background: rgba(10, 16, 40, 0.85);
  border: 1px solid rgba(45, 212, 255, 0.18);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}
.chat-typing.shown { display: inline-flex; }
.chat-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  animation: typingDot 1s ease-in-out infinite;
}
.chat-typing i:nth-child(2) { animation-delay: 0.16s; }
.chat-typing i:nth-child(3) { animation-delay: 0.32s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-composer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 22, 0.8);
  font-size: 0.72rem;
  color: rgba(170, 176, 216, 0.6);
}
.chat-composer svg { width: 15px; height: 15px; color: var(--text-dim); flex-shrink: 0; }
.chat-composer .chat-send {
  margin-left: auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* --- Modules B & D: screenshot slideshows --- */

.shot-demo { position: relative; height: 300px; }

.shot-demo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.shot-demo img.shown { opacity: 1; }

.shot-caption {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(45, 212, 255, 0.22);
  border-radius: 9px;
  background: rgba(2, 3, 24, 0.88);
  font-size: 0.7rem;
  color: var(--text);
}

.shot-dots { display: inline-flex; gap: 5px; }
.shot-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(120, 140, 220, 0.35);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.shot-dots button.active {
  background: var(--cyan);
  transform: scale(1.25);
}

/* --- Module C: operational analytics demo --- */

.analytics-demo {
  height: 300px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.kpi {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 9, 26, 0.8);
}
.kpi strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kpi span { font-size: 0.62rem; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; }

.bars-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.9rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 9, 26, 0.6);
}
.bars-title {
  font-size: 0.66rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 9%;
  padding: 0 2%;
}

.bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}
.bar i {
  display: block;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--cyan), var(--blue) 65%, rgba(91, 124, 255, 0.4));
  transform-origin: bottom;
  animation: barGrow 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}
.bar:nth-child(2n) i { background: linear-gradient(180deg, var(--violet), var(--magenta) 80%, rgba(226, 58, 217, 0.35)); }
.bar span {
  margin-top: 0.35rem;
  font-size: 0.58rem;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
}

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.pulse-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
  color: var(--text-dim);
}
.pulse-line i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(53, 224, 195, 0.8);
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Sections ---------- */

/* Compact vertical rhythm so each section fits one screen at 100% */
.section { padding: clamp(2.2rem, 4.5vw, 3.2rem) 0; }

.section-alt {
  background: var(--bg-raise);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head { max-width: 720px; margin-bottom: 1.6rem; }
.section-sub { color: var(--text-dim); font-size: 1.05rem; }

/* These headers run the full container width so their long heading /
   intro line stays on one line (wrapping only on narrower screens) */
#how-it-works .section-head,
#sectors .section-head { max-width: none; }

/* ---------- Cards & panels ---------- */

/* Every box carries the violet gradient contour (as step card 02) */
.card {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(160deg, rgba(139, 61, 245, 0.6), rgba(91, 124, 255, 0.25) 55%, rgba(139, 61, 245, 0.1)) border-box;
  box-shadow: 0 0 34px rgba(139, 61, 245, 0.1);
  padding: 1.1rem 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Uniform box typography across every card and panel */
.card h3,
.panel h3 { font-size: 1rem; margin-bottom: 0.4em; }

/* Hover: subtle lift with a glowing cyan-violet outline (v2-style) */
.card { cursor: pointer; }
.card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 36px rgba(1, 1, 20, 0.6),
    0 0 0 1px rgba(45, 212, 255, 0.45),
    0 0 20px rgba(45, 212, 255, 0.18),
    0 0 34px rgba(139, 61, 245, 0.28);
}

/* Clicked/selected: the glow stays pinned until deselected */
.card.selected {
  box-shadow:
    0 12px 36px rgba(1, 1, 20, 0.6),
    0 0 0 1px rgba(45, 212, 255, 0.65),
    0 0 22px rgba(45, 212, 255, 0.3),
    0 0 44px rgba(139, 61, 245, 0.35);
}
.card p { color: var(--text-dim); font-size: 0.84rem; line-height: 1.5; }
.card p:last-child { margin-bottom: 0; }

/* Philosophy split */

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Gradient-bordered comparison panels, as in the reference cards */
.panel {
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.panel-danger,
.panel-success {
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(160deg, rgba(139, 61, 245, 0.6), rgba(91, 124, 255, 0.25) 55%, rgba(139, 61, 245, 0.1)) border-box;
  box-shadow: 0 0 34px rgba(139, 61, 245, 0.1);
}

.panel-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.panel-danger .panel-tag { color: var(--magenta); }
.panel-success .panel-tag { color: var(--lavender); }
/* same body size as every other box */
.panel p { color: var(--text-dim); font-size: 0.84rem; line-height: 1.5; }

/* Check / cross lists */

.check-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: grid;
  gap: 0.4rem;
}
.check-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.84rem;
  color: var(--text-dim);
}
.check-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
}
/* Reference-style markers: blue dots for positives, coral dashes for risks */
.list-check li::before { content: "•"; color: var(--blue); font-size: 1.15em; line-height: 1.35; }
.list-cross li::before { content: "–"; color: var(--magenta); }

/* How it works */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.step-card { padding-top: 1.2rem; }
.step-card .check-list { padding-top: 0.9rem; }

/* Number and heading share one line at the top of each card */
.step-head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.step-head h3 { margin-bottom: 0; }

/* Small monospace step index, lavender, per the reference cards */
.step-num {
  display: inline-block;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--lavender);
}


/* Capabilities */

/* Six-column grid so the last row of two can sit centered:
   three cards per row (each spanning two columns), cards 7-8 offset */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.9rem;
}
.cap-card { grid-column: span 2; }
.cap-card:nth-child(7) { grid-column: 2 / span 2; }
.cap-card:nth-child(8) { grid-column: 4 / span 2; }

/* All capability icons in violet, compact so the section fits one screen */
.cap-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, rgba(45, 212, 255, 0.14), rgba(226, 58, 217, 0.14));
  border: 1px solid var(--line);
  color: var(--violet);
}
.cap-icon svg { width: 19px; height: 19px; }

/* Tightened metrics so heading + sub-heading + all nine boxes
   fit within a single viewport at 100% zoom */
#capabilities {
  padding: 2.4rem 0 2.6rem;
}
#capabilities .section-head {
  margin-bottom: 1.5rem;
}
#capabilities .section-head h2 {
  margin-bottom: 0.3em;
}
#capabilities .section-sub {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.opt-tag {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(45, 212, 255, 0.4);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-left: 0.45rem;
}


/* Sectors */

.sector-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.9rem;
}
.sector-card { grid-column: span 2; }
/* last two cards centered on a 6-col grid */
.sector-card:nth-child(4) { grid-column: 2 / span 2; }
.sector-card:nth-child(5) { grid-column: 4 / span 2; }


/* Comparison table */

.table-wrap {
  overflow-x: auto;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(160deg, rgba(139, 61, 245, 0.6), rgba(91, 124, 255, 0.25) 55%, rgba(139, 61, 245, 0.1)) border-box;
  box-shadow: 0 0 34px rgba(139, 61, 245, 0.08);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.84rem;
}

.compare-table th,
.compare-table td {
  padding: 0.55rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

/* Monospace matrix-style header row: coral for the cloud column,
   lavender for the KleverDeck column, as in the reference table */
.compare-table thead th {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9fb0e8;
  background: rgba(6, 6, 14, 0.6);
}
.compare-table thead th:nth-child(2) { color: var(--magenta); }
.compare-table thead th.col-kd { color: var(--lavender); }

.compare-table tbody th {
  font-weight: 500;
  color: var(--text);
  width: 18%;
}

.compare-table tbody td { color: var(--text-dim); }

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }

.compare-table .col-kd {
  background: linear-gradient(135deg, rgba(45, 212, 255, 0.07), rgba(226, 58, 217, 0.07));
  color: var(--text);
}
.compare-table thead .col-kd {
  background: linear-gradient(135deg, rgba(45, 212, 255, 0.16), rgba(226, 58, 217, 0.16));
  color: var(--text);
}

/* CTA */

.cta-section {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--line);
}
.cta-section .hero-glow { opacity: 0.16; }

.cta-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, 90vw);
  transform: translate(-50%, -50%);
  opacity: 0.06;
  pointer-events: none;
}

.cta-inner { position: relative; max-width: 800px; }

/* "Join the movement" matches the other section headlines */
.cta-inner .cta-slogan {
  margin: 0 0 0.9rem;
}

/* gradient hairline between the two lines, centered */
.cta-inner .accent-line {
  margin-inline: auto;
  margin-bottom: 1.4rem;
}

/* body line mirrors the hero copy */
.cta-copy {
  font-size: 1.02rem;
  color: var(--text-dim);
  max-width: 54ch;
  margin: 0 auto;
}

.cta-actions { margin: 1.6rem 0 1rem; }

.fine-print { font-size: 0.82rem; color: var(--text-dim); }
.fine-print a { color: var(--lavender); text-decoration: none; }
.fine-print a:hover { text-decoration: underline; }

/* ---------- Pilot application modal ---------- */

body.modal-open { overflow: hidden; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: rgba(2, 2, 8, 0.75);
  backdrop-filter: blur(6px);
}
.modal-overlay[hidden] { display: none; }

.modal-box {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 2.6rem 2.4rem 2.4rem;
  border: 1px solid rgba(120, 140, 220, 0.25);
  border-radius: 20px;
  background: linear-gradient(180deg, #14162c, var(--bg-raise) 60%, #06060e);
  box-shadow: 0 40px 120px rgba(0, 0, 10, 0.6);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.modal-close:hover { border-color: rgba(45, 212, 255, 0.5); }

.modal-box h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }

/* Compact spacing for the sign-in/register and contact modals, so each whole
   view — including its submit button — fits on one screen without scrolling */
#authModalOverlay .modal-box,
#contactModalOverlay .modal-box { padding: 1.8rem 2.4rem 1.6rem; }
#authModalOverlay .modal-subtitle,
#contactModalOverlay .modal-subtitle { margin-bottom: 0.9rem; }
#authModalOverlay .form-divider { margin: 0.85rem 0; }
#authModalOverlay .form-field,
#contactModalOverlay .form-field { margin-bottom: 0.8rem; }
#authModalOverlay .form-consent { margin-bottom: 0.65rem; }
#contactModalOverlay .form-note { margin-bottom: 0.65rem; }

.modal-subtitle {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.form-grid--phone { grid-template-columns: 170px 1fr; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.68rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 5, 12, 0.75);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.25);
}
.form-field select option { background: var(--bg-raise); color: var(--text); }
.form-field textarea { resize: vertical; }

.form-hint {
  align-self: flex-end;
  font-size: 0.68rem;
  color: rgba(170, 176, 216, 0.55);
}

.form-error {
  margin: 0.2rem 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 95, 143, 0.4);
  border-radius: 10px;
  background: rgba(255, 95, 143, 0.08);
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.5;
}

.modal-form .btn {
  width: 100%;
  margin-top: 0.3rem;
}
.modal-form .btn:disabled { opacity: 0.6; cursor: not-allowed; }

.modal-success h3 { margin-bottom: 0.5rem; }
.modal-success p { color: var(--text-dim); margin: 0; }

/* Contact confirmation: once the success message shows, drop the intro
   title + subtitle so only the "Thank you" message remains, and center it */
.modal-box:has(#contactSuccess:not([hidden])) > #contactModalTitle,
.modal-box:has(#contactSuccess:not([hidden])) > .modal-subtitle {
  display: none;
}
#contactSuccess { text-align: center; }

/* Small "*Required field" note above the consent block */
.form-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0 0 0.9rem;
}

/* Consent checkbox rows */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-dim);
  cursor: pointer;
}
.form-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0.18rem 0 0;
  flex-shrink: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

/* ---------- Sign-in / registration modal ---------- */

.auth-switch {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: -0.8rem 0 1.4rem;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--violet);
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* White Google identity button — compact, left-aligned */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  background: #fff;
  color: #1f1f1f;
  font-weight: 600;
}
.btn-google:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 10, 0.4);
}
.btn-google svg { width: 16px; height: 16px; flex-shrink: 0; }

/* "Create an account with email" hairline divider */
.form-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.3rem 0;
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Footer ---------- */

/* Option 1 — ease the transition: drop the hard divider and let a soft
   violet glow bleed down from the seam, so the footer reads as an
   intentional wind-down instead of an abrupt dark band */
.site-footer {
  padding: 2.6rem 0 2.2rem;
  background:
    radial-gradient(150% 130px at 50% 0, rgba(139, 61, 245, 0.13), rgba(139, 61, 245, 0) 68%),
    var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-footer .brand-mark { width: 56px; }
.site-footer .brand-name { font-size: 1.05rem; }

.footer-copy {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin: 0;
  text-align: left;
  flex: 1 1 320px;
}

.footer-links {
  display: flex;
  gap: 1.4rem;
}
.footer-links a {
  font-size: 0.84rem;
  color: var(--text-dim);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-watermark { animation: none; }
  .bar i { animation: none; }
  .chat-typing i { animation: none; }
  .pulse-line i { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 6, 14, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.5rem 1.2rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }
  .site-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  /* Mobile-only: the open menu is a full-height layer, not a floating strip.
     Without a bottom edge it ended after its last item and the hero showed
     through beside and beneath it; without a z-index it sat at stacking level
     auto under later positioned content. Nothing here reaches desktop, where
     .site-nav is static inline. */
  .site-nav.open {
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 60;
    /* Fully opaque while open: at 0.98 the 60px near-white hero heading was
       still legible through the panel. Same colour, alpha only. */
    background: rgb(6, 6, 14);
  }
  .site-nav a:not(.btn) { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-top: 1rem; text-align: center; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-copy .accent-line { margin-inline: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
  .hero-workspace { max-width: 760px; margin-inline: auto; width: 100%; }
}

@media (max-width: 980px) {
  .steps-grid, .cap-grid { grid-template-columns: repeat(2, 1fr); }

  .cap-card,
  .cap-card:nth-child(7),
  .cap-card:nth-child(8) { grid-column: auto; }

  .sector-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-card,
  .sector-card:nth-child(4),
  .sector-card:nth-child(5) { grid-column: auto; }
  .sector-card:nth-child(5) { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .split-grid, .steps-grid, .cap-grid { grid-template-columns: 1fr; }
  .sector-grid { grid-template-columns: 1fr; }
  .sector-card:nth-child(5) { grid-column: auto; }

  /* chips can wrap again on narrow phones where one row can't fit */
  .hero-badges { flex-wrap: wrap; }

  .workspace { grid-template-columns: 1fr; }
  .workspace-sidebar {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.8rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .workspace-label { display: none; }
  .ws-tab { width: auto; margin-bottom: 0; white-space: nowrap; flex-shrink: 0; }

  .kpi-row { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
  .kpi strong { font-size: 0.9rem; }

  .form-grid, .form-grid--phone { grid-template-columns: 1fr; }
  .modal-box { padding: 2rem 1.4rem 1.6rem; }

  .footer-inner { flex-direction: column; text-align: center; }
  /* Mobile-only. Once .footer-inner is a column, the desktop row basis
     `flex: 1 1 320px` on .footer-copy becomes a 320px HEIGHT for one line of
     text — the blank band above the links. Reset it to content size here.
     The links keep desktop's nowrap row; on a phone that squeezed four links
     into 50-80px columns three lines tall, so let them wrap and center. */
  .footer-copy { flex: 0 0 auto; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; row-gap: 0.55rem; }
}

/* =========================================================
   Full-screen viewport sections (desktop): every nav tab
   snaps its section to fill the whole visible screen —
   no part of the previous or next section shows through.
   On smaller screens the page scrolls normally.
   ========================================================= */
@media (min-width: 1101px) {
  html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
  }

  .hero,
  main > .section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  main > .section,
  #capabilities {
    padding: calc(var(--header-h) + 0.75rem) 0 1.25rem;
  }

  .hero {
    padding: calc(var(--header-h) + 0.5rem) 0 1rem;
  }

  /* section headings sit closer to their content when centered */
  .section-head { margin-bottom: 1.4rem; }

  /* the short footer snaps to the bottom edge after the last screen */
  .site-footer {
    scroll-snap-align: end;
  }
}
