/* ============================================================
   Noah Predict — scroll-film engine (site-test, design-lab)
   One uniform system: kicker → headline → support → component
   ============================================================ */
:root {
  --ink: #172334;
  --muted: #657489;
  --faint: #9aa7b8;
  --line: #d8e1ea;
  --paper: #f5f7fa;
  --blue: #173669;
  --blue-deep: #0d1e39;
  --blue-black: #07111f;
  --gold: #e4a33b;
  --gold-bright: #f4c878;
  --green: #2d7452;
  --max: 1280px;
  --radius: 8px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: #fff;
  background: var(--blue-black);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Nav (fixed, translucent) ---------- */
.nav {
  height: 64px;
  padding: 0 clamp(18px, 3.8vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(20,22,28,.55);
  border-bottom: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}
.logo {
  width: 140px;
  height: 36px;
  background: url("/images/predict-logo-20260427-white-yellow.png") left center/contain no-repeat;
  text-indent: -9999px;
  overflow: hidden;
  flex: 0 0 auto;
}
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-login {
  color: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 700;
}
.menu-toggle {
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span { width: 16px; height: 2px; border-radius: 999px; background: currentColor; }

/* ---------- Drawer ---------- */
.menu-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3,11,22,.54);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.menu-drawer {
  position: fixed; top: 0; right: 0; z-index: 61;
  width: min(560px, calc(100vw - 22px));
  height: 100vh;
  overflow-y: auto;
  background: #f8fafc;
  color: var(--ink);
  transform: translateX(102%);
  transition: transform .26s ease;
  box-shadow: -28px 0 80px rgba(0,0,0,.28);
  padding: 28px;
}
body.menu-open { overflow: hidden; }
body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
body.menu-open .menu-drawer { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.drawer-logo {
  width: 150px; height: 40px;
  background: url("/images/predict-logo-20260427-grey.png") left center/contain no-repeat,
              url("/images/predict-logo-grey.png") left center/contain no-repeat;
  text-indent: -9999px; overflow: hidden;
}
.drawer-close {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  cursor: pointer; font-size: 22px; line-height: 1;
}
.drawer-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.drawer-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.drawer-group h3 {
  margin: 0 0 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: 10px;
}
.drawer-group a {
  display: block;
  color: #32445c;
  font-weight: 650;
  font-size: 13px;
  line-height: 1.35;
  padding: 7px 0;
  border-top: 1px solid #eef2f6;
}
.drawer-group a:first-of-type { border-top: 0; }
.drawer-cta { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer-cta a {
  border-radius: var(--radius);
  padding: 13px 16px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid var(--blue);
}
.drawer-cta a:first-child { background: var(--blue); color: #fff; }
.drawer-cta a:last-child { background: #fff; color: var(--blue); }

/* ---------- The film ---------- */
.sj-wrap { position: relative; }
.sj-stage {
  padding: 86px clamp(20px, 4.5vw, 72px) 48px;
  position: relative;
  overflow: hidden;
  background: var(--blue-black);
}
.sj-backdrop {
  position: absolute;
  inset: -4%;
  z-index: 0;
  background: var(--sj-bg, none) center/cover no-repeat;
}
.sj-backdrop.kenburns { animation: sj-kenburns 38s ease-in-out infinite alternate; }
@keyframes sj-kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.09) translate(-1.2%, 1.4%); }
}
.sj-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.sj-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 78% 18%, rgba(228,163,59,.14), transparent 28%),
    linear-gradient(90deg, rgba(7,18,34,.96) 0%, rgba(7,18,34,.81) 38%, rgba(7,18,34,.45) 68%, rgba(7,18,34,.62) 100%),
    linear-gradient(180deg, rgba(7,18,34,.34), rgba(7,18,34,.78));
  pointer-events: none;
}
.sj-progress { display: none; }
.sj-count { display: none; }
.sj-beats {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}
.sj-beat { max-width: 860px; margin-top: 64px; }
.sj-beat:first-child { margin-top: 0; }
.sj-num {
  font-family: var(--mono);
  color: var(--gold-bright);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 16px;
}
.sj-beat h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 7vw, 92px);
  line-height: .92;
  letter-spacing: -.05em;
  color: #fff;
  max-width: 800px;
}
.sj-beat h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.8vw, 58px);
  line-height: 1;
  letter-spacing: -.04em;
  color: #fff;
}
.sj-beat p {
  margin: 20px 0 0;
  color: rgba(255,255,255,.75);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.62;
  max-width: 580px;
}
.sj-beat p strong { color: #fff; font-weight: 650; }
.sj-quote {
  font-family: var(--serif);
  font-style: italic;
  color: #fff;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.3;
  max-width: 640px;
  margin-top: 24px;
}
.sj-hint {
  margin-top: 38px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sj-hint::after {
  content: "";
  width: 44px; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.7), transparent);
  animation: sj-drip 2.2s ease-in-out infinite;
}
@keyframes sj-drip {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1); transform-origin: left; }
  55% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* uniform component rhythm */
.sj-beat .object-table,
.sj-beat .sj-figure,
.sj-beat .sj-chips,
.sj-beat .sj-stats,
.sj-beat .sj-news,
.sj-beat .sj-cta-btns { margin-top: 28px; }

.object-table {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 620px;
  background: rgba(7,17,31,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.object-row {
  display: grid;
  grid-template-columns: 136px minmax(0,1fr);
  border-top: 1px solid rgba(255,255,255,.1);
}
.object-row:first-child { border-top: 0; }
.object-row b, .object-row span { padding: 12px 14px; font-size: 12.5px; line-height: 1.45; }
.object-row b {
  background: rgba(255,255,255,.06);
  color: var(--gold-bright);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.object-row span { color: rgba(255,255,255,.78); }

.sj-figure { max-width: 760px; }
.sj-figure img {
  display: block;
  max-width: 100%;
  max-height: 44vh;
  object-fit: contain;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  background: #fff;
}

.sj-chips { display: flex; flex-wrap: wrap; gap: 9px; max-width: 660px; }
.sj-chip {
  border: 1px solid rgba(255,255,255,.32);
  color: rgba(255,255,255,.88);
  background: rgba(7,17,31,.4);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  transition: border-color .18s ease, color .18s ease;
}
.sj-chip:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

.sj-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 26px 34px;
  max-width: 560px;
}
.sj-stat b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1;
  color: #fff;
  margin-bottom: 7px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.sj-stat span {
  color: rgba(255,255,255,.6);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sj-news { max-width: 780px; display: grid; gap: 10px; }
.sj-news .news-item {
  background: rgba(7,17,31,.55);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 64px minmax(0,1fr) auto;
  gap: 14px;
  align-items: start;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sj-news .news-item b { color: var(--gold-bright); font-family: var(--mono); font-size: 11px; }
.sj-news .news-item strong { display: block; font-size: 14px; margin-bottom: 4px; color: #fff; }
.sj-news .news-item span { color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.45; }
.sj-news .news-item em { color: rgba(255,255,255,.42); font-family: var(--mono); font-size: 11px; font-style: normal; white-space: nowrap; }

.sj-cta-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.16);
  max-width: 640px;
}
.sj-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.sj-btn.primary {
  background: var(--gold-bright);
  color: var(--blue-black);
  box-shadow: 0 8px 28px rgba(228,163,59,.3);
}
.sj-btn.primary:hover { background: #ffe28a; transform: translateY(-1px); }
.sj-btn.ghost {
  background: rgba(7,17,31,.4);
  color: #fff;
  border: 1px solid rgba(255,255,255,.32);
}
.sj-btn.ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

/* ---------- Reading sweep: words light up gold at reading speed ---------- */
body.sj-on .sj-word { color: rgba(255,255,255,.32); transition: color .22s ease; }
body.sj-on .sj-word.hot { color: var(--gold-bright); }
body.sj-on h1 .sj-word.lit, body.sj-on h3 .sj-word.lit { color: #fff; }
body.sj-on p .sj-word.lit { color: rgba(255,255,255,.78); }
body.sj-on p strong .sj-word.lit { color: #fff; }

/* ---------- Pinned mode (JS active) ---------- */
body.sj-on .sj-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: 86px;
  padding-bottom: 36px;
}
body.sj-on .sj-progress {
  display: block;
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%);
  z-index: 5;
  transition: width .12s linear;
}
body.sj-on .sj-count {
  display: block;
  position: absolute;
  bottom: 20px;
  left: clamp(20px, 4.5vw, 72px);
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: rgba(255,255,255,.45);
}
body.sj-on .sj-beats { flex: 1 1 auto; min-height: 0; }
body.sj-on .sj-beat {
  position: absolute;
  inset: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
body.sj-on .sj-beat.active { opacity: 1; transform: none; pointer-events: auto; }
body.sj-on .sj-beat.past { opacity: 0; transform: translateY(-26px); }

/* ---------- Footer ---------- */
.site-footer {
  background: #050d18;
  color: rgba(255,255,255,.5);
  padding: 34px clamp(20px, 4.5vw, 72px);
  font-size: 12px;
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-inner a { color: rgba(255,255,255,.66); border-bottom: 1px solid rgba(255,255,255,.18); }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .nav { height: 58px; padding: 0 18px; }
  .logo { width: 122px; height: 32px; }
  .sj-stage { padding: 60px 20px 28px; }
  body.sj-on .sj-stage { padding-top: 76px; }
  .sj-beat h1 { font-size: clamp(40px, 12vw, 54px); }
  .sj-beat h3 { font-size: clamp(30px, 9.4vw, 42px); }
  .sj-beat p { font-size: 15px; margin-top: 14px; }
  .sj-num { margin-bottom: 10px; }
  .sj-quote { font-size: 19px; }
  .sj-hint { margin-top: 28px; font-size: 9px; letter-spacing: .16em; white-space: nowrap; }
  .sj-hint::after { width: 28px; }
  .sj-figure img { max-height: 36vh; }
  .sj-chips .sj-chip { padding: 9px 12px; font-size: 11.5px; }
  .sj-stats { gap: 20px 22px; }
  .sj-news { gap: 8px; }
  .sj-news .news-item { padding: 13px; grid-template-columns: 50px minmax(0,1fr); }
  .sj-news .news-item em { display: none; }
  .sj-news .news-item span { display: none; }
  .object-row { grid-template-columns: 104px minmax(0,1fr); }
  .object-row b, .object-row span { padding: 10px 12px; font-size: 11.5px; }
  .sj-cta-btns { flex-direction: column; }
  .sj-btn { justify-content: center; }
  .drawer-grid { grid-template-columns: 1fr; }
  .drawer-cta { grid-template-columns: 1fr; }
  .menu-drawer { width: min(100vw, 420px); padding: 20px; }
  body.sj-on .sj-count { left: 20px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sj-beat, .sj-hint, .sj-progress { transition: none !important; }
  .sj-backdrop.kenburns { animation: none; }
  .sj-hint::after { animation: none; }
}
