/* Page-level polish for the index, so everything below the banner belongs to
   the same night sky. Loaded only by main/index.html; layout.css still governs
   every other page. */

/* ---------- glass cards ---------- */

.main-container .glass-card {
  /* Darker and bluer than layout.css's plain white wash: a white veil over a
     star field just looks like fog. */
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(96, 126, 255, 0.10) 0%, rgba(9, 12, 32, 0) 70%),
    rgba(9, 13, 32, 0.55);
  border: 1px solid rgba(150, 180, 255, 0.16);
  border-radius: 0.9rem;
  /* A hairline of light along the top edge, as if lit from above. */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 50px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- section headings ---------- */

.icon-title-wrapper h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

.icon-title-wrapper i {
  color: rgba(150, 180, 255, 0.9);
}

/* The same fading hairline the galaxy labels use, under each section title. */
.icon-title-wrapper::after {
  content: '';
  display: block;
  width: 8rem;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(150, 180, 255, 0.6), transparent);
}

.icon-title-wrapper {
  flex-wrap: wrap;
}

.icon-title-wrapper::after {
  flex: 0 0 100%;
  margin-top: 0.6rem;
}

/* ---------- welcome ---------- */

.welcome-text {
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(226, 234, 255, 0.9);
  max-width: 62rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.welcome-text strong {
  color: #fff;
}

/* ---------- news ---------- */

.news-item ul {
  list-style: none;
  margin: 0.5rem auto 0;
  padding: 0;
  max-width: 62rem;
  text-align: left;
}

.news-item li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.5rem;
  color: rgba(222, 231, 255, 0.88);
  line-height: 1.55;
  /* A timeline running down the left, with each item a point on it. */
  border-left: 1px solid rgba(150, 180, 255, 0.18);
}

.news-item li::before {
  content: '';
  position: absolute;
  left: -0.3rem;
  top: 1.05rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #cfe0ff;
  box-shadow: 0 0 10px 1px rgba(140, 175, 255, 0.9);
}

/* The newest entry is the bright one. */
.news-item li:first-child::before {
  background: #fff;
  box-shadow: 0 0 14px 3px rgba(150, 185, 255, 1);
}

.news-item li p {
  margin: 0;
  display: inline;
}

/* ---------- tool previews ---------- */

.preview-container {
  gap: 1.5rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 50px -30px rgba(0, 0, 0, 0.9);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.preview-container:hover {
  transform: translateY(-3px);
  border-color: rgba(150, 180, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 26px 60px -28px rgba(0, 0, 0, 0.95),
    0 0 40px -18px rgba(110, 150, 255, 0.7);
}

/* Alternating sides, so five stacked panels do not read as one long column.
   The flip class is on the markup: nth-of-type would count every sibling div. */
.preview-container.preview-flip {
  flex-direction: row-reverse;
}

.preview-container.preview-flip .text-box {
  margin-right: 0;
  margin-left: 20px;
}

.image-box img {
  max-width: 100%;
  border-radius: 0.6rem;
  border: 1px solid rgba(150, 180, 255, 0.2);
  box-shadow: 0 14px 40px -20px rgba(0, 0, 0, 0.95);
  transition: transform 320ms ease;
}

.preview-container:hover .image-box img {
  transform: scale(1.02);
}

.preview-container h3 {
  letter-spacing: 0.06em;
}

/* ---------- links ---------- */

/* layout.css sets .link and .link:hover with !important (hover goes to black,
   which is invisible on this page), so these have to shout back. Scoped to the
   index by the same :has() guard as the page background, so every other page
   keeps the site-wide link styling. */
body:has(.dsdb-banner) .link {
  color: #9dc0ff !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(157, 192, 255, 0.35);
  transition: color 160ms ease, border-color 160ms ease;
}

body:has(.dsdb-banner) .link:hover {
  color: #fff !important;
  text-decoration: none !important;
  border-color: rgba(255, 255, 255, 0.8);
}

@media (prefers-reduced-motion: reduce) {
  .preview-container,
  .image-box img { transition: none; }
  .preview-container:hover { transform: none; }
  .preview-container:hover .image-box img { transform: none; }
}
