/* ============================================================
   ACARMAN — shared stylesheet
   Included on every HTML page via <link href="/assets/css/all.css">
   ============================================================ */

/* ---------- 1. Variables ---------- */
:root {
  --bg: #fafafa;
  --bg-alt: #ffffff;
  --text: #111827;
  --text-light: #4b5563;
  --text-muted: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #eff6ff;
  --border: #e5e7eb;
  --card-bg: #ffffff;
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
  --footer-muted: #64748b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sc: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --section-padding: 48px;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --text: #f1f5f9;
    --text-light: #cbd5e1;
    --text-muted: #64748b;
    --accent: #60a5fa;
    --accent-hover: #93bbfd;
    --accent-light: #1e3a5f;
    --border: #334155;
    --card-bg: #1e293b;
    --footer-bg: #020617;
    --footer-text: #94a3b8;
    --header-bg: rgba(15,23,42,0.88);
  }
}

/* ---------- 2. Reset & base ---------- */
*, *::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.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

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

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

/* ---------- 4. Header ---------- */
.site-header,
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,250,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.site-header.scrolled,
.header.scrolled {
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  .site-header,
  .header { background: var(--header-bg); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}



.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.nav-link::after { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

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

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}

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

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
}

/* ---------- 6. Language switch ---------- */
.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lang-btn {
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: inherit;
}

.lang-btn.active {
  background: var(--accent);
  color: #ffffff;
}

.lang-btn:not(.active):hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ---------- 7. Hero ---------- */
.hero {
  padding: var(--section-padding) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--accent-light) 0%, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .hero::before { opacity: 0.25; }
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  position: relative;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 12px;
  }
  .hero p {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  .hero-stats {
    margin-top: 32px !important;
    gap: 16px !important;
  }
  .stat-card {
    padding: 16px 12px;
  }
  .stat-card .stat-number {
    font-size: 1.6rem;
  }
  .stat-card .stat-label {
    font-size: 0.75rem;
  }
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

@media (max-width: 600px) {
  :root {
    --header-h: auto;
  }
  .site-header,
  .header {
    position: relative !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    background: transparent;
    box-shadow: none;
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  .site-header.scrolled,
  .header.scrolled {
    box-shadow: none;
  }
  .header-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    height: auto;
    min-height: 0;
    padding: 0 12px;
    gap: 4px;
    line-height: 1.1;
    margin: 0;
  }
  .header-actions {
    display: none !important;
  }
  .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
    flex: 1;
    min-width: 0;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.1;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-link {
    padding: 0;
    margin: 0;
    font-size: 0.55rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    color: var(--text);
    line-height: 1.1;
  }
  .nav-link:hover {
    transform: none;
    box-shadow: none;
    color: var(--accent);
    background: transparent;
    border-color: transparent;
  }
  .logo {
    font-size: 0.8rem;
    flex-shrink: 0;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    gap: 0;
  }
  .hero {
    padding-top: 12px;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
  .hero-stats {
    gap: 16px !important;
    margin-top: 32px !important;
  }
  .stat-card {
    flex: 1 1 calc(50% - 16px);
    min-width: 0;
    padding: 16px 8px;
  }
  .stat-card .stat-number {
    font-size: 1.4rem;
  }
}

.hero-stat { text-align: center; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: 56px;
  position: relative;
  flex-wrap: wrap;
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- 8. Sections ---------- */
section {
  padding: var(--section-padding) 0;
  margin: 0;
}

#demo {
  margin-top: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-label {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 100px;
  margin-bottom: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-light);
  max-width: 580px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
}

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

@media (prefers-color-scheme: dark) {
  .card:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.3); }
}

.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--accent);
  transition: all 0.2s;
}

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

.card:hover .card-icon {
  background: var(--accent);
  color: #ffffff;
}

.card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.card p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- 10. Data tables ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.9rem;
}

.data-table th {
  background: var(--text);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.data-table tr:nth-child(even) { background: var(--card-bg); }

.data-table .highlight {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 11. Highlight / CTA box ---------- */
.highlight-box {
  background: linear-gradient(135deg, var(--accent-light), var(--bg));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-top: 0;
  margin-bottom: 0;
  flex: 1;
  text-align: center;
}

.highlight-box + .highlight-box {
  margin-top: 0;
}

.cta-grid {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .cta-grid {
    flex-direction: column;
    gap: 32px;
  }
  .card-grid {
    margin-bottom: 64px;
  }
  .highlight-box {
    margin-bottom: 32px;
  }
  .highlight-box:last-child {
    margin-bottom: 0;
  }
}

.highlight-box h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}

.highlight-box p {
  color: var(--text-light);
  max-width: 540px;
  margin: 0 auto 20px;
  text-align: center;
}

.cta-box {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  border-radius: 18px;
  padding: 52px 36px;
  text-align: center;
  color: white;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  position: relative;
}

.cta-box p {
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 1rem;
  position: relative;
}

.cta-box .btn {
  background: white;
  color: var(--accent);
  border: 2px solid white;
}

.cta-box .btn:hover { background: rgba(255,255,255,0.95); }

/* ---------- 12. Timeline ---------- */
.timeline {
  margin-top: 36px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.timeline-item {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-left: 2px solid var(--border);
  padding-left: 22px;
  margin-left: 10px;
  position: relative;
}

.timeline-year {
  position: absolute;
  left: -10px;
  top: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-year-inner {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
  min-width: 66px;
  padding-top: 6px;
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.timeline-content p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ---------- 13. News cards ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  .news-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-type {
  padding: 2px 8px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
}

.news-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card p {
  color: var(--text-light);
  font-size: 0.82rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.news-source {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.news-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tag {
  padding: 2px 6px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 500;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 0 20px;
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-brand .logo {
  color: var(--footer-text);
  margin-bottom: 10px;
}

.footer-brand 

.footer-brand p {
  color: var(--footer-muted);
  font-size: 0.85rem;
  margin-top: 8px;
  line-height: 1.6;
}

.footer-brand a { color: var(--accent); }

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--footer-muted);
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: var(--footer-text);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--footer-muted);
}

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

.footer-links a {
  color: var(--footer-muted);
  transition: color 0.2s;
}

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

/* ---------- 15. Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

.scroll-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 16. Focus ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 17. Responsive ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .nav-links { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px;
    justify-content: center;
  }
  .nav-link {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .hero-stats { gap: 40px; }
  .hero-stat-num { font-size: 1.4rem; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 8px 10px; }
  .timeline-item { padding-left: 16px; margin-left: 0; }
  section { padding: var(--section-padding) 0; }
  .hero { padding: var(--section-padding) 0; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero { padding: var(--section-padding) 0; }
  section { padding: var(--section-padding) 0; }
  .timeline-section { padding: 40px 0; }
  .timeline {
    display: block;
  }
  .timeline-item {
    flex-direction: column;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 14px 0 18px;
    margin-left: 0;
  }
  .timeline-year { display: none; }
  .timeline-year-inner { font-size: 0.85rem; padding-top: 0; }
  .news-grid { grid-template-columns: 1fr; }
}


/* ---------- Stat Cards for homepage ---------- */
.stat-card {
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1 1 200px;
  min-width: 160px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}
.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.stat-card:hover::before {
  transform: scaleX(1);
}
@media (prefers-color-scheme: dark) {
  .stat-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  }
}
.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-stats {
  gap: 80px !important;
  margin-top: 56px !important;
}
@media (max-width: 900px) {
  .hero-stats {
    gap: 40px !important;
  }
  .stat-card {
    flex: 1 1 150px;
    min-width: 130px;
    padding: 24px 16px;
  }
  .stat-card .stat-number {
    font-size: 2rem;
  }
}
}

/* ---------- 18. Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden { @extend .sr-only; }
