/* Misraj GTM — Platform Guide
   Dark sidebar / light content, teal+blue accent. Self-contained, no external deps. */

:root {
  --sidebar-w: 300px;
  --accent: #0d9488;       /* teal-600 */
  --accent-dark: #0f766e;  /* teal-700 */
  --accent-light: #14b8a6; /* teal-500 */
  --blue: #2563eb;         /* blue-600 */
  --blue-light: #3b82f6;

  --ink-900: #0b1220;
  --ink-800: #0f1b2d;
  --ink-700: #16273f;
  --ink-600: #223550;
  --ink-line: rgba(255, 255, 255, 0.08);

  --paper: #f7f9fb;
  --paper-card: #ffffff;
  --paper-line: #e4e9ef;
  --text-900: #101826;
  --text-600: #4b5768;
  --text-400: #8590a1;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-pop: 0 12px 32px rgba(16, 24, 40, 0.16), 0 4px 10px rgba(16, 24, 40, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--text-900);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--paper-line);
  border: 1px solid var(--paper-line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.82em;
}

/* ---------- Layout shell ---------- */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, var(--ink-900) 0%, var(--ink-800) 100%);
  color: #dbe4f0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 40;
  border-right: 1px solid var(--ink-line);
}

.brand {
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--ink-line);
  flex: 0 0 auto;
}
.brand-logo { height: 26px; width: auto; display: block; }
.brand-sub {
  display: block;
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7f93ad;
  font-weight: 600;
}

.search-wrap {
  position: relative;
  padding: 14px 16px 10px;
  flex: 0 0 auto;
}
.search-icon {
  position: absolute;
  left: 28px;
  top: 24px;
  color: #6c8099;
  pointer-events: none;
}
#searchBox {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ink-line);
  color: #eef3f9;
  border-radius: 9px;
  padding: 9px 12px 9px 32px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
#searchBox::placeholder { color: #7688a2; }
#searchBox:focus {
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.09);
}
.search-count {
  display: block;
  font-size: 11px;
  color: #7688a2;
  margin-top: 6px;
  min-height: 14px;
  padding-left: 4px;
}

.nav-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 10px 14px;
}
.nav-scroll::-webkit-scrollbar { width: 8px; }
.nav-scroll::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 8px; }

.nav-intro { padding: 4px 6px 10px; border-bottom: 1px solid var(--ink-line); margin-bottom: 8px; }
.nav-intro .nav-link { font-weight: 700; color: #f4f8fc; }

.nav-group { margin-bottom: 4px; }
.nav-group-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: #93a7c2;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 10px 6px 6px;
  cursor: pointer;
  font-family: inherit;
}
.nav-group-title .chev { transition: transform 0.15s ease; color: #6c8099; }
.nav-group-title[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.nav-group-title:hover { color: #c3d3e8; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list[hidden] { display: none; }

.nav-link {
  display: block;
  padding: 7px 12px 7px 18px;
  margin: 1px 0;
  border-radius: 8px;
  color: #b7c6da;
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.3;
  border-left: 2px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link.active {
  background: rgba(20, 184, 166, 0.16);
  color: #fff;
  border-left-color: var(--accent-light);
  font-weight: 600;
}
.nav-link.search-hidden { display: none; }
.nav-link.search-match {
  outline: 1px dashed rgba(20, 184, 166, 0.6);
  outline-offset: -1px;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--ink-line);
  font-size: 11px;
  color: #64789a;
}

/* ---------- Mobile toggle ---------- */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink-900);
  color: #fff;
  border: 1px solid var(--ink-line);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Content ---------- */
.content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 0 60px;
}

.hero {
  background:
    radial-gradient(1100px 420px at 15% -10%, rgba(13, 148, 136, 0.10), transparent 60%),
    radial-gradient(900px 380px at 90% -10%, rgba(37, 99, 235, 0.08), transparent 60%),
    var(--paper-card);
  border-bottom: 1px solid var(--paper-line);
  padding: 48px 48px 40px;
  scroll-margin-top: 20px;
}
.hero-inner { max-width: 980px; }
.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(13, 148, 136, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--ink-900), var(--accent-dark) 65%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-600);
  max-width: 760px;
  margin: 0 0 30px;
}
.hero-lede strong { color: var(--text-900); }

.how-ai-works {
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 24px 26px 26px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}
.how-ai-works h2 { font-size: 17px; margin: 0 0 6px; }
.how-ai-lede { font-size: 13.5px; color: var(--text-600); margin: 0 0 18px; }

.pipeline-diagram {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
}
.pipe-step {
  flex: 1 1 150px;
  min-width: 140px;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pipe-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink-800);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pipe-human .pipe-num { background: var(--blue); }
.pipe-final .pipe-num { background: var(--accent); }
.pipe-human { border-color: rgba(37, 99, 235, 0.35); background: rgba(37, 99, 235, 0.05); }
.pipe-final { border-color: rgba(13, 148, 136, 0.35); background: rgba(13, 148, 136, 0.06); }
.pipe-label { font-weight: 700; font-size: 13.5px; }
.pipe-desc { font-size: 12px; color: var(--text-600); line-height: 1.45; }
.pipe-arrow {
  align-self: center;
  color: var(--text-400);
  font-size: 18px;
  flex: 0 0 auto;
  padding: 0 2px;
}

.how-ai-callout {
  margin: 18px 0 0;
  font-size: 13.5px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--ink-700);
}
.how-ai-callout strong { color: var(--blue); }

.hero-groups { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-chip {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-800);
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 20px;
  padding: 7px 14px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  transition: border-color .15s, transform .1s;
}
.hero-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.hero-chip span {
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
}

.group-header {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(247, 249, 251, 0.94);
  backdrop-filter: blur(4px);
  padding: 22px 48px 10px;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--paper-line);
}
.group-header:first-of-type { margin-top: 0; }

.card {
  scroll-margin-top: 48px;
  margin: 0 48px;
  padding: 26px 0;
  border-bottom: 1px solid var(--paper-line);
}
.card:last-of-type { border-bottom: none; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.card-head h3 {
  font-size: 21px;
  margin: 0;
  letter-spacing: -0.01em;
}
.collapse-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--paper-line);
  background: var(--paper-card);
  color: var(--text-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s;
}
.collapse-btn:hover { background: var(--paper); }
.collapse-btn[aria-expanded="false"] svg { transform: rotate(-90deg); }
.collapse-btn svg { transition: transform 0.15s ease; }

.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 16px;
  align-items: start;
}
.card-body[hidden] { display: none; }

.block { margin-bottom: 16px; }
.label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}
.card-text p { font-size: 14.5px; line-height: 1.6; color: var(--text-600); margin: 0; }
.card-text ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-900);
}
.card-text ol li { margin-bottom: 5px; }
.card-text ol li strong { color: var(--ink-800); }

.benefit {
  background: rgba(13, 148, 136, 0.07);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px;
}
.benefit-tag {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 4px;
}
.benefit p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-700); }

.shot {
  margin: 0;
  position: sticky;
  top: 20px;
}
.shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-card);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
  position: relative;
  transition: box-shadow 0.15s, transform 0.15s;
}
.shot-btn:hover { box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.shot-btn img { display: block; width: 100%; height: auto; }
.zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(11, 18, 32, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.shot-btn:hover .zoom-hint { opacity: 1; }

.site-footer {
  padding: 30px 48px 10px;
  font-size: 12px;
  color: var(--text-400);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  padding: 40px;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox figure { margin: 0; max-width: min(1400px, 94vw); max-height: 90vh; }
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: block;
  margin: 0 auto;
}
.lightbox figcaption {
  text-align: center;
  color: #dbe4f0;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 14px;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Focus states ---------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .card-body { grid-template-columns: 1fr; }
  .shot { position: static; }
  .hero { padding: 40px 28px 32px; }
  .card { margin: 0 28px; }
  .group-header { padding: 20px 28px 10px; }
  .site-footer { padding: 30px 28px 10px; }
}

@media (max-width: 760px) {
  .mobile-toggle { display: flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 20px 0 40px rgba(0,0,0,0.25);
  }
  .sidebar.open { transform: translateX(0); }
  .hero { padding: 74px 20px 28px; }
  .card { margin: 0 20px; }
  .group-header { padding: 18px 20px 10px; }
  .hero h1 { font-size: 27px; }
  .pipeline-diagram { flex-direction: column; }
  .pipe-arrow { transform: rotate(90deg); align-self: center; }
}
