/* /release-notes page-only styles. The timeline markup is generated from
   marketing/release-notes.json by server/releaseNotes.ts. Gold stays a fill. */

/* ---------- Hero ---------- */
.rn-hero .page-hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
.rn-hero h1 { margin-bottom: 18px; }

.rn-latest {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--card);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}
.rn-latest:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.rn-latest-label {
  background: var(--gold); color: var(--ink); border-radius: 999px; padding: 4px 12px;
  font-size: 0.75rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase;
}
.rn-latest-version { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.rn-latest-date { color: var(--muted); font-size: 0.95rem; }

.rn-hero-media { display: grid; place-items: center; min-height: 340px; }
.rn-hero-glow {
  position: absolute; width: min(380px, 80%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--gold-soft), rgba(255, 231, 179, 0) 100%);
}
.rn-hero-character { position: relative; width: auto; max-height: 400px; filter: drop-shadow(0 18px 24px rgba(38, 36, 80, 0.18)); }
.rn-spark {
  position: absolute; width: 22px; height: 22px; background: var(--gold);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: rn-twinkle 3.2s var(--ease) infinite;
}
.rn-spark-1 { top: 14%; inset-inline-start: 14%; }
.rn-spark-2 { top: 34%; inset-inline-end: 10%; width: 16px; height: 16px; background: var(--grape); animation-delay: -1.1s; }
.rn-spark-3 { bottom: 16%; inset-inline-start: 22%; width: 14px; height: 14px; background: var(--coral); animation-delay: -2.2s; }
@keyframes rn-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.6) rotate(45deg); opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) { .rn-spark { animation: none; } }

@media (max-width: 900px) {
  .rn-hero .page-hero-grid { grid-template-columns: 1fr; }
  .rn-hero-media { order: -1; min-height: 0; }
  .rn-hero-character { max-height: 220px; }
  .rn-hero-glow { width: 240px; }
}

/* ---------- Timeline ---------- */
.rn-wrap { max-width: 1240px; }
.rn-index { justify-content: flex-start; margin-bottom: 48px; }

.rn-timeline { --meta: 170px; --gap: 52px; position: relative; display: grid; gap: clamp(40px, 6vw, 72px); }
/* The rail runs down the gap between the dates and the cards. */
.rn-timeline::before {
  content: ''; position: absolute; top: 12px; bottom: 12px;
  inset-inline-start: calc(var(--meta) + var(--gap) / 2 - 1px); width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 8px, transparent 8px 16px);
}

.rn-release { display: grid; grid-template-columns: var(--meta) minmax(0, 1fr); gap: var(--gap); position: relative; scroll-margin-top: 96px; }
.rn-release::before {
  content: ''; position: absolute; top: 14px; inset-inline-start: calc(var(--meta) + var(--gap) / 2 - 8px);
  width: 16px; height: 16px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 3px var(--grape);
}
.rn-release.is-latest::before { background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft), inset 0 0 0 3px var(--ink); }

.rn-meta { position: sticky; top: 104px; align-self: start; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: end; }
.rn-version {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.rn-version:hover { color: var(--grape); }
.rn-meta time { color: var(--muted); font-weight: 700; font-size: 0.95rem; }
.rn-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.rn-pill {
  border-radius: 999px; padding: 3px 10px; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--grape-soft); color: var(--grape-deep);
}
.rn-pill-latest { background: var(--gold); color: var(--ink); }

.rn-card {
  background: var(--card); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 48px);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
}
.is-latest .rn-card {
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 169, 25, 0.16), rgba(251, 169, 25, 0) 38%),
    radial-gradient(circle at 0% 100%, rgba(94, 52, 201, 0.07), rgba(94, 52, 201, 0) 40%),
    var(--card);
}
.rn-card h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 14px; }
.rn-summary { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-soft); max-width: 42em; margin-bottom: 28px; }

/* ---------- Items ---------- */
.rn-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rn-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.rn-items:not(.rn-grid) .rn-item:first-child { border-top: 0; padding-top: 4px; }
.rn-item h3 { font-size: 1.15rem; margin: 2px 0 4px; }
.rn-item p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.rn-item .rn-kind {
  margin: 0; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grape);
}
.rn-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grape-soft); color: var(--grape); }
.rn-icon svg { width: 22px; height: 22px; }
.rn-improved .rn-icon { background: var(--teal-soft); color: #138a81; }
.rn-improved .rn-kind { color: #138a81; }
.rn-fixed .rn-icon { background: var(--coral-soft); color: #b8274a; }
.rn-fixed .rn-kind { color: #b8274a; }

/* Big releases: soft tiles in two columns, icons cycling through the palette. */
.rn-items.rn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rn-grid .rn-item {
  border-top: 0; padding: 20px; border-radius: var(--radius);
  background: var(--paper); box-shadow: inset 0 0 0 1px rgba(38, 36, 80, 0.06);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}
.rn-grid .rn-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.rn-grid .rn-new:nth-child(4n + 2) .rn-icon { background: var(--gold-soft); color: #8a5a00; }
.rn-grid .rn-new:nth-child(4n + 3) .rn-icon { background: var(--teal-soft); color: #138a81; }
.rn-grid .rn-new:nth-child(4n + 4) .rn-icon { background: var(--coral-soft); color: #b8274a; }
@media (prefers-reduced-motion: reduce) { .rn-grid .rn-item, .rn-latest { transition: none; } }

.rn-footnote { text-align: center; color: var(--muted); font-size: 0.95rem; margin: clamp(40px, 6vw, 64px) 0 0; }

/* ---------- Narrow screens: dates sit above each card ---------- */
@media (max-width: 820px) {
  .rn-timeline::before, .rn-release::before { display: none; }
  .rn-release { grid-template-columns: 1fr; gap: 14px; }
  .rn-meta { position: static; flex-direction: row; flex-wrap: wrap; align-items: baseline; text-align: start; gap: 12px; }
  .rn-pills { margin-top: 0; }
  .rn-items.rn-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .rn-grid .rn-item { padding: 16px; }
  .rn-item { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
  .rn-icon { width: 40px; height: 40px; border-radius: 12px; }
}
