/* Fonts: self-hosted latin subsets (SIL OFL, see fonts/) */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/outfit-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono-latin.woff2") format("woff2");
}

/* Maben tokens. Dark is the default, light swaps the same names. */
:root {
  color-scheme: dark;
  --mb-bg: #0A0A0B;
  --mb-surface: #121214;
  --mb-raised: #1A1A1D;
  --mb-hover: #222226;
  --mb-border-subtle: #2A2A2F;
  --mb-border: #34343A;
  --mb-border-strong: #66666F;
  --mb-text-muted: #8B8B94;
  --mb-text-secondary: #B3B3BB;
  --mb-text: #EDEDF0;
  --mb-accent: var(--mb-text);
  --mb-success: #3DD68C;
  --mb-warning: #F5B83D;
  --mb-danger: #FF6369;
  --mb-divider: #1E1E22;
  --mb-radius-sm: 4px;
  --mb-radius: 6px;
  --mb-radius-lg: 10px;
  --mb-ease: cubic-bezier(0.2, 0, 0, 1);
  --mb-font: "Outfit", system-ui, sans-serif;
  --mb-mono: "Geist Mono", ui-monospace, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --mb-bg: #FFFFFF;
  --mb-surface: #F6F6F8;
  --mb-raised: #FFFFFF;
  --mb-hover: #EDEDF0;
  --mb-border-subtle: #E6E6EA;
  --mb-border: #D4D4DA;
  --mb-border-strong: #8E8E98;
  --mb-text-muted: #6A6A73;
  --mb-text-secondary: #45454D;
  --mb-text: #111113;
  --mb-success: #0E7A4A;
  --mb-warning: #8F5A00;
  --mb-danger: #C9202C;
  --mb-divider: #ECECEF;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--mb-bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--mb-bg);
  color: var(--mb-text);
  font: 400 16px/26px var(--mb-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--mb-text); text-decoration: none; }
:focus-visible { outline: 2px solid var(--mb-text); outline-offset: 2px; border-radius: var(--mb-radius-sm); }
::selection { background: var(--mb-hover); color: var(--mb-text); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mb-mono); font-size: 12px; line-height: 16px; color: var(--mb-text-muted); }

/* Layout */
.hub { padding: 0 24px; overflow-x: hidden; }
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 0 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 64px 96px;
}
.side { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 40px; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 48px; margin-top: -12px; }

/* Brand */
/* Lockup: mark 0.72em tall, bottom on the baseline, 0.28em gap */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  align-self: flex-start;
  font: 600 22px/28px var(--mb-font);
  letter-spacing: -0.01em;
}
.brand svg { height: 0.72em; width: auto; aspect-ratio: 68 / 58; flex: none; }

/* Intro */
.intro { display: flex; flex-direction: column; gap: 16px; }
.intro h1 { margin: 0; font-size: 28px; line-height: 34px; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
.intro p { margin: 0; color: var(--mb-text-secondary); font-size: 15px; line-height: 24px; text-wrap: pretty; }

/* Elsewhere links */
.links { display: flex; flex-direction: column; }
/* Top rule rides on the first row so it reveals with it */
.lnk:first-of-type { border-top: 1px solid var(--mb-divider); }
.lnk {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 36px;
  color: var(--mb-text-secondary);
  font-size: 15px;
  border-bottom: 1px solid var(--mb-divider);
  transition: color 120ms var(--mb-ease);
}
.lnk .mono { transition: color 120ms var(--mb-ease); }
.lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transform-origin: left center;
  transition: transform 120ms var(--mb-ease);
}
/* Press: the label gives a little under the finger, so the tap feels heard */
.lnk:active .lbl { transform: scale(0.97); }

/* Hover arrow: fades in and slides 3px toward its direction */
.arr {
  width: 10px;
  height: 10px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 120ms var(--mb-ease), transform 120ms var(--mb-ease);
}
.lnk:focus-visible .arr { opacity: 1; transform: none; }

/* Page-load reveal: each piece fades up 8px, 40ms apart */
@keyframes mb-rise {
  from { opacity: 0; transform: translateY(8px); }
}
.rise {
  animation: mb-rise 300ms var(--mb-ease) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
[data-i="1"] { --i: 1; }
[data-i="2"] { --i: 2; }
[data-i="3"] { --i: 3; }
[data-i="4"] { --i: 4; }
[data-i="5"] { --i: 5; }
[data-i="6"] { --i: 6; }
[data-i="7"] { --i: 7; }
[data-i="8"] { --i: 8; }

/* Product lists */
.grp {
  margin: 0 0 6px;
  padding: 0 0 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  color: var(--mb-text-muted);
  border-bottom: 1px solid var(--mb-border-subtle);
}
.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 112px;
  gap: 16px;
  align-items: center;
  min-height: 52px;
  padding: 0 12px;
  margin: 0 -12px;
  border-radius: var(--mb-radius);
  transition: background-color 120ms var(--mb-ease);
}
.nm { font-size: 15px; font-weight: 600; }
.ds { font-size: 15px; color: var(--mb-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mb-text-muted); white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--mb-text-muted); }
.dot.live { background: var(--mb-success); }
.dot.beta { background: var(--mb-warning); }
.st .short { display: none; }

/* While the product lists are hidden, the footer sits under the sidebar on every screen size.
   When they come back: .foot { margin: 0; } and .foot-m { display: none; } */
.foot { display: none; }
.foot-m { margin: 0; }

/* Hover only where there is a real pointer, so taps don't leave sticky states */
@media (hover: hover) and (pointer: fine) {
  .lnk:hover, .lnk:hover .mono { color: var(--mb-text); }
  .lnk:hover .arr { opacity: 1; transform: none; }
  a.row:hover { background: var(--mb-surface); }
}

/* Phone: one column, links after the lists */
@media (max-width: 760px) {
  .hub { padding: 0 16px; }
  .wrap { flex-direction: column; flex-wrap: nowrap; gap: 40px; padding: 48px 0 40px; }
  .side { display: contents; }
  .brand { order: 1; }
  .intro { order: 2; }
  .intro h1 { text-wrap: pretty; }
  .main { order: 3; flex: none; gap: 40px; margin-top: 0; }
  .links { order: 4; }
  .foot { display: none; }
  .foot-m { display: block; order: 5; }
  .grp { margin-bottom: 0; }
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "nm st" "ds st";
    column-gap: 16px;
    row-gap: 2px;
    padding: 10px 0;
    margin: 0;
    min-height: 60px;
    border-bottom: 1px solid var(--mb-divider);
    border-radius: 0;
  }
  .nm { grid-area: nm; font-size: 16px; line-height: 24px; }
  .ds { grid-area: ds; white-space: normal; font-size: 14px; line-height: 20px; }
  .st { grid-area: st; }
  .st .long { display: none; }
  .st .short { display: inline; }
  .lnk { height: 44px; font-size: 16px; }
}

/* Reduced motion: keep the fades that help, drop every movement */
@keyframes mb-fade {
  from { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rise { animation-name: mb-fade; animation-delay: 0ms; }
  .arr, .lnk:hover .arr, .lnk:focus-visible .arr { transform: none; transition: opacity 120ms var(--mb-ease); }
  .lnk:active .lbl { transform: none; }
}
