/* page.css — page-specific layout for the Reflections page.
   Depends on styles.css (the shared design system). */

/* ---- Header — matches /writing rhythm ------------------------------------- */
.reflections-head { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.4rem, 3.5vw, 2.5rem); }
.reflections-head .display { margin-bottom: 1.4rem; }
.reflections-head .lede { max-width: 42ch; }

/* ---- X column --------------------------------------------------------------
   No-JS fallback: a single centered column of cards (also what a crawler and a
   JS-off visitor get). x-masonry.js upgrades this into a row-major two-column
   masonry by dealing the cards left→right into .x-col flex columns — so reading
   order stays chronological across then down (01,02 / 03,04 / 05,06) while each
   column stacks tightly with no row-alignment gaps. It reverts to this single
   column below the breakpoint. */
.x-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 560px;
  margin: var(--sp-4) auto 0;
}
.x-column.is-cols {
  flex-direction: row;
  align-items: flex-start;
  max-width: 1120px;
}
.x-column.is-cols .x-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ---- Card shell — same accent-bar-on-hover idiom as .card ------------------ */
.x-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 1.9rem);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.x-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform .35s var(--ease);
}
.x-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line);
}
.x-card:hover::before { transform: scaleY(1); }

/* ---- Meta label — eyebrow-style mono caption -------------------------------- */
.x-meta {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .9rem;
}
.x-meta .num { color: var(--accent); }

/* ---- Fallback pull-quote (pre-JS / crawler-visible) -------------------------
   Once x-embeds.js runs, the blockquote is swapped for an
   <iframe class="twitter-tweet twitter-tweet-rendered"> which the widget
   sizes and centers itself — the rule below is scoped to the un-rendered
   blockquote only so it never fights the rendered embed. */
.x-card blockquote.twitter-tweet:not(.twitter-tweet-rendered) {
  display: block;
  font-family: var(--font-reading);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 1.1rem;
  margin: 0;
}
.x-card blockquote.twitter-tweet:not(.twitter-tweet-rendered) p {
  margin: 0 0 .85rem;
}
.x-card blockquote.twitter-tweet:not(.twitter-tweet-rendered) a {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--accent);
}

/* the rendered iframe centers itself via the widget's own inline styles —
   just make sure the card doesn't clip or misalign it */
.x-card .twitter-tweet-rendered {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ---- CTA section ------------------------------------------------------------ */
.reflections-cta .wrap { display: flex; justify-content: center; }

@media (max-width: 560px) {
  .x-card { padding: 1.2rem; }
}
