/* Digital Infohub — homepage v3.
   A thin layer over the homepage rules in index.html: bigger corners, quieter
   hero chrome, scroll-linked zoom, and the daily-three card. Homepage only. */

:root {
  --home-r-xl: 32px;
  --home-r-lg: 26px;
  --home-r-md: 20px;
  --home-r-sm: 14px;
}

.home-content { gap: 78px; }

/* ---------------------------------------------------------------- the hero */
.hero { max-width: 940px; padding: 26px 0 0; }
.hero-glow { opacity: .55; animation: none; }

.hero h1 { font-size: clamp(36px, 6.5vw, 68px); letter-spacing: -.052em; }
.hero-sub { max-width: 640px; margin-bottom: 28px; }
.hero .dih-pill { margin-bottom: 22px; }

/* The search field is the one thing to do here: give it room. */
.hero .hub-ai { max-width: 680px; margin: 26px auto 10px; }
.hero .hub-ai-form { padding: 7px 8px 7px 20px; }
.hero .hub-ai-input { font-size: 16px; padding: 13px 0; }
.hero .hub-ai-btn { padding: 10px 20px; }

/* The four numbers read as one quiet line, not four little cards. */
.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0;
  max-width: 640px; margin: 34px auto 0; padding: 15px 0;
  border-top: 1px solid var(--dih-border);
  border-bottom: 1px solid var(--dih-border);
}
.hero-stats .hero-stat {
  flex: 1 1 0; min-width: 0;
  padding: 0 16px; border: 0; border-radius: 0; background: none; text-align: center;
}
.hero-stat + .hero-stat { border-left: 1px solid var(--dih-border); }
.hero-stat b { font-size: 20px; letter-spacing: -.03em; }
.hero-stat span { font-size: 10.5px; }

@media (max-width: 560px) {
  .hero { padding-top: 14px; }
  .hero .hub-ai { margin-top: 20px; }
  .hero-stats .hero-stat { padding: 0 9px; }
  .hero-stat b { font-size: 16px; }
  .hero-stat span { font-size: 9px; line-height: 1.35; }
}

/* -------------------------------------------------------------- section rhythm */
#homeAbout, #homePaths, #homeInterest, #homeExplore, #homeBriefing,
#marketPulse, #homeNews, #homeDailyInsight, #vr, #homeApp { scroll-margin-top: 84px; }

.home-jump {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 2px;
  margin: 0 auto; max-width: 1120px; scrollbar-width: none;
}
.home-jump::-webkit-scrollbar { display: none; }
.home-jump a {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--dih-border); background: var(--dih-surface);
  color: var(--dih-text-sub); font-size: 12px; font-weight: 650; text-decoration: none;
}
.home-jump a:hover { color: var(--dih-text); border-color: var(--dih-border-strong); background: var(--dih-surface-2); }

.dih-section-head { margin-bottom: 26px; }
.dih-section-head h2 { letter-spacing: -.042em; text-wrap: balance; }
.dih-eyebrow { letter-spacing: .14em; }

/* ---------------------------------------------------------- chapter openers */
/* A title and its picture arrive together: the page reads as chapters. */
.dih-section-head.chapter-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 336px;
  gap: 32px; align-items: center; margin-bottom: 30px;
}
.dih-section-head.chapter-head .chapter-copy { min-width: 0; }

.chapter-copy .dih-eyebrow { position: relative; padding-left: 30px; }
.chapter-copy .dih-eyebrow::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 18px; height: 2px;
  border-radius: 2px; background: currentColor; opacity: .55;
  transition: width .9s var(--dih-ease) .2s, opacity .9s var(--dih-ease) .2s;
}
.is-focus .chapter-copy .dih-eyebrow::before, .is-in .chapter-copy .dih-eyebrow::before { width: 22px; opacity: .9; }

.chapter-copy h2 {
  margin: 12px 0 0; max-width: 18ch;
  font-size: clamp(28px, 3.7vw, 42px); line-height: 1.05; letter-spacing: -.048em;
  font-weight: 830; color: var(--dih-text);
}
.chapter-copy h2 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--dih-accent) 0%, #9b7bff 52%, var(--dih-accent-3) 100%);
  background-size: 220% 100%; background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position 1.4s var(--dih-ease);
}
.is-focus .chapter-copy h2 em { background-position: 100% 50%; }
.chapter-copy p { margin: 13px 0 0; max-width: 54ch; font-size: 14px; line-height: 1.62; }
.chapter-copy .dih-view-all { margin-top: 18px; }

.chapter-art {
  position: relative; margin: 0; aspect-ratio: 4 / 3;
  border-radius: var(--home-r-lg); overflow: hidden;
  border: 1px solid var(--dih-border); background: var(--dih-surface-3);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .22);
  transition: border-color .7s var(--dih-ease), box-shadow .7s var(--dih-ease);
}
.is-focus .chapter-art {
  border-color: rgba(120, 160, 255, .34);
  box-shadow: 0 28px 64px rgba(0, 0, 0, .38);
}
.chapter-art img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  transform: scale(1.06); filter: saturate(.92);
}
.chapter-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 5, 10, 0) 42%, rgba(4, 5, 10, .76) 100%);
}
.chapter-art figcaption {
  position: absolute; left: 15px; right: 15px; bottom: 13px; z-index: 2;
  font-size: 11px; line-height: 1.45; color: rgba(240, 244, 255, .78);
}
.chapter-art figcaption b { display: block; color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: -.01em; }

@media (max-width: 900px) {
  .dih-section-head.chapter-head { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; }
  .chapter-copy h2 { max-width: none; }
}
@media (max-width: 700px) {
  .dih-section-head.chapter-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 22px; align-items: start; }
  .chapter-art { aspect-ratio: 16 / 9; max-height: 260px; border-radius: 20px; }
  .chapter-copy h2 { font-size: clamp(25px, 7.2vw, 31px); }
  .chapter-copy p { font-size: 13px; margin-top: 10px; }
  .chapter-copy .dih-view-all { margin-top: 14px; }
  .chapter-art figcaption { font-size: 10.5px; }
}

/* ------------------------------------------------------- what this is */
/* An explanation and the six actions, side by side: orientation and a door. */
.home-about {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 48px; align-items: start;
}
.about-copy h2 {
  margin: 12px 0 0; max-width: 22ch;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.06; letter-spacing: -.046em;
  font-weight: 830; color: var(--dih-text); text-wrap: balance;
}
.about-copy h2 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--dih-accent) 0%, #9b7bff 52%, var(--dih-accent-3) 100%);
  background-size: 220% 100%; background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position 1.4s var(--dih-ease);
}
.is-focus .about-copy h2 em { background-position: 100% 50%; }
.about-copy p {
  margin: 14px 0 0; max-width: 54ch;
  font-size: 14px; line-height: 1.68; color: var(--dih-text-sub);
}
.about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.about-more {
  font-size: 12.5px; font-weight: 700; color: var(--dih-accent); text-decoration: none;
}
.about-more:hover { text-decoration: underline; }
.about-more span { display: inline-block; transition: transform .25s var(--dih-ease); }
.about-more:hover span { transform: translateX(3px); }

.about-do {
  padding: 18px 16px;
  border-radius: var(--home-r-lg); border: 1px solid var(--dih-border);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(76, 141, 255, .09), transparent 60%),
    linear-gradient(180deg, var(--dih-surface-2), var(--dih-surface));
  box-shadow: 0 20px 48px rgba(0, 0, 0, .18);
}
.about-do-label {
  margin: 2px 4px 10px; font-family: var(--dih-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--dih-text-muted);
}
.about-rows { display: grid; gap: 2px; }
.about-row {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border-radius: 15px; text-decoration: none; color: var(--dih-text);
  transition: background .22s var(--dih-ease), transform .22s var(--dih-ease);
}
.about-row:hover { background: var(--dih-surface-3); transform: translateX(2px); }
.about-row i {
  flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 11px; font-style: normal; font-size: 16px;
  background: rgba(76, 141, 255, .1); border: 1px solid rgba(76, 141, 255, .16);
}
.about-row span { flex: 1; min-width: 0; }
.about-row b { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.about-row small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.45; color: var(--dih-text-muted); }
.about-row em { font-style: normal; font-size: 13px; color: var(--dih-text-muted); transition: transform .22s var(--dih-ease), color .22s; }
.about-row:hover em { color: var(--dih-accent); transform: translateX(2px); }
html[data-theme="light"] .about-do { box-shadow: 0 14px 34px rgba(30, 50, 90, .08); }

/* ------------------------------------------------------- the two paths */
.path-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.path-card {
  display: flex; flex-direction: column; padding: 26px 24px 22px;
  border-radius: var(--home-r-lg); border: 1px solid var(--dih-border);
  background: linear-gradient(180deg, var(--dih-surface-2), var(--dih-surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 22px 50px rgba(0, 0, 0, .18);
}
.path-card-start {
  background:
    radial-gradient(130% 120% at 0% 0%, rgba(76, 141, 255, .13), transparent 58%),
    linear-gradient(180deg, var(--dih-surface-2), var(--dih-surface));
}
.path-card-pro {
  background:
    radial-gradient(130% 120% at 100% 0%, rgba(139, 92, 246, .16), transparent 58%),
    linear-gradient(180deg, var(--dih-surface-2), var(--dih-surface));
}
.path-tag {
  align-self: flex-start; padding: 5px 11px; border-radius: 999px;
  font-family: var(--dih-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--dih-accent); background: rgba(76, 141, 255, .1);
  border: 1px solid rgba(76, 141, 255, .22);
}
.path-card-pro .path-tag { color: #c4b5fd; background: rgba(139, 92, 246, .12); border-color: rgba(139, 92, 246, .28); }
.path-card h3 {
  margin: 14px 0 0; font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.15; letter-spacing: -.036em; font-weight: 820; text-wrap: balance;
}
.path-card > p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.62; color: var(--dih-text-sub); max-width: 46ch; }
.path-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; }
.path-list a {
  display: block; padding: 11px 12px; border-radius: 15px;
  border: 1px solid transparent; text-decoration: none; color: inherit;
  transition: background .22s var(--dih-ease), border-color .22s var(--dih-ease);
}
.path-list a:hover { background: rgba(255, 255, 255, .04); border-color: var(--dih-border); }
.path-list b { display: block; font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.path-list span { display: block; margin-top: 3px; font-size: 11.8px; line-height: 1.5; color: var(--dih-text-muted); }
.path-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 20px; }

/* ------------------------------------------------------- keep exploring */
.home-content > .dih-explore {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  max-width: none; margin: 0; padding: 20px 22px;
  border-radius: var(--home-r-lg); border: 1px solid var(--dih-border);
  background: var(--dih-surface);
}
.home-more-links { display: flex; flex-wrap: wrap; gap: 8px; }
.home-more-links a {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--dih-border);
  color: var(--dih-text-sub); font-size: 12.5px; font-weight: 650; text-decoration: none;
  transition: .22s var(--dih-ease);
}
.home-more-links a:hover { color: var(--dih-text); border-color: var(--dih-border-strong); background: var(--dih-surface-2); transform: translateY(-2px); }

@media (max-width: 980px) {
  .home-about { grid-template-columns: 1fr; gap: 26px; }
  .about-copy h2 { max-width: none; }
}
@media (max-width: 860px) {
  .path-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .about-copy h2 { font-size: clamp(25px, 7.2vw, 31px); }
  .about-copy p { font-size: 13px; }
  .about-do { padding: 14px 12px; border-radius: 22px; }
  .about-actions .dih-btn { flex: 1 1 auto; justify-content: center; }
  .path-card { padding: 22px 18px 18px; border-radius: 22px; }
  .path-actions .dih-btn { flex: 1 1 auto; justify-content: center; }
  .home-content > .dih-explore { padding: 16px; border-radius: 22px; }
}

/* --------------------------------------------------------------- the cards */
.hub-banner { border-radius: var(--home-r-lg); }
.vr-band .promo-card:first-child { border-color: rgba(139, 92, 246, .4); }

.promo-band {
  margin: 0; padding: 32px; border-radius: var(--home-r-xl);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .26);
}
.promo-band .promo-card { border-radius: var(--home-r-md); }
/* Four cards should sit in one row, not leave an orphan underneath. */
.promo-band .promo-grid { grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 12px; }
.promo-band .promo-head h2 { letter-spacing: -.042em; }

.article-card { border-radius: var(--home-r-lg); }
.article-body { padding: 18px 19px 20px; }
.article-card h3 { font-size: 16px; }

.newsletter-band { padding: 34px 32px; border-radius: var(--home-r-xl); }

.pulse-card { border-radius: var(--home-r-md); }
.tool-card { border-radius: var(--home-r-md); }
.hub-mini { border-radius: var(--home-r-md); }
.interest-card { border-radius: var(--home-r-md); }
/* At four across an ellipsis hides most of the title; two lines do not. */
#homeInterest .interest-copy strong {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.32;
}
.dih-explore-card { border-radius: var(--home-r-md); }
.hub-ad, .dih-ad-slot { border-radius: var(--home-r-md) !important; }
/* Ads are flex items here: without an explicit width the unit collapses to the
   width of its empty frame until it loads. */
.home-content > .dih-ad-slot, .home-content > .hub-ad { width: 100%; }

@media (max-width: 640px) {
  .home-content { gap: 54px; }
  .promo-band .promo-grid { grid-template-columns: 1fr; }
  .promo-band, .newsletter-band { padding: 20px; border-radius: 24px; }
  .article-card { border-radius: 22px; }
  .hub-banner { border-radius: 20px; }
}

/* ------------------------------------------------------ reading progress */
.home-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1000;
  pointer-events: none; background: rgba(255, 255, 255, .04);
}
.home-progress i {
  display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--dih-accent), #9b7bff 58%, var(--dih-accent-3));
  box-shadow: 0 0 14px rgba(76, 141, 255, .5);
}

/* ------------------------------------------------------- scroll-driven zoom */
/* Sections rise and settle as they enter; cards breathe in with the scroll. */
@media (prefers-reduced-motion: no-preference) {
  .home-content > .zoom {
    opacity: 0; transform: translate3d(0, 22px, 0) scale(.972);
    transition: opacity .8s var(--dih-ease), transform 1s var(--dih-ease);
  }
  .home-content > .zoom.is-in { opacity: 1; transform: none; }

  @supports (animation-timeline: view()) {
    .path-card, .promo-card, .tool-card, .article-card, .hub-mini, .interest-card {
      animation: hubCardZoom linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 78%;
    }
  }
}

@keyframes hubCardZoom { from { scale: .965; } to { scale: 1; } }

/* The chapter picture drifts against the scroll instead of with it. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .chapter-art img {
      animation: chapterDrift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}
@keyframes chapterDrift {
  from { transform: scale(1.14) translate3d(0, -3.5%, 0); }
  to { transform: scale(1.14) translate3d(0, 3.5%, 0); }
}

/* ------------------------------------------------------- today's three card */
.hd-pick {
  position: fixed; left: 20px; bottom: 20px; z-index: 930;
  width: min(332px, calc(100vw - 40px)); padding: 17px 18px 15px;
  border-radius: 22px; border: 1px solid rgba(120, 160, 255, .24);
  background: linear-gradient(180deg, rgba(18, 22, 36, .98), rgba(11, 14, 24, .98));
  box-shadow: 0 28px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; transform: translateY(14px) scale(.97); pointer-events: none;
  transition: opacity .4s var(--dih-ease), transform .5s var(--dih-ease);
}
.hd-pick.is-in { opacity: 1; transform: none; pointer-events: auto; }
html[data-theme="light"] .hd-pick {
  background: #fff; border-color: rgba(30, 60, 120, .16);
  box-shadow: 0 28px 70px rgba(20, 35, 70, .18);
}
.hd-pick-x {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  border: 0; border-radius: 9px; background: none; color: var(--dih-text-muted);
  cursor: pointer; font-size: 13px; line-height: 1;
}
.hd-pick-x:hover { background: var(--dih-surface-3); color: var(--dih-text); }
.hd-pick-kicker {
  margin: 0; font-family: var(--dih-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--dih-accent);
}
.hd-pick h3 { margin: 7px 0 4px; font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.hd-pick-sub { margin: 0 0 10px; font-size: 11.5px; line-height: 1.5; color: var(--dih-text-muted); }
.hd-pick-list { display: grid; gap: 2px; }
.hd-pick-list a {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: 12px; text-decoration: none; color: var(--dih-text);
}
.hd-pick-list a:hover { background: var(--dih-surface-2); }
.hd-pick-list i { font-style: normal; width: 20px; font-size: 15px; text-align: center; }
.hd-pick-list strong { display: block; font-size: 12.5px; font-weight: 650; }
.hd-pick-list small { display: block; font-size: 10.5px; color: var(--dih-text-muted); }
.hd-pick-mail {
  display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 700;
  color: var(--dih-accent); text-decoration: none;
}
.hd-pick-mail:hover { text-decoration: underline; }

@media (max-width: 720px) { .hd-pick { display: none; } }
