*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

:root {
  --bg: #ffffff;
  --bg-2: #fafafa;
  --bg-3: #f4f4f5;
  --fg: #0b0909;
  --fg-2: #52525b;
  --fg-3: #a1a1aa;
  --fg-4: #d4d4d8;
  --border: #e4e4e7;
  --border-2: #d4d4d8;
  --accent: #09090b;
  --accent-fg: #ffffff;
  --code-bg: #09090b;
  --code-fg: #e4e4e7;
  --code-kw: #c4b5fd;
  --code-fn: #93c5fd;
  --code-str: #86efac;
  --code-cm: #52525b;
  --code-num: #fca5a5;
  --code-tag: #fda4af;
  --sans: "Outfit", system-ui, sans-serif;
  --mono: "Geist Mono", monospace;
  --sidebar-w: 240px;
  --header-h: 56px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ─── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

.header-tag {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 2px 7px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-2);
  width: 34px;
  height: 34px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-gh {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-2);
  text-decoration: none;
  padding: 2px 7px;
  border: 1px solid var(--border);
  transition:
    background 0.1s,
    color 0.1s;
}

.nav-gh:hover {
  background: var(--bg-2);
  color: var(--fg);
}

.nav-npm {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-fg);
  background: var(--accent);
  padding: 2px 7px;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: opacity 0.1s;
}

.nav-npm:hover {
  opacity: 0.85;
}

/* ─── HERO ─── */
.hero-wrapper {
  border-bottom: 1px solid var(--border);
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 1.5rem 72px;
  animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 4px 12px;
  margin-bottom: 1.5rem;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--fg);
  animation: blink 2s ease infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: 1.1rem;
}

h1 .light {
  font-weight: 300;
  color: var(--fg-2);
}

.hero-sub {
  font-size: 15px;
  font-weight: 400;
  color: var(--fg-2);
  max-width: 500px;
  line-height: 1.65;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-install {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  padding: 9px 12px 9px 16px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg);
}

.install-dollar {
  color: var(--fg-3);
  user-select: none;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg-2);
  font-family: var(--mono);
  padding: 3px 9px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.1s,
    color 0.1s;
}

.copy-btn:hover {
  background: var(--bg-3);
  color: var(--fg);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-2);
  text-decoration: none;
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 2px;
  transition:
    color 0.1s,
    border-color 0.1s;
}

.hero-cta:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
}

.feature {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  transition: background 0.1s;
}

.feature:last-child {
  border-right: none;
}

.feature:hover {
  background: var(--bg-2);
}

.feature-icon {
  margin-bottom: 0.9rem;
  color: var(--fg-3);
}

.icon-multi {
  color: #3b82f6 !important;
}

.icon-locales {
  color: #10b981 !important;
}

.icon-icu {
  color: #f59e0b !important;
}

.feature h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.feature p {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.6;
}

/* ─── MAIN LAYOUT ─── */
.main-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  padding: 1.75rem 0;
  overflow-y: auto;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-group {
  margin-bottom: 1.75rem;
}

.sidebar-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
  display: block;
  padding: 0 1rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 1rem;
  color: var(--fg-2);
  text-decoration: none;
  font-size: 14px;
  border-left: 2px solid transparent;
  transition:
    color 0.1s,
    background 0.1s,
    border-color 0.1s;
}

.sidebar-link:hover {
  color: var(--fg);
  background: var(--bg-2);
}

.sidebar-link.active {
  color: var(--fg);
  font-weight: 500;
  border-left-color: var(--fg);
  background: var(--bg-2);
}

.sidebar-link svg {
  color: var(--fg-3);
  flex-shrink: 0;
}

.sidebar-link.active svg {
  color: var(--fg);
}

/* ─── CONTENT ─── */
.content-area {
  flex: 1;
  padding: 0 2.5rem;
  max-width: calc(100% - var(--sidebar-w));
  min-width: 0;
}

.section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  color: var(--fg);
}

.section-desc {
  font-size: 14px;
  color: var(--fg-2);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* ─── CODE BLOCKS ─── */
.code-block {
  border: 1px solid var(--border);
  background: var(--code-bg);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.code-header {
  background: #141414;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
  font-size: 14px;
  color: #71717a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.code-lang {
  font-size: 14px;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #52525b;
}

.code-body {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.85;
  color: var(--code-fg);
}

.code-body pre {
  margin: 0;
}

.kw {
  color: var(--code-kw);
}

.fn {
  color: var(--code-fn);
}

.str {
  color: var(--code-str);
}

.cm {
  color: var(--code-cm);
  font-style: italic;
}

.num {
  color: var(--code-num);
}

.tag {
  color: var(--code-tag);
}

/* ─── SETUP TABS ─── */
.setup-tabs {
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.setup-tab-bar {
  display: flex;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.setup-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 9px 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 14px;
  cursor: pointer;
  transition:
    color 0.1s,
    border-color 0.1s;
}

.setup-tab:hover {
  color: var(--fg-2);
}

.setup-tab.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.setup-pane {
  display: none;
}

.setup-pane.active {
  display: block;
  animation: fadeIn 0.12s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.setup-pane .code-block {
  margin: 0;
  border: none;
}

/* ─── API GRID ─── */
.formatters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.formatter-card {
  padding: 1.25rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.formatter-card:nth-child(2n) {
  border-right: none;
}

.formatter-card:nth-last-child(-n + 2) {
  border-bottom: none;
}

.formatter-card:hover {
  background: var(--bg-2);
}

.formatter-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.fn-badge {
  font-size: 14px;
  padding: 1px 5px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg-3);
}

.formatter-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.formatter-example:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.formatter-input {
  color: var(--fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formatter-arrow {
  color: var(--fg-4);
  flex-shrink: 0;
}

.formatter-output {
  color: var(--fg);
  font-weight: 500;
  flex-shrink: 0;
}

/* ─── TABLE ─── */
.table-wrap {
  border: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 420px;
}

th {
  text-align: left;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  vertical-align: top;
}

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

tr:hover td {
  background: var(--bg-2);
  color: var(--fg);
}

td code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 1px 6px;
  color: var(--fg);
}

/* ─── CALLOUT ─── */
.callout {
  display: flex;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.6;
}

.callout svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--fg-3);
}

.inline-code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 1px 5px;
  color: var(--fg);
}

/* ─── FAQ ─── */
.faq-item {
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.faq-question {
  padding: 0.9rem 1.25rem;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  color: var(--fg);
  gap: 12px;
  transition: background 0.1s;
}

.faq-question:hover {
  background: var(--bg-2);
}

.faq-icon {
  flex-shrink: 0;
  color: var(--fg-3);
  transition: transform 0.18s;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-body {
  display: none;
  padding: 0 1.25rem 0.9rem;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

.faq-item.open .faq-body {
  display: block;
}

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg-3);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--fg-3);
  text-decoration: none;
  transition: color 0.1s;
}

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

/* ─── SIDEBAR OVERLAY (mobile) ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0, 0, 0, 0.25);
  z-index: 999;
}

.sidebar-overlay.visible {
  display: block;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .content-area {
    padding: 0 1.75rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 1rem;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-gh {
    display: none;
  }

  .hero {
    padding: 68px 1rem 56px;
  }

  h1 {
    font-size: 2.4rem;
    letter-spacing: -0.035em;
  }

  .hero-sub {
    max-width: 100%;
    font-size: 14px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .feature {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .feature:last-child {
    border-bottom: none;
  }

  .main-layout {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: -100%;
    width: 260px;
    z-index: 1000;
    transition: left 0.2s ease;
    height: calc(100vh - var(--header-h));
    border-right: 1px solid var(--border);
  }

  .sidebar.open {
    left: 0;
  }

  .content-area {
    max-width: 100%;
    padding: 0 1rem;
  }

  .formatters-grid {
    grid-template-columns: 1fr;
  }

  .formatter-card {
    border-right: none;
  }

  .formatter-card:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .formatter-card:last-child {
    border-bottom: none;
  }

  .footer {
    padding: 1.5rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-install {
    width: 100%;
    justify-content: space-between;
  }

  .setup-tab {
    padding: 8px 10px;
    font-size: 14px;
  }

  .content-area {
    padding: 0 0.75rem;
  }
}
