/* OpenBox — shared styles. Same palette family as samai.cc / zagent.samai.cc
   so the language switch feels seamless across SamAI properties. */

:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --accent-soft: #ecfeff;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --code-bg: #f1f5f9;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 24px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, 'Noto Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
code, pre {
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
}
code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  color: var(--accent-dark);
}
pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 18px 22px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
}
pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; }
pre .c { color: #64748b; font-style: italic; }
pre .k { color: #c084fc; }
pre .s { color: #86efac; }
pre .n { color: #fbbf24; }
pre .o { color: #f472b6; }

/* ===== Navigation ===== */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.nav-brand img { height: 32px; width: 32px; }
.nav-brand:hover { text-decoration: none; }
.nav-brand span { letter-spacing: -0.3px; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-links a.active { color: var(--primary); }
.nav-cta {
  background: var(--primary); color: white !important;
  padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 14px;
}
.nav-cta:hover { background: var(--primary-dark); text-decoration: none; }
.lang-switch {
  color: var(--text-muted); font-size: 14px; padding: 4px 10px;
  border-radius: 6px; border: 1px solid transparent;
}
.lang-switch:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; border-color: var(--border); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: white; padding: 16px 24px; border-bottom: 1px solid var(--border); gap: 14px; }
  .nav-links.open { display: flex; }
  .nav-toggle {
    display: inline-block; background: none; border: 1px solid var(--border);
    border-radius: 6px; padding: 6px 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 3px 0; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600; font-size: 15px;
  border: none; cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59,130,246,0.3); text-decoration: none; }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  padding: 80px 24px 100px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.08), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -150px; left: -150px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.07), transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 920px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px;
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 24px; font-weight: 500;
}
.hero-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.hero-badge strong { color: var(--success); font-weight: 700; }
.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.hero p.lead {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.55;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 48px; justify-content: center;
  margin-top: 64px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat .num {
  font-size: 32px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat .label { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ===== Sections ===== */
.section { max-width: 1200px; margin: 0 auto; padding: 88px 24px; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-soft .section { padding: 88px 24px; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
}
.section-header p { color: var(--text-secondary); font-size: 17px; max-width: 680px; margin: 0 auto; }

/* ===== Feature grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.2s;
}
.feature-card:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(59,130,246,0.08); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.55; }

/* ===== Format grid ===== */
.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.format-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  transition: all 0.2s;
}
.format-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(6,182,212,0.10); transform: translateY(-2px); }
.format-name { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.format-ops { display: flex; gap: 8px; justify-content: center; margin-top: 8px; font-size: 12px; }
.format-op { padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.format-op.compress { background: #dbeafe; color: #1d4ed8; }
.format-op.extract { background: #ecfeff; color: #0891b2; }
.format-op.no { background: #fef2f2; color: #b91c1c; }
.format-note { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ===== Screenshots ===== */
.screenshot-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.screenshot-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.screenshot-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.screenshot-card img, .screenshot-card svg { width: 100%; height: auto; display: block; background: #f1f5f9; }
.screenshot-card .caption {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}
.screenshot-card .caption strong { color: var(--text); display: block; margin-bottom: 2px; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: white; }
table th, table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table th { background: var(--bg-soft); font-weight: 700; color: var(--text); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
table tr:last-child td { border-bottom: none; }
table tr:hover { background: var(--bg-soft); }

/* ===== Download cards ===== */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.dl-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: all 0.2s;
}
.dl-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.dl-platform {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.dl-platform .icon { font-size: 28px; }
.dl-platform .name { font-size: 18px; font-weight: 700; }
.dl-platform .ver { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.dl-options { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.dl-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.dl-link:hover { background: white; border-color: var(--primary); text-decoration: none; color: var(--primary); }
.dl-link .name { font-weight: 600; }
.dl-link .meta { font-size: 12px; color: var(--text-muted); }
.dl-link .ext { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--text-muted); }

/* ===== Code blocks (install) ===== */
.install-block {
  background: #0f172a; border-radius: 12px; padding: 22px 26px;
  position: relative; margin: 18px 0;
}
.install-block pre { background: transparent; padding: 0; margin: 0; }
.install-block .copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.1); color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 10px; border-radius: 5px; font-size: 11px;
  cursor: pointer; font-family: inherit;
}
.install-block .copy-btn:hover { background: rgba(255,255,255,0.2); }

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 72px 24px;
  text-align: center;
  border-radius: 24px;
  margin: 60px auto;
  max-width: 1120px;
}
.cta h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-bottom: 14px; letter-spacing: -0.8px; }
.cta p { font-size: 17px; opacity: 0.92; max-width: 620px; margin: 0 auto 28px; }
.cta .btn-primary { background: white; color: var(--primary); }
.cta .btn-primary:hover { background: #f1f5f9; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.cta .btn-secondary { background: transparent; color: white; border-color: rgba(255,255,255,0.4); }
.cta .btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; color: white; }

/* ===== Footer ===== */
footer {
  background: #0f172a; color: #cbd5e1; padding: 56px 24px 28px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; font-size: 18px; color: white; }
.footer-brand img { height: 32px; }
.footer-col h4 { color: white; font-size: 14px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { display: block; color: #94a3b8; font-size: 14px; padding: 4px 0; }
.footer-col a:hover { color: white; text-decoration: none; }
.footer-meta { color: #64748b; font-size: 13px; line-height: 1.6; margin-top: 14px; }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0; padding-top: 22px;
  border-top: 1px solid #1e293b;
  text-align: center; color: #64748b; font-size: 13px;
}

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ===== Utility ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; } .mb-5 { margin-bottom: 40px; }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  text-transform: uppercase;
}
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: #d1fae5; color: #047857; }
.tag-amber { background: #fef3c7; color: #b45309; }
.tag-gray { background: #e2e8f0; color: #475569; }

/* Anchor links in sections with sticky nav */
section[id], div[id] { scroll-margin-top: 80px; }
