/* L402 Gateway — Design System */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-code: #1a1f2b;
  --border: #30363d;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --accent: #f7931a;
  --accent-hover: #ffad33;
  --link: #58a6ff;
  --success: #3fb950;
  --danger: #f85149;
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1100px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', 'Fira Code', Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section:nth-child(even) { background: var(--bg-card); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(13,17,23,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { font-size: 1.25rem; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 0.5rem; }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta { background: var(--accent); color: #000 !important; font-weight: 600; padding: 0.5rem 1.25rem; border-radius: var(--radius-sm); transition: background 0.2s; }
.nav-cta:hover { background: var(--accent-hover); }
.lang-switch { font-size: 0.8rem; color: var(--text-muted); cursor: pointer; border: 1px solid var(--border); padding: 4px 8px; border-radius: 4px; background: transparent; }

/* Hero */
.hero { padding: 6rem 0 4rem; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 1rem; background: linear-gradient(135deg, #f7931a 0%, #ffcd00 50%, #f7931a 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 2rem; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; }
.step { text-align: center; padding: 2rem 1.5rem; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #000; font-weight: 800; font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* Code block */
.code-section { text-align: center; }
.code-block { background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: left; max-width: 650px; margin: 2rem auto 0; position: relative; overflow-x: auto; }
.code-block pre { font-family: var(--mono); font-size: 0.85rem; line-height: 1.7; color: #e6edf3; white-space: pre; }
.code-block .copy-btn { position: absolute; top: 0.75rem; right: 0.75rem; background: var(--border); color: var(--text-muted); border: none; padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; cursor: pointer; }
.code-block .copy-btn:hover { background: var(--text-muted); color: var(--bg); }
.tag { color: #7ee787; }
.attr { color: #d2a8ff; }
.val { color: #a5d6ff; }
.comment { color: var(--text-muted); }

/* Features grid */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.feature { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; transition: border-color 0.2s; }
.feature:hover { border-color: var(--accent); }
.feature-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature p { color: var(--text-muted); font-size: 0.9rem; }

/* Pricing */
.pricing-card { background: var(--bg); border: 2px solid var(--accent); border-radius: var(--radius); padding: 3rem; text-align: center; max-width: 450px; margin: 2rem auto 0; }
.pricing-card .price { font-size: 3rem; font-weight: 800; color: var(--accent); }
.pricing-card .price-sub { color: var(--text-muted); margin-bottom: 1.5rem; }
.pricing-card ul { list-style: none; text-align: left; margin-bottom: 2rem; }
.pricing-card li { padding: 0.4rem 0; }
.pricing-card li::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* FAQ */
.faq { max-width: 700px; margin: 2rem auto 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.faq-q { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-q::after { content: '+'; font-size: 1.25rem; color: var(--text-muted); transition: transform 0.2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s, padding 0.3s; color: var(--text-muted); font-size: 0.95rem; }
.faq-item.open .faq-a { max-height: 200px; padding-top: 0.75rem; }

/* Auth section */
.auth-methods { display: flex; flex-direction: column; gap: 0.75rem; max-width: 400px; margin: 0 auto; }
.auth-btn { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font-size: 0.95rem; cursor: pointer; transition: border-color 0.2s; width: 100%; }
.auth-btn:hover { border-color: var(--accent); }
.auth-btn img, .auth-btn svg { width: 20px; height: 20px; }

/* Footer */
.footer { padding: 3rem 0; border-top: 1px solid var(--border); }
.footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-copy { color: var(--text-muted); font-size: 0.85rem; }

/* Section headings */
.section-title { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.section-subtitle { text-align: center; color: var(--text-muted); max-width: 550px; margin: 0 auto; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 3rem 0 2rem; }
  .section { padding: 3rem 0; }
  .features { grid-template-columns: 1fr; }
  .footer .container { flex-direction: column; text-align: center; }
}
