/* ════════════════════════════════════════
   AsimAppFactory – Shared Design System
   style.css  (all pages import this)
   Color scheme: Brand Blue from logo
   ════════════════════════════════════════ */

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

:root {
  --ink: #0a1628;
  --paper: #f4f7fc;
  --accent: #0071e3;
  --accent-dark: #0058b0;
  --accent-light: #ddeeff;
  --accent-glow: rgba(0,113,227,.15);
  --muted: #64748b;
  --border: #dae2ef;
  --white: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.8;
  font-size: 16px;
}

/* ── HEADER ── */
header {
  background: linear-gradient(135deg, #0a1628 0%, #0d2045 60%, #0a3272 100%);
  color: var(--white);
  padding: 52px 24px 44px;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(0,113,227,.06) 40px,
    rgba(0,113,227,.06) 41px
  );
}
header::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(0,113,227,.18) 0%, transparent 70%);
  border-radius: 50%;
}
.header-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  text-align: center;
  z-index: 1;
}
.header-inner .brand { justify-content: center; }

/* Logo in header */
.header-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.15);
  padding: 6px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  animation: floatLogo 4s ease-in-out infinite;
}
@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.brand-dot {
  width: 8px; height: 8px;
  background: #58aeff;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(88,174,255,.4); }
  50%       { transform: scale(1.3); opacity: .8; box-shadow: 0 0 0 6px rgba(88,174,255,0); }
}
.brand-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 6vw, 50px);
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -.02em;
  color: #fff;
}
header h1 em {
  font-style: italic;
  color: #58aeff;
}
.meta {
  font-size: 13px;
  color: rgba(255,255,255,.4);
  letter-spacing: .04em;
}

/* ── STICKY NAV ── */
.toc-bar {
  background: var(--accent);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 12px rgba(0,113,227,.3);
}
.toc-bar::-webkit-scrollbar { display: none; }
.toc-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  gap: 0;
}
.toc-bar a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 16px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.toc-bar a:hover,
.toc-bar a.active {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.7);
}

/* ── MAIN ── */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* ── TYPOGRAPHY ── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-heading {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(22px, 3.5vw, 28px);
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--ink);
}
.section-intro {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}

h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(22px, 3.5vw, 28px);
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--ink);
}
h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--ink);
}

p { margin-bottom: 16px; color: #334155; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 20px; margin-bottom: 16px; color: #334155; }
li { margin-bottom: 8px; }
li::marker { color: var(--accent); }
a { color: var(--accent); }

/* ── SECTIONS ── */
section {
  margin-bottom: 52px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

/* ── COMPONENTS ── */

.info-card {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 24px 28px;
  margin-bottom: 40px;
  font-size: 15px;
  color: #003d7a;
}
.info-card strong { font-weight: 600; }

.highlight-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  margin: 20px 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  background: var(--white);
  transition: box-shadow .2s, transform .2s;
}
.card-item:hover {
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-2px);
  border-color: rgba(0,113,227,.25);
}
.card-item .card-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.card-item .card-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.card-item a {
  display: inline-block; margin-top: 10px; font-size: 12px;
  font-weight: 500; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.rights-list { list-style: none; padding: 0; }
.rights-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.rights-list li:last-child { border-bottom: none; }
.rights-list .icon {
  flex-shrink: 0; width: 28px; height: 28px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 14px;
}
.rights-list .text strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.rights-list .text span   { font-size: 13px; color: var(--muted); }

.dark-card {
  background: var(--ink);
  color: var(--white);
  border-radius: 12px;
  padding: 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dark-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(0,113,227,.25) 0%, transparent 70%);
  border-radius: 50%;
}
.dark-card h2 { color: #fff; margin-bottom: 10px; position: relative; }
.dark-card p  { color: rgba(255,255,255,.6); margin-bottom: 20px; position: relative; }
.dark-card a.btn {
  display: inline-block; background: var(--accent); color: #fff;
  text-decoration: none; padding: 12px 28px; border-radius: 6px;
  font-weight: 500; font-size: 14px; letter-spacing: .04em;
  transition: background .2s, transform .15s; position: relative;
}
.dark-card a.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer .footer-logo {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: contain;
  margin-bottom: 10px;
  opacity: .7;
}
footer a { color: var(--accent); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  header { padding: 36px 20px 32px; }
  main   { padding: 40px 20px 60px; }
  .dark-card { padding: 28px 20px; }
  .header-logo { width: 64px; height: 64px; }
}
