/* ============================================
   Aurora — Changelog Page Styles
   ============================================ */

.changelog-hero {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.changelog-hero__title {
  font-size: var(--text-hero-desktop);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: var(--space-6);
  letter-spacing: 0;
}

.changelog-hero__subtitle {
  font-size: var(--text-hero-body-desktop);
  color: var(--text-secondary);
  line-height: 1.6;
}

.changelog-list {
  max-width: 800px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  position: relative;
}

/* Vertical timeline spine */
.changelog-list::before {
  content: "";
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: 20px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(52, 211, 153, 0.35) 0%,
    rgba(56, 189, 248, 0.22) 55%,
    rgba(167, 139, 250, 0.12) 100%
  );
  border-radius: 2px;
  pointer-events: none;
}

.changelog-entry {
  background: var(--surface-dark);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  margin-left: var(--space-10);
  position: relative;
}

/* Timeline dot sits on the spine to the left of each card */
.changelog-entry__marker {
  position: absolute;
  left: calc(-1 * var(--space-10) + 12px);
  top: var(--space-8);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.changelog-entry__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-green), var(--accent-cyan));
  box-shadow:
    0 0 0 3px var(--surface-dark),
    0 0 14px rgba(52, 211, 153, 0.55);
  position: relative;
}

.changelog-entry--latest .changelog-entry__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, 0.55);
  animation: changelog-dot-pulse 2.4s ease-out infinite;
}

@keyframes changelog-dot-pulse {
  0%   { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.changelog-entry--latest {
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 10px 40px rgba(52, 211, 153, 0.06);
}

.changelog-entry__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.changelog-entry__version {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 700;
}

.changelog-entry__date {
  font-size: var(--text-small);
  color: var(--text-muted);
}

.changelog-entry__tag {
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background: rgba(27, 200, 156, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(27, 200, 156, 0.2);
}

.changelog-entry__tag--new {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
  color: #fff;
  border-color: transparent;
}

.changelog-entry__title {
  font-size: var(--text-card-title);
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}

.changelog-entry__summary {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-5);
}

.changelog-entry__list {
  padding-left: var(--space-6);
  margin: 0;
}

.changelog-entry__list li {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-3);
  list-style: disc;
}

.changelog-entry__list strong {
  color: var(--text-primary);
  font-weight: 600;
  margin-right: 4px;
}

.changelog-entry__list em {
  color: var(--accent-green);
  font-style: normal;
  font-weight: 500;
}

/* ============================================
   HEADLINE FEATURE HIGHLIGHT
   Used inside a .changelog-entry to draw the eye
   to the marquee change of a release. Gradient
   border + soft glow + brand-coloured badge.
   ============================================ */
.changelog-highlight {
  position: relative;
  margin: var(--space-5) 0 var(--space-6);
  padding: var(--space-6);
  border-radius: var(--radius-card);
  /* Two-layer background: a surface fill on top, and a subtle
     Google-palette gradient peeking through the rounded border
     via a ::before. Keeps the card readable while signalling
     the integration at a glance. */
  background:
    linear-gradient(180deg, rgba(66,133,244,0.06) 0%, rgba(52,168,83,0.04) 55%, rgba(251,188,5,0.04) 100%),
    var(--surface-card);
  border: 1px solid rgba(66, 133, 244, 0.22);
  box-shadow:
    0 0 0 1px rgba(66, 133, 244, 0.04) inset,
    0 10px 40px rgba(66, 133, 244, 0.10);
  overflow: hidden;
}

/* Soft radial glow in the corner so the card has depth but stays
   readable on both dark and light themes. */
.changelog-highlight::before {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 70%; height: 180%;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(66, 133, 244, 0.10) 0%,
    rgba(52, 168, 83, 0.06) 40%,
    transparent 70%);
  filter: blur(30px);
  z-index: 0;
}

.changelog-highlight > * { position: relative; z-index: 1; }

[data-theme="light"] .changelog-highlight {
  background:
    linear-gradient(180deg, rgba(66,133,244,0.08) 0%, rgba(52,168,83,0.05) 55%, rgba(251,188,5,0.05) 100%),
    var(--surface-card);
  border-color: rgba(66, 133, 244, 0.30);
}

/* Badge: "Headline feature" with the Google logo inline. */
.changelog-highlight__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}
[data-theme="light"] .changelog-highlight__badge {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.08);
}

.changelog-highlight__logo {
  display: block;
  flex-shrink: 0;
}

.changelog-highlight__title {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
}

.changelog-highlight__body {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-4);
  max-width: 58ch;
}

.changelog-highlight__list {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

/* Custom bullet: a small Google-blue dot so items in the list read
   as part of the highlight, not as generic body text. */
.changelog-highlight__list li {
  position: relative;
  padding-left: 22px;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--text-primary);
}
.changelog-highlight__list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.62em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4 0%, #34A853 50%, #FBBC05 100%);
  box-shadow: 0 0 8px rgba(66, 133, 244, 0.45);
}

@media (max-width: 480px) {
  .changelog-highlight { padding: var(--space-5); }
  .changelog-highlight__title { font-size: 17px; }
  .changelog-highlight__body, .changelog-highlight__list li { font-size: 14px; }
}

@media (prefers-reduced-data: reduce) {
  .changelog-highlight::before { display: none; }
  .changelog-highlight__list li::before { box-shadow: none; }
}

.changelog-foot {
  margin-top: var(--space-10);
  color: var(--text-muted);
  font-size: var(--text-small);
}

.changelog-foot a {
  color: var(--accent-green);
  text-decoration: underline;
  text-decoration-color: rgba(52, 211, 153, 0.4);
  text-underline-offset: 3px;
}

@media (max-width: 768px) {
  .changelog-hero__title {
    font-size: var(--text-hero-mobile);
  }

  /* Spine sits at x=12px; card body starts at 36px so nothing overlaps.
     `--space-7` is not defined in root tokens — using literal rems here
     keeps the layout math self-contained. */
  .changelog-list::before { left: 12px; }

  .changelog-entry {
    padding: var(--space-5);
    margin-left: 36px;
  }

  /* Marker is 18px; its center needs to land on the spine (x=13px).
     Card left edge sits at x=36px, so the marker's left = -23px puts
     it at absolute 13px → centered on the spine. */
  .changelog-entry__marker {
    left: -23px;
    top: var(--space-5);
    width: 18px;
    height: 18px;
  }

  .changelog-entry__dot {
    width: 12px;
    height: 12px;
    box-shadow:
      0 0 0 2px var(--surface-dark),
      0 0 10px rgba(52, 211, 153, 0.5);
  }

  .changelog-entry__header {
    gap: var(--space-3);
    margin-bottom: var(--space-4);
  }

  .changelog-entry__title {
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  /* Tighten further on narrow phones — spine moves slightly closer,
     padding drops so card content doesn't feel crammed. */
  .changelog-list::before { left: 10px; top: 24px; bottom: 24px; }
  .changelog-entry { padding: var(--space-4) var(--space-4) var(--space-5); margin-left: 30px; }
  .changelog-entry__marker { left: -21px; top: var(--space-4); width: 16px; height: 16px; }
  .changelog-entry__dot { width: 10px; height: 10px; }
  .changelog-entry__version { font-size: 15px; }
  .changelog-entry__tag { padding: 3px var(--space-2); font-size: 10px; }
  .changelog-entry__date { font-size: 12px; }
  .changelog-entry__list { padding-left: var(--space-5); }
  .changelog-entry__list li { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .changelog-entry--latest .changelog-entry__dot::after {
    animation: none;
  }
}
