/* Merv public site — hand-authored, no build step.
   Palette mirrors the app's locked "Graphite Aqua · Emerald" tokens
   (theme/tokens.ts). This file is NOT bound by docs/DESIGN-SYSTEM.md, which
   governs the RN makeStyles(t) seam — but the values are copied from it so the
   site and the app read as one product. Dim is the default, matching the app. */

:root {
  --bg: #101418;
  --surface: #29323a;
  --surface2: #323c45;
  --border: #495563;
  --text: #f4f7fa;
  --text-secondary: #b6c0c9;
  --text-muted: #8b96a0;
  --accent: #20c488;
  --on-accent: #03130b;
  --link: #6aa0f5;
  --danger: #f0674f;
  --logo-dark: block;
  --logo-light: none;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #e9e4da;
    --surface: #f8fafb;
    --surface2: #f4f1eb;
    --border: #d4ccbe;
    --text: #100c0a;
    --text-secondary: #3a322e;
    --text-muted: #4f4741;
    --accent: #0c8058;
    --on-accent: #ffffff;
    --link: #1b63c4;
    --danger: #be3626;
    --logo-dark: none;
    --logo-light: block;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- header ---- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 34px;
  width: auto;
}

.logo img.for-dark-bg {
  display: var(--logo-dark);
}

.logo img.for-light-bg {
  display: var(--logo-light);
}

.stage {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* ---- content ---- */

/* `main.wrap`, not `main` — .wrap is a class and would otherwise win on
   specificity and reset this to `0 20px`, dropping the h1 against the header.
   The pages whose first child carries its own padding (.hero, .status) hid it. */
main.wrap {
  padding-top: 40px;
  padding-bottom: 24px;
}

h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 40px 0 10px;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 17px;
  margin: 26px 0 6px;
}

p,
li {
  color: var(--text-secondary);
}

li {
  margin-bottom: 6px;
}

strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.lede {
  font-size: 19px;
  color: var(--text-secondary);
  margin-top: 0;
}

.meta {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---- cards / callouts ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 24px 0;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card.accent {
  border-color: var(--accent);
}

.card.warn {
  border-color: var(--danger);
}

.card h2,
.card h3 {
  margin-top: 0;
}

/* ---- tables ---- */

.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  min-width: 460px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

th {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

/* ---- buttons ---- */

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 10px;
  margin-top: 4px;
}

.button:hover {
  opacity: 0.9;
}

.mail {
  font-weight: 600;
  word-break: break-word;
}

/* ---- landing ---- */

/* Tops up main.wrap's 40px rather than restating it — the landing wants a
   little more air above the headline than a document page does. */
.hero {
  padding: 16px 0 8px;
}

.hero h1 {
  font-size: 38px;
}

.features {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}

.features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0;
}

.features b {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

/* Reserved slot for the product demo video (queued — see CONVENTIONS §16).
   Drop an <iframe> or <video> inside .video-frame and delete .video-placeholder. */
.video-frame {
  margin: 36px 0 0;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-frame iframe,
.video-frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-placeholder {
  color: var(--text-muted);
  font-size: 15px;
  padding: 20px;
  text-align: center;
  margin: 0;
}

/* ---- confirmation page ---- */

.status {
  text-align: center;
  padding: 24px 0 32px;
}

.status .glyph {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 18px;
}

.status h1 {
  margin-bottom: 12px;
}

.status p {
  font-size: 18px;
}

.hidden {
  display: none;
}

/* ---- footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 24px 0 40px;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 26px;
  }
  .hero h1 {
    font-size: 30px;
  }
  main.wrap {
    padding-top: 28px;
  }
}
