/* Scriber project site — Material Design dark theme (matches the app:
   dark elevated surfaces with paper elevation, teal primary, click ripple). */

:root {
  color-scheme: dark;

  --bg: #121317;
  --bg-2: #0e0f13;
  --surface: #1b1d24;
  --surface-2: #23262f;
  --surface-3: #2b2f3a;
  --border: #343843;

  --text: #e7e8ec;
  --text-muted: #a1a6b0;

  --accent: #2dd4bf;
  --accent-2: #12a99a;
  --accent-contrast: #04231f;
  --bar: #2dd4bf;

  --red: #ff6b6b;
  --red-bg: rgba(255, 107, 107, 0.15);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.15);
  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.15);
  --gray: #9ca3af;
  --gray-bg: rgba(156, 163, 175, 0.16);

  --radius: 12px;
  --radius-sm: 8px;

  /* Material elevation (umbra + penumbra + ambient). */
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 3px 1px rgba(0, 0, 0, 0.28);
  --elev-2: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 6px 2px rgba(0, 0, 0, 0.28);
  --elev-3: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 10px 3px rgba(0, 0, 0, 0.28);
  --elev-6: 0 8px 18px rgba(0, 0, 0, 0.5), 0 12px 34px 8px rgba(0, 0, 0, 0.4);
  --shadow: var(--elev-6);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.4em; letter-spacing: -0.01em; }

img { max-width: 100%; }

code, kbd {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

:not(pre) > code {
  background: var(--surface-2);
  border-radius: 5px;
  padding: 1px 6px;
  color: #a9ede2;
}

kbd {
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.82em;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Subtle Material scrollbars. */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--surface-3); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Ripple ink (positioned by ripple.js) ---------- */

.ripple-ink {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.22;
  transform: scale(0);
  pointer-events: none;
  animation: ripple-expand 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes ripple-expand { to { transform: scale(1); opacity: 0; } }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 22, 28, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: var(--elev-2);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { display: block; width: 28px; height: 28px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a {
  position: relative;
  overflow: hidden;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14.5px;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav .nav-cta { color: var(--accent-contrast); background: var(--accent); box-shadow: var(--elev-1); }
.nav .nav-cta:hover { filter: brightness(1.08); background: var(--accent); color: var(--accent-contrast); }

@media (max-width: 720px) {
  .nav .hide-sm { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--elev-2); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: var(--elev-4, var(--elev-3)); }
.btn.ghost { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--elev-1); }
.btn.ghost:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto 0;
  height: 520px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(45, 212, 191, 0.16), transparent 70%);
  pointer-events: none;
}
.hero-logo { width: 92px; height: 92px; margin: 0 auto 22px; filter: drop-shadow(0 8px 24px rgba(45, 212, 191, 0.35)); }
.hero h1 { font-size: clamp(38px, 6vw, 62px); margin: 0 0 12px; font-weight: 800; }
.hero .tagline {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 12px;
}
.hero .subline { color: var(--text-muted); max-width: 620px; margin: 0 auto 30px; font-size: 15.5px; }
.accent-word { color: var(--accent); }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--elev-1);
  font-size: 13px;
  color: var(--text-muted);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section.alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.section h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 12px; font-weight: 600; }
.section-head p { color: var(--text-muted); font-size: 17px; margin: 0; }

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--elev-1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--elev-3); }
.card .ico {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(45, 212, 191, 0.14);
  font-size: 21px;
  margin-bottom: 14px;
}
.card h3 { font-size: 17.5px; margin: 0 0 6px; font-weight: 600; }
.card p { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  box-shadow: var(--elev-1);
}
.step .num {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: var(--elev-1);
}
.step h3 { font-size: 16.5px; margin: 0 0 6px; font-weight: 600; }
.step h3 code { font-size: 14px; }
.step p { color: var(--text-muted); font-size: 14.5px; margin: 0; }
.step.muted-step .num { background: var(--surface-2); color: var(--text); box-shadow: none; }

/* ---------- Architecture flow ---------- */

.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.flow-node {
  flex: 1 1 190px;
  min-width: 180px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--elev-1);
}
.flow-node .ico { font-size: 26px; margin-bottom: 8px; }
.flow-node h4 { margin: 0 0 4px; font-size: 15px; }
.flow-node p { margin: 0; color: var(--text-muted); font-size: 13px; }
.flow-node.local { box-shadow: var(--elev-1), inset 0 0 0 1px rgba(45, 212, 191, 0.4); }
.flow-arrow { align-self: center; color: var(--text-muted); font-size: 22px; }
.flow-note {
  margin: 22px auto 0;
  max-width: 720px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14.5px;
}
.flow-note strong { color: var(--accent); }

/* ---------- Callout ---------- */

.callout {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 14.5px;
  box-shadow: var(--elev-1);
}
.callout strong { color: var(--text); }
.callout.warn { border-left-color: var(--amber); }
.callout.warn strong { color: var(--amber); }

/* ---------- Code blocks ---------- */

pre {
  margin: 16px 0;
  padding: 16px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
}
pre code { color: #d6def0; }
.tok-c { color: var(--text-muted); }       /* comment */
.tok-k { color: var(--accent); }            /* key / keyword */
.tok-s { color: #f0b36b; }                  /* string / value */

/* ---------- Screenshots gallery (recreated mockups) ---------- */

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 26px; }
.shot { margin: 0; }
.shot figcaption { margin-top: 12px; color: var(--text-muted); font-size: 14px; text-align: center; }
.shot figcaption b { color: var(--text); }

.window {
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--elev-6);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface-2);
}
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.window-dots i:nth-child(1) { background: #ff5f57; }
.window-dots i:nth-child(2) { background: #febc2e; }
.window-dots i:nth-child(3) { background: #28c840; }
.window-url {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 6px;
  padding: 4px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.window-body { background: var(--bg); padding: 14px; overflow: hidden; }

/* ---- In-mockup UI (compact reproduction of the Material dashboard) ---- */

.m { font-size: 12px; color: var(--text); }
.m-top {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; margin: -14px -14px 12px;
  background: var(--surface); box-shadow: var(--elev-2);
}
.m-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; }
.m-brand svg { width: 16px; height: 16px; }
.m-nav { display: flex; gap: 3px; margin-left: 6px; }
.m-nav span { color: var(--text-muted); font-weight: 600; padding: 3px 8px; border-radius: 6px; font-size: 11px; }
.m-nav span.on { color: var(--accent); background: rgba(45, 212, 191, 0.12); }
.m-top .spacer { margin-left: auto; }
.m-gear { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--text-muted); }
.m-h1 { font-size: 15px; font-weight: 700; margin: 2px 0 10px; }

.m-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.m-stat { background: var(--surface); border-radius: 10px; padding: 9px 10px; box-shadow: var(--elev-1); }
.m-stat .v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.m-stat .l { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

.m-panel { background: var(--surface); border-radius: 10px; padding: 11px; box-shadow: var(--elev-1); }
.m-panel + .m-panel { margin-top: 10px; }
.m-panel h4 { font-size: 12px; margin: 0 0 9px; }

.m-chart { display: grid; gap: 5px; }
.m-bar-row { display: grid; grid-template-columns: 44px 1fr 16px; align-items: center; gap: 8px; font-size: 10px; color: var(--text-muted); }
.m-bar { height: 9px; background: var(--bar); border-radius: 0 4px 4px 0; }
.m-bar-row .c { text-align: right; color: var(--text); }

.m-table { width: 100%; border-collapse: collapse; }
.m-table th {
  text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.m-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); font-size: 11px; white-space: nowrap; }
.m-table tr:last-child td { border-bottom: none; }
.m-name { font-weight: 700; }
.m-mut { color: var(--text-muted); }

.m-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 700; text-transform: capitalize;
}
.m-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.m-badge.completed { color: var(--green); background: var(--green-bg); }
.m-badge.summarizing { color: var(--amber); background: var(--amber-bg); }
.m-badge.error { color: var(--red); background: var(--red-bg); }
.m-badge.cancelled { color: var(--gray); background: var(--gray-bg); }

/* avatar column (participants) */
.m-av-col { width: 1%; padding-right: 4px !important; }
.m-av {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #04211e;
  box-shadow: var(--elev-1);
}
.m-av.g1 { background: linear-gradient(135deg, #3ee0cc, #12a99a); }
.m-av.g2 { background: linear-gradient(135deg, #fbbf24, #f0863b); }
.m-av.g3 { background: linear-gradient(135deg, #8b7cf6, #6366f1); color: #f4f2ff; }
.m-av.ph { background: var(--surface-2); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }

/* Material filled fields in the mockups */
.m-field { margin-bottom: 10px; }
.m-field label { display: block; font-size: 10px; font-weight: 700; margin-bottom: 4px; color: var(--text-muted); }
.m-input {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-radius: 5px 5px 0 0;
  padding: 8px 10px; font-size: 11px; color: var(--text);
}
.m-input.focus { background: var(--surface-3); border-bottom: 2px solid var(--accent); }
.m-input .lock { color: var(--text-muted); font-size: 9px; }
.m-prov { border-radius: 8px; padding: 10px; margin-bottom: 9px; background: var(--surface); box-shadow: var(--elev-1); }
.m-prov .ph-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.m-prov .tag { font-size: 9px; font-weight: 800; color: var(--accent); background: rgba(45,212,191,0.14); border-radius: 5px; padding: 2px 7px; }
.m-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 16px; border-radius: 8px; font-size: 11px; font-weight: 700;
  background: var(--accent); color: var(--accent-contrast); box-shadow: var(--elev-2);
}
.m-md h5 { font-size: 12px; margin: 0 0 5px; }
.m-md p { margin: 0 0 6px; color: var(--text-muted); font-size: 11px; }
.m-md ul { margin: 0; padding-left: 15px; color: var(--text-muted); font-size: 11px; }
.m-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.m-meta .k { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.m-meta .val { font-size: 11px; }

/* ---------- Docs (setup.html / api.html) ---------- */

.doc { padding: 40px 0 80px; }
.doc-layout { display: grid; grid-template-columns: 232px 1fr; gap: 44px; align-items: start; }
.toc {
  position: sticky; top: 84px;
  border-radius: var(--radius); background: var(--surface); padding: 16px;
  font-size: 13.5px; box-shadow: var(--elev-1);
}
.toc h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin: 0 0 10px; }
.toc a { display: block; color: var(--text-muted); padding: 4px 0; }
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc ol { margin: 0; padding-left: 18px; }
.toc ol li { margin: 3px 0; }

.doc-main { min-width: 0; }
.doc-main h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 8px; }
.doc-lead { color: var(--text-muted); font-size: 17px; margin: 0 0 8px; }
.doc-main h2 {
  font-size: 24px; margin: 44px 0 14px; padding-top: 14px; border-top: 1px solid var(--border);
}
.doc-main h2:first-of-type { border-top: none; padding-top: 0; }
.doc-main h3 { font-size: 18px; margin: 26px 0 10px; }
.doc-main p { color: #c3ccdf; }
.doc-main ul, .doc-main ol { color: #c3ccdf; padding-left: 22px; }
.doc-main li { margin: 6px 0; }
.doc-main li::marker { color: var(--text-muted); }

.step-block {
  display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border);
}
.step-block:last-child { border-bottom: none; }
.step-block .n {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800;
  background: var(--accent); color: var(--accent-contrast); box-shadow: var(--elev-1);
}
.step-block .b { min-width: 0; }
.step-block .b h3 { margin: 3px 0 6px; font-size: 17px; }
.step-block .b p { margin: 0 0 8px; }

.perm-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; display: block; overflow-x: auto; }
.perm-table th, .perm-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.perm-table th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.perm-table code { white-space: nowrap; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tag-perm { font-size: 12.5px; font-weight: 700; color: var(--accent); background: rgba(45,212,191,0.12); border-radius: 8px; padding: 4px 10px; }

.next-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.next-links a {
  position: relative; overflow: hidden;
  display: block; background: var(--surface); border-radius: var(--radius); padding: 16px 18px; color: var(--text);
  box-shadow: var(--elev-1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.next-links a:hover { transform: translateY(-2px); box-shadow: var(--elev-3); text-decoration: none; }
.next-links a b { display: block; margin-bottom: 3px; }
.next-links a span { color: var(--text-muted); font-size: 13.5px; }

/* ---------- Footer ---------- */

.site-footer { padding: 40px 0; color: var(--text-muted); font-size: 14px; border-top: 1px solid var(--border); }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 640px) {
  .m-stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0; }
  .hero { padding: 60px 0 48px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .ripple-ink { display: none; animation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
