:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #0d9488;
  --accent-soft: #f0fdfa;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --warn-bg: #fffbeb;
  --warn-border: #fcd34d;
  --warn-text: #92400e;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --max-w: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

code,
pre,
.mono {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}

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

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 16px;
}

/* Hero */
.hero {
  padding: 72px 0 64px;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 16px;
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-integrations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-light);
}

.chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
}

/* Code Window */
.code-window {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid #1e293b;
}

.code-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1e293b;
  font-size: 12px;
  color: #94a3b8;
}

.code-window pre {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
  overflow-x: auto;
}

/* Sections */
.section {
  padding: 68px 0;
}

.section-subtle {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}

.section-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 12px;
  font-weight: 800;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.endpoint-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 12px;
}

/* Tabs & Snippets */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
}

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

.copy-btn {
  background: #334155;
  color: #f8fafc;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.copy-btn:hover {
  background: #475569;
}

/* Pricing */
.pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-md);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.price {
  font-size: 34px;
  font-weight: 800;
  margin: 12px 0 6px;
}

.price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.feature-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}

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

/* Playground */
.playground-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
}

textarea.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

/* Notice / Warning */
.notice-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Legal prose */
.prose {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.prose h1 {
  font-size: 28px;
  margin: 0 0 8px;
}

.prose .updated {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 32px;
}

.prose h2 {
  font-size: 19px;
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 28px;
  font-size: 14px;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  width: 28%;
  background: var(--bg-subtle);
  font-weight: 700;
}

.placeholder-tag {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
}

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-md);
}

/* Footer */
.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
}

.usecase-flow {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.sandbox-preview {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.sandbox-preview svg,
.sandbox-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}

@media (max-width: 860px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .form-row {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}
