/* OsmoSync — shared design system
   Tokens, utilities, components used across every page. */

:root{
  --bg: #FBFCFD;
  --fg: #25292E;
  --muted: #7A8189;
  --muted-2: #B6BBC1;
  --hairline: #E6E8EB;
  --hairline-2: #EFF1F4;
  --primary: #15171A;
  --primary-fg: #FFFFFF;
  --accent: #5B6BFF;
  --accent-soft: #EEF0FF;
  --green: #137A4B;
  --red: #B23B3B;
  --shadow-card: 0 1px 0 rgba(20,22,26,0.04), 0 8px 24px -12px rgba(20,22,26,0.08);
  --shadow-cta: 0 30px 60px -28px rgba(20,22,26,0.35), 0 0 0 1px rgba(20,22,26,0.06);
  --font-display: 'Instrument Serif', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html, body { background: var(--bg); }
body {
  font-family: var(--font-body);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

.bg-page { background: var(--bg); }
.text-fg { color: var(--fg); }
.text-muted { color: var(--muted); }
.text-muted-2 { color: var(--muted-2); }
.text-accent { color: var(--accent); }
.bg-accent { background: var(--accent); }
.bg-accent-soft { background: var(--accent-soft); }
.border-hairline { border-color: var(--hairline); }
.border-hairline-2 { border-color: var(--hairline-2); }

/* buttons */
.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  transition: opacity .2s ease, transform .2s ease;
}
.btn-primary:hover { opacity: .9; }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--hairline);
  transition: background .15s ease, border-color .15s ease;
}
.btn-ghost:hover { background: #fff; border-color: #D7DBDF; }

.ghost-circle {
  background: #fff;
  color: var(--fg);
  box-shadow: 0 2px 12px rgba(20,22,26,0.08);
  transition: background .2s ease;
}
.ghost-circle:hover { background: #ffffffcc; }

.nav-link { color: var(--muted); transition: color .15s ease; }
.nav-link:hover { color: var(--fg); }

.card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { border-color: #D7DBDF; box-shadow: var(--shadow-card); }

/* mono caps label */
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* hairline */
.hr-thin { border-top: 1px solid var(--hairline); }

/* dotted-grid bg for dark CTA panels */
.cta-grid {
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* sticky-phase reveal */
.phase-row { transition: opacity .4s ease, transform .4s ease; }
.phase-row.is-dim { opacity: .35; }

/* hover-reveal pattern for bento cells */
.bento-cell .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.bento-cell:hover .reveal { opacity: 1; transform: translateY(0); }
.bento-cell .baseline { transition: opacity .3s ease; }
.bento-cell:hover .baseline { opacity: 0; }

/* subpage hero — solid section header */
.subhero {
  padding-top: 160px;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}
.subhero > * { position: relative; z-index: 1; }

/* background image stage for subhero — drop a div with this class as first child */
.subhero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
/* fade the bottom edge so type stays readable and the page transition is soft */
.subhero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(251,252,253,0) 30%, rgba(251,252,253,0.65) 75%, rgba(251,252,253,1) 100%);
}

/* figure card — for inline UI stills (B-series) */
.figure-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.figure-card img { display: block; width: 100%; height: auto; }
.figure-card figcaption {
  padding: 12px 18px;
  border-top: 1px solid var(--hairline-2);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.figure-card .fig-disclaim {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* dropdown menu */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 40;
}
.dropdown-host:hover .dropdown,
.dropdown-host:focus-within .dropdown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg);
  font-size: 14px;
  transition: background .15s ease;
}
.dropdown a:hover { background: var(--hairline-2); }
.dropdown a .meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* prose for long-form pages */
.prose { color: var(--fg); }
.prose p { font-size: 16px; line-height: 1.7; margin: 0 0 1.1em; max-width: 64ch; text-wrap: pretty; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 36px; line-height: 1.05;
  margin: 2.2em 0 0.6em;
  letter-spacing: -0.01em;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 26px; line-height: 1.1;
  margin: 1.8em 0 0.5em;
}
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin: 0.4em 0; line-height: 1.6; max-width: 60ch; }
.prose strong { font-weight: 600; color: var(--fg); }
.prose em { font-style: italic; }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose blockquote {
  border-left: 2px solid var(--fg);
  padding-left: 20px;
  margin: 1.6em 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.3;
  color: var(--fg);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--hairline-2);
  padding: 2px 6px;
  border-radius: 4px;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2.5em 0;
}

/* form inputs */
.input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--fg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px rgba(91,107,255,0.12);
}
textarea.input { resize: vertical; min-height: 110px; }
.field-label {
  font-size: 13px; font-weight: 500; color: var(--fg);
  display: block; margin-bottom: 6px;
}
.field-help { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* faint background noise — kills banding on light page */
.bg-noise {
  position: relative;
}
.bg-noise::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.025 0'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 0;
}
