/* =============================================
   Credit Shield — Cloudflare Pages Landing Page
   ============================================= */

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #1a1a26;
  --border: #2a2a3a;
  --text: #e4e4ec;
  --text-dim: #8888a0;
  --accent: #6c5ce7;
  --accent-glow: rgba(108, 92, 231, 0.25);
  --green: #00e676;
  --red: #ff5252;
  --yellow: #ffd740;
  --radius: 12px;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Grid background */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
}

/* ============== Header ============== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shield {
  font-size: 28px;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

.btn-cta {
  background: var(--accent);
  color: white !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
  background: #7c6ff7;
  box-shadow: 0 0 24px var(--accent-glow);
}

/* ============== Hero ============== */
main {
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: 100px 24px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e4e4ec 0%, #a78bfa 50%, #6c5ce7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-sub strong {
  color: var(--text);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: #7c6ff7;
  box-shadow: 0 0 32px var(--accent-glow);
  transform: translateY(-1px);
}

.inline-cmd {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-card);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
}

/* ============== Counter strip ============== */
.counter-strip {
  display: flex;
  justify-content: center;
  gap: 64px;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.counter {
  text-align: center;
}

.counter-value {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.counter-label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ============== Sections ============== */
.section {
  padding: 80px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.section.dark {
  max-width: 100%;
  background: var(--bg-elevated);
}

.section.dark > * {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
  margin-top: 24px;
}

/* ============== Steps ============== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 48px;
}

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

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  margin-top: 2px;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-dim);
  font-size: 15px;
}

pre {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow-x: auto;
  color: var(--text);
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ============== Terminal window ============== */
.terminal-window {
  max-width: 600px;
  margin: 32px auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #1e1e2e;
  border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px;
  background: #0d0d14;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 2;
}

.terminal-body .prompt {
  color: var(--green);
  font-weight: 700;
  margin-right: 8px;
}

.terminal-body .dim {
  color: var(--text-dim);
}

.terminal-body .green {
  color: var(--green);
  font-weight: 600;
}

/* ============== How-it-works grid ============== */
.how-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.how-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.how-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.how-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

.how-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.how-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.how-card code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ============== CTA / Audience section ============== */
.cta-section {
  padding-top: 80px;
  padding-bottom: 80px;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.audience-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.audience-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.audience-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

/* ============== FAQ ============== */
.faq {
  padding-bottom: 100px;
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.faq details:hover {
  border-color: var(--accent);
}

.faq details[open] {
  border-color: var(--accent);
}

.faq summary {
  font-weight: 700;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--text-dim);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.faq details p {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

.faq details code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ============== Config table ============== */
.config-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 14px;
}

.config-table thead th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.config-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

.config-table tbody td:first-child { color: var(--text); font-weight: 600; }
.config-table tbody code { font-size: 12px; background: var(--bg); padding: 2px 6px; border-radius: 4px; }

/* ============== CLI grid ============== */
.cli-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.cli-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cli-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.cli-card h3 {
  margin-bottom: 10px;
}

.cli-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.cli-card code {
  font-size: 13px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============== Action grid ============== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.action-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

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

.action-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.action-card pre {
  font-size: 12px;
  padding: 12px 14px;
}

/* ============== Badge display ============== */
.badge-display {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.badge-display img {
  border-radius: 4px;
}

/* ============== Footer ============== */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 32px 32px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.footer-version {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 4px;
}

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

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.footer-bottom p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.footer-cred {
  margin-top: 4px;
}

.footer-cred a {
  color: var(--accent);
  text-decoration: none;
}

/* ============== Responsive ============== */
@media (max-width: 768px) {
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 16px; }
  .counter-strip { flex-direction: column; gap: 32px; align-items: center; }
  .counter-value { font-size: 28px; }
  .how-grid, .audience-grid, .cli-grid, .action-grid { grid-template-columns: 1fr; }
  .step { flex-direction: column; gap: 12px; }
  nav { gap: 12px; }
  nav a { font-size: 13px; }
}

@media (max-width: 480px) {
  header { padding: 12px 16px; }
  .hero { padding: 60px 16px 40px; }
  .hero h1 { font-size: 32px; }
  .section { padding: 48px 16px; }
  .section h2 { font-size: 26px; }
  .footer-top { flex-direction: column; gap: 16px; align-items: flex-start; }
}
