/* ==========================================================================
   SITEFALL — Linear-Inspired Editorial Changelog Styling
   ========================================================================== */

.nav__links a.is-current,
.nav__mobile a.is-current {
  color: var(--amber);
}

.cl-container {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.cl-main {
  padding-top: 74px;
}

/* ---------------- EDITORIAL HERO ---------------- */
.cl-hero {
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 22% 0%, rgba(245, 158, 11, 0.085), transparent 55%);
}

.cl-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.cl-back {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.16s ease;
}
.cl-back:hover { color: #fff; }

.cl-kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.cl-kbd-hint kbd {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  padding: 2px 6px;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 10px;
}

.cl-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: #fff;
}

.cl-hero__sub {
  margin: 18px 0 32px;
  font-size: 18px;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.6;
}

/* Proof Bar */
.cl-proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  background: rgba(18, 22, 31, 0.72);
  margin-bottom: 28px;
}

.cl-proof-item {
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cl-proof-item:last-child { border-right: none; }
.cl-proof-item strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.05;
  color: #fff;
}
.cl-proof-item span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Category Filter Bar */
.cl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cl-filter {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}
.cl-filter:hover {
  color: #fff;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
}
.cl-filter.is-active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fcd34d;
}
.cl-filter__count {
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ---------------- LINEAR TIMELINE FEED ---------------- */
.cl-feed {
  padding: 20px 0 84px;
}

.cl-entry {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  scroll-margin-top: 90px;
}
.cl-entry:last-child { border-bottom: none; }
.cl-entry.is-hidden { display: none; }

/* Sticky Left Spine Rail */
.cl-rail {
  position: relative;
  border-right: 1px solid var(--border);
  padding-right: 28px;
}

.cl-rail__sticky {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.cl-rail__dot {
  position: absolute;
  right: -33px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #334155;
  border: 2px solid var(--bg);
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.cl-rail__dot--live,
.cl-entry.is-active-entry .cl-rail__dot {
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
  transform: scale(1.15);
}

.cl-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #cbd5e1;
  letter-spacing: 0.06em;
}

.cl-version-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.cl-version-pill--latest {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.cl-rail__tags {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}
.cl-rail__tags span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cl-copy-link {
  margin-top: 6px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.cl-copy-link:hover { color: var(--amber); }

/* Right Editorial Column */
.cl-entry__title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.02;
  letter-spacing: 0.015em;
  color: #fff;
}
.cl-entry__title a { transition: color 0.15s ease; }
.cl-entry__title a:hover { color: #fcd34d; }

.cl-entry__lead {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.65;
  color: #c7d0de;
}
.cl-entry__lead code,
.cl-hl code,
.cl-detail-list code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  padding: 1px 6px;
}

/* Interactive Optics Stage (Entry 1 Showstopper) */
.cl-optics-stage {
  background: #0c0f16;
  border: 1px solid var(--border-strong);
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

.cl-optics-stage__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.cl-optics-stage__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--amber);
}

.cl-media-expand {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cl-media-expand:hover {
  background: var(--amber);
  color: #090b0f;
  border-color: var(--amber);
}

.cl-optics-stage__frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #06080c;
  cursor: zoom-in;
}

.cl-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease, transform 0.5s var(--ease);
}

.cl-optics-pills {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--border);
  background: #090c12;
}

.cl-optics-pill {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cl-optics-pill:last-child { border-right: none; }
.cl-optics-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.cl-optics-pill.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.12);
  border-bottom-color: var(--amber);
}

/* Single & Duo Visual Frames */
.cl-media-single,
.cl-media-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: #06080c;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  text-align: left;
  cursor: zoom-in;
}

.cl-media-single {
  aspect-ratio: 16 / 9;
  margin-bottom: 26px;
}

.cl-media-duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}

.cl-media-card {
  aspect-ratio: 16 / 10;
}

.cl-media-single img,
.cl-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.cl-media-single:hover img,
.cl-media-card:hover img {
  transform: scale(1.025);
}

.cl-media-card__tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(8, 10, 14, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  padding: 5px 10px;
}

/* Inline Metrics Strip */
.cl-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 26px;
}

.cl-metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cl-metric-box span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.cl-metric-box strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: #fff;
}

/* Editorial Highlight Blocks */
.cl-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 28px;
  margin-bottom: 24px;
}

.cl-hl h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.03em;
  color: #fff;
}

.cl-hl p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Expandable Engineering Verification */
.cl-details {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.cl-details summary {
  cursor: pointer;
  padding: 13px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cl-details summary::-webkit-details-marker { display: none; }
.cl-details summary::after {
  content: "+";
  font-size: 15px;
  color: var(--amber);
}
.cl-details[open] summary::after { content: "−"; }
.cl-details[open] summary { border-bottom: 1px solid var(--border); }

.cl-detail-list {
  margin: 0;
  padding: 16px 20px 18px 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}
.cl-detail-list strong { color: #fff; }

/* Bottom CTA */
.cl-cta {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  background: radial-gradient(circle at 50% 100%, rgba(245, 158, 11, 0.1), transparent 60%);
}

.cl-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cl-cta .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.cl-cta h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}
.cl-cta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}

/* ---------------- MAIN LANDING PAGE CHANGELOG PREVIEW STRIP ---------------- */
.cl-preview-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.cl-preview-row {
  display: grid;
  grid-template-columns: 152px 1fr 224px;
  gap: 28px;
  align-items: center;
  padding: 22px 16px;
  margin-inline: -16px;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.cl-preview-row:last-child {
  border-bottom: none;
}

.cl-preview-row:hover {
  background: rgba(255, 255, 255, 0.028);
  border-left-color: var(--amber);
}

.cl-preview-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.cl-preview-row__copy h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 25px;
  line-height: 1.06;
  letter-spacing: 0.015em;
  color: #fff;
  transition: color 0.16s ease;
}

.cl-preview-row:hover .cl-preview-row__copy h4 {
  color: #fcd34d;
}

.cl-preview-row__copy p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.cl-preview-row__read {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}

.cl-preview-row__thumb {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  background: #06080c;
}
.cl-preview-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.cl-preview-row:hover .cl-preview-row__thumb img {
  transform: scale(1.05);
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 900px) {
  .cl-entry {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 44px 0;
  }
  .cl-rail {
    border-right: none;
    padding-right: 0;
  }
  .cl-rail__sticky {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  .cl-rail__dot { display: none; }
  .cl-rail__tags { flex-direction: row; gap: 10px; margin-top: 0; }
  .cl-copy-link { margin-top: 0; margin-left: auto; }
  .cl-optics-pills { grid-template-columns: repeat(4, 1fr); }
  .cl-highlights { grid-template-columns: 1fr; }
  .cl-proof-strip { grid-template-columns: repeat(2, 1fr); }
  .cl-proof-item { border-bottom: 1px solid var(--border); }
  .cl-metrics-row { grid-template-columns: repeat(2, 1fr); }
  .cl-cta__inner { flex-direction: column; align-items: flex-start; }
  .cl-preview-row { grid-template-columns: 1fr; gap: 14px; }
  .cl-preview-row__thumb { max-width: 320px; }
}

@media (max-width: 600px) {
  .cl-container { width: calc(100% - 32px); }
  .cl-media-duo { grid-template-columns: 1fr; }
  .cl-optics-pills { grid-template-columns: repeat(2, 1fr); }
  .cl-kbd-hint { display: none; }
}
