@import url("widescreen.css");
@import url("textcase-chrome.css");
@import url("site-footer.css");

/* TextCase docs — homepage tokens, simplified shell */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --ink: #101425;
  --muted: #647084;
  --line: #e8ebf2;
  --line-strong: #dce2ee;
  --purple: #8458ff;
  --purple-dark: #6d42e8;
  --wrap: calc(1100px * var(--mx-wrap-scale, 1));
  --page-gutter: 1.5rem;
  --radius-sm: 14px;
  --radius-md: 24px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 72px;
  --tc-announcement-height: 0px;
  --tc-announcement-gap: 0px;
  --tc-header-height: 64px;
  --tc-nav-offset: calc(
    var(--tc-announcement-height) + var(--tc-announcement-gap) + var(--tc-header-height)
  );
}


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: geometricPrecision;
}

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

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

.wrap {
  width: min(var(--wrap), calc(100vw - (var(--page-gutter) * 2)));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 13px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: var(--purple);
}

.btn-primary:hover {
  background: var(--purple-dark);
}

.btn-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: rgba(132, 88, 255, 0.4);
  color: var(--purple);
}



/* Simplified docs header — sticky under the fixed announcement */

.docs-header {
  position: sticky;
  top: calc(var(--tc-announcement-height) + var(--tc-announcement-gap));
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

/* In-flow spacer so the sticky header isn’t covered at scroll top */
html:has(.tc-announcement):not(.tc-announcement--dismissed) body {
  padding-top: var(--tc-announcement-height);
}

.docs-nav {
  min-height: var(--tc-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}


/* Layout — content left, TOC right */

.docs-main {
  padding: calc(var(--space-xl) + 8px) 0 var(--space-2xl);
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 48px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: calc(var(--tc-nav-offset) + 24px);
  padding: 4px 0;
  order: 2;
}

.docs-content {
  order: 1;
  min-width: 0;
}

.docs-toc__label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-toc nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-toc a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.docs-toc a:hover,
.docs-toc a.is-active {
  color: var(--purple);
  background: rgba(132, 88, 255, 0.08);
}

.docs-intro {
  margin-bottom: calc(var(--space-xl) + 4px);
  padding-bottom: calc(var(--space-lg) + 4px);
  border-bottom: 1px solid var(--line);
}

.docs-intro--with-icon {
  display: flex;
  align-items: center;
  gap: 1.35rem 1.75rem;
}

.docs-intro__icon {
  flex-shrink: 0;
}

.docs-intro__icon img {
  display: block;
  width: 5.75rem;
  height: 5.75rem;
  object-fit: cover;
  border-radius: 22.5%;
  box-shadow: 0 10px 24px rgba(16, 20, 37, 0.12);
}

.docs-intro__text {
  min-width: 0;
  flex: 1;
}

.docs-intro__eyebrow {
  margin: 0 0 10px;
  color: var(--purple);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.docs-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.docs-intro__text > p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.docs-intro__text > p.docs-intro__eyebrow {
  color: var(--purple);
}

.docs-intro__meta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.docs-section a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.docs-section a:hover {
  color: var(--purple-dark);
}

.docs-section {
  margin-bottom: calc(var(--space-xl) + var(--space-sm));
  scroll-margin-top: var(
    --toc-scroll-clearance,
    calc(var(--tc-nav-offset) + 1.5rem)
  );
}

.docs-section h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.docs-section h3 {
  margin: 26px 0 10px;
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.docs-section p,
.docs-section li {
  color: #3a4258;
  line-height: 1.7;
}

.docs-section p {
  margin: 0 0 14px;
}

.docs-section ul,
.docs-section ol {
  margin: 0 0 16px;
  padding-left: 1.2rem;
}

.docs-section li + li {
  margin-top: 8px;
}

.docs-transform-list {
  margin-bottom: 22px;
}

.docs-transform-list li {
  line-height: 1.5;
}

.docs-transform-list__alias {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.docs-table th,
.docs-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.docs-table th {
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.docs-callout {
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid rgba(132, 88, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(132, 88, 255, 0.06);
}

.docs-callout p {
  margin: 0;
  color: var(--ink);
}

/* Mobile Jump to */

.tc-toc--mobile {
  display: none;
  position: sticky;
  top: calc(var(--tc-nav-offset) + 0.55rem);
  z-index: 20;
  margin: 0 0 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(16, 20, 37, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.tc-toc--mobile.is-hidden {
  transform: translateY(calc(-100% - 1.25rem));
  opacity: 0;
  pointer-events: none;
}



@media (max-width: 900px) {
  :root {
    --page-gutter: 1.5rem;
  }
}

@media (max-width: 860px) {
  .docs-intro--with-icon {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-toc {
    display: none;
  }

  .tc-toc--mobile {
    display: block;
  }
}
