/* FrontBooker Developer Portal — Black & Gold Visual Identity
   developers.frontbooker.com

   Background: pure black AMOLED #000000
   Text: white / off-white (#ffffff, #e2e8f0 muted)
   Accents: gold/bronze ONLY (#d4a373 -> lighter hover)
   Headings: serif
   Body: sans-serif
   Glass-black secondary surfaces, subtle rgba(255,255,255,0.08) borders
   NO turquoise, NO blue/cyan, NO shiny gradients, NO oversized illustrations
*/

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #141414;
  --surface-3: #1a1a1a;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  --text-faint: #94a3b8;
  --accent: #d4a373;
  --accent-hover: #e6c28c;
  --accent-soft: rgba(212, 163, 115, 0.12);
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --font-serif: "Playfair Display", Georgia, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 70px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Links */
a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}

a.underline {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent);
}

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

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h1,
.section-header h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Typography helpers */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--text-main);
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 24px 0 12px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 20px 0 10px;
}

p {
  color: var(--text-muted);
  margin: 0 0 16px;
}

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

.highlight {
  color: var(--accent);
}

/* ===== Top Navigation ===== */
.site-header {
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: padding 0.3s ease, font-size 0.3s ease, border-color 0.3s ease;
}

.site-header.shrunk {
  padding: 8px 0;
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  transition: height 0.3s ease;
}

.site-header.shrunk .header-inner {
  height: 44px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
  font-family: var(--font-serif);
  transition: font-size 0.3s ease;
}

.site-header.shrunk .brand {
  font-size: 1rem;
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.brand-name {
  letter-spacing: -0.01em;
}

.brand-accent {
  color: var(--accent);
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(212, 163, 115, 0.12);
}

.nav-link.nav-download {
  font-size: 0.75rem;
  padding: 4px 10px;
}

.nav-link.nav-api {
  font-size: 0.75rem;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  margin: 4.5px 0;
  transition: all 0.3s;
  border-radius: 2px;
}

/* Sign-in / Get API access (far right) — on pages that include them */
.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: 16px;
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #000000;
}

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

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

.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
  color: var(--text-main);
}

/* ===== Features ===== */
.features {
  padding: 80px 0;
  background: var(--surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Quickstart / Code blocks ===== */
.quickstart {
  padding: 80px 0;
  background: var(--surface);
}

.quickstart-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #000000;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.step-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
  position: relative;
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0;
}

.code-block code {
  color: var(--text-main);
}

/* ===== CTA ===== */
.cta {
  padding: 80px 0;
  background: var(--surface-2);
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

.cta-content p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 1.1rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}

.footer-brand .brand-name {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-main);
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

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

.footer-legal p {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.footer-disclaimer {
  margin-top: 8px;
  font-style: italic;
  color: var(--text-faint);
}

/* ===== Three-column docs layout (API reference, widgets, etc.) ===== */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  gap: 32px;
  align-items: start;
  margin-top: 32px;
}

.docs-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.docs-sidebar h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.docs-sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-sidebar a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.docs-sidebar a:hover {
  background: var(--surface-2);
  color: var(--accent);
  border-color: var(--border-hover);
}

.docs-sidebar a.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.docs-content {
  padding-right: 16px;
}

.docs-api-panel {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.docs-api-panel .panel-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  height: fit-content;
}

.docs-api-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 12px;
}

.docs-api-panel p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.docs-api-panel .btn {
  width: 100%;
  justify-content: center;
}

/* Doc sections (used by widgets/auth/integrations/errors) */
.doc-section {
  margin-bottom: 32px;
}

.doc-section h2 {
  font-size: 1.35rem;
}

.doc-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Tables */
.endpoint-list table,
.doc-section table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.endpoint-list th,
.endpoint-list td,
.doc-section th,
.doc-section td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.endpoint-list th,
.doc-section th {
  background: var(--surface);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.endpoint-list tr:last-child td,
.doc-section tr:last-child td {
  border-bottom: none;
}

.method {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000000;
}

.method.get { background: var(--accent); }
.method.post { background: #94a3b8; }
.method.put { background: #c4b5a0; }
.method.patch { background: #d4a373; }
.method.delete { background: #94a3b8; }

.api-note {
  margin-top: 32px;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.api-note h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.api-note p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .docs-sidebar,
  .docs-api-panel {
    position: static;
    top: auto;
  }

  .docs-api-panel {
    order: -1;
  }
}

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

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

  .hero-actions .btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    right: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    flex-direction: column;
    gap: 0;
    min-width: 200px;
    z-index: 60;
    box-shadow: var(--shadow);
  }

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

  .header-nav .nav-link {
    display: block;
    padding: 10px 14px;
    width: 100%;
    border-radius: 6px;
    white-space: normal;
  }

  .header-nav .nav-link:hover {
    background: var(--surface-2);
    color: var(--accent);
  }

  .nav-actions {
    display: none;
  }

  .footer-inner {
    gap: 24px;
  }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  z-index: 1000;
}

.skip-link:focus {
  top: 16px;
  left: 16px;
}
