/* MajesticMesh landing — "smooth" design system.
   Light, airy, pastel-wave hero with huge mix-blend typography.
   Standalone: the chat/account surfaces keep their own dark theme.
   Type: Plus Jakarta Sans (variable, self-hosted — no Google CDN,
   keeps the privacy policy honest). Motion: WAAPI in landing.js,
   spring-flavoured easing, reduced-motion aware. */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/plus-jakarta-sans-var.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* color tokens */
  --bg: #fdfcff;
  --bg-soft: #f7f4fc;
  --ink: #191331;
  --ink-2: rgba(25, 19, 49, 0.68);
  --ink-3: rgba(25, 19, 49, 0.45);
  --line: rgba(25, 19, 49, 0.08);
  --line-strong: rgba(25, 19, 49, 0.16);
  --card: #ffffff;
  --gold: #b97a24;
  --gold-soft: #ffc98f;
  --violet-soft: #eca0f5;
  --blue-soft: #a9c7ff;
  --pill-dark: #171130;
  --pill-dark-hover: #241b47;
  --shadow-sm: 0 2px 10px rgba(25, 19, 49, 0.05);
  --shadow-md: 0 14px 40px rgba(25, 19, 49, 0.09);
  --shadow-lg: 0 30px 80px rgba(25, 19, 49, 0.14);
  /* motion tokens — one rhythm everywhere */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-med: 280ms;
  --mono: 'SF Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 2px 6px;
}
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── header: transparent over hero → glass on scroll ─────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-spring),
              backdrop-filter var(--t-med);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-header.scrolled {
  background: rgba(253, 252, 255, 0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand img { height: 26px; width: auto; }
/* the wordmark sits on its 5-unit pixel grid: 10px = 2px per unit */
.brand .wordmark { height: 10px; width: auto; }
/* language switch */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px;
  font-size: 13px;
  font-weight: 600;
}
.lang-switch a, .lang-switch span {
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--ink-3);
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch [aria-current] { background: var(--ink); color: #fff; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}
.site-nav a { transition: color var(--t-fast); }
.site-nav a:hover { color: var(--ink); }

/* ── buttons: pill language everywhere ────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-spring),
              background var(--t-fast),
              border-color var(--t-fast);
  will-change: transform;
}
.btn:hover { transform: scale(1.04); box-shadow: var(--shadow-md); background: #ffffff; }
.btn:active { transform: scale(0.96); }
.btn-dark {
  background: var(--pill-dark);
  border-color: var(--pill-dark);
  color: #ffffff;
}
.btn-dark:hover { background: var(--pill-dark-hover); }
.btn-sm { height: 40px; padding: 0 20px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active { transform: none; }
}

/* ── hero: the wave owns the viewport ─────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-wave {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* static pastel fallback until (or in case) WebGL takes over */
  background:
    radial-gradient(90% 90% at 20% 15%, rgba(255, 201, 143, 0.6), transparent 60%),
    radial-gradient(90% 90% at 80% 25%, rgba(236, 160, 245, 0.5), transparent 60%),
    radial-gradient(110% 90% at 50% 95%, rgba(169, 199, 255, 0.55), transparent 65%),
    #ffffff;
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 110px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-logo { height: 56px; width: auto; margin-bottom: 34px; }
.hero-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(25, 19, 49, 0.55);
  margin-bottom: 20px;
}
.hero h1 {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  font-size: clamp(3rem, 10vw, 7.6rem);
  color: #000;
  mix-blend-mode: overlay; /* the wave shines through the strokes */
  text-wrap: balance;
}
.hero-sub {
  max-width: 560px;
  margin-top: 34px;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 400;
  color: rgba(25, 19, 49, 0.72);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 42px;
}
.hero-tag {
  margin-top: 46px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(25, 19, 49, 0.5);
}
.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(25, 19, 49, 0.4);
}
.hero-scroll svg { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll svg { animation: bob 2.2s var(--ease-spring) infinite; }
  @keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
  }
}

/* ── sections ─────────────────────────────────────────────── */
section { padding: 108px 0; }
section.soft { background: var(--bg-soft); }
.kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--gold), #b465c9 55%, #4f74d8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-size: clamp(1.9rem, 4vw, 3rem);
  text-wrap: balance;
  max-width: 720px;
}
.section-sub {
  max-width: 620px;
  margin-top: 18px;
  color: var(--ink-2);
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 56px;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-spring);
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.step .num {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(255, 201, 143, 0.45), rgba(236, 160, 245, 0.35), rgba(169, 199, 255, 0.4));
  margin-bottom: 20px;
}
.step h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 15.5px; }

/* features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 56px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 26px;
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-spring),
              border-color var(--t-med);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(185, 122, 36, 0.35);
}
.feature h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.feature .fdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-soft), var(--violet-soft));
  box-shadow: 0 0 0 4px rgba(236, 160, 245, 0.15);
}
.feature p { color: var(--ink-2); font-size: 15px; }
@media (prefers-reduced-motion: reduce) {
  .step:hover, .feature:hover { transform: none; }
}

/* live agents strip */
.agents-strip { margin-top: 48px; }
.agent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-spring),
              border-color var(--t-fast);
}
.agent-chip:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
  border-color: rgba(185, 122, 36, 0.4);
}
.agent-chip:active { transform: scale(0.96); }
.agent-chip .mm-av { margin-left: -9px; }
.agents-note { margin-top: 22px; font-size: 14px; color: var(--ink-3); }

/* developer split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split pre {
  background: var(--pill-dark);
  color: #e8e4f5;
  border-radius: 22px;
  padding: 28px 30px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
}
.split .btn { margin-top: 26px; }

/* builder banner */
.builder-banner {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  padding: 72px 40px;
  text-align: center;
  background:
    radial-gradient(120% 160% at 15% 0%, rgba(255, 201, 143, 0.55), transparent 55%),
    radial-gradient(120% 160% at 85% 10%, rgba(169, 199, 255, 0.5), transparent 55%),
    radial-gradient(140% 120% at 50% 110%, rgba(236, 160, 245, 0.45), transparent 60%),
    #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.builder-banner h2 { margin: 0 auto; }
.builder-banner .section-sub { margin-left: auto; margin-right: auto; }
.builder-banner .hero-ctas { margin-top: 34px; }

/* compact hero variant (secondary pages: static pastels, no wave) */
.hero.compact { min-height: 76dvh; }

/* dark code/proof card outside the split grid */
.code-card {
  background: var(--pill-dark);
  color: #e8e4f5;
  border-radius: 22px;
  padding: 26px 30px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.8;
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
  margin-top: 40px;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  font-size: 14px;
  color: var(--ink-3);
}
.site-footer a { transition: color var(--t-fast); }
.site-footer a:hover { color: var(--ink); }
.gw-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; }
.gw-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-3);
}
.gw-status.up .dot { background: #2c8a55; box-shadow: 0 0 8px rgba(44, 138, 85, 0.6); }

/* ── reveal-on-scroll (driven by landing.js / WAAPI) ──────── */
.rv { opacity: 0; }
.rv.rv-shown { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; }
}

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .steps, .features { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 640px) {
  section { padding: 76px 0; }
  .steps, .features { grid-template-columns: 1fr; }
  .site-nav .hide-mobile { display: none; }
  .site-nav { gap: 12px; }
  .brand { gap: 8px; }
  .brand img { height: 20px; }
  .site-header .btn-sm { padding: 0 12px; }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .hero-logo { height: 44px; }
  .btn { height: 48px; padding: 0 24px; }
}
/* phones: the hero already carries the call to action, so the header keeps
   only logo, wordmark and language switch */
@media (max-width: 480px) {
  .site-header .btn-sm { display: none; }
}

/* agent avatar (avatar.js): gradient with a white icon (icons.js) or the
   letter. Sizes are set inline. */
.mm-av {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 28%;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-style: normal;
  line-height: 1;
  user-select: none;
}
/* Font Awesome 7 paths reach slightly past their viewBox */
.mm-av svg {
  flex: none;
  overflow: visible;
}

/* ── header menu "Use cases" / "Branchen" (links to the intro pages) ── */
.nav-menu { position: relative; }
.nav-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 999px;
  transition: color var(--t-fast);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover, .nav-menu[open] summary { color: var(--ink); }
.nav-menu summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.nav-menu summary > svg:last-child { transition: transform var(--t-med) var(--ease-spring); }
.nav-menu[open] summary > svg:last-child { transform: rotate(180deg); }
.nav-menu .nm-icon { display: none; }
.nm-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 60;
  width: 370px;
  padding: 8px;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: nm-in var(--t-med) var(--ease-spring);
}
@keyframes nm-in { from { opacity: 0; transform: translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) { .nm-panel { animation: none; } }
.nm-panel a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
}
.nm-panel a:hover, .nm-panel a:focus-visible { background: var(--bg-soft); outline: none; }
.nm-panel a[aria-current] { background: var(--bg-soft); }
.nm-panel i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #fff1e0, #f6e3fb);
  font-style: normal;
  font-size: 19px;
}
.nm-panel b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.nm-panel small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--ink-3); font-weight: 500; }
.nm-panel a.nm-all {
  display: block;
  margin-top: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
/* phones: a compact grid icon instead of the word, panel under the header */
@media (max-width: 640px) {
  .nav-menu summary { width: 36px; height: 36px; justify-content: center; border: 1px solid var(--line-strong); }
  .nav-menu .nm-icon { display: block; }
  .nav-menu .nm-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .nav-menu summary > svg:last-child { display: none; }
  .nm-panel { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; transform: none; }
  @keyframes nm-in { from { opacity: 0; transform: translateY(-6px); } }
}
/* tablets: section links leave the header, the menu and language switch stay */
@media (max-width: 900px) {
  .site-nav .hide-mobile { display: none; }
  .site-nav { gap: 18px; }
}
@media (max-width: 1100px) {
  .site-nav .hide-tablet { display: none; }
}

/* ── phone navigation (built by landing.js from the header's links) ── */
.mnav-btn { display: none; }
@media (max-width: 900px) {
  .site-header.has-mnav .nav-menu { display: none; }
  .mnav-btn {
    display: inline-grid;
    place-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--ink);
    cursor: pointer;
  }
  .mnav-btn span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--t-med) var(--ease-spring), opacity var(--t-fast);
  }
  .mnav-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
  .mnav-open .mnav-btn { background: var(--ink); color: #fff; border-color: var(--ink); }
  .mnav-open .mnav-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .mnav-open .mnav-btn span:nth-child(2) { opacity: 0; }
  .mnav-open .mnav-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .site-header.mnav-open {
    background: var(--bg);
    box-shadow: 0 1px 0 var(--line);
  }
  /* fixed, but sized by height: the scrolled header's backdrop-filter makes
     it the containing block, so "bottom: 0" would end at the header */
  .mnav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    height: calc(100dvh - 68px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    animation: mnav-in var(--t-med) var(--ease-spring);
  }
  .mnav[hidden] { display: none; }
  @keyframes mnav-in { from { opacity: 0; transform: translateY(-8px); } }
  .mnav-inner { display: grid; max-width: 640px; margin: 0 auto; padding: 12px 16px 32px; }
  .mnav-inner:focus { outline: none; }
  .mnav-list > a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 10px; }
  .mnav-h {
    margin: 18px 4px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
  .mnav-list { display: grid; }
  .mnav-list > a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 19px;
    font-weight: 600;
    color: var(--ink);
  }
  .mnav-list.cases > a {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 4px;
  }
  .mnav-list.cases i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff1e0, #f6e3fb);
    font-style: normal;
    font-size: 20px;
  }
  .mnav-list.cases b { display: block; font-size: 17px; line-height: 1.3; }
  .mnav-list.cases small { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.35; color: var(--ink-3); }
  .mnav-list.cases a.nm-all { display: flex; font-size: 16px; color: var(--ink-2); border-bottom: 0; }
  .mnav-list > a[aria-current] { margin: 0 -8px; padding-left: 12px; padding-right: 12px; border-radius: 14px; border-bottom-color: transparent; background: var(--bg-soft); }
  .mnav-cta { width: 100%; margin-top: 22px; height: 52px; }
  html.mnav-lock, html.mnav-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .mnav { animation: none; }
}
