/* ─────────────────────────────────────────────────────────────────────────
   Ardent — the public changelog.

   Scroll mode. The hero holds the first screen and lifts away as the feed
   arrives underneath it, driven by `--hero` (written by chrome.js from the
   real scroll position) rather than a canned animation that plays once and
   then lies about where you are on the page.
   ───────────────────────────────────────────────────────────────────────── */

.updates {
  max-width: 74ch;
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* This page opens on a full-bleed hero, so the sky stays at full strength up
   there and steps back only once there is something to read. core.css reads
   `--sky`; `--hero` is the scroll position chrome.js writes. */
.mode-scroll {
  --sky: calc(1 - var(--hero, 0) * 0.66);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.updates-hero {
  min-height: calc(100svh - 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  opacity: clamp(0, calc(1 - var(--hero, 0) * 1.55), 1);
  transform: translateY(calc(var(--hero, 0) * -42px))
    scale(calc(1 - var(--hero, 0) * 0.055));
  will-change: opacity, transform;
}

.updates-hero img {
  width: clamp(58px, 10vmin, 92px);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(126, 116, 255, 0.4));
  margin-bottom: 1.1rem;
}

.updates-hero h1 {
  font-family: var(--tn-font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 5.4vmin, 2.7rem);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  color: var(--tn-hi);
  text-shadow: 0 0 26px rgba(150, 150, 255, 0.3);
}

.updates-hero p {
  margin-top: 0.7rem;
  max-width: 44ch;
  font-size: 1rem;
  color: var(--tn-mid);
  line-height: 1.6;
  text-wrap: pretty;
}

.scroll-cue {
  position: absolute;
  bottom: clamp(1.2rem, 5vmin, 2.6rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  opacity: clamp(0, calc(1 - var(--hero, 0) * 4), 1);
}
.scroll-cue span:first-child {
  font-family: var(--tn-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--tn-lo);
}
.scroll-cue i {
  width: 13px;
  height: 13px;
  border-right: 1px solid var(--tn-line-hi);
  border-bottom: 1px solid var(--tn-line-hi);
  transform: rotate(45deg);
  animation: cue-bob 2.4s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, 4px); }
}

/* ── Feed ─────────────────────────────────────────────────────────────── */
.feed {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-top: clamp(1rem, 5vmin, 2.5rem);
}

.feed-year {
  font-family: var(--tn-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tn-lo);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--tn-line);
  margin-top: 1.4rem;
}
.feed-year:first-child { margin-top: 0; }

/* Release: the headline entry. */
.release {
  background: var(--tn-panel);
  border: 1px solid var(--tn-line);
  border-radius: var(--tn-radius-lg);
  padding: 1.6rem 1.7rem 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.release-version {
  display: inline-block;
  font-family: var(--tn-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--tn-accent);
  text-shadow: 0 0 16px rgba(150, 150, 255, 0.45);
  padding: 0.3em 0.8em;
  border: 1px solid var(--tn-accent-edge);
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.release h2 {
  font-family: var(--tn-font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 3vmin, 1.5rem);
  color: #fff;
  margin-bottom: 0.5rem;
}

.release-summary {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.96rem;
  line-height: 1.62;
  margin-bottom: 1.1rem;
  text-wrap: pretty;
}

.release-changelog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem 1.6rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--tn-line);
}

.release-changelog h3 {
  font-family: var(--tn-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tn-lo);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.release-changelog ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
}

.release-changelog li {
  position: relative;
  padding-left: 0.95rem;
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
}
.release-changelog li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 1px;
  background: var(--tn-line-hi);
}

.release-date,
.small-date {
  font-family: var(--tn-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tn-lo);
}
.release-date { margin-top: 1.2rem; }

/* Small update: the routine entry. Quieter than a release but still a panel —
   these are most of the feed, and a paragraph laid straight onto a live
   starfield loses whichever line has a bright star behind it. */
.small {
  padding: 1rem 1.2rem;
  background: rgba(14, 11, 30, 0.5);
  border: 1px solid var(--tn-line);
  border-left: 2px solid rgba(154, 151, 232, 0.34);
  border-radius: var(--tn-radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.small h3 {
  font-family: var(--tn-font-display);
  font-weight: 400;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.92);
  margin: 0.3rem 0;
}
.small p {
  font-size: 0.88rem;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.64);
  text-wrap: pretty;
}

/* ── States ───────────────────────────────────────────────────────────── */
.feed-state {
  text-align: center;
  color: var(--tn-mid);
  font-size: 0.94rem;
  padding: 2rem 0;
}
.feed-state button {
  margin-top: 1rem;
}

/* Loading placeholders that match the shape of what arrives, so the page does
   not jump when it does. */
.skeleton {
  background: var(--tn-panel);
  border: 1px solid var(--tn-line);
  border-radius: var(--tn-radius-lg);
  padding: 1.6rem 1.7rem;
}
.skeleton span {
  display: block;
  height: 0.7rem;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    rgba(214, 206, 255, 0.06),
    rgba(214, 206, 255, 0.14),
    rgba(214, 206, 255, 0.06)
  );
  background-size: 300% 100%;
  animation: shimmer 1.6s linear infinite;
  margin-bottom: 0.7rem;
}
.skeleton span:nth-child(1) { width: 22%; }
.skeleton span:nth-child(2) { width: 68%; height: 1.1rem; }
.skeleton span:nth-child(3) { width: 100%; }
.skeleton span:nth-child(4) { width: 84%; margin-bottom: 0; }
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -200% 0; }
}

.btn-quiet {
  font-family: var(--tn-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tn-mid);
  background: transparent;
  border: 1px solid var(--tn-line);
  border-radius: 999px;
  padding: 0.6em 1.3em;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.btn-quiet:hover,
.btn-quiet:focus-visible {
  color: #fff;
  border-color: var(--tn-accent-edge);
  background: var(--tn-accent-wash);
}

@media (prefers-reduced-motion: reduce) {
  .updates-hero { opacity: 1; transform: none; }
  .scroll-cue i { animation: none; }
  .skeleton span { animation: none; }
}
