/* === AixSafe Design System — Dark Theme === */

:root {
  --color-bg: #000000;
  --color-bg-alt: #0a0a0a;
  --color-bg-card: #111111;
  --color-bg-elevated: #1a1a1a;
  --color-text: #ffffff;
  --color-text-muted: #a1a1aa;
  --color-text-dim: #71717a;
  --color-primary: #1a56db;
  --color-primary-hover: #1443b0;
  --color-border: #222222;
  --color-border-light: #2a2a2a;
  --color-accent: #1a56db;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --radius: 8px;
}

/* === Reset === */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; display: block; }

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

/* === Typography === */

h1, h2, h3, h4 {
  line-height: 1.15;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: 3.5rem; letter-spacing: -0.03em; }
h2 { font-size: 2.5rem; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { color: var(--color-text-muted); }
.hero p { max-width: 640px; }
.section-header p { max-width: 900px; }

/* === Section Label (eyebrow) === */

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: 12px;
}

/* === Layout === */

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

section { padding: 88px 0; }
section.alt { background: var(--color-bg-alt); }

/* === Header === */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.logo span { color: var(--color-accent); }

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

nav a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.15s;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-text);
}

/* === Buttons === */

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}

.btn-primary { background: var(--color-primary); color: #ffffff; }
.btn-primary:hover { background: var(--color-primary-hover); color: #ffffff; text-decoration: none; }

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

.btn-outline:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text);
  text-decoration: none;
}

/* === Hero === */

.hero { padding: 120px 0 100px; text-align: center; }
.hero h1 { max-width: 800px; margin: 0 auto 24px; }
.hero p { font-size: 1.15rem; margin: 0 auto 44px; color: var(--color-text-muted); }

.cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Section Header === */

.section-header { text-align: center; margin-bottom: 56px; }
.section-header p { margin: 14px auto 0; font-size: 1.1rem; }

/* === Grid === */

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

/* === Cards === */

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(26, 86, 219, 0.05), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.95rem; color: var(--color-text-muted); }

.card .card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(26, 86, 219, 0.12);
  color: var(--color-accent);
  margin-bottom: 16px;
}

.card .card-icon svg { width: 22px; height: 22px; }

/* === clickable-card === */
.clickable-card { cursor: pointer; }

/* === Compliance Banner === */

.compliance-banner {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px;
}

.compliance-banner h3 { margin-bottom: 14px; }

.compliance-banner ul { list-style: none; padding: 0; }

.compliance-banner li {
  padding: 6px 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.compliance-banner li::before {
  content: "—";
  color: var(--color-accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* === CTA Section === */

.cta-section {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  padding: 88px 0;
}

.cta-section h2 { color: var(--color-text); margin-bottom: 16px; }
.cta-section p { color: var(--color-text-muted); margin: 0 auto 32px; max-width: 560px; }

/* === Forms === */

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  background: var(--color-bg-card);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--color-primary); }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--color-text-dim); }

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* === Footer === */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 56px 0 32px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col a {
  display: block;
  color: var(--color-text-dim);
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color 0.15s;
}

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

.footer-inner {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-inner p { font-size: 0.85rem; color: var(--color-text-dim); }
.footer-note {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  max-width: 600px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.8;
}

/* === Page Header === */

.page-header {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 { margin-bottom: 14px; font-size: 2.75rem; }
.page-header p { font-size: 1.15rem; color: var(--color-text-muted); max-width: 600px; }

/* === Content Sections === */

.content-block { margin-bottom: 48px; }
.content-block:last-child { margin-bottom: 0; }
.content-block h2 { margin-bottom: 16px; font-size: 1.75rem; }
.content-block h3 { margin-bottom: 10px; }
.content-block p { margin-bottom: 12px; }

.content-block ul { list-style: none; padding: 0; margin-top: 16px; }
.content-block li {
  padding: 6px 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.content-block li::before {
  content: "—";
  color: var(--color-accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* === Lifecycle Steps === */

.lifecycle { display: grid; grid-template-columns: 1fr; }

.lifecycle-step {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
}

.lifecycle-step:last-child { border-bottom: none; }

.lifecycle-step .step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.lifecycle-step h3 { margin-bottom: 6px; }

/* === FAQ Items === */

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: border-color 0.2s;
}

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

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  list-style: none;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; content: ''; }

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--color-text-dim);
  transition: transform 0.2s;
}

details[open] .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  padding: 0 24px 20px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* === Guide Cards === */

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

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

.guide-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.1);
}

.guide-card h3 { margin-bottom: 8px; }
.guide-card h3 a { color: var(--color-text); }
.guide-card h3 a:hover { color: var(--color-primary); }
.guide-card .guide-meta { font-size: 0.85rem; color: var(--color-text-dim); margin-bottom: 12px; }
.guide-card p { font-size: 0.95rem; margin-bottom: 16px; }

.guide-tag {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-text-dim);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === Contact === */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 { margin-bottom: 8px; margin-top: 32px; font-size: 1rem; }
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { font-size: 0.9rem; margin-bottom: 6px; }
.contact-info a.email-link {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--color-accent);
}

/* === Feature Rows === */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--color-border);
}

.feature-row:last-child { border-bottom: none; }
.feature-row.reverse > *:first-child { order: 2; }
.feature-row.reverse > *:last-child { order: 1; }

.code-block {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.code-block-header {
  background: var(--color-bg-elevated);
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-dim);
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-block-dots { display: flex; gap: 6px; }
.code-block-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-light);
}

.code-block-body {
  padding: 24px;
  color: #4ade80;
  line-height: 1.8;
}

/* === Scorecard === */

.scorecard {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
}

.scorecard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.scorecard-row:last-child { border-bottom: none; }
.scorecard-row .label { color: var(--color-text-muted); }
.scorecard-row .value { color: var(--color-accent); font-weight: 700; font-family: var(--font-mono); }

/* === Responsive === */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-columns { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.reverse > *:first-child { order: 0; }
  .feature-row.reverse > *:last-child { order: 0; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  section { padding: 56px 0; }
  .hero { padding: 72px 0 56px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .guide-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 2rem; }

  nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    align-items: flex-start;
  }

  nav.open { display: flex; }
  .mobile-toggle { display: block; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  .footer-columns { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}
