/* Simdsoft company homepage - gradient tech theme */

:root {
  --sd-gradient: linear-gradient(135deg, #4567ff 0%, #00c6ff 100%);
  --sd-primary-rgb: 69, 103, 255;
  --sd-cyan-rgb: 0, 198, 255;
  --sd-glass-blur: saturate(150%) blur(10px);
}

[data-bs-theme="dark"] {
  --bs-primary: #4567ff;
  --bs-primary-rgb: 69, 103, 255;
  --bs-link-color: #5b8cff;
  --bs-link-hover-color: #7aa5ff;
  --bs-body-bg: #0a0e1a;
  --bs-body-color: #e6e9f2;
  --bs-border-color: rgba(255, 255, 255, 0.08);
  --bs-card-bg: rgba(255, 255, 255, 0.04);
  --bs-card-border-color: rgba(255, 255, 255, 0.08);
  --sd-glass-bg: rgba(10, 14, 26, 0.72);
  --sd-glass-border: rgba(255, 255, 255, 0.1);
  --sd-muted: rgba(230, 233, 242, 0.72);
  --sd-glow: rgba(69, 103, 255, 0.35);
}

[data-bs-theme="light"] {
  --bs-primary: #4567ff;
  --bs-primary-rgb: 69, 103, 255;
  --bs-link-color: #2f5bff;
  --bs-link-hover-color: #1f4dff;
  --bs-body-bg: #f6f8fc;
  --bs-body-color: #1a2138;
  --bs-border-color: rgba(15, 23, 42, 0.1);
  --bs-card-bg: #ffffff;
  --bs-card-border-color: rgba(15, 23, 42, 0.1);
  --sd-glass-bg: rgba(255, 255, 255, 0.78);
  --sd-glass-border: rgba(15, 23, 42, 0.08);
  --sd-muted: rgba(26, 33, 56, 0.7);
  --sd-glow: rgba(69, 103, 255, 0.22);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  text-decoration: none;
}

section {
  scroll-margin-top: 76px;
}

/* -------- glass navbar -------- */
.glass-nav {
  backdrop-filter: var(--sd-glass-blur);
  -webkit-backdrop-filter: var(--sd-glass-blur);
  background-color: var(--sd-glass-bg);
  border-bottom: 1px solid var(--sd-glass-border);
}

.glass-nav .navbar-brand .brand-name {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.glass-nav .nav-link {
  color: var(--bs-body-color);
  margin: 0 0.1rem;
}

.glass-nav .nav-link:hover {
  color: var(--bs-link-hover-color);
}

.glass-nav .nav-link.active {
  color: var(--bs-primary) !important;
  font-weight: 600;
}

/* -------- theme toggle -------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--bs-border-color);
  color: var(--bs-body-color);
  background-color: transparent;
  transition: all 0.2s ease-in-out;
}

.theme-toggle:hover {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  transform: scale(1.06);
}

.theme-icon {
  vertical-align: middle;
}

/* -------- hero -------- */
.hero-gradient {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 15% 22%, rgba(var(--sd-primary-rgb), 0.3), transparent 62%),
    radial-gradient(720px 440px at 86% 72%, rgba(var(--sd-cyan-rgb), 0.2), transparent 60%),
    linear-gradient(165deg, var(--bs-body-bg) 0%, rgba(var(--sd-primary-rgb), 0.12) 46%, var(--bs-body-bg) 100%);
}

.hero-gradient::before,
.hero-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient::before {
  bottom: auto;
  height: clamp(220px, 30vw, 340px);
  opacity: 0.18;
  background:
    linear-gradient(112deg, transparent 0 42%, rgba(var(--sd-primary-rgb), 0.13) 42.2%, transparent 42.5%),
    linear-gradient(23deg, transparent 0 57%, rgba(var(--sd-cyan-rgb), 0.1) 57.2%, transparent 57.5%);
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 28%, #000 82%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 64%, transparent 100%);
  mask-composite: intersect;
}

.hero-gradient::after {
  opacity: 0.38;
  background:
    radial-gradient(circle at 54% 28%, rgba(var(--sd-primary-rgb), 0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 48%, rgba(var(--sd-cyan-rgb), 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 83% 37%, rgba(255, 255, 255, 0.38) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 70%, rgba(var(--sd-primary-rgb), 0.44) 0 1px, transparent 2px);
}

.hero-gradient > .container {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: block;
  margin-bottom: 1rem;
  color: var(--bs-link-color);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 820px;
  font-size: 1.28rem;
}

.hero-intro {
  max-width: 860px;
}

.hero-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 920px;
}

.hero-signal {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 4rem;
  padding: 0.75rem 0.9rem;
  color: var(--bs-body-color);
  border: 1px solid transparent;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.012);
  opacity: 0.82;
  transition: opacity 180ms ease, color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.hero-signal:hover {
  color: var(--bs-body-color);
  opacity: 1;
  border-color: rgba(var(--sd-primary-rgb), 0.22);
  background: rgba(255, 255, 255, 0.035);
}

.hero-signal img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.hero-signal strong,
.hero-signal small {
  display: block;
}

.hero-signal small {
  margin-top: 0.2rem;
  color: var(--sd-muted);
}

.text-glow {
  text-shadow: 0 0 26px var(--sd-glow), 0 0 6px rgba(255, 255, 255, 0.08);
}

.py-lg-6 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

/* -------- buttons -------- */
.btn-accent {
  color: #fff;
  background-image: var(--sd-gradient);
  background-size: 100% 100%;
  border: none;
  transition: all 0.2s ease-in-out;
}

.btn-accent:hover,
.btn-accent:focus {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.btn-outline-secondary:hover {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  background-color: transparent;
}

/* -------- sections -------- */
.section-band {
  position: relative;
}

.section-band-raised {
  background:
    linear-gradient(180deg, rgba(var(--sd-primary-rgb), 0.035), transparent 68%),
    rgba(255, 255, 255, 0.012);
  border-top: 1px solid rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.section-title {
  font-weight: 700;
}

.lead-muted {
  color: var(--sd-muted);
}

.card-product {
  border: 1px solid var(--bs-card-border-color);
  background-color: var(--bs-card-bg);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card-product:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--sd-primary-rgb), 0.45);
  box-shadow: 0 16px 38px rgba(var(--sd-primary-rgb), 0.16);
}

.card-product .product-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 18px;
}

.card-featured-product {
  border-color: rgba(var(--sd-primary-rgb), 0.28);
  background:
    linear-gradient(135deg, rgba(var(--sd-primary-rgb), 0.12), transparent 42%),
    var(--bs-card-bg);
}

.card-featured-product .product-logo-lg {
  width: 118px;
  height: 118px;
  border-radius: 22px;
}

.card-product .card-text {
  color: var(--sd-muted);
}

.card-product .badge {
  font-weight: 500;
}

.card-oss-primary .product-logo {
  width: 108px;
  height: 108px;
}

.card-oss-secondary .product-logo {
  width: 88px;
  height: 88px;
}

.link-accent {
  color: var(--bs-link-color);
  transition: color 0.15s ease;
}

.link-accent:hover {
  color: var(--bs-link-hover-color);
  text-decoration: underline;
}

/* -------- lightweight links and repositories -------- */
.sustain-copy {
  max-width: 860px;
  margin-right: auto;
  margin-left: auto;
}

.sustain-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  border-top: 1px solid var(--bs-card-border-color);
}

.sustain-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.15rem;
  border-bottom: 1px solid var(--bs-card-border-color);
}

.repo-list {
  max-width: 980px;
  margin: 0 auto;
  border-top: 1px solid var(--bs-card-border-color);
}

.repo-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0.15rem;
  border-bottom: 1px solid var(--bs-card-border-color);
}

.repo-title {
  font-weight: 700;
}

.repo-stars {
  margin-left: 0.35rem;
  color: var(--sd-muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.repo-desc {
  margin: 0;
  color: var(--sd-muted);
  font-size: 0.9rem;
}

/* -------- timeline -------- */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--sd-gradient);
  opacity: 0.35;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.8rem;
  padding-left: 1.8rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-2rem + 0.5rem);
  top: 0.3rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sd-gradient);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--sd-glow);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 0.15rem;
}

.timeline-content {
  color: var(--sd-muted);
}

.site-footer {
  border-top: 1px solid var(--bs-border-color);
}

.footer-text {
  font-size: 0.8rem;
  color: var(--sd-muted);
}

.footer-text a {
  color: var(--bs-link-color);
}

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

@media (max-width: 991.98px) {
  .hero-gradient::before,
  .hero-gradient::after {
    opacity: 0.16;
  }

  .hero-signal-grid {
    grid-template-columns: 1fr;
  }

  .hero-lead {
    font-size: 1.12rem;
  }

  .repo-item {
    grid-template-columns: minmax(140px, 0.8fr) minmax(0, 1.6fr) auto;
  }
}

@media (max-width: 575.98px) {
  .hero-gradient::before {
    display: none;
  }

  .hero-gradient::after {
    opacity: 0.24;
  }

  .py-lg-6 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .hero-kicker {
    margin-bottom: 0.75rem;
  }

  .hero-intro {
    font-size: 1.05rem;
    line-height: 1.55;
  }

  .hero-signal-grid {
    gap: 0.35rem;
    margin-top: 1.75rem !important;
  }

  .hero-signal {
    min-height: 3rem;
    padding: 0.4rem 0.65rem;
    border: 0;
    background: transparent;
  }

  .hero-signal img {
    width: 28px;
    height: 28px;
  }

  .sustain-links {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .repo-item {
    grid-template-columns: 1fr auto;
    gap: 0.35rem 0.75rem;
  }

  .repo-desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .repo-item > a {
    grid-column: 2;
    grid-row: 1;
  }
}
