/* ngrok design tokens — fonts */
@font-face {
  font-family: 'Roobert';
  src: url('https://assets.ngrok.com/fonts/roobert/roobert-proportional-vf.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('https://assets.ngrok.com/fonts/jetbrains/jetbrainsmono-wght.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

/* Glow CTA rotating border */
@property --degree {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes rotate {
  0%  { --degree: 0deg; }
  to  { --degree: 360deg; }
}

:root {
  /* backgrounds */
  --bg-base: #1a1a1a;
  --bg-card: #262626;
  --bg-code: #1f1f1f;

  /* borders */
  --border: #363636;
  --border-muted: #525252;

  /* text */
  --text-body: rgba(255,255,255,0.7);
  --text-strong: #ffffff;
  --text-muted: #808080;
  --text-placeholder: rgba(255,255,255,0.4);

  /* accent */
  --accent: #4d94ff;
  --accent-light: #7cb3ff;

  /* radii */
  --radius-xl: 0.75rem;
  --radius-full: 9999rem;

  /* fonts */
  --font-sans: 'Roobert', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-base);
  scroll-behavior: smooth;
}

/* ---- Layout ---- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- Header / Nav ---- */

header {
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-strong);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-strong);
}

/* ---- Hero ---- */

.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  background: var(--bg-base);
  color: var(--text-strong);
  margin-bottom: 0;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--text-strong);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
}

.hero .tagline {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--accent-light);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Sections ---- */

.section {
  padding: 3rem 0;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section h3 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-body);
  font-weight: 600;
}

/* ---- Code ---- */

code {
  background: var(--bg-code);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--accent-light);
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-code);
  color: rgba(255,255,255,0.85);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

pre code {
  color: inherit;
  background: none;
  padding: 0;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 400;
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--text-strong);
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
  position: relative;
}

.btn:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Glow effect on primary CTA */
.btn.glow {
  position: relative;
  z-index: 0;
}

.btn.glow::after {
  content: "";
  z-index: -1;
  background-image: conic-gradient(from var(--degree), #fcd34d, #bef264, #6ee7b7, #7dd3fc, #d8b4fe, #fda4af, #fcd34d);
  filter: blur(8px);
  opacity: 0.4;
  border-radius: var(--radius-full);
  animation: 3s linear infinite rotate;
  position: absolute;
  inset: -1px;
}

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

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-muted);
}

/* ---- Tabs ---- */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.tab {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
  color: var(--text-body);
}

.tab.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ---- Feature grid ---- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
}

.feature-card h3 {
  color: var(--text-strong);
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  display: inline-block;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent-light);
}

/* ---- Cards ---- */

.card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-xl);
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.card h4 {
  color: var(--text-strong);
  margin-top: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.card-note {
  margin-top: 1rem;
}

/* ---- Tables ---- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

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

th {
  background: var(--bg-base);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

/* ---- Architecture flow ---- */

.arch-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.arch-step {
  background: var(--bg-base);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  color: var(--text-body);
  text-align: center;
  font-size: 0.95rem;
}

.arch-step span {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.arch-arrow {
  color: var(--accent-light);
  font-size: 0.8rem;
  padding: 0.4rem 0;
  font-weight: 500;
}

.arch-arrow::before {
  content: '↓';
  display: block;
  font-size: 1.2rem;
  line-height: 1;
}

/* ---- Footer ---- */

footer {
  background: var(--bg-card);
  color: var(--text-muted);
  text-align: center;
  padding: 3rem 0;
  margin-top: 5rem;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--text-strong);
}

.footer-links {
  margin-top: 0.5rem;
}

/* ---- Badge ---- */

.version-badge {
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent);
  color: var(--text-strong);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  vertical-align: middle;
  letter-spacing: 0;
}

/* ---- Typography defaults ---- */

p {
  color: var(--text-muted);
  line-height: 1.7;
}

a {
  color: var(--accent-light);
}

strong {
  color: var(--text-body);
}

ul {
  margin-left: 1.5rem;
  color: var(--text-muted);
}

ul li {
  margin-bottom: 0.25rem;
}

ol {
  margin-left: 1.5rem;
  color: var(--text-muted);
}

ol li {
  margin-bottom: 0.25rem;
}

/* ---- Mobile menu ---- */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-body);
  cursor: pointer;
  padding: 0.5rem;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0.5rem;
  }

  .nav-links.open {
    display: flex;
  }

  .tabs {
    overflow-x: auto;
  }

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

  .arch-flow {
    padding: 1rem;
  }
}
