/* Quantum Gateway — Styles */

/* ---------- Root Variables ---------- */
:root {
  --primary: #3483FF;
  --primary-dark: #2a6cd9;
  --dark: #212529;
  --interactive: #007bff;
  --accent: #fb9678;
  --green: #28a745;
  --red: #dc2626;

  --text-primary: #333;
  --text-secondary: #555;
  --text-muted: #777;
  --bg-white: #ffffff;
  --bg-subtle: #f8f9fa;
  --border: #dee2e6;
  --border-focus: #007bff;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);

  /* Legacy aliases for existing markup */
  --navy: #3483FF;
  --navy-dark: #212529;
  --navy-light: #2a6cd9;
  --purple: #007bff;
  --gold: #fb9678;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-size: 16px;
}

body {
  background: var(--bg-white);
  color: var(--text-primary);
  font-family: 'Varta', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(52, 131, 255, 0.2);
  color: var(--text-primary);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 400;
}

h4, h5, h6 {
  font-family: 'Varta', system-ui, sans-serif;
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.375rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  max-width: 680px;
}

.text-center p { margin-left: auto; margin-right: auto; }

/* ---------- Skip to Content (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 2px 2px;
  z-index: 1000;
  font-size: 0.875rem;
}
.skip-link:focus {
  top: 0;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

.narrow-container {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 96px 0;
}

.section-gray {
  background: var(--bg-subtle);
}

.section-navy {
  background: var(--dark);
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
}

/* Grid helpers */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
  .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.pt-16 { padding-top: 4rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.site-nav.scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img {
  height: 32px;
}

.nav-logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.25rem 0;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

@media (max-width: 1024px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  z-index: 90;
  flex-direction: column;
  padding: 5rem 2rem 2rem;
  overflow-y: auto;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 1rem 0;
  font-size: 1.125rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  font-weight: 500;
}

.mobile-menu a:hover {
  color: var(--primary);
}

.menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0 2rem;
  height: 48px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

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

.btn-primary:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--primary);
  padding: 0 2rem;
  height: 48px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid var(--primary);
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

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

.btn-secondary:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 0 0.5rem;
  height: 48px;
  border: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-ghost:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

.btn-sm {
  height: 36px;
  padding: 0 1rem;
  font-size: 0.8125rem;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 24px;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-shadow {
  border: none;
  box-shadow: var(--shadow-sm);
}

.card-shadow:hover {
  box-shadow: var(--shadow-lg);
}

/* ---------- Feature Icons ---------- */
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.feature-icon-navy {
  background: rgba(52, 131, 255, 0.08);
  border-color: rgba(52, 131, 255, 0.15);
}

/* ---------- Hero Section ---------- */
.hero {
  padding-top: 160px;
  padding-bottom: 96px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 2px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: rgba(52, 131, 255, 0.06);
  color: var(--primary);
  border: 1px solid rgba(52, 131, 255, 0.12);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  margin-bottom: 1.5rem;
  max-width: 680px;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.social-proof-strip {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.social-proof-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.social-proof-item strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ---------- Inner Page Hero ---------- */
.page-hero {
  padding-top: 140px;
  padding-bottom: 64px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.125rem;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem 1rem;
}

.stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.section-navy .stat-number {
  color: #fff;
}

.section-navy .stat-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Trust Badges ---------- */
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 2px;
  background: var(--bg-white);
  border: 1px solid var(--border);
}

/* ---------- Testimonial Card ---------- */
.testimonial-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem;
}

.testimonial-card blockquote {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.testimonial-card .attribution {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.testimonial-card .attribution span {
  font-weight: 400;
  color: var(--text-muted);
}

/* ---------- How It Works ---------- */
.step-card {
  text-align: center;
  padding: 2rem;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 auto 1rem;
}

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Varta', system-ui, sans-serif;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ---------- Product Tabs ---------- */
.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
}

.product-tab {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Varta', system-ui, sans-serif;
}

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

.product-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.product-panel {
  display: none;
}

.product-panel.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .product-panel.active { grid-template-columns: 1fr; }
}

/* ---------- Code Blocks (Developers Page) ---------- */
.code-example {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.code-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-subtle);
}

.code-tab {
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Varta', system-ui, sans-serif;
}

.code-tab:hover {
  color: var(--text-secondary);
  background: rgba(0,0,0,0.02);
}

.code-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--bg-white);
}

.code-block-wrapper {
  position: relative;
  background: #1e1e2e;
  overflow: hidden;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

.code-block-wrapper code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 10;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.copy-btn.copied {
  color: var(--green);
  border-color: rgba(40, 167, 69, 0.3);
}

.tab-panel {
  display: none;
}

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

/* ---------- Response Block ---------- */
.response-block {
  background: #1e1e2e;
  border: 1px solid rgba(40, 167, 69, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.response-header {
  background: rgba(40, 167, 69, 0.1);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  border-bottom: 1px solid rgba(40, 167, 69, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Docs Sidebar ---------- */
.docs-sidebar {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
}

.sidebar-link {
  display: block;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

.sidebar-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(52, 131, 255, 0.05);
  font-weight: 500;
}

.sidebar-link.sub {
  padding-left: 1.75rem;
  font-size: 0.8rem;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 1rem 1rem 0.4rem;
}

/* ---------- Parameter Table ---------- */
.param-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.param-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.param-table td {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-secondary);
}

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

.param-table tbody tr:hover {
  background: var(--bg-subtle);
}

.param-name {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
  font-size: 0.8rem;
  background: rgba(52, 131, 255, 0.06);
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
}

.param-required {
  font-size: 0.65rem;
  color: var(--red);
  font-weight: 600;
  text-transform: uppercase;
}

.param-optional {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- HTTP Method Badges ---------- */
.method-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.method-post {
  background: rgba(40, 167, 69, 0.1);
  color: var(--green);
}

.method-get {
  background: rgba(52, 131, 255, 0.1);
  color: var(--primary);
}

/* ---------- Endpoint URL ---------- */
.endpoint-url {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.5rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
}

/* ---------- API Type Badge ---------- */
.api-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(52, 131, 255, 0.06);
  color: var(--primary);
  border: 1px solid rgba(52, 131, 255, 0.12);
}

/* ---------- Form Styles ---------- */
.form-input {
  width: 100%;
  height: 48px;
  background: var(--bg-white);
  border: 1px solid #d1d5db;
  border-radius: 2px;
  padding: 0 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: 'Varta', system-ui, sans-serif;
}

.form-input:focus {
  border-color: var(--interactive);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  height: auto;
  min-height: 120px;
  padding: 0.75rem 1rem;
  resize: vertical;
}

select.form-input {
  appearance: auto;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

/* ---------- Inline Code ---------- */
code:not([class*="language-"]) {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  color: var(--primary);
}

/* ---------- Platform Card (Modules) ---------- */
.platform-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s;
}

.platform-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(52, 131, 255, 0.2);
}

.platform-card a { color: inherit; text-decoration: none; }

/* ---------- Module Accordion ---------- */
.module-toggle {
  position: relative;
  cursor: pointer;
}

.module-toggle.active {
  border-color: var(--primary) !important;
  background: rgba(52, 131, 255, 0.04) !important;
  box-shadow: 0 0 0 2px rgba(52, 131, 255, 0.1);
}

.toggle-hint {
  color: var(--primary);
  transition: transform 0.3s ease;
}

.module-toggle.active .toggle-hint {
  transform: rotate(180deg);
}

.module-detail {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-white);
}

.module-detail img {
  border-radius: 2px;
  border: 1px solid var(--border);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  padding: 80px 0 40px;
  color: rgba(255,255,255,0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

.site-footer h4 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  padding: 0.25rem 0;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-bottom-left img {
  height: 24px;
  opacity: 0.6;
}

.footer-bottom-left span,
.footer-bottom-right {
  color: rgba(255,255,255,0.4);
  font-size: 0.8125rem;
}

/* ---------- Credentials Modal (Developers Page) ---------- */
.creds-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 80;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-lg);
  transition: background 0.2s;
}

.creds-fab:hover {
  background: var(--primary-dark);
}

.creds-fab.personalized {
  background: var(--green);
}

.creds-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 90;
}

.creds-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.creds-modal {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.creds-modal h3 {
  font-family: 'Varta', system-ui, sans-serif;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.creds-modal .field-group {
  margin-bottom: 1rem;
}

.creds-modal label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.creds-modal label .field-vars {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--primary);
  opacity: 0.7;
}

.creds-modal input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.6rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: border-color 0.2s;
}

.creds-modal input:focus {
  border-color: var(--interactive);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.creds-modal input::placeholder {
  color: var(--text-muted);
}

.cred-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cred-actions button {
  flex: 1;
  padding: 0.6rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.cred-save {
  background: var(--primary);
  color: #fff;
}

.cred-save:hover {
  background: var(--primary-dark);
}

.cred-clear {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border) !important;
}

.cred-clear:hover {
  background: var(--border);
  color: var(--text-primary);
}

.cred-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.cred-close:hover {
  color: var(--text-primary);
}

.cred-status {
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.cred-status.active {
  background: rgba(40, 167, 69, 0.1);
  color: var(--green);
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.cred-status.inactive {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.cred-value { transition: color 0.3s; }
.cred-value.set { color: #34d399 !important; }
.cred-value.placeholder { color: #6b7280 !important; font-style: italic; }

/* ---------- Glass card (legacy compat) ---------- */
.glass-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: box-shadow 0.2s ease;
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
}

.glass {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
}

/* ---------- Glow line (legacy compat) ---------- */
.glow-line {
  height: 1px;
  background: var(--border);
}

/* ---------- Code Preview (Homepage) ---------- */
.code-preview {
  background: #1a1a2e;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid #2d2d44;
}

.code-preview-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #151525;
  border-bottom: 1px solid #2d2d44;
}

.code-preview-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-preview pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
  background: none;
}

.code-preview code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #f1f5f9;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

.code-preview-header span {
  color: #9ca3af;
}

.code-preview code span {
  background: none !important;
  border: none !important;
}

/* ---------- Prism Overrides ---------- */
pre[class*="language-"],
code[class*="language-"] {
  text-shadow: none !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
  font-size: 0.82rem !important;
}

pre[class*="language-"] {
  background: transparent !important;
  margin: 0 !important;
  padding: 1.5rem !important;
}

.token.comment { color: #6b7280 !important; }
.token.string { color: #a5f3fc !important; }
.token.keyword { color: #c084fc !important; }
.token.function { color: #60a5fa !important; }
.token.number { color: #fbbf24 !important; }
.token.operator { color: #94a3b8 !important; }
.token.class-name { color: #4ade80 !important; }
.token.property { color: #67e8f9 !important; }
.token.punctuation { color: #94a3b8 !important; }
.token.variable { color: #f9a8d4 !important; }

/* ---------- Alert Boxes ---------- */
.alert-info {
  background: rgba(52, 131, 255, 0.04);
  border: 1px solid rgba(52, 131, 255, 0.12);
  border-left: 4px solid var(--primary);
  border-radius: 2px;
  padding: 1rem 1.25rem;
}

.alert-warning {
  background: rgba(251, 150, 120, 0.06);
  border: 1px solid rgba(251, 150, 120, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 2px;
  padding: 1rem 1.25rem;
}

.alert-success {
  background: rgba(40, 167, 69, 0.06);
  border: 1px solid rgba(40, 167, 69, 0.15);
  border-radius: 2px;
  padding: 1rem 1.25rem;
}

.alert-error {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 2px;
  padding: 0.75rem 1rem;
}

/* ---------- Scrollbar ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

*::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

/* ---------- Responsive helpers ---------- */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:flex-row { flex-direction: row; }
  .sm\:inline { display: inline; }
}

@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
  .lg\:flex { display: flex; }
  .lg\:col-span-2 { grid-column: span 2; }
}

@media (min-width: 1280px) {
  .xl\:block { display: block; }
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Status Dot ---------- */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

/* ---------- Print styles ---------- */
/* Iconoir icon defaults */
[class^="iconoir-"], [class*=" iconoir-"] {
  display: inline-flex;
  vertical-align: middle;
  line-height: 1;
}
.icon-inline { font-size: 1.25rem; margin-right: 0.375rem; }
.icon-card   { font-size: 1.5rem;  margin-right: 0.5rem; }
.icon-feature { font-size: 2rem; display: block; margin-bottom: 0.75rem; color: var(--text-secondary); }
.icon-check  { font-size: 1.125rem; color: var(--green); flex-shrink: 0; margin-top: 2px; }

@media print {
  .site-nav, .site-footer, .creds-fab, .mobile-menu { display: none; }
  .section { padding: 2rem 0; }
  body { color: #000; background: #fff; }
}
