/* ═══════════════════════════════════════════════════
   OUTREACHOS — DOCS PAGE STYLES
   Design language: Linear palette / Attio structure
════════════════════════════════════════════════════ */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600&family=Geist:wght@400;500&display=swap');

/* ── TOKENS ── */
:root {
  /* Linear palette — tinted, not pure black */
  --bg:          #0c0c10;
  --bg-surface:  #131318;
  --bg-elevated: #1c1c22;
  --bg-overlay:  #252529;

  /* Accent = Mercury white (neutral) */
  --accent:   #F4F5F8;
  --accent-2: rgba(244, 245, 248, 0.80);
  --a-dim:    rgba(244, 245, 248, 0.10);
  --a-line:   rgba(255, 255, 255, 0.15);

  --glass:    rgba(255, 255, 255, 0.04);
  --glass-h:  rgba(255, 255, 255, 0.065);
  --border:   rgba(255, 255, 255, 0.08);
  --border-t: rgba(255, 255, 255, 0.12);

  /* Text — Mercury white + opacity levels */
  --text:   #F4F5F8;
  --text-1: rgba(244, 245, 248, 0.92);
  --text-2: rgba(244, 245, 248, 0.78);
  --text-3: rgba(244, 245, 248, 0.52);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;

  --header-h: 64px;
  --sidebar-w: 240px;
}

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: clip;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ═══════════════════════════════════════════════════
   SHARED COMPONENTS
════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.18s ease,
              color 0.18s ease,
              opacity 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: #F4F5F8;
  color: #000000;
  font-weight: 600;
}

.btn-primary:hover {
  background: rgba(244, 245, 248, 0.90);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.97);
  background: rgba(244, 245, 248, 0.82);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.nav-link:focus-visible,
.navbar__brand:focus-visible {
  outline: 2px solid rgba(244, 245, 248, 0.5);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════
   SITE HEADER & NAVBAR
════════════════════════════════════════════════════ */

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  width: calc(100% - 32px);
  max-width: 1100px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid transparent;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(12, 12, 16, 0.96);
  border-color: var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.site-header.is-hidden {
  transform: translateX(-50%) translateY(calc(-100% - 24px));
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.navbar__toggle-wrapper {
  display: none;
}

.navbar__toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  padding: 0;
  z-index: 600;
}

.toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center left;
}

.site-header.is-menu-open .toggle-line.top    { transform: rotate(45deg) translate(2.5px, -2.5px); }
.site-header.is-menu-open .toggle-line.middle { opacity: 0; }
.site-header.is-menu-open .toggle-line.bottom { transform: rotate(-45deg) translate(2px, 3.5px); }

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.navbar__logo {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: #F4F5F8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.navbar__nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navbar__nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.navbar__actions {
  display: flex;
  align-items: center;
}

.navbar__cta {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 6px;
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 80px 32px 48px;
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.mobile-nav__link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s ease;
}

.mobile-nav__link:hover {
  color: var(--text);
}

.mobile-nav__footer {
  width: 100%;
  max-width: 320px;
}

/* ═══════════════════════════════════════════════════
   PAGE LAYOUT — TWO COLUMN DOCS
════════════════════════════════════════════════════ */

.docs-page {
  padding-top: calc(var(--header-h) + 32px);
  min-height: 100vh;
}

.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 0;
  align-items: start;
}

/* ── SIDEBAR ── */
.docs-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  padding: 8px 0 48px 0;
  scrollbar-width: none;
}

.docs-sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-group {
  margin-bottom: 28px;
}

.sidebar-group__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 12px;
  margin-bottom: 6px;
  display: block;
}

.sidebar-group__links {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  font-size: 13.5px;
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease, font-weight 0s;
}

.sidebar-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.sidebar-link.is-active {
  color: var(--text);
  background: rgba(255,255,255,0.09);
  font-weight: 500;
}

/* ── CONTENT ── */
.docs-content {
  padding: 0 0 96px 56px;
  min-width: 0;
}

/* ═══════════════════════════════════════════════════
   DOCS TYPOGRAPHY
════════════════════════════════════════════════════ */

.docs-section {
  padding-top: 64px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.docs-section:first-child {
  padding-top: 0;
  border-top: none;
}

.docs-section + .docs-section {
  margin-top: 0;
}

/* Hero section — no border */
#intro {
  border-top: none;
  padding-top: 0;
}

.docs-section h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 12px;
}

.docs-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
  margin-top: 48px;
}

.docs-section h2:first-child {
  margin-top: 0;
}

.docs-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-1);
  margin-top: 32px;
  margin-bottom: 10px;
}

.docs-section h3:first-child {
  margin-top: 0;
}

.docs-section p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 16px;
}

.docs-section p:last-child {
  margin-bottom: 0;
}

.docs-section strong {
  color: var(--text-1);
  font-weight: 500;
}

.docs-section a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-t);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.docs-section a:hover {
  text-decoration-color: var(--text-2);
}

/* ── INTRO SECTION SPECIAL ── */
.docs-intro-sub {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 16px;
}

.docs-intro-body {
  font-size: 14.5px;
  color: var(--text-3);
}

/* ── REQUIREMENTS LIST ── */
.req-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.req-list li {
  font-size: 14.5px;
  color: var(--text-2);
  padding-left: 16px;
  position: relative;
}

.req-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-3);
}

/* ── NUMBERED STEPS ── */
.steps {
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.steps li {
  counter-increment: step-counter;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.steps li::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: #0c0c10;
  flex-shrink: 0;
  margin-top: 1px;
}

.steps li p {
  margin-bottom: 4px;
}

.steps li p:last-child {
  margin-bottom: 0;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.step-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── CALLOUT BOX ── */
.callout {
  background: rgba(244, 245, 248, 0.045);
  border: 1px solid rgba(244, 245, 248, 0.07);
  border-radius: var(--r-sm);
  padding: 14px 20px 16px;
  margin: 24px 0;
}

.callout::before {
  content: 'NOTE';
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.callout[data-type="tip"]::before   { content: 'TIP'; }
.callout[data-type="warning"]::before { content: 'HEADS UP'; }

.callout p {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 8px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout strong {
  color: var(--text-1);
}

.callout code {
  font-size: 12.5px;
  word-break: break-all;
}

/* ── CODE / MONOSPACE ── */
code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 13px;
  background: var(--bg-elevated);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
}

/* ── TABLES ── */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.docs-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}

.docs-table td {
  padding: 10px 16px;
  color: var(--text-2);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.docs-table td:first-child {
  color: var(--text);
}

.docs-table td code {
  font-size: 12px;
}

.docs-table tr:last-child td {
  border-bottom: none;
}

/* ── STATUS GROUPS (what's working) ── */
.status-group {
  margin-bottom: 32px;
}

.status-group__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-list li {
  font-size: 14px;
  color: var(--text-2);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.status-list li::before {
  position: absolute;
  left: 0;
  font-size: 11px;
}

.status-list.working li::before   { content: '✓'; color: rgba(40, 200, 64, 0.7); }
.status-list.partial li::before   { content: '◐'; color: rgba(251, 188, 46, 0.7); }
.status-list.upcoming li::before  { content: '○'; color: var(--text-3); }

/* ── KNOWN ISSUES LIST ── */
.issue-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.issue-item__title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 6px;
}

.issue-item__desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── HELP OPTIONS ── */
.help-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.help-option {
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.help-option__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

.help-option p {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 0;
}

/* ── IMAGE PLACEHOLDERS ── */
.docs-figure {
  margin: 24px 0;
}

.docs-figure img {
  width: 100%;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.docs-figure figcaption {
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
  margin-top: 10px;
}

.docs-figure[data-placeholder] {
  background: var(--bg-surface);
  border: 2px dashed var(--border-t);
  border-radius: var(--r-sm);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
}

.docs-figure[data-placeholder] .placeholder-label {
  font-size: 13px;
  color: var(--text-3);
  font-style: italic;
}

/* ── CODE BLOCK WITH COPY BUTTON ── */
.code-block {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin: 16px 0;
  overflow-x: auto;
}

.code-block code {
  display: block;
  padding: 16px 20px;
  padding-right: 56px;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 13.5px;
  color: var(--text-1);
  white-space: pre;
}

.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.code-copy-btn:hover {
  background: var(--glass-h);
  color: var(--text-1);
}

.code-copy-btn.is-copied {
  color: rgba(40, 200, 64, 0.8);
}

.code-copy-btn svg {
  width: 16px;
  height: 16px;
}

/* ── PAGE FOOTER CLOSE LINE ── */
.docs-footer-line {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.docs-footer-line p {
  font-size: 13.5px;
  color: var(--text-3);
}

/* ── VERSION BADGE ── */
.docs-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.version-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(40, 200, 64, 0.85);
  box-shadow: 0 0 0 3px rgba(40, 200, 64, 0.15);
  flex-shrink: 0;
  animation: version-pulse 2.4s ease-in-out infinite;
}

@keyframes version-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(40, 200, 64, 0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(40, 200, 64, 0); }
}

/* ── SECTION GROUP LABEL ("YOU ARE HERE") ── */
.docs-section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

/* ── LINKABLE HEADING ANCHORS ── */
.heading-anchor {
  display: inline-flex;
  align-items: center;
  opacity: 0;
  margin-left: 8px;
  color: var(--text-3);
  text-decoration: none;
  vertical-align: middle;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.docs-section h2:hover .heading-anchor,
.docs-section h3:hover .heading-anchor {
  opacity: 1;
}

.heading-anchor:hover {
  color: var(--text-2);
}

/* ── MOBILE JUMP DROPDOWN ── */
.docs-jump-mobile {
  display: none;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 0 20px;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-content {
    padding: 0 0 64px 0;
    grid-row: 2;
  }

  .navbar__toggle-wrapper {
    display: flex;
  }

  .navbar__nav,
  .navbar__actions {
    display: none;
  }

  /* Jump dropdown — sticky below header on mobile */
  .docs-jump-mobile {
    display: block;
    grid-column: 1 / -1;
    grid-row: 1;
    position: sticky;
    top: calc(var(--header-h) + 12px);
    z-index: 10;
    margin-bottom: 28px;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .docs-jump-mobile.nav-hidden {
    top: 12px;
  }

  .docs-jump-mobile select {
    width: 100%;
    padding: 10px 40px 10px 14px;
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(244,245,248,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
  }
}

/* ── FOOTER ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

footer {
  background: var(--bg-void);
  border-top: 1px solid rgba(255, 255, 255, .055);
  padding: 44px 0 36px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.footer-logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #F4F5F8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-3);
  transition: color .2s;
}

.footer-links a:hover {
  color: var(--text-2);
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-copy-extra {
    display: none;
  }
}
