/* ==========================================================================
   page sections: hero, rotator, signals rotary + card, event, opinions
   ========================================================================== */

/* view transitions between /home and /opinions (Chrome, Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; filter: blur(8px); transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; filter: blur(8px); transform: translateY(10px); } }

/* ---------- hero ---------- */
.hero { padding: clamp(72px, 11vw, 150px) 0 var(--space-16); }
/* fingerprint hero: the wordmark is "scanned" in, then the print follows the cursor */
.print { position: relative; width: fit-content; max-width: calc(100% - 32px); margin: 0 auto clamp(48px, 7vw, 88px); cursor: crosshair; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.print__word { font-size: clamp(72px, 16.5vw, 228px); line-height: 1.18; padding-bottom: 0; }
.print .wordmark--live { position: relative; z-index: 1; clip-path: inset(0 0 calc(100% - var(--scan, 0%)) 0); transition: background-position .9s var(--ease-out); }
.print__ghost { position: absolute; inset: 0; z-index: 0; color: var(--gray-100); -webkit-text-fill-color: var(--gray-100); background: none; }
.print__line { position: absolute; left: -3%; right: -3%; top: var(--scan, 0%); height: 2px; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--blue-600) 12%, #6f8cff 50%, var(--blue-600) 88%, transparent);
  box-shadow: 0 0 18px 4px rgba(0,33,197,.35), 0 0 60px 12px rgba(0,33,197,.12);
  opacity: var(--line, 0); transition: opacity .4s; }
.print__line::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 60px; background: linear-gradient(to top, rgba(0,33,197,.10), transparent); }
.print__status { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); white-space: nowrap; display: flex; align-items: center; gap: 8px; color: var(--text-accent); opacity: 0; transition: opacity .5s; }
.print.is-verified .print__status { opacity: 1; }
.print__status .tick { width: 14px; height: 14px; border-radius: 50%; background: var(--blue-600); display: grid; place-items: center; transform: scale(0); transition: transform .5s var(--ease-spring) .1s; }
.print.is-verified .print__status .tick { transform: scale(1); }
.print__status .tick svg { width: 8px; height: 8px; }
.hero__caption { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 16px; width: min(var(--wide), calc(100% - 48px)); margin: calc(clamp(48px, 7vw, 88px) * -1 + 44px) auto clamp(48px, 7vw, 88px); color: var(--text-tertiary); }
.hero__caption span:last-child { text-align: right; }

.blur-word { display: inline-block; animation: blurword 6s var(--ease-out) infinite; }
@keyframes blurword {
  0%, 62%, 100% { filter: blur(0); opacity: 1; letter-spacing: -0.03em; }
  70% { filter: blur(7px); opacity: .55; letter-spacing: 0em; }
  78% { filter: blur(0); opacity: 1; letter-spacing: -0.03em; }
}

.rotator { margin: var(--space-6) 0 var(--space-4); color: var(--text-primary); }
.rotator__slot { position: relative; display: inline-grid; vertical-align: bottom; overflow: hidden; height: 29px; color: var(--text-accent); }
.rotator__item { grid-area: 1/1; justify-self: start; white-space: nowrap; transition: transform .6s var(--ease-out), opacity .6s var(--ease-out), filter .6s var(--ease-out); }
.rotator__item[data-state="next"] { transform: translateY(100%); opacity: 0; filter: blur(4px); }
.rotator__item[data-state="prev"] { transform: translateY(-100%); opacity: 0; filter: blur(4px); }
.rotator__caret { display: inline-block; width: 2px; height: 1.05em; background: var(--blue-600); vertical-align: -3px; margin-left: 2px; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.hero__body { color: var(--text-secondary); margin: 0 0 var(--space-8); }
.hero__body strong { color: var(--text-primary); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* dictionary definition */
.define {
  margin-top: var(--space-16);
  display: grid; grid-template-columns: auto 1fr; gap: 6px 20px;
  padding: var(--space-6);
  border: 1px dashed var(--border-default); border-radius: var(--radius-md);
  background: rgba(247,247,247,.6);
}
.define__word { font-weight: 600; letter-spacing: -0.01em; }
.define__pos { font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); }
.define__def { grid-column: 1 / -1; color: var(--text-secondary); font-size: 15px; line-height: 24px; }
.define__def em { color: var(--text-primary); font-style: normal; background: linear-gradient(transparent 62%, var(--blue-100) 62%); }

/* ---------- signals ---------- */
.signals { padding: var(--space-24) 0 var(--space-16); overflow: hidden; }
.signals__head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-8); margin-bottom: var(--space-12); }
.signals__head p { margin: var(--space-4) 0 0; color: var(--text-secondary); max-width: 560px; }
.signals__controls { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full); border: 1px solid var(--border-default);
  background: var(--bg-page); cursor: pointer; display: grid; place-items: center;
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur) var(--ease-spring);
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 16px; height: 16px; }

.rotary {
  position: relative; height: 500px; perspective: 1500px; perspective-origin: 50% 40%;
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; outline: none;
}
.rotary.is-dragging { cursor: grabbing; }
.rotary__ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.rotary::before { /* floor glow under centre card */
  content: ""; position: absolute; left: 50%; bottom: 6px; width: 420px; height: 40px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0,33,197,.16), transparent); filter: blur(6px); pointer-events: none;
}
.rotary__fade { position: absolute; inset: 0; pointer-events: none; z-index: 200;
  background: linear-gradient(90deg, var(--bg-page) 0%, rgba(255,255,255,0) 14%, rgba(255,255,255,0) 86%, var(--bg-page) 100%); }

.signals__meta { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); margin-top: var(--space-8); }
.signals__meta .t-meta { min-width: 160px; }
.signals__meta .t-meta:last-child { text-align: right; }
.dots { flex-wrap: wrap; }
.dots__gap { width: 10px; }

/* ---------- card (standard shape for every tweet + article) ---------- */
.card {
  position: absolute; left: 0; top: 0;
  width: 320px; height: 420px;
  display: flex; flex-direction: column;
  padding: 18px 18px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(247,247,247,.92));
  border: 1px solid rgba(217,217,217,.9);
  box-shadow: var(--surface-shadow);
  text-decoration: none; color: var(--text-primary);
  backface-visibility: hidden; will-change: transform, opacity;
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur);
}
.card.is-center { border-color: rgba(0,33,197,.28); box-shadow: var(--surface-shadow), 0 0 0 4px rgba(0,33,197,.05); }
.card.is-center:hover { border-color: var(--blue-600); }
.card__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em; color: var(--text-tertiary); text-transform: uppercase; }
.card__src { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.card__src svg { width: 13px; height: 13px; color: var(--text-primary); }
.card__src-mono { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: var(--gray-900); color: #fff; font-size: 8px; letter-spacing: 0; }
.card__body { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 14px; position: relative; }
.card__author { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card__author b { display: block; font-size: 14px; line-height: 18px; font-weight: 600; }
.card__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-subtle); object-fit: cover; }
.card__text { margin: 0; font-size: 15px; line-height: 22px; letter-spacing: -0.005em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 11; overflow: hidden; }
.card__text--short { -webkit-line-clamp: 4; }
.card__text--big { font-size: 22px; line-height: 28px; letter-spacing: -0.015em; font-weight: 500; }
.card__more { color: var(--text-tertiary); }
.card__quote { margin-top: 10px; padding: 10px 12px; border-left: 2px solid var(--blue-100); background: var(--bg-accent-subtle); border-radius: 0 8px 8px 0; font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.card__quote .t-meta { display: block; color: var(--text-accent); font-size: 10px; margin-bottom: 2px; }
.card__media { margin-top: auto; height: 168px; border-radius: 12px; overflow: hidden; background: var(--bg-subtle); border: 1px solid var(--border-default); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__cover { position: relative; height: 158px; border-radius: 12px; overflow: hidden; background: var(--bg-subtle); border: 1px solid var(--border-default); flex-shrink: 0; }
.card__cover img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.02); }
.card__cover--px { background: var(--bg-accent-subtle); border-color: var(--blue-100); }
.card__cover--px svg { width: 100%; height: 100%; }
.card__cover-word { position: absolute; left: 12px; bottom: 10px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-page); color: var(--text-accent); padding: 3px 7px; border-radius: 4px; }
.card__play { position: absolute; top: 57px; left: 50%; transform: translateX(-50%); width: 46px; height: 46px; border-radius: 50%; background: var(--blue-600); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(0,33,197,.6); }
.card__play svg { width: 20px; height: 20px; margin-left: 2px; }
.card__title { margin: 14px 0 6px; font-size: 18px; line-height: 23px; font-weight: 600; letter-spacing: -0.015em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.card__dek { margin: 0; font-size: 13px; line-height: 19px; color: var(--text-secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.card__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--border-default); color: var(--text-tertiary); }
.card__foot .t-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.card__cta { font-size: 13px; font-weight: 500; color: var(--text-accent); opacity: 0; transform: translateX(-4px); transition: opacity var(--dur), transform var(--dur) var(--ease-out); }
.card.is-center .card__cta { opacity: 1; transform: none; }

/* ---------- event ---------- */
.event { padding: var(--space-24) 0; }
.event__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-8); }
.event__date { color: var(--text-accent); margin: 0 0 var(--space-3); display: flex; align-items: center; gap: 10px; }
.event__date .live { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-600); box-shadow: 0 0 0 0 rgba(0,33,197,.5); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(0,33,197,0); } 100% { box-shadow: 0 0 0 0 rgba(0,33,197,0); } }
.event__lede { color: var(--text-secondary); margin: var(--space-4) 0 0; }
.steps { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--border-default); }
.step { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--border-default); transition: background var(--dur); }
.step:hover { background: linear-gradient(90deg, var(--bg-accent-subtle), transparent); }
.step__n { font-family: var(--font-mono); font-size: 12px; color: var(--text-accent); padding-top: 3px; }
.step b { display: block; font-weight: 500; }
.step span { color: var(--text-secondary); font-size: 15px; }
.countdown { display: flex; gap: var(--space-2); margin-top: var(--space-8); }
.countdown__cell { flex: 1; text-align: center; padding: 14px 8px 10px; border-radius: var(--radius-md); background: var(--bg-surface); border: 1px solid var(--border-default); }
.countdown__num { display: block; font-family: var(--font-mono); font-size: 28px; line-height: 32px; font-weight: 500; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.countdown__lbl { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-tertiary); }
/* embed breaks out of the 640 column so Luma uses its side-by-side layout (Register button stays visible) */
.event__embed { --w: min(880px, calc(100vw - 48px)); width: var(--w); margin: var(--space-8) 0 0 calc((100% - var(--w)) / 2); }
.embed-frame iframe { display: block; width: 100%; height: 440px; border: 0; background: #EAF1FD; }
@media (max-width: 760px) { .embed-frame iframe { height: 780px; } }
.embed-note { display: flex; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-3); color: var(--text-tertiary); }

/* ---------- opinions ---------- */
.drafts { display: grid; gap: var(--space-3); margin-top: var(--space-12); }
.draft {
  display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: var(--space-4);
  padding: 18px 20px; border-radius: var(--radius-md); border: 1px solid var(--border-default);
  background: linear-gradient(160deg, #fff, var(--bg-surface)); box-shadow: var(--surface-shadow);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur);
}
.draft:hover { transform: translateX(4px); border-color: var(--blue-100); }
.draft__kind { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-accent); background: var(--bg-accent-subtle); padding: 4px 8px; border-radius: 4px; justify-self: start; }
.draft__kind--convicted { color: #fff; background: var(--gray-900); }
.redact { display: flex; flex-wrap: wrap; gap: 6px; }
.redact i { display: block; height: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--gray-900) 0%, var(--gray-700) 50%, var(--gray-900) 100%); background-size: 200% 100%; animation: shimmer 2.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.draft__status { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }
.draft__status::after { content: "_"; animation: caret 1s steps(2) infinite; }
.draft--live { text-decoration: none; color: inherit; }
.draft--live .draft__title { font-weight: 500; }

.opinion-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-8); }
.opinion-tags span { font-family: var(--font-mono); font-size: 12px; padding: 6px 12px; border-radius: var(--radius-full); border: 1px solid var(--border-default); color: var(--text-secondary); background: #fff; }

/* responsive */
@media (max-width: 760px) {
  .signals__head { flex-direction: column; align-items: flex-start; }
  .rotary { height: 470px; }
  .card { width: 280px; height: 400px; }
  .signals__meta .t-meta { min-width: 0; }
  .signals__meta .t-meta:first-child { display: none; }
  .draft { grid-template-columns: 1fr auto; }
  .draft .redact { grid-column: 1 / -1; grid-row: 2; }
  .hero__caption { display: none; }
}

@media (max-width: 520px) {
  .define { grid-template-columns: 1fr; }
  .nav { padding: 12px 16px; }
  .nav__right { gap: 2px; }
  .nav__right .btn--sm { --h: 32px; padding: 0 14px; font-size: 13px; }
  /* rotator: its own two-line slot so long phrases wrap without overlapping */
  .rotator__slot { display: block; position: relative; width: 100% !important; height: 58px; margin-top: 2px; }
  .rotator__item { position: absolute; left: 0; top: 0; width: 100%; white-space: normal; }
  .rotator__caret { display: none; }
}
@media (max-width: 380px) {
  .define__pos { display: none; }
  .card { width: 260px; height: 392px; padding: 16px 16px 12px; }
  .card__media { height: 150px; }
}
@media (max-width: 520px) {
  /* 23 dots don't fit a phone: show chapter + counter instead */
  .dots { display: none; }
  .signals__meta .t-meta:first-child { display: block !important; min-width: 0; }
  .signals__meta .t-meta:last-child { white-space: nowrap; }
}
@media (max-width: 640px) {
  .print__status { position: static; transform: none; justify-content: center; margin-top: 10px; white-space: normal; text-align: center; font-size: 11px; }
}

/* opinions teaser on home */
.opinions-band { padding: var(--space-16) 0 var(--space-24); }
.opinions-band .t-h1 { margin-top: 0; }

/* mid-size fingerprint wordmark above the hero copy, aligned to the text column */
.print--hero { margin: 0 0 clamp(28px, 4vw, 44px); max-width: 100%; }
.print--hero .print__word { font-size: clamp(64px, 13vw, 124px); }
