/* ============================================================
   MODUS — marketing site
   Dark, cinematic HUD/glass system. Built on the app's
   "turbo gradient" (pink → purple → blue) brand DNA.
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;450;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* brand gradient */
  --pink:   #e92a67;
  --purple: #a853ba;
  --blue:   #2a8af6;
  --grad: linear-gradient(110deg, #e92a67 0%, #a853ba 48%, #2a8af6 100%);
  --grad-soft: linear-gradient(110deg, #f0568a 0%, #b96bca 48%, #4f9ff8 100%);

  /* surfaces — near-black with a faint cool tint for depth */
  --bg:        #07080b;
  --bg-2:      #0a0c11;
  --panel:     #0e1117;
  --panel-2:   #12151d;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.045);
  --glow-blue: rgba(42,138,246,0.14);

  /* text */
  --fg:        #eef1f6;
  --fg-2:      #aab2c0;
  --fg-3:      #6b7585;
  --fg-faint:  #424a58;

  /* status */
  --ok:   #2bb673;
  --warn: #e0a92b;
  --bad:  #e0533f;

  /* type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv05' 1, 'cv11' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: rgba(42,138,246,0.32); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { position: relative; padding: clamp(80px, 11vh, 150px) 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-3);
}
.eyebrow::before {
  content: ''; width: 22px; height: 1px; background: var(--grad);
}
.eyebrow.center::before { display: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; }
.grad-text {
  background: var(--grad-soft); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.muted { color: var(--fg-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 22px; border-radius: 11px;
  font-size: 14.5px; font-weight: 550; letter-spacing: -0.01em;
  position: relative; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  color: #fff;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  box-shadow: 0 0 0 0 rgba(42,138,246,0);
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad); opacity: 0; transition: opacity .3s var(--ease); z-index: -1;
}
.btn-primary { z-index: 0; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -14px rgba(168,83,186,0.7); }
.btn-primary:hover::after { opacity: 1; }
.btn-ghost {
  color: var(--fg); border: 1px solid var(--line); background: rgba(255,255,255,0.015);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); transform: translateY(-2px); }
.btn-lg { height: 54px; padding: 0 28px; font-size: 15.5px; border-radius: 13px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: 9px; }

/* ---------- Glass / HUD ---------- */
.glass {
  background: linear-gradient(160deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.012) 100%);
  border: 1px solid var(--line);
  border-top-color: rgba(255,255,255,0.14);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.hud-corners { position: relative; }
.hud-corners::before, .hud-corners::after {
  content: ''; position: absolute; width: 11px; height: 11px;
  border-color: rgba(255,255,255,0.28); border-style: solid; pointer-events: none;
}
.hud-corners::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.hud-corners::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* dot grid texture */
.dotgrid {
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7,8,11,0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav-inner { height: 66px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark { width: 30px; height: 30px; color: var(--fg); }
.brand .mark svg { width: 100%; height: 100%; }
.brand .word {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  letter-spacing: -0.02em; white-space: nowrap;
}
.brand .word .sep { color: var(--blue); font-weight: 400; margin: 0 2px; }
.nav-links { display: flex; gap: 2px; margin-left: 6px; }
.nav-links a {
  font-size: 14px; color: var(--fg-2); padding: 8px 12px; border-radius: 8px;
  transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--fg); background: rgba(255,255,255,0.04); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-cta .signin { font-size: 14px; color: var(--fg-2); transition: color .2s; white-space: nowrap; }
.nav-cta .signin:hover { color: var(--fg); }
.nav-burger { display: none; width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); align-items: center; justify-content: center; }
.nav-burger svg { width: 18px; height: 18px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: 82px 0 80px; overflow: hidden; }
.hero-graph {
  position: relative; width: 100%;
  height: clamp(380px, 54vh, 620px);
  margin-top: 4px; z-index: 1;
}
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero-glow {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%,-50%);
  width: 900px; height: 900px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(42,138,246,0.16) 0%, rgba(168,83,186,0.08) 35%, transparent 65%);
  filter: blur(20px);
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding-top: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 8px;
  border-radius: 100px; font-size: 13px; color: var(--fg-2);
  margin-bottom: 24px;
}
.hero-badge .pill {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: #fff; padding: 3px 9px; border-radius: 100px;
  background: var(--grad); white-space: nowrap;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 82px); line-height: 1.0; letter-spacing: -0.035em;
  max-width: 16ch; margin: 0 auto;
}
.hero .sub {
  font-size: clamp(16px, 1.8vw, 20px); color: var(--fg-2); line-height: 1.55;
  max-width: 60ch; margin: 26px auto 0;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 20px; display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
  font-size: 13px; color: var(--fg-3);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(43,182,115,0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(43,182,115,0.45);} 70%{box-shadow:0 0 0 7px rgba(43,182,115,0);} 100%{box-shadow:0 0 0 0 rgba(43,182,115,0);} }

/* hero product frame */
.hero-frame-wrap { position: relative; z-index: 2; margin-top: 64px; }
.hero-frame {
  border-radius: 16px; overflow: hidden; position: relative;
  box-shadow: 0 40px 120px -40px rgba(0,0,0,0.9), 0 0 0 1px var(--line);
}
.hero-frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  border-radius: 16px;
}

/* logo marquee */
.marquee { margin-top: 60px; position: relative; z-index: 2; }
.marquee .label { text-align: center; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 26px; }
.marquee-track { display: flex; gap: 56px; align-items: center; justify-content: center; flex-wrap: wrap; opacity: 0.85; }
.marquee-track .ms-logo { display: inline-flex; align-items: center; gap: 9px; color: var(--fg-2); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; transition: color .25s; }
.marquee-track .ms-logo:hover { color: var(--fg); }
.marquee-track .ms-logo svg { width: 21px; height: 21px; opacity: 0.9; }

/* ============================================================
   GENERIC SECTION HEADERS
   ============================================================ */
.sec-head { max-width: 720px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.sec-head h2 { font-size: clamp(30px, 4.2vw, 50px); margin-top: 18px; letter-spacing: -0.03em; }
.sec-head p { font-size: clamp(16px, 1.6vw, 18.5px); color: var(--fg-2); margin-top: 18px; line-height: 1.55; }

/* ============================================================
   FABRIC / CONCEPT
   ============================================================ */
.fabric { border-top: 1px solid var(--line-2); }
.fabric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-top: 56px; }
.fabric-stage {
  position: relative; aspect-ratio: 1/1; border-radius: 18px; overflow: hidden;
}
.fabric-list { display: flex; flex-direction: column; gap: 8px; }
.fabric-item {
  display: flex; gap: 16px; padding: 20px; border-radius: 14px; cursor: default;
  border: 1px solid transparent; transition: border-color .3s, background .3s, transform .3s;
}
.fabric-item:hover { border-color: var(--line); background: rgba(255,255,255,0.02); transform: translateX(4px); }
.fabric-item .idx { font-family: var(--font-mono); font-size: 12px; color: var(--blue); padding-top: 3px; min-width: 26px; }
.fabric-item h4 { font-size: 18px; font-family: var(--font-display); letter-spacing: -0.01em; }
.fabric-item p { font-size: 14.5px; color: var(--fg-2); margin-top: 5px; line-height: 1.5; }

/* ============================================================
   FEATURES GRID
   ============================================================ */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.feat-card {
  position: relative; padding: 26px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(165deg, rgba(255,255,255,0.03), rgba(255,255,255,0.008));
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.feat-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgba(42,138,246,0.1), transparent 60%);
  pointer-events: none;
}
.feat-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-3px); }
.feat-card:hover::before { opacity: 1; }
.feat-card.span-2 { grid-column: span 2; }
.feat-ico {
  width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: rgba(255,255,255,0.025); margin-bottom: 20px; color: var(--fg);
}
.feat-ico svg { width: 21px; height: 21px; }
.feat-card h3 { font-size: 19px; letter-spacing: -0.01em; }
.feat-card p { font-size: 14.5px; color: var(--fg-2); margin-top: 9px; line-height: 1.55; }
.feat-tag { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }

/* ============================================================
   AUDIENCES (modular messaging)
   ============================================================ */
.aud-tabs { display: flex; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.aud-tab {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 100px;
  border: 1px solid var(--line); color: var(--fg-2); font-size: 14.5px; font-weight: 500;
  transition: all .25s var(--ease);
}
.aud-tab svg { width: 17px; height: 17px; opacity: 0.7; }
.aud-tab:hover { color: var(--fg); border-color: rgba(255,255,255,0.18); }
.aud-tab.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--grad) border-box;
  border: 1px solid transparent;
}
.aud-tab.active svg { opacity: 1; }
.aud-panel-wrap {
  margin-top: 28px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,255,255,0.035), rgba(255,255,255,0.008));
}
.aud-panel { display: none; grid-template-columns: 1fr 1fr; gap: 0; }
.aud-panel.active { display: grid; }
.aud-copy { padding: clamp(30px, 4vw, 52px); }
.aud-copy .role { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.aud-copy h3 { font-size: clamp(24px, 3vw, 34px); margin-top: 14px; letter-spacing: -0.025em; }
.aud-copy p { font-size: 16px; color: var(--fg-2); margin-top: 16px; line-height: 1.6; }
.aud-points { margin-top: 24px; display: flex; flex-direction: column; gap: 13px; }
.aud-points li { display: flex; gap: 12px; font-size: 14.5px; color: var(--fg); list-style: none; align-items: flex-start; }
.aud-points li svg { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.aud-visual {
  position: relative; border-left: 1px solid var(--line); min-height: 340px;
  display: flex; align-items: center; justify-content: center; padding: 36px;
  background: radial-gradient(circle at 60% 40%, rgba(42,138,246,0.08), transparent 70%);
}

/* stat tiles inside audience visual */
.stat-cluster { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 360px; }
.stat-tile { padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8,10,14,0.5); }
.stat-tile .v { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.stat-tile .v .grad-text { font-size: inherit; }
.stat-tile .k { font-size: 12.5px; color: var(--fg-3); margin-top: 5px; }
.stat-tile.wide { grid-column: span 2; }

/* ============================================================
   STATUS / UPTIME
   ============================================================ */
.status-card { margin-top: 48px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.status-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.015); flex-wrap: wrap; gap: 16px; }
.status-top .left { display: flex; align-items: center; gap: 13px; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 100px; font-size: 13px; font-weight: 500; color: var(--ok); background: rgba(43,182,115,0.1); border: 1px solid rgba(43,182,115,0.25); }
.status-rows { padding: 8px 0; }
.status-row { display: flex; align-items: center; gap: 18px; padding: 15px 26px; }
.status-row .name { width: 190px; font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
.status-row .name svg { width: 16px; height: 16px; color: var(--fg-3); }
.bars { display: flex; gap: 3px; flex: 1; height: 30px; align-items: stretch; }
.bars i { flex: 1; border-radius: 2px; background: var(--ok); opacity: 0.85; }
.bars i.warn { background: var(--warn); }
.bars i.bad { background: var(--bad); }
.status-row .pct { font-family: var(--font-mono); font-size: 13px; color: var(--fg-2); width: 66px; text-align: right; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-wrap { margin-top: 48px; display: grid; grid-template-columns: 1fr; gap: 0; max-width: 860px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 6px; text-align: left; font-family: var(--font-display); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; transition: color .2s; }
.faq-q:hover { color: var(--blue); }
.faq-q .chev { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; transition: transform .35s var(--ease), border-color .2s; }
.faq-q .chev svg { width: 13px; height: 13px; }
.faq-item.open .faq-q .chev { transform: rotate(45deg); border-color: var(--blue); color: var(--blue); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq-a .inner { padding: 0 40px 26px 6px; color: var(--fg-2); font-size: 15.5px; line-height: 1.65; }

/* ============================================================
   CTA
   ============================================================ */
.cta { position: relative; overflow: hidden; }
.cta-card {
  position: relative; border-radius: 24px; overflow: hidden; text-align: center;
  padding: clamp(48px, 7vw, 88px) 28px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.cta-card .glow { position: absolute; left: 50%; bottom: -40%; transform: translateX(-50%); width: 700px; height: 700px; background: radial-gradient(circle, rgba(168,83,186,0.18), rgba(42,138,246,0.08) 40%, transparent 70%); pointer-events: none; }
.cta-card h2 { position: relative; font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -0.035em; max-width: 18ch; margin: 0 auto; }
.cta-card p { position: relative; color: var(--fg-2); font-size: 17px; margin: 20px auto 0; max-width: 52ch; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 70px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { font-size: 14px; color: var(--fg-3); max-width: 30ch; line-height: 1.6; }
.footer-col h5 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--fg-2); padding: 6px 0; transition: color .2s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line-2); flex-wrap: wrap; gap: 16px; }
.footer-bottom p { font-size: 13px; color: var(--fg-faint); }
.footer-bottom .meta { display: flex; gap: 20px; font-size: 13px; color: var(--fg-3); }
.footer-bottom .meta a:hover { color: var(--fg); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.mreveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.mreveal.shown { opacity: 1; transform: none; }
/* escape hatch: if rAF/compositor is throttled, never leave content hidden */
html.no-anim .mreveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.mreveal[data-d="1"] { transition-delay: .08s; }
.mreveal[data-d="2"] { transition-delay: .16s; }
.mreveal[data-d="3"] { transition-delay: .24s; }
.mreveal[data-d="4"] { transition-delay: .32s; }
.mreveal[data-d="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .mreveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .fabric-grid { grid-template-columns: 1fr; gap: 40px; }
  .fabric-stage { max-width: 460px; margin: 0 auto; width: 100%; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .feat-card.span-2 { grid-column: span 2; }
  .aud-panel.active { grid-template-columns: 1fr; }
  .aud-visual { border-left: none; border-top: 1px solid var(--line); min-height: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 20px; }
  .nav-links, .nav-cta .signin { display: none; }
  .nav-burger { display: flex; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-card.span-2 { grid-column: span 1; }
  .status-row .name { width: 130px; }
  .status-row .pct { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { letter-spacing: -0.025em; }
  .aud-tab .lbl-long { display: none; }
}
