/*  Connect by JBRH — the twenty dedicated product and solution pages.
 *
 *  Loaded after page-system.css, only by pages built from
 *  `site-source/products/`. Like page-system.css it holds no colour of its own:
 *  every surface, line and ink is a theme token, so Day and Dark follow the
 *  site switch without a rule here.
 *
 *  The one exception is the cinematic hero on wide screens, where copy sits
 *  on a photograph. A photograph does not change with the theme, so neither
 *  can the type over it: those few values are fixed rgb() light-on-dark, held
 *  legible by a dark scrim on the photograph's open side. Below 900px the
 *  picture stacks above the copy and the copy goes back to theme tokens, so a
 *  phone never reads white type over a busy photograph.
 */

/* ---------------------------------------------------------------- the hero */

.dp-hero { position: relative; }
.dp-hero-media { margin: 0; min-width: 0; }
.dp-hero-img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; object-position: var(--dp-focus, 50% 50%);
  background: var(--surface-2);
}
.dp-hero-note {
  margin-top: var(--cs-2); font-size: 11.5px; line-height: 1.5; color: var(--muted);
}
.dp-hero-copy { min-width: 0; }
.cs-page .dp-hero h1 {
  font-size: clamp(32px, 5.2vw, 60px); line-height: 1.03; font-weight: 620; margin: 0;
  max-width: 15ch; overflow-wrap: break-word;
}

/*  Stacked (every hero below 900px, and the split hero below 1000px):
 *  picture first, copy beneath it on the page's own background. */
.dp-hero-cinematic .dp-hero-copy,
.dp-hero-split .dp-hero-copy { padding: var(--cs-6) var(--cs-gutter) var(--cs-7); max-width: var(--max); margin: 0 auto; }
.dp-hero-split .dp-hero-media { padding: var(--cs-4) var(--cs-gutter) 0; max-width: var(--max); margin: 0 auto; }
.dp-hero-split .dp-hero-img { border-radius: 20px; }
.dp-hero-cinematic .dp-hero-note { padding: 0 var(--cs-gutter); }

@media (min-width: 900px) {
  .dp-hero-cinematic {
    display: grid; align-items: center; isolation: isolate; overflow: hidden;
    min-height: clamp(560px, calc(100svh - var(--header) - 40px), 760px);
    background: rgb(18 20 20);
  }
  .dp-hero-cinematic .dp-hero-media { position: absolute; inset: 0; z-index: -1; }
  .dp-hero-cinematic .dp-hero-img { height: 100%; aspect-ratio: auto; }
  /*  The scrim: dark where the copy sits, clear where the subject is. It is
   *  there for contrast, not decoration, and stops at the middle of the frame. */
  .dp-hero-cinematic .dp-hero-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgb(10 12 12 / .84) 0%, rgb(10 12 12 / .66) 34%, rgb(10 12 12 / .12) 62%, rgb(10 12 12 / 0) 78%);
  }
  .dp-hero-cinematic .dp-hero-note {
    position: absolute; right: var(--cs-5); bottom: var(--cs-4); padding: 0; z-index: 1;
    color: rgb(255 255 255 / .72);
  }
  .dp-hero-cinematic .dp-hero-copy {
    width: 100%; padding: var(--cs-8) var(--cs-gutter);
    color: rgb(250 248 243);
  }
  .dp-hero-cinematic .dp-hero-copy > * { max-width: 560px; }
  .cs-page .dp-hero-cinematic h1 { color: rgb(250 248 243); }
  .cs-page .dp-hero-cinematic h1 em { color: rgb(222 197 150); }
  .cs-page .dp-hero-cinematic .eyebrow { color: rgb(255 255 255 / .74); }
  .dp-hero-cinematic .cs-hero-lede { color: rgb(255 255 255 / .84); }
  .dp-hero-cinematic .cs-hero-proof { color: rgb(255 255 255 / .8); }
  .dp-hero-cinematic .cs-hero-proof li::before { background: rgb(222 197 150); }
  .dp-hero-cinematic .cs-crumb ol { color: rgb(255 255 255 / .7); }
  .dp-hero-cinematic .cs-crumb a { color: rgb(255 255 255 / .82); }
  .dp-hero-cinematic .cs-crumb a:hover,
  .dp-hero-cinematic .cs-crumb [aria-current="page"] { color: rgb(255 255 255); }
  .dp-hero-cinematic .button-quiet {
    color: rgb(255 255 255); background: rgb(255 255 255 / .08);
    border-color: rgb(255 255 255 / .42);
  }
  .dp-hero-cinematic .button-quiet:hover { background: rgb(255 255 255 / .16); }
}

@media (min-width: 1000px) {
  .dp-hero-split {
    max-width: var(--max); margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    gap: var(--cs-8); align-items: center;
    padding: var(--cs-8) var(--cs-gutter) var(--cs-9);
  }
  .dp-hero-split .dp-hero-copy,
  .dp-hero-split .dp-hero-media { padding: 0; margin: 0; max-width: none; }
  .dp-hero-split .dp-hero-media { order: 2; }
  .dp-hero-split.dp-hero-image-left { grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); }
  .dp-hero-split.dp-hero-image-left .dp-hero-media { order: 0; }
  .dp-hero-split .dp-hero-img { border-radius: 26px; aspect-ratio: 4 / 3.4; box-shadow: var(--shadow-soft); }
}

/* ------------------------------------------------- copy beside a picture */

.dp-split-grid { display: grid; gap: var(--cs-6); align-items: center; }
.dp-split-copy, .dp-split-aside { min-width: 0; }
.dp-split-copy .section-heading { margin-bottom: var(--cs-5); }
@media (min-width: 1000px) {
  .dp-split-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--cs-8); }
  .dp-split-reverse .dp-split-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .dp-split-reverse .dp-split-aside { order: -1; }
}

/* A facts panel: what a record, a quote or a source actually holds. */
.dp-panel {
  padding: var(--cs-5); border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface); box-shadow: var(--shadow-soft);
}
@media (min-width: 640px) { .dp-panel { padding: var(--cs-6); } }
.dp-panel-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 var(--cs-4) !important;
  font-size: 13px; font-weight: 750; letter-spacing: -.01em; color: var(--ink);
}
.dp-panel-title .cs-icon { color: var(--cs-accent-text); }
.dp-panel-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.dp-panel-rows li {
  display: grid; gap: 4px; padding: 13px 0; border-top: 1px solid var(--line);
}
@media (min-width: 520px) { .dp-panel-rows li { grid-template-columns: 9.5em minmax(0, 1fr); gap: var(--cs-4); } }
.dp-panel-rows b { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.dp-panel-rows span { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.dp-panel-foot {
  margin: var(--cs-4) 0 0 !important; padding-top: var(--cs-4); border-top: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
}

/* ------------------------------------------------ authentic screenshots */

.dp-figure { margin: 0; }
.dp-figure-frame {
  overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px;
  background: var(--surface-2); box-shadow: var(--shadow-soft);
}
.dp-figure-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.dp-figure figcaption {
  margin-top: var(--cs-3); font-size: 12.5px; line-height: 1.55; color: var(--muted); max-width: 64ch;
}
.dp-figure-wide { max-width: 1040px; }

/* ------------------------------------------------- how it works with ... */

.dp-connects { display: grid; gap: var(--cs-3); }
@media (min-width: 720px) { .dp-connects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .dp-connects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dp-connect {
  display: grid; align-content: start; gap: 6px; padding: var(--cs-5);
  border: 1px solid var(--line); border-radius: var(--cs-card); background: var(--surface);
  text-decoration: none; color: inherit;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.dp-connect:hover, .dp-connect:focus-visible { transform: translateY(-2px); border-color: var(--line-strong); }
.dp-connect b { font-size: 15px; font-weight: 700; }
.dp-connect span { font-size: 13.5px; line-height: 1.55; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .dp-connect:hover, .dp-connect:focus-visible { transform: none; }
}
