/* Homepage additions. Loads after style.css, product-showcase.css, hero-wordmark.css and publication.css. */

/* The template reserves 100px on the left of #main for a sidebar this page no longer has. */
.home-page #main { margin-left: 0; }

/* ---------- Hero: full width montage behind the copy ----------
   Each cut in hero-montage.* places the tracker window on the right half, inside the vertical band
   that survives object-fit: cover. The height grows with the width so wide screens do not crop it away. */
.home-page #hero.hero-montage {
  width: 100%;
  margin: 0;
  padding: 72px 0;
  min-height: clamp(520px, 46vw, 860px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #0a1a2c url("../media/hero/hero-montage-poster.jpg") center / cover no-repeat;
}
/* Replaces the template's 80% white wash: dark behind the copy on the left, clear over the tracker window on the right. */
.home-page #hero.hero-montage::before {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 26, 44, .94) 0%, rgba(10, 26, 44, .86) 30%, rgba(10, 26, 44, .35) 48%, rgba(10, 26, 44, .08) 62%, rgba(10, 26, 44, 0) 100%);
}
.hero-montage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.home-page .hero-montage-copy { max-width: 480px; }
.home-page #hero.hero-montage .hero-wordmark { width: 100%; max-width: 440px; mix-blend-mode: normal; filter: brightness(0) invert(1); }
.hero-montage-pause { position: absolute; right: 24px; bottom: 24px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); background: rgba(10, 26, 44, .55); color: #fff; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.hero-montage-pause:hover { background: rgba(10, 26, 44, .8); }
.hero-montage-pause[hidden] { display: none; }
.home-page #hero.hero-montage p { color: rgba(255, 255, 255, .9); }
.home-page #hero.hero-montage .product-button { background: #fff; border-color: #fff; color: #0b4852; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.home-page #hero.hero-montage .product-button:hover { background: #e8f3f4; color: #073740; }
.home-page #hero.hero-montage .product-text-link { color: #fff; }
.home-page #hero.hero-montage a:focus-visible, .hero-montage-pause:focus-visible { outline: 3px solid #7fd0dc; outline-offset: 3px; }

/* ---------- Tracker carousel: overview screenshot, then the walkthroughs, with feature tabs below ---------- */
.home-page .tracker-carousel-column { min-width: 0; }
.home-page .tracker-carousel { overflow: hidden; border: 1px solid #c5d7d8; border-radius: 12px; background: #fff; box-shadow: 0 18px 45px -20px #17464c50; }
.home-page .tracker-carousel .preview-toolbar a { display: inline-flex; color: var(--product-muted); font-size: 14px; }
.home-page .tracker-carousel .preview-toolbar a:hover { color: var(--product-teal); }
.home-page .carousel-viewport { position: relative; aspect-ratio: 1090 / 621; background: #eef3f4; }
.home-page .carousel-slide { position: absolute; inset: 0; }
.home-page .carousel-slide[hidden] { display: none; }
.home-page .carousel-slide > a, .home-page .carousel-slide img { display: block; width: 100%; height: 100%; }
.home-page .carousel-slide img { object-fit: cover; object-position: top left; }
.home-page .carousel-slide video { display: block; width: 100%; height: 100%; object-fit: contain; background: #eef3f4; }
.home-page .carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; padding: 0; border: 1px solid var(--product-line); border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--product-ink); font-size: 24px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 14px rgba(16, 39, 64, .16); opacity: 0; transition: opacity .2s ease, background-color .2s ease; }
.home-page .carousel-prev { left: 12px; }
.home-page .carousel-next { right: 12px; }
.home-page .tracker-carousel:hover .carousel-arrow, .home-page .carousel-arrow:focus-visible { opacity: 1; }
.home-page .carousel-arrow:hover { background: #fff; color: var(--product-teal); }
@media (hover: none) { .home-page .carousel-arrow { opacity: 1; width: 34px; height: 34px; } }
.home-page .tracker-carousel-caption { padding: 16px 20px 18px; border-top: 1px solid var(--product-line); }
.home-page .tracker-carousel-caption h3 { margin: 0 0 4px; color: var(--product-ink); font-size: 16px; font-weight: 700; }
.home-page .tracker-carousel-caption p { margin: 0; color: var(--product-muted); font-size: 14px; line-height: 1.6; min-height: 45px; }
.home-page .carousel-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.home-page .carousel-tabs [role="tab"] { min-height: 44px; padding: 8px 12px; border: 1px solid var(--product-line); border-radius: 8px; background: #fff; color: var(--product-muted); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.35; text-align: center; cursor: pointer; transition: border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.home-page .carousel-tabs [role="tab"]:hover { border-color: #7caaaf; color: var(--product-ink); }
.home-page .carousel-tabs [role="tab"][aria-selected="true"] { color: var(--product-teal); border-color: var(--product-teal); background: #f7fbfb; box-shadow: inset 0 -3px var(--product-teal); }
.home-page .carousel-tabs [role="tab"]:focus-visible, .home-page .carousel-arrow:focus-visible, .home-page .tracker-carousel .preview-toolbar a:focus-visible { outline: 3px solid #237a89; outline-offset: 3px; }

/* ---------- Commercial Integrations ---------- */
.home-page .commercial-integrations { padding: 76px 0; background: #eef5f4; border-block: 1px solid var(--product-line); }
.home-page .integrations-intro { max-width: 780px; margin-bottom: 36px; }
.home-page .integrations-intro h2 { margin: 0 0 18px; color: var(--product-ink); font-size: clamp(30px, 3vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -1px; }
.home-page .integrations-intro .product-lead { margin-bottom: 14px; }
.home-page .integrations-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home-page .integration-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #c5d7d8; border-radius: 12px; background: #fff; box-shadow: 0 18px 45px -24px #17464c50; }
.home-page .integration-media { background: #102b31; aspect-ratio: 16 / 9; overflow: hidden; }
.home-page .integration-media video { display: block; width: 100%; height: 100%; object-fit: contain; background: #102b31; }
.home-page .integration-media-image { background: #edf1f2; padding: 20px 20px 0; }
.home-page .integration-media-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border: 1px solid #d0d9db; border-bottom: 0; border-radius: 6px 6px 0 0; }
.home-page .integration-content { display: flex; flex: 1; flex-direction: column; padding: 26px 28px 28px; }
.home-page .integration-kicker { margin: 0 0 8px; color: var(--product-teal); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.home-page .integration-card h3 { color: var(--product-ink); font-size: 22px; font-weight: 700; line-height: 1.3; margin: 0 0 12px; }
.home-page .integration-content p:not(.integration-kicker) { color: var(--product-muted); font-size: 15px; line-height: 1.75; margin-bottom: 24px; }

/* ---------- Ctrl+AI+Reg Briefing ---------- */
.home-page .briefing { padding: 76px 0; background: #fff; }
.home-page .briefing-layout { display: grid; grid-template-columns: 0.95fr 1.1fr; gap: 48px; align-items: center; }
.home-page .briefing h2 { margin-bottom: 22px; color: var(--product-ink); font-size: clamp(30px, 3vw, 44px); font-weight: 700; line-height: 1.15; letter-spacing: -1.2px; }
.home-page .briefing-preview img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .home-page #hero.hero-montage { padding: 72px 0 64px; min-height: 460px; text-align: center; }
  .home-page #hero.hero-montage::before { background: rgba(10, 26, 44, .8); }
  .home-page .hero-montage-copy { max-width: none; }
  .home-page #hero.hero-montage .hero-wordmark { margin-inline: auto; }
  .home-page .integrations-grid { grid-template-columns: minmax(0, 1fr); }
  .home-page .carousel-tabs { display: flex; overflow-x: auto; scroll-snap-type: x proximity; margin: 14px -24px 0; padding: 2px 24px 8px; }
  .home-page .carousel-tabs [role="tab"] { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
  .home-page .briefing-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .home-page .briefing-copy { max-width: 580px; }
}
@media (max-width: 575px) {
  .home-page #hero.hero-montage { padding: 56px 0 48px; min-height: 400px; }
  .home-page .commercial-integrations, .home-page .briefing { padding: 48px 0; }
  .home-page .integration-content { padding: 22px 20px 24px; }
  .home-page .integration-card h3 { font-size: 20px; }
}

/* ---------- Scroll reveals (classes are added by assets/js/reveal.js) ----------
   Light components (text) rise 20px over 1.4s. Heavy components (cards, media) rise 44px from a slightly
   smaller scale over 1.9s. Both decelerate long and late, and enter 200ms apart (reveal.js). */
.home-page .reveal {
  opacity: 0;
  transition-property: opacity, transform;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.home-page .reveal-light {
  transform: translate3d(0, 20px, 0);
  transition-duration: 1100ms, 1400ms;
  transition-timing-function: cubic-bezier(.3, .6, .3, 1), cubic-bezier(.19, 1, .22, 1);
}
.home-page .reveal-heavy {
  transform: translate3d(0, 44px, 0) scale(.98);
  transform-origin: 50% 100%;
  transition-duration: 1400ms, 1900ms;
  transition-timing-function: cubic-bezier(.3, .6, .3, 1), cubic-bezier(.16, .84, .24, 1);
}
.home-page .reveal.is-revealed { opacity: 1; transform: none; }

/* ---------- Plugin card media: the plugin's commands, as they appear after typing / ---------- */
.home-page .plugin-media { display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #123540 0%, #0c2730 100%); }
.home-page .plugin-panel { width: 100%; max-width: 460px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; background: rgba(255, 255, 255, .06); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); overflow: hidden; }
.home-page .plugin-input { display: flex; align-items: center; gap: 2px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); font: 600 14px/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: #fff; }
.home-page .plugin-input i { display: inline-block; width: 2px; height: 16px; background: #7fd0dc; animation: plugin-caret 1.1s steps(1) infinite; }
@keyframes plugin-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .home-page .plugin-input i { animation: none; } }
.home-page .plugin-commands { list-style: none; margin: 0; padding: 6px; }
.home-page .plugin-commands li { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 8px; }
.home-page .plugin-commands li:first-child { background: rgba(127, 208, 220, .14); }
.home-page .plugin-commands code { color: #9fe3ec; font: 600 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: none; padding: 0; }
.home-page .plugin-commands span { color: rgba(255, 255, 255, .62); font-size: 12px; line-height: 1.4; }
@media (max-width: 575px) { .home-page .plugin-media { padding: 16px; } .home-page .plugin-commands li { padding: 5px 8px; } }
/* Both card media share one fixed height in the two-column layout so the card headings line up,
   and the plugin panel sizes itself on phones. */

/* Three cards need room. Below 1100px they stack in one centred column. */
@media (max-width: 1099px) { .home-page .integrations-grid { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin-inline: auto; } }

/* ---------- Briefing readership: organisation names grouped by sector (names, not logos) ---------- */
.home-page .readership { margin-top: 72px; }
.home-page .readership-title { margin: 0 0 24px; color: var(--product-teal); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.home-page .readership-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 24px; }
.home-page .readership-group p { margin: 0 0 10px; color: var(--product-muted); font-size: 12px; font-weight: 600; }
.home-page .readership-group ul { margin: 0; padding: 0; list-style: none; }
.home-page .readership-group li { color: var(--product-ink); font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.home-page .readership-group li + li { margin-top: 8px; }
.home-page .readership-note { margin: 28px 0 0; color: var(--product-muted); font-size: 12px; }
@media (max-width: 1099px) { .home-page .readership-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px) { .home-page .readership { margin-top: 52px; } .home-page .readership-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } .home-page .readership-group li { font-size: 14px; } }

/* "Best for" line on the integration cards, so visitors can tell which offering is theirs. */
.home-page .integration-content p.integration-fit { margin: -4px 0 14px; color: var(--product-muted); font-size: 14px; font-style: italic; line-height: 1.5; }
.home-page .integration-content p.integration-price { margin: -12px 0 24px; color: var(--product-ink); font-size: 14px; font-weight: 600; }

/* ---------- Integration card media at one shared 16:10 shape ----------
   The panels size their contents to the frame width with container queries, so nothing is cropped or
   rescaled, and the wide MCP walkthrough letterboxes against a matching dark background. */
.home-page .integrations-grid .integration-media { aspect-ratio: 16 / 10; height: auto; background: linear-gradient(160deg, #123540 0%, #0c2730 100%); }
.home-page .integrations-grid .integration-media video { background: transparent; }
.home-page .plugin-media { container-type: inline-size; padding: 18px; }
.home-page .plugin-panel { max-height: 100%; }
.home-page .plugin-input { padding: 9px 14px; font-size: 13px; }
.home-page .plugin-commands { padding: 4px; }
.home-page .plugin-commands li { padding: 5px 10px; }
.home-page .plugin-commands span { display: none; }
@container (min-width: 440px) {
  .home-page .plugin-media { padding: 24px; }
  .home-page .plugin-commands span { display: block; }
}
.home-page .json-panel { margin: 0; padding: 12px 14px 14px; background: none; border: 0; font: 12px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: rgba(255, 255, 255, .7); overflow: hidden; }
.home-page .json-line { display: block; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.home-page .json-key { color: #9fe3ec; }
.home-page .json-str { color: #d9f2c4; }
.home-page .json-more { color: rgba(255, 255, 255, .45); }
@container (min-width: 440px) { .home-page .json-panel { font-size: 13px; } }

/* ---------- Briefing: Substack posts as a fanned deck of cards ----------
   Each card carries its offset from the centre card (--o) and its distance (--a) inline. Cards step out
   sideways, tilt and sit a little lower the further they are from the front, like a hand of cards.
   Hovering or focusing the deck opens the fan wider. */
.home-page .briefing-deck { position: relative; display: block; width: 100%; max-width: 640px; aspect-ratio: 8 / 5; margin-inline: auto; }
.home-page .deck-card { position: absolute; left: 50%; top: 4%; width: 40%; aspect-ratio: 4 / 5; margin-left: -20%; overflow: hidden; border: 1px solid rgba(16, 39, 64, .12); border-radius: 12px; background: #fff; box-shadow: 0 18px 36px -20px rgba(16, 39, 64, .45), 0 2px 6px rgba(16, 39, 64, .08); transform-origin: 50% 100%; transform: translateX(calc(var(--o) * 46%)) translateY(calc(var(--a) * 3.5%)) rotate(calc(var(--o) * 7deg)); transition: transform 700ms cubic-bezier(.2, .8, .2, 1); }
.home-page .deck-card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.home-page .deck-card.deck-front { transform: translateY(-4%); box-shadow: 0 30px 60px -24px rgba(16, 39, 64, .55), 0 2px 8px rgba(16, 39, 64, .1); }
.home-page .briefing-deck:hover .deck-card, .home-page .briefing-deck:focus-visible .deck-card { transform: translateX(calc(var(--o) * 54%)) translateY(calc(var(--a) * 4%)) rotate(calc(var(--o) * 9deg)); }
.home-page .briefing-deck:hover .deck-card.deck-front, .home-page .briefing-deck:focus-visible .deck-card.deck-front { transform: translateY(-8%); }
.home-page .briefing-deck:focus-visible { outline: 3px solid #237a89; outline-offset: 8px; border-radius: 16px; }
@media (prefers-reduced-motion: reduce) { .home-page .deck-card { transition: none; } }
@media (max-width: 991px) { .home-page .briefing-deck { max-width: 520px; } }
@media (max-width: 575px) { .home-page .deck-card { width: 34%; margin-left: -17%; transform: translateX(calc(var(--o) * 40%)) translateY(calc(var(--a) * 3%)) rotate(calc(var(--o) * 6deg)); } }

/* ---------- TechieRay Brain ---------- */
.home-page .brain { padding: 76px 0; background: #eef5f4; border-block: 1px solid var(--product-line); }
.home-page .brain-intro { max-width: 780px; margin-bottom: 36px; }
.home-page .brain-intro h2 { margin: 0 0 18px; color: var(--product-ink); font-size: clamp(30px, 3vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -1px; }
.home-page .brain-intro .product-lead { margin: 0; }
.home-page .brain-video { overflow: hidden; border: 1px solid #c5d7d8; border-radius: 14px; background: #f3f7f8; box-shadow: 0 24px 60px -28px #17464c66; }
.home-page .brain-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.home-page .brain-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.home-page .brain-point { padding-top: 18px; border-top: 2px solid var(--product-teal); }
.home-page .brain-point h3 { margin: 0 0 8px; color: var(--product-ink); font-size: 17px; font-weight: 700; }
.home-page .brain-point p { margin: 0; color: var(--product-muted); font-size: 15px; line-height: 1.7; }
.home-page .brain-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 36px; }
.home-page .brain-foot p { margin: 0; max-width: 720px; color: var(--product-muted); font-size: 14px; line-height: 1.7; }
@media (max-width: 767px) { .home-page .brain-points { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
@media (max-width: 575px) { .home-page .brain { padding: 48px 0; } .home-page .brain-video { border-radius: 10px; } }
