/* Salesforce Hub LLC site.
   Token names follow /Users/Shared/reusable/PortableThemes/html-css/theme.css
   (--bg, --surface, --ink, --ink-muted, --rule, --accent …) so the shared
   theme kit can be dropped in later without renaming. The site itself stays
   quiet (chalk and basalt) so each app's own colours carry the page.
   No Salesforce blue: the company is not affiliated with Salesforce, Inc. */

:root {
  color-scheme: light dark;
  --font-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #edefea;          /* chalk */
  --surface: #f7f8f4;
  --surface-2: #ffffff;
  --ink: #1c2326;         /* basalt */
  --ink-muted: #4f5c62;
  --ink-faint: #6f7b80;
  --rule: #c9cfcb;
  --accent: #1c2326;
  --accent-ink: #f7f8f4;
  --mark: #c98f1a;        /* ochre: the one studio accent */
  --live: #047857;
  --focus: #2f6f8f;
  --xhibit: #2c55c7;      /* from xhibit/webui/static/css/tokens.css */
  --error: #b3261e;

  --radius-s: 4px;
  --radius-m: 12px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(4rem, 9vw, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141819;
    --surface: #1b2022;
    --surface-2: #20272a;
    --ink: #e3e7e2;
    --ink-muted: #a1acad;
    --ink-faint: #85908f;
    --rule: #2f383b;
    --accent: #e3e7e2;
    --accent-ink: #141819;
    --mark: #e2a93a;
    --live: #34d399;
    --focus: #7fb8d4;
    --xhibit: #6d8ff0;
    --error: #f2a19b;
  }
}

:root[data-theme="dark"] {
  --bg: #141819;
  --surface: #1b2022;
  --surface-2: #20272a;
  --ink: #e3e7e2;
  --ink-muted: #a1acad;
  --ink-faint: #85908f;
  --rule: #2f383b;
  --accent: #e3e7e2;
  --accent-ink: #141819;
  --mark: #e2a93a;
  --live: #34d399;
  --focus: #7fb8d4;
  --xhibit: #6d8ff0;
  --error: #f2a19b;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }
p { margin: 0; }
code { font-family: var(--font-code); font-size: 0.875em; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  padding: var(--space-1) var(--space-2);
  background: var(--ink);
  color: var(--bg);
  z-index: 10;
}
.skip-link:focus { top: var(--space-2); }

/* ── Buttons and links ────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: color-mix(in srgb, var(--accent) 84%, var(--mark)); }
.button--small { min-height: 40px; padding: 0 1rem; font-size: 0.9375rem; }

.text-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: var(--mark);
}

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-row { display: flex; align-items: center; gap: var(--space-3); min-height: 68px; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark-mark { width: 24px; height: 24px; fill: var(--ink); }
.wordmark-mark .wordmark-dot { fill: var(--mark); }

.site-nav { display: flex; gap: var(--space-3); margin-left: auto; }
.site-nav a { color: var(--ink-muted); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.site-nav a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .site-nav { display: none; }
  .header-row .button { margin-left: auto; }
}

/* ── Hero: the app index is the hero ──────────────────────────────────── */

.hero { padding-block: var(--space-6) var(--space-5); }
.hero h1 { max-width: 12ch; }
.lede { margin-top: var(--space-3); max-width: 52ch; font-size: 1.1875rem; color: var(--ink-muted); }

.app-index { list-style: none; margin: var(--space-5) 0 0; padding: 0; border-top: 2px solid var(--ink); }

.app-row {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(10rem, 15rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--rule);
}
.app-row--lead { padding-block: var(--space-3); }

.app-icon { width: 48px; height: 48px; border-radius: 11px; }
.app-icon--mono {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  font-size: 1.375rem;
}
.app-icon--xhibit { background: var(--xhibit); color: #fff; }

.app-name { font-weight: 800; font-size: clamp(1.375rem, 2.4vw, 1.75rem); letter-spacing: -0.025em; line-height: 1.15; }
.app-row--lead .app-name { font-size: clamp(1.75rem, 3.6vw, 2.75rem); letter-spacing: -0.035em; }
.app-name a { text-decoration: none; }
/* The whole row is the link target; the name carries the accessible link. */
.app-name a::after { content: ""; position: absolute; inset: 0; }
.app-row:hover .app-name a { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 6px; }

.app-job { color: var(--ink-muted); max-width: 48ch; }

.status {
  justify-self: end;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.status::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.45em;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  vertical-align: 0.06em;
}
.status--live { color: var(--live); }
.status--live::before { background: currentColor; }
.status--private { color: var(--xhibit); }

@media (max-width: 760px) {
  .app-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .app-row .app-icon { width: 40px; height: 40px; border-radius: 9px; font-size: 1.125rem; }
  .app-job { grid-column: 2 / -1; font-size: 0.9375rem; }
  .status { grid-row: 1; grid-column: 3; }
}

/* The one orchestrated moment: the index fills in, row by row. */
@media (prefers-reduced-motion: no-preference) {
  .js .app-row { animation: arrive 520ms cubic-bezier(.2, .7, .2, 1) both; }
  .js .app-row:nth-child(2) { animation-delay: 70ms; }
  .js .app-row:nth-child(3) { animation-delay: 140ms; }
  .js .app-row:nth-child(4) { animation-delay: 210ms; }
  .js .app-row:nth-child(5) { animation-delay: 280ms; }
  .js .app-row:nth-child(6) { animation-delay: 350ms; }
  .js .app-row:nth-child(7) { animation-delay: 420ms; }
  @keyframes arrive {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: none; }
  }
}

/* ── Shared section rhythm ────────────────────────────────────────────── */

/* The divider is drawn as a background so it lines up with the content edge,
   not the gutter (a border would span the padding too). */
main > section {
  padding-block: var(--space-6);
  background: linear-gradient(var(--rule), var(--rule)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
main > .hero { background: none; }

/* ── Feature sections (DataVot, Xhibit) ───────────────────────────────── */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-5);
  align-items: center;
}
.feature--flip .feature-copy { order: 2; }
.feature--flip .record { order: 1; }

.feature-lede { margin-top: var(--space-2); font-size: 1.1875rem; color: var(--ink-muted); max-width: 46ch; }
.feature-list { margin: var(--space-3) 0 0; padding-left: 1.1rem; max-width: 52ch; }
.feature-list li + li { margin-top: 0.4rem; }
.feature-list li::marker { color: var(--mark); }
.feature-note { margin-top: var(--space-3); font-weight: 500; }
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.fine-print { margin-top: var(--space-3); max-width: 60ch; font-size: 0.8125rem; line-height: 1.55; color: var(--ink-faint); }

.shot { margin: 0; }
.shot img {
  border-radius: var(--radius-m);
  border: 1px solid var(--rule);
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 35, 38, 0.06), 0 18px 40px -18px rgba(28, 35, 38, 0.28);
}
.shot figcaption { margin-top: var(--space-1); font-size: 0.875rem; color: var(--ink-faint); }

@media (max-width: 960px) {
  .feature { grid-template-columns: 1fr; gap: var(--space-4); }
  .feature--flip .feature-copy, .feature--flip .record { order: 0; }
}

/* Xhibit capture record: the artifact the service actually produces. */
.record {
  margin: 0;
  padding: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--xhibit);
  border-radius: var(--radius-m);
}
.record-title { font-weight: 700; margin-bottom: var(--space-2); }
.record-fields { margin: 0; }
.record-fields div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: var(--space-2);
  padding-block: 0.6rem;
  border-top: 1px solid var(--rule);
}
.record-fields dt { color: var(--ink-muted); font-size: 0.9375rem; }
.record-fields dd { margin: 0; font-size: 0.9375rem; overflow-wrap: anywhere; }
.record-fields .hash { font-size: 0.8125rem; line-height: 1.5; }
@media (max-width: 560px) {
  .record-fields div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ── About ────────────────────────────────────────────────────────────── */

.about h2 { margin-bottom: var(--space-3); }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.about-cols p { color: var(--ink-muted); max-width: 52ch; font-size: 1.125rem; }
@media (max-width: 760px) { .about-cols { grid-template-columns: 1fr; gap: var(--space-2); } }

/* ── Contact ──────────────────────────────────────────────────────────── */

.signup { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-5); }
.signup-copy p { margin-top: var(--space-2); color: var(--ink-muted); max-width: 40ch; }
.signup-form { display: grid; gap: var(--space-1); max-width: 480px; }
.signup-form label { font-weight: 700; font-size: 0.9375rem; margin-top: var(--space-1); }
.signup-form .optional { font-weight: 400; color: var(--ink-faint); }
.signup-form input,
.signup-form select,
.signup-form textarea {
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
}
.signup-form textarea { resize: vertical; }
.signup-form :is(input, select, textarea):focus-visible { outline-offset: 0; }
.signup-form .button { margin-top: var(--space-2); justify-self: start; }
.form-status { min-height: 1.6em; font-size: 0.9375rem; }
.form-status.is-error { color: var(--error); }
.form-status.is-ok { font-weight: 700; }
@media (max-width: 960px) { .signup { grid-template-columns: 1fr; gap: var(--space-3); } }

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--rule); padding-block: var(--space-4); font-size: 0.875rem; color: var(--ink-muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); }
.legal { max-width: 62ch; color: var(--ink-faint); }
