/* ============================================================
   index.css
   Homepage-specific styles only
   ============================================================ */

.page {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 48px 40px;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
  opacity: 0;
  animation: appear 0.4s ease forwards 0.05s;
}

.report-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.report-id {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.report-id-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.report-id-link:hover {
  color: var(--red);
  border-color: var(--red);
}

.note-count {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.stamp-date {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: right;
}

.status-badge {
  display: inline-block;
  margin-top: 5px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 8px;
}

/* ── Main two-column grid ───────────────────────────────── */
.main {
  padding: 40px 0 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0 60px;
  align-items: start;
  align-content: start;
}

/* ── Left annotations sidebar ───────────────────────────── */
.annotations {
  padding-top: 8px;
  opacity: 0;
  animation: appear 0.5s ease forwards 0.4s;
}

.ann-block {
  margin-bottom: 28px;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
  position: relative;
}

.ann-block::before {
  content: "";
  position: absolute;
  left: -5px; top: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.ann-title {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 5px;
}

.ann-text {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  font-style: italic;
}

hr.ann-divider {
  border: none;
  border-top: 1px dashed var(--rule);
  margin: 24px 0;
}

.field-block { margin-bottom: 14px; }

.field-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.field-value { font-size: 12px; letter-spacing: 0.04em; }

.field-value a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

/* ── Content area ───────────────────────────────────────── */
.content { position: relative; }

.fracture-wrap {
  position: fixed;
  top: 80px;
  right: 15px;
  width: 260px;
  height: 260px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

/* ── Headline ───────────────────────────────────────────── */

/* drawLine duplicated here intentionally — LiteSpeed may strip keyframes
   from base.css if it doesn't see them used in the same file */
@keyframes drawLine {
  from { width: 0; }
  to   { width: 100%; }
}

.headline-group {
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: slideRight 0.7s cubic-bezier(0.16,1,0.3,1) forwards 0.25s;
}

.hed-top {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

h1 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 900;
  font-size: clamp(54px, 8vw, 100px);
  line-height: 0.94;
  letter-spacing: -0.02em;
}

.headline-group h1 .italic-line {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  color: var(--red);
  position: relative;
}

.headline-group h1 .italic-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 3px;
  display: block;
  height: 3px;
  width: 0;
  background: var(--red);
  animation: drawLine 0.8s ease forwards 1s !important;
}

/* ── Subhead / description ──────────────────────────────── */
.subhead {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  opacity: 0;
  animation: appear 0.5s ease forwards 0.7s;
}

.subhead p {
  font-size: 14px;
  line-height: 1.8;
  color: #4a4640;
  max-width: 680px;
}

.subhead p + p { margin-top: 14px; }
.subhead strong { font-weight: 700; color: var(--ink); }

/* ── Clusters section ───────────────────────────────────── */
.clusters-section {
  margin-top: 44px;
  opacity: 0;
  animation: appear 0.5s ease forwards 0.85s;
}

.section-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.clusters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

button.cluster-card {
  /* Native button reset */
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  /* Visual styles */
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  position: relative;
  transition: border-color 0.2s, opacity 0.2s;
}

.cluster-card:hover { border-color: var(--red); }

.cluster-card::before {
  content: attr(data-code);
  position: absolute;
  top: 10px; right: 12px;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--rule);
  font-weight: 700;
}

.cluster-name {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 7px;
}

.cluster-desc {
  font-size: 11.5px;
  line-height: 1.65;
  color: #4a4640;
}

.cluster-theme {
  margin-top: 9px;
  font-size: 10px;
  font-style: italic;
  color: var(--muted);
  border-top: 1px dashed var(--rule);
  padding-top: 7px;
}

/* ── Field notes list ───────────────────────────────────── */
.notes-section {
  margin-top: 44px;
  opacity: 0;
  animation: appear 0.5s ease forwards 0.95s;
}

.notes-list {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.note-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: baseline;
  gap: 0 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
  position: relative;
}

.note-row:hover { background: var(--paper); }
.note-row:hover .note-arrow { opacity: 1; transform: translateX(0); }

.note-row.is-highlighted {
  background: var(--paper);
  border-left: 2px solid var(--red);
  padding-left: 8px;
}

.note-row.is-dimmed {
  opacity: 0.35;
  transition: opacity 0.2s;
}

.cluster-card.is-active {
  border-color: var(--red);
}

.note-id {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.note-title-wrap { min-width: 0; }

.note-title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-cluster {
  display: inline-block;
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
}

.note-arrow {
  font-size: 13px;
  color: var(--red);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}

/* ── Author block ───────────────────────────────────────── */
.author-block {
  margin-bottom: 28px;
}

.author-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  border: 1px solid var(--rule);
}

.author-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 6px;
}

.author-bio {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 8px;
}

.author-linkedin {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.note-row:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.author-linkedin:hover { border-color: var(--red); }
/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 680px) {
  .page { padding: 24px 20px; }
  .main { grid-template-columns: 1fr; }
  .annotations { display: none; }
  .clusters-grid { grid-template-columns: 1fr; }
  .notes-list { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 60px 1fr auto; gap: 0 12px; }
}

/* ── Cluster dim state (JS-driven) ─────────────────────── */
.cluster-card.is-dimmed {
  opacity: 0.45;
  transition: opacity 0.2s;
}
.cluster-card {
  transition: border-color 0.2s, opacity 0.2s;
}

/* ── Focus visible ──────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}