/* ─────────────────────────────────────────────────────────────────────────────
   SCL Editorial Page — Hybrid accordion (Part 1) + linear (Part 2)
   Version: 2.0.0
   ───────────────────────────────────────────────────────────────────────────── */

.scl-editorial {
  --ed-max: 740px;
  --ed-gap: clamp(2.5rem, 5vw, 4.5rem);
}


/* ══════════════════════════════════════════════════════════════════════════════
   1. HERO
   ══════════════════════════════════════════════════════════════════════════════ */

.scl-ed__hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  margin-bottom: var(--ed-gap);
  background: var(--surface);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.scl-ed__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scl-ed__hero-body {
  position: relative;
  z-index: 1;
  padding: 3rem 3.5rem 4rem;
  background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.1) 65%, transparent 100%);
}

.scl-ed__hero-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
}

.scl-ed__hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  max-width: 700px;
}

.scl-ed__hero-tagline {
  margin: 0;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(255,255,255,0.75);
  max-width: 580px;
  line-height: 1.55;
}


/* ══════════════════════════════════════════════════════════════════════════════
   2. PART WRAPPER + CHAPTER BREAK
   ══════════════════════════════════════════════════════════════════════════════ */

.editorial-part {
  max-width: var(--ed-max);
  margin: 0 auto;
}

.editorial-chapter-break {
  max-width: var(--ed-max);
  margin: var(--ed-gap) auto;
  padding: var(--ed-gap) 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}

.editorial-chapter-break__num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.editorial-chapter-break__label {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}


/* ══════════════════════════════════════════════════════════════════════════════
   3. PART 1 — ACCORDION
   ══════════════════════════════════════════════════════════════════════════════ */

.editorial-part--accordion {
  margin-bottom: 0;
}

/* Each H2 section becomes a panel */
.ed-panel {
  border-top: 1px solid var(--line);
}

.ed-panel:last-child {
  border-bottom: 1px solid var(--line);
}

.ed-panel__trigger {
  width: 100% !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 1rem 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body, inherit);
  color: var(--text) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem) !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  outline: none;
}

.ed-panel__trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Ensure open state never shows a background */
.ed-panel.is-open .ed-panel__trigger {
  background: none !important;
  background-color: transparent !important;
  color: var(--text) !important;
}

.ed-panel__trigger-label {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.ed-panel__trigger-label em {
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
}

.ed-panel__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, border-color 200ms ease;
  color: var(--muted);
}

.ed-panel__trigger:hover .ed-panel__icon {
  background: var(--surface);
  border-color: rgba(32,27,23,0.3);
}

.ed-panel__icon::before {
  content: '+';
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.ed-panel.is-open .ed-panel__icon::before {
  content: '−';
}

.ed-panel__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-panel.is-open .ed-panel__body {
  max-height: 9000px; /* large enough */
}

.ed-panel__content {
  padding-bottom: 1.25rem;
}


/* ══════════════════════════════════════════════════════════════════════════════
   4. PART 2 — LINEAR EDITORIAL
   ══════════════════════════════════════════════════════════════════════════════ */

.editorial-part--linear h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Product guide entries (H3 inside linear) */
.editorial-part--linear h3 {
  margin: 2.5rem 0 0.6rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.editorial-part--linear h3:first-of-type {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}


/* ══════════════════════════════════════════════════════════════════════════════
   5. SHARED BODY TYPOGRAPHY (both parts)
   ══════════════════════════════════════════════════════════════════════════════ */

.editorial-part p {
  margin: 0 0 1.3em;
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--text);
}

.editorial-part p:last-child { margin-bottom: 0; }

.editorial-part em { font-style: italic; color: var(--muted); }
.editorial-part strong { font-weight: 700; color: var(--text); }

.editorial-part h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--muted);
}

.editorial-part ul,
.editorial-part ol {
  padding-left: 1.3rem;
  margin: 0 0 1.3em;
}

.editorial-part li {
  font-size: 0.96rem;
  line-height: 1.75;
  margin-bottom: 0.4em;
  color: var(--text);
}

.editorial-part a {
  color: var(--text);
  text-underline-offset: 3px;
  text-decoration-color: rgba(32,27,23,0.3);
  transition: text-decoration-color 200ms ease;
}

.editorial-part a:hover {
  text-decoration-color: var(--text);
}

/* hr inside parts — subtle section divider */
.editorial-part hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

/* Intro tagline paragraph (first <p> in content, italic) */
.scl-ed__intro-tagline {
  max-width: var(--ed-max);
  margin: 0 auto var(--ed-gap);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.65;
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
}

/* Space between chapter break and the accordion/linear parts */
.editorial-chapter-break + .editorial-part--accordion,
.editorial-chapter-break + .editorial-part--linear {
  margin-top: 0;
}

.editorial-chapter-break {
  margin-top: clamp(2rem, 4vw, 3.5rem);
}


/* ══════════════════════════════════════════════════════════════════════════════
   6. FURTHER READING
   ══════════════════════════════════════════════════════════════════════════════ */

.scl-ed__further {
  max-width: var(--ed-max);
  margin: var(--ed-gap) auto 0;
  padding-top: var(--ed-gap);
  border-top: 1px solid var(--line);
}

.scl-ed__further-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.scl-ed__further ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.scl-ed__further li {
  border-top: 1px solid var(--line);
}

.scl-ed__further li:last-child {
  border-bottom: 1px solid var(--line);
}

.scl-ed__further a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: opacity 200ms ease;
}

.scl-ed__further a:hover { opacity: 0.6; }

.scl-ed__further a::after {
  content: '↗';
  font-size: 0.8rem;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 1rem;
}


/* ══════════════════════════════════════════════════════════════════════════════
   7. RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
  .scl-ed__hero { min-height: 340px; border-radius: 16px; }
  .scl-ed__hero-body { padding: 1.75rem 1.5rem 2.5rem; }
}

@media (max-width: 560px) {
  .scl-ed__hero { min-height: 280px; }
  .editorial-chapter-break { flex-direction: column; gap: 0.4rem; }
}
