:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-primary-start: #0a8754;
  --color-primary-end: #84cc16;
  --color-accent: #0d9488;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-border: #e2e8f0;
  --color-highlight: #f0fdf4;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Fira Code", Consolas, "Liberation Mono", monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.1);
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Typography & Fluid Scale */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--color-text-main); text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw + 0.5rem, 3.25rem); letter-spacing: -0.02em; margin-bottom: var(--spacing-sm); }
h2 { font-size: clamp(1.5rem, 3vw + 0.25rem, 2.25rem); margin-bottom: var(--spacing-md); position: relative; }
h3 { font-size: clamp(1.15rem, 2vw + 0.1rem, 1.35rem); margin-bottom: var(--spacing-xs); }
p { margin-bottom: var(--spacing-sm); color: var(--color-text-muted); font-size: 1rem; }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; color: var(--color-accent); }
strong { font-weight: 600; color: var(--color-text-main); }

/* Layout Utilities */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--spacing-sm); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--spacing-md); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--spacing-md); }
.section { padding: var(--spacing-xl) 0; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--spacing-lg); }

/* Header & Navigation */
header { background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--spacing-xs); text-decoration: none; color: var(--color-text-main); font-weight: 700; }
.brand img { height: 32px; width: auto; object-fit: contain; }
nav ul { display: flex; list-style: none; gap: var(--spacing-md); }
nav a { text-decoration: none; color: var(--color-text-muted); font-weight: 500; padding: 0.5rem 0; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-primary-start); border-color: var(--color-primary-start); }
nav a[aria-current="page"] { font-weight: 600; }

/* Hero Section */
.hero { padding: var(--spacing-xl) 0; background: linear-gradient(135deg, #f0fdf4 0%, #ecfccb 100%); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); align-items: center; }
.hero-content { max-width: 560px; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--color-text-muted); margin-bottom: var(--spacing-md); }
.hero-actions { display: flex; gap: var(--spacing-sm); flex-wrap: wrap; margin-top: var(--spacing-md); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--spacing-xs);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; text-decoration: none;
  cursor: pointer; border: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  font-size: 1rem;
}
.btn-primary { background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end)); color: #fff; box-shadow: 0 4px 12px rgba(10, 135, 84, 0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(10, 135, 84, 0.35); }
.btn-secondary { background: var(--color-surface); color: var(--color-text-main); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-highlight); border-color: var(--color-primary-start); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; border-radius: var(--radius-sm); }

/* Cards */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--spacing-md); box-shadow: var(--shadow-card); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--spacing-xs); display: flex; justify-content: space-between; }
.card-title { font-weight: 600; margin-bottom: var(--spacing-xs); line-height: 1.35; }
.card-desc { font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: var(--spacing-sm); }
.card-link { color: var(--color-primary-start); text-decoration: none; font-weight: 500; font-size: 0.9rem; }
.card-link:hover { text-decoration: underline; }

/* Lists & Markers (No Emojis/Bullets) */
ul.styled-list, ol.styled-list { list-style: none; padding-left: 0; counter-reset: item; }
ul.styled-list li { position: relative; padding-left: 1.5rem; margin-bottom: var(--spacing-xs); }
ul.styled-list li::before { content: ""; position: absolute; left: 0; top: 0.55rem; width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary-start); }
ol.styled-list { padding-left: 0; margin-bottom: var(--spacing-md); }
ol.styled-list li { position: relative; padding-left: 2rem; margin-bottom: var(--spacing-xs); counter-increment: item; }
ol.styled-list li::before { content: counter(item); position: absolute; left: 0; top: 0; width: 1.4rem; height: 1.4rem; background: var(--color-highlight); color: var(--color-primary-start); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; font-family: var(--font-mono); }

/* Tables */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--spacing-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-highlight); font-weight: 600; color: var(--color-text-main); }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }

/* FAQ / Details */
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--spacing-sm); overflow: hidden; }
summary { padding: 1rem; cursor: pointer; font-weight: 600; color: var(--color-text-main); list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.25rem; color: var(--color-primary-start); font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { content: "-"; }
details p { padding: 0 1rem 1rem; margin: 0; font-size: 0.95rem; }
details:focus-within { outline: 2px solid var(--color-primary-start); outline-offset: 2px; }

/* SVG & Animation */
.svg-container { width: 100%; max-width: 100%; overflow: hidden; }
svg { width: 100%; height: auto; display: block; }
.flow-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes flowDash { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.animate-flow { animation: flowDash 4s ease-in-out infinite alternate; }
.dot-flow { animation: dotPulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes dotPulse { 0%, 100% { opacity: 0.3; r: 3; } 50% { opacity: 1; r: 5; } }
.flow-line { animation: lineDraw 5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes lineDraw { from { stroke-dashoffset: 1; stroke-opacity: 0.2; } to { stroke-dashoffset: 0; stroke-opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; animation-name: none !important; }
}

/* Footer */
footer { background: var(--color-text-main); color: #cbd5e1; padding: var(--spacing-lg) 0 var(--spacing-md); margin-top: var(--spacing-xl); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.footer-col h4 { color: #fff; margin-bottom: var(--spacing-sm); font-size: 1rem; }
.footer-col a { color: #94a3b8; text-decoration: none; display: block; margin-bottom: 0.5rem; font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #334155; padding-top: var(--spacing-md); text-align: center; font-size: 0.85rem; color: #64748b; }

/* Responsive */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  nav ul { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: var(--spacing-lg) 0; }
}

/* Page-specific tweaks */
.download-box { background: linear-gradient(135deg, #f0fdf4, #ecfccb); border: 2px dashed var(--color-primary-start); border-radius: var(--radius-lg); padding: var(--spacing-lg); margin-top: var(--spacing-md); text-align: center; }
.feature-icon { width: 40px; height: 40px; margin-bottom: var(--spacing-xs); stroke: var(--color-primary-start); fill: none; stroke-width: 1.5; }
.mockup-frame { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden; }
.mockup-header { background: #f1f5f9; padding: 0.75rem; border-bottom: 1px solid var(--color-border); display: flex; gap: 0.5rem; }
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.mockup-body { padding: var(--spacing-md); display: flex; gap: var(--spacing-md); }
.mockup-sidebar { width: 30%; background: #f8fafc; border-right: 1px solid var(--color-border); padding: var(--spacing-sm); }
.mockup-chat { width: 70%; display: flex; flex-direction: column; gap: var(--spacing-xs); }
.chat-bubble { max-width: 80%; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.85rem; }
.bubble-in { background: #f1f5f9; align-self: flex-start; }
.bubble-out { background: var(--color-highlight); color: var(--color-primary-start); align-self: flex-end; }
.encryption-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; color: var(--color-accent); background: #f0fdf4; padding: 0.2rem 0.5rem; border-radius: 20px; margin-top: 0.5rem; }
