/* ManageBloc public marketing site — standard CSS, no framework. */

:root {
  --mb-bg: #ffffff;
  --mb-bg-soft: #fbfcfd;
  --mb-text: #101a24;
  --mb-muted: #5c6b7a;
  --mb-border: #e6eaee;
  --mb-accent: #0f766e;
  --mb-accent-hover: #0d6259;
  --mb-focus: #14b8a6;
  --mb-container: 1200px;
  --mb-header-h: 64px;
  --mb-radius: 10px;
}

/*
  Global/element rules are scoped to non-platform surfaces. The shared
  deployment loads this sheet from <head> on every URL so the marketing page
  never paints unstyled, and the surface gate sets html[data-surface="app"]
  before first paint, so nothing below can reach the platform UI.
*/

html:not([data-surface="app"]) *,
html:not([data-surface="app"]) *::before,
html:not([data-surface="app"]) *::after {
  box-sizing: border-box;
}

html:not([data-surface="app"]) {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html:not([data-surface="app"]) body {
  margin: 0;
  background: var(--mb-bg);
  color: var(--mb-text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

html:not([data-surface="app"]) img {
  max-width: 100%;
  height: auto;
}

html:not([data-surface="app"]) a {
  color: inherit;
  text-decoration: none;
}

html:not([data-surface="app"]) svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html:not([data-surface="app"]) :focus-visible {
  outline: 2px solid var(--mb-focus);
  outline-offset: 2px;
  border-radius: 6px;
}

html:not([data-surface="app"]) .container {
  width: 100%;
  max-width: var(--mb-container);
  margin: 0 auto;
  padding: 0 20px;
}


.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--mb-bg);
  border: 1px solid var(--mb-border);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.skip-link:focus {
  left: 16px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--mb-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--mb-header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand__mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand__tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--mb-muted);
}

/* Desktop nav (shown from 1024px up) */
.nav {
  display: none;
  flex: 1 1 auto;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mb-text);
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav__link:hover {
  background: var(--mb-bg-soft);
  color: var(--mb-accent);
}

.nav__chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.nav__trigger[aria-expanded="true"] .nav__chevron {
  transform: rotate(180deg);
}

/* Product dropdown */
.menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(640px, calc(100vw - 40px));
  background: var(--mb-bg);
  border: 1px solid var(--mb-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px -12px rgba(16, 26, 36, 0.18);
  padding: 10px;
  animation: mb-menu-in 0.12s ease-out;
}

.menu[hidden] {
  display: none;
}

@keyframes mb-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu {
    animation: none;
  }
  html:not([data-surface="app"]) {
    scroll-behavior: auto;
  }
}

.menu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu__item {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background-color 0.15s ease;
}

.menu__item:hover {
  background: var(--mb-bg-soft);
}

.menu__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.menu__desc {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--mb-muted);
}

/* Actions */
.actions {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--mb-radius);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--ghost {
  color: var(--mb-text);
}

.btn--ghost:hover {
  background: var(--mb-bg-soft);
  color: var(--mb-accent);
}

.btn--primary {
  background: var(--mb-accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--mb-accent-hover);
}

.btn--block {
  width: 100%;
}

/* Mobile toggle */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--mb-border);
  border-radius: 10px;
  background: var(--mb-bg);
  color: var(--mb-text);
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile panel */
.mobile-nav {
  border-top: 1px solid var(--mb-border);
  background: var(--mb-bg);
  max-height: calc(100dvh - var(--mb-header-h));
  overflow-y: auto;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav__inner {
  padding-top: 10px;
  padding-bottom: 20px;
}

.mobile-nav__section,
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--mb-text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--mb-border);
  cursor: pointer;
  text-align: left;
}

.mobile-nav__section[aria-expanded="true"] .nav__chevron {
  transform: rotate(180deg);
}

.mobile-nav__sublist {
  margin: 0;
  padding: 6px 0 10px;
  list-style: none;
}

.mobile-nav__sublist[hidden] {
  display: none;
}

.mobile-nav__sublist a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--mb-muted);
}

.mobile-nav__sublist a:hover {
  background: var(--mb-bg-soft);
  color: var(--mb-text);
}

.mobile-nav__actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

@media (min-width: 1024px) {
  :root {
    --mb-header-h: 72px;
  }

  .nav,
  .actions {
    display: flex;
  }

  .menu-toggle,
  .mobile-nav {
    display: none;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
  }
}

/* Public 404 (framework-free) */
.site-404 {
  padding: 96px 24px 120px;
  text-align: center;
}

.site-404 h1 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: -0.01em;
}

.site-404 p {
  margin: 0 0 20px;
  color: var(--mb-muted);
}
