:root {
  --bg-gradient-start: #050712;
  --bg-gradient-end: #050712;
  --card-bg: rgba(15, 18, 35, 0.96);
  --card-border: rgba(120, 120, 255, 0.25);
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.12);
  --accent-strong: rgba(124, 92, 255, 0.28);
  --text-main: #f5f4ff;
  --text-muted: #9fa4c9;
  --text-soft: #7a7f9e;
  --danger: #ff5c7a;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-subtle: 0 16px 40px rgba(3, 7, 18, 0.9);
  --border-strong: 1px solid rgba(255, 255, 255, 0.06);
  --nav-bg: rgba(5, 7, 20, 0.9);
  --backdrop-blur: blur(6px);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.dark-body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-main);
  background:
    radial-gradient(circle at 0% 0%, rgba(127, 90, 240, 0.1), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(45, 212, 191, 0.05), transparent 55%),
    linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
}

/* Header / Nav */
.fm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: var(--backdrop-blur);
  background: linear-gradient(to bottom, rgba(3, 7, 18, 0.76), rgba(3, 7, 18, 0.72));
  /* border-bottom: 1px solid rgba(148, 163, 184, 0.18); */
}
/* .fm-header {
  position: sticky;
  top: 0;
  z-index: 50;

  /* Blur */
  /* backdrop-filter: var(--backdrop-blur);

  /* Halftone image background */
  /* background:
    url("assets/halftone.png") repeat-x,
    rgba(3, 7, 18, 0.10);  /* fallback dark overlay */

  /* background-size: auto 100%; image covers full height, repeats horizontally */


/* } */ 

.fm-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fm-logo-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0%, #e5e7ff, #7c5cff);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 10px rgba(124, 92, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #050816;
  font-size: 18px;
}

img {
  width: 100px;
  height: auto;
}

.fm-brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.fm-brand-tagline {
  font-size: 11px;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fm-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fm-nav-link {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.18s ease-out;
}

.fm-nav-link:hover {
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.12), transparent 55%);
}

.fm-nav-link-active {
  color: #0b1120;
  background: linear-gradient(135deg, #e5e7ff, #7c5cff);
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.4),
    0 4px 5px rgba(124, 92, 255, 0.7);
}

/* Main Layout */
.fm-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.fm-hero h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: 0.02em;
}

.fm-hero-subtitle {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.fm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-soft);
}

.fm-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.fm-layout {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 22px;
  align-items: flex-start;
}

/* Cards */
.fm-toc-card,
.fm-content-card {
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.16), transparent 60%),
              radial-gradient(circle at 100% 100%, rgba(45, 212, 191, 0.13), transparent 60%),
              linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
}

.fm-toc-card {
  padding: 16px 16px 18px;
  position: sticky;
  top: 150px;
}

.fm-toc-card h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.fm-toc-card ol {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.fm-toc-card li {
  margin-bottom: 4px;
}

.fm-toc-card a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: all 0.15s ease-out;
}

.fm-toc-card a:hover {
  color: var(--accent);
  border-bottom-color: rgba(124, 92, 255, 0.7);
}

.fm-content-card {
  padding: 20px 22px 24px;
}

/* Sections */
.fm-section {
  padding-bottom: 20px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
  margin-bottom: 16px;
}

.fm-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.fm-section h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 20px;
}

.fm-section h3 {
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 15px;
}

.fm-section p {
  margin: 4px 0 8px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.fm-section ul {
  margin: 4px 0 8px 18px;
  padding: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.fm-section li + li {
  margin-top: 2px;
}

.fm-section a {
  color: #c4b5fd;
  text-decoration: none;
  border-bottom: 1px dashed rgba(196, 181, 253, 0.6);
  transition: border-color 0.15s ease-out;
}

.fm-section a:hover {
  border-bottom-color: rgba(248, 250, 252, 0.9);
}

/* Footer */
.fm-footer {
  border-top: 1px solid rgba(30, 64, 175, 0.7);
  background: radial-gradient(circle at 50% 0, rgba(15, 23, 42, 0.98), rgba(3, 7, 18, 1));
}

.fm-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.fm-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}

.fm-footer a:hover {
  color: var(--accent);
  border-bottom-color: rgba(124, 92, 255, 0.7);
}

/* Responsive */
@media (max-width: 840px) {
  .fm-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .fm-toc-card {
    position: static;
    order: 0;
    margin-bottom: 16px; /* small spacing before main content */
  }

  .fm-header-inner {
    padding: 12px 16px;
  }

  .fm-main {
    padding: 22px 16px 32px;
  }
}

@media (max-width: 520px) {
  .fm-header-inner {
    flex-direction: column;
    align-items: start;      /* ✅ valid value */
    text-align: start;       /* center text under the logo/title */
    gap: 8px;
  }

  .fm-nav {
    width: 100%;
    display: flex;            /* just to be safe on overrides */
    justify-content: center;  /* ✅ center the links in the row */
    gap: 6px;
  }

  .fm-nav a,
  .fm-nav .fm-nav-link {
    text-align: center;       /* make each link's text centered */
  }

  .fm-hero h1 {
    font-size: 24px;
  }

  .fm-content-card {
    padding: 18px 16px 20px;
  }

  .fm-footer-inner {
    justify-content: center;
    text-align: center;
  }

  .fm-footer-inner a {
    margin: 0 6px;
  }
}

/* ============================================================
   FORMETRIX LANDING HERO (index.html)
   ============================================================ */

.fm-fullpage {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 16px;
}

.fm-fullpage-inner {
  max-width: 900px;
  width: 100%;
  margin: auto;
  border-radius: 28px;
  padding: 32px 32px 22px;
  background:
    radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.22), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(45, 212, 191, 0.18), transparent 60%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.fm-main-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}

/* App icon */

.fm-hero-icon {
  width: clamp(140px, 24vw, 190px);
  height: clamp(140px, 24vw, 190px);
  border-radius: 40px;
  background: linear-gradient(145deg, #1C1C1C, #0E0E0E); /* your requested bg */
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fm-hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text */

.fm-hero-text h1 {
  margin: 0 0 4px;
  font-size: clamp(28px, 3.8vw, 36px);
  letter-spacing: 0.08em;
}

.fm-coming-label {
  margin: 10;
  font-size: 14px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.fm-try-text {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--text-muted);
}

/* Platforms */

.fm-platforms-block {
  margin-top: 18px;
  width: 100%;
}

.fm-platforms-label {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 10px;
  text-align: left;
}

.fm-platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.fm-platform-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 18px;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.98),
    0 0 0 1px rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  transition: all 0.18s ease-out;
  overflow: hidden;
}

.fm-platform-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.18), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.18), transparent 55%);
  opacity: 0.35;
  mix-blend-mode: screen;
  pointer-events: none;
}

.fm-platform-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 1),
    0 0 0 1px rgba(196, 181, 253, 0.9);
  border-color: rgba(196, 181, 253, 0.9);
}

.fm-platform-icon-circle {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, rgba(248, 250, 252, 0.96), rgba(148, 163, 184, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.8),
    0 8px 18px rgba(15, 23, 42, 0.95);
}

.fm-platform-icon-text {
  font-size: 16px;
  color: #020617;
}

.fm-platform-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.fm-platform-title {
  font-size: 14px;
  font-weight: 600;
}

.fm-platform-sub {
  font-size: 12px;
  color: var(--text-soft);
}

/* Powered by AEV Labs */

.fm-powered-row {
  display: flex;
  align-items: center;       /* vertical centers gif + text */
  justify-content: center;   /* horizontal center as a row */
  gap: 16px;
  margin-top: 4px;
}

.fm-aev-logo {
  height: 60px;              /* bigger logo */
  width: auto;
  object-fit: contain;
}

.fm-powered-text {
  font-size: 14px;
  font-weight: 600;          /* bolder */
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-main);
}

/* Responsive tweaks */

@media (max-width: 840px) {
  .fm-fullpage-inner {
    padding: 26px 22px 18px;
  }

  .fm-platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .fm-fullpage-inner {
    padding: 22px 18px 16px;
    border-radius: 22px;
    gap: 18px;
  }

  .fm-hero-text h1 {
    font-size: 24px;
  }

  .fm-try-text {
    font-size: 14px;
  }

  .fm-platform-btn {
    padding: 9px 11px;
  }

  .fm-aev-logo {
    height: 52px;
  }
}

/* =============================================
   FUTURISTIC DOT GRID OVERLAY (soft & subtle)
   ============================================= */

/* Adds a dotted grid on top of your gradient */
.dotted-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 22px 22px; /* distance between dots */
  opacity: 0.4; /* lower for more subtle */
  z-index: 0;
}

/* Ensure page content stays above the overlay */
body.dotted-bg, .dotted-bg * {
  position: relative;
  z-index: 1;
}


/* Hex-like pattern using double-layered radial gradients */
.hexgrid-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px) 12px 12px / 24px 24px;
  opacity: 0.45;
  z-index: 0;
}

body.hexgrid-bg, .hexgrid-bg * {
  position: relative;
  z-index: 1;
}


/* Horizontal + vertical lines + dots */
.gridlines-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);

  background-size:
    40px 40px, 40px 40px, 40px 40px;

  background-position:
    0 0, 0 0, 20px 20px;

  opacity: 0.45;
  z-index: 0;
}

body.gridlines-bg, .gridlines-bg * {
  position: relative;
  z-index: 1;
}