/* VectorIT — the editorial issue. Bone-white, serif-led, type-scale drama.
 * Modeled on the jordangilroy.com language: quiet ground, huge editorial
 * serif, numbered index rows with live previews, mono bracket labels.
 *
 * Same mechanism as the retired dark skin: body.editorial re-declares the
 * tokens main.css consumes, so every page follows; below are the editorial
 * primitives (index rows, hero lines, bands) used by the homepage.
 */

body.editorial {
  --paper: #F3F4EF;
  --card: #FBFBF8;
  --ink: #191B20;
  --muted: #5A5E66;
  --faint: #9B9FA6;
  --line: rgba(25, 27, 32, 0.16);
  --line-soft: rgba(25, 27, 32, 0.08);
  --grid: rgba(25, 27, 32, 0.035);
  --blue: #2545C8;
  --blue-deep: #1B36A3;
  --blue-soft: #5B7BE8;
  --blue-tint: rgba(37, 69, 200, 0.08);
  --signal: #E8481F;
  --signal-hover: #D13A12;
  --shadow-sm: 0 1px 2px rgba(25, 27, 32, 0.05);
  --shadow-md: 0 8px 30px rgba(25, 27, 32, 0.08);
  --shadow-lg: 0 18px 60px rgba(25, 27, 32, 0.12);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
}

/* serif carries the headlines everywhere; UI text stays Archivo */
.editorial h1, .editorial h2, .editorial .price {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.editorial h1 em, .editorial h2 em { font-style: italic; color: var(--blue); }

/* flat, printed look — kill glows and heavy radii from the product skin */
.editorial .btn-primary { border-radius: 4px; box-shadow: none; }
.editorial .btn-ghost { border-radius: 4px; background: transparent; }
.editorial .site-header {
  background: rgba(243, 244, 239, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  z-index: 120;
}

/* ---------- hero: the statement, line by line ---------- */
.ed-hero { padding: clamp(90px, 16vh, 170px) 0 clamp(40px, 7vh, 80px); }
.ed-hero .wrap { max-width: 1280px; }
.ed-line {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7.6vw, 7.2rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.ed-line > span { display: block; will-change: transform; }
.ed-line em { font-style: italic; color: var(--blue); }
.ed-scroll-cue {
  margin-top: clamp(30px, 6vh, 56px);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.ed-scroll-cue::before { content: "[ "; color: var(--faint); }
.ed-scroll-cue::after { content: " ]"; color: var(--faint); }

/* ---------- the index: numbered rows with live previews ---------- */
.ed-index { border-top: 1px solid var(--line); }
.ed-row {
  display: grid;
  grid-template-columns: minmax(70px, 120px) 1fr auto;
  align-items: baseline;
  gap: clamp(14px, 3vw, 40px);
  padding: clamp(26px, 4.5vh, 44px) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.ed-no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.ed-no::before { content: "[ "; color: var(--faint); }
.ed-no::after { content: " ]"; color: var(--faint); }
.ed-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s;
}
.ed-row:hover .ed-title { transform: translateX(14px); font-style: italic; color: var(--blue); }
.ed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.ed-view {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  white-space: nowrap;
  align-self: center;
  position: relative;
}
.ed-view::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.ed-row:hover .ed-view::after { transform: scaleX(1); }

/* the floating preview that follows the cursor over the index */
.ed-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: clamp(300px, 26vw, 420px);
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  background: #fff;
}
.ed-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ed-preview img.on { opacity: 1; }

/* inline preview for touch / small screens */
.ed-row-img { display: none; }

/* ---------- quiet editorial sections ---------- */
.ed-band { border-top: 1px solid var(--line); padding: clamp(50px, 9vh, 100px) 0; }
.ed-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.ed-kicker::before { content: "[ "; color: var(--faint); }
.ed-kicker::after { content: " ]"; color: var(--faint); }

/* modules as a printed two-column list */
.ed-mods {
  columns: 2;
  column-gap: clamp(30px, 6vw, 90px);
  max-width: 1000px;
}
.ed-mods > div {
  break-inside: avoid;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.ed-mods b { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; white-space: nowrap; }
.ed-mods span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* numbers, set like a colophon */
.ed-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 4vw, 60px); }
.ed-nums b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1;
}
.ed-nums b sub { font-size: 0.4em; color: var(--muted); vertical-align: baseline; margin-left: 3px; }
.ed-nums span { display: block; margin-top: 8px; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }

/* collaborate band */
.ed-collab { border-top: 1px solid var(--line); padding: clamp(70px, 12vh, 140px) 0; }
.ed-collab h2 {
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 1.05;
  margin-bottom: 30px;
  max-width: 18ch;
}
.ed-collab .ed-links { display: flex; flex-wrap: wrap; gap: 16px 34px; align-items: center; }
.ed-collab .ed-links a {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
}
.ed-collab .ed-links a:hover { color: var(--blue); border-color: var(--blue); }
.ed-collab .ed-links .arrow { font-family: var(--serif); font-size: 1.6em; color: var(--blue); border: 0; }

/* ---------- laptop chapter: the demo playing screen by screen ---------- */
/* Tall section; the inner pin stays stuck while scroll drives the slides. */
.ed-lab { height: 520svh; border-top: 1px solid var(--line); }
.ed-lab-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ed-lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  /* no width here — .wrap's own min() width must survive, or the grid goes full-bleed */
  flex: 0 0 auto;
}
.ed-laptop { margin: 0; min-width: 0; }
.ed-lap-lid {
  border: 2px solid var(--ink);
  border-bottom-width: 0;
  border-radius: 14px 14px 0 0;
  padding: clamp(8px, 1vw, 14px);
  background: var(--ink);
}
.ed-lap-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: var(--card);
}
.ed-lap-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.45s ease, transform 0.6s ease;
}
.ed-lap-screen img.on { opacity: 1; transform: scale(1); }
.ed-lap-base {
  height: clamp(10px, 1.2vw, 16px);
  background: var(--ink);
  border-radius: 0 0 14px 14px;
  margin: 0 -2.5%;
}
.ed-lab-names { min-width: 0; }
.ed-lab-names ol {
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  display: grid;
  gap: 2px;
}
.ed-lab-names li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
  counter-increment: labname;
  opacity: 0.34;
  transform: translateX(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.ed-lab-names li::before {
  content: counter(labname, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.ed-lab-names li b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  white-space: nowrap;
}
.ed-lab-names li span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ed-lab-names li.on { opacity: 1; transform: translateX(10px); }
.ed-lab-names li.on b { font-style: italic; color: var(--blue); }
.ed-lab-names li.on span { opacity: 1; }
.ed-lab-names li.seen { opacity: 0.72; }
.ed-lab-now { display: none; }
.ed-lab-cta { display: inline-block; }
.ed-lab-cta::after { transform: scaleX(1); }
.ed-lab-cta:hover { color: var(--blue); }

/* editorial passes over shared components */
.editorial .plan, .editorial .card, .editorial .compare, .editorial .faq details {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}
.editorial .plan.featured { border: 2px solid var(--ink); background: var(--card); }
.editorial .pill { border-radius: 3px; }
.editorial .fig { color: var(--muted); }

@media (max-width: 900px) {
  .ed-row { grid-template-columns: 60px 1fr; }
  .ed-view { display: none; }
  .ed-preview { display: none; }
  .ed-row-img { display: block; grid-column: 1 / -1; border-radius: 6px; border: 1px solid var(--line); width: 100%; }
  .ed-nums { grid-template-columns: 1fr 1fr; }
  .ed-mods { columns: 1; }
  /* laptop chapter: full-width laptop, one live caption instead of the list */
  .ed-lab { height: 420svh; }
  .ed-lab-grid { grid-template-columns: 1fr; gap: 20px; align-content: center; }
  .ed-lab-names ol { display: none; }
  .ed-lab-cta { display: inline-block; } /* survives the .ed-view mobile hide */
  .ed-lab-now {
    display: block;
    font-family: var(--serif);
    font-size: clamp(1.5rem, 6vw, 2.1rem);
    font-style: italic;
    color: var(--blue);
    margin: 4px 0 10px;
    min-height: 1.3em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ed-title, .ed-view::after { transition: none; }
  .ed-lap-screen img, .ed-lab-names li, .ed-lab-names li span { transition: none; }
}
