/* =====================================================================
   Harris Digital · shared page components (v2, Oct 13)
   Used by: page-product.php (with hd-product.css)
            page-case-study.php (with hd-case-study.css)
   Ported from Matt's v2 HTML files. Every class is prefixed hdx- and
   scoped under .hdx so theme styles can't leak in or out.
   ===================================================================== */
.hdx {
  --font-hd: var(--font, "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif);
  --container: 1240px;
  --gutter: clamp(16px, 5vw, 64px);
  --col-gap: 32px;
  --section-y: clamp(56px, 8vw, 96px);
  --page: #EFEFEF;
  --white: #FFFFFF;
  --ink: #1C1B1C;
  --body: #4A494A;
  --muted: #696869;
  --hairline: #E3E1E2;
  --tint: #F6F5F5;
  --plum-dark: #300B1F;
  --plum: #4B102F;
  --magenta: #A8275E;
  --gold: #BFA24E;
  --gold-ink: #8C7530;
  display: block;
  background: var(--white);
  color: var(--body);
  font-family: var(--font-hd);
  font-size: 17px;
  line-height: 1.6;
  color-scheme: light;
}
.hdx *, .hdx *::before, .hdx *::after { box-sizing: border-box; }
.hdx h1, .hdx h2, .hdx h3, .hdx h4, .hdx p, .hdx dl, .hdx dd, .hdx figure, .hdx blockquote { margin: 0; }
.hdx h1, .hdx h2, .hdx h3, .hdx h4 { font-family: var(--font-hd); color: var(--ink); text-wrap: balance; text-transform: none; }
.hdx p, .hdx li, .hdx dt, .hdx dd, .hdx span, .hdx a, .hdx b { font-family: var(--font-hd); }
.hdx ul, .hdx ol { margin: 0; padding: 0; list-style: none; }
.hdx img { max-width: 100%; }
.hdx a { color: var(--magenta); }
.hdx a:focus-visible, .hdx summary:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 2px; }

/* Section shells */
.hdx .hdx-inner { max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); padding-block: var(--section-y); }
.hdx .hdx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.hdx .hdx-grey  { background: var(--page); }
.hdx .hdx-white { background: var(--white); }
.hdx .hdx-dark  { background: var(--plum-dark); --ink: #FFFFFF; --body: rgba(255,255,255,.86); --muted: #C9AABA; --hairline: #6E3D55; --magenta: #E79BCB; color: var(--body); }

/* Type */
.hdx .hdx-label { font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--magenta); margin-bottom: 12px; }
.hdx .hdx-label.is-flush { margin: 0; }
.hdx .hdx-h2 { font-size: clamp(30px, 3vw, 40px); font-weight: 600; line-height: 1.12; letter-spacing: 0; }
.hdx .hdx-h3 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.hdx .hdx-lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; max-width: 38em; margin-top: 16px; color: var(--body); }
.hdx .hdx-prose { display: grid; gap: 18px; max-width: 40em; align-content: start; }
.hdx .hdx-prose p:not(.hdx-label) { font-size: 17px; line-height: 1.6; color: var(--body); }
.hdx .hdx-map-foot { font-size: 13px; line-height: 1.5; color: #696869; }

/* Hero */
.hdx .hdx-crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.hdx .hdx-crumbs a { color: var(--muted); text-decoration: none; }
.hdx .hdx-crumbs a:hover { color: var(--ink); }
.hdx .hdx-hero .hdx-grid-2 { align-items: center; }
.hdx .hdx-h1 { font-size: clamp(34px, 3.5vw, 48px); font-weight: 200; line-height: 1.12; letter-spacing: 0; }
.hdx .hdx-sub { margin-top: 20px; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.5; color: var(--body); max-width: 34em; }

/* White card on the dark hero */
.hdx .hdx-client-card { background: var(--white); border-radius: 14px; padding: clamp(24px, 3vw, 36px); display: grid; gap: 24px; color: #4A494A; box-shadow: 0 12px 40px rgba(0,0,0,.25); min-width: 0; }
.hdx .hdx-client-card .hdx-label { color: #A8275E; margin: 0; }
.hdx .hdx-client-card .hdx-who { font-size: 14px; line-height: 1.5; color: #696869; margin-top: 6px; }

/* 3-box diagram */
.hdx .hdx-map { display: flex; align-items: stretch; }
.hdx .hdx-node { flex: 1 1 0; min-width: 0; background: var(--tint); border: 1px solid var(--hairline); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; align-content: center; }
.hdx .hdx-node img { height: 24px; width: auto; max-width: 100%; display: block; margin-bottom: 2px; object-fit: contain; object-position: left center; }
.hdx .hdx-node b { font-size: 15px; font-weight: 600; color: #1C1B1C; line-height: 1.2; }
.hdx .hdx-node span { font-size: 12.5px; line-height: 1.35; color: #696869; }
.hdx .hdx-node.is-built { background: var(--plum); border-color: var(--plum); }
.hdx .hdx-node.is-built img { height: 20px; }
.hdx .hdx-node.is-built b { color: #FFFFFF; }
.hdx .hdx-node.is-built span { color: #E6CF8F; }
.hdx .hdx-link { flex: 0 0 26px; position: relative; align-self: center; height: 2px; background: var(--gold-ink); overflow: hidden; }
.hdx .hdx-link::after { content: ""; position: absolute; top: -2px; left: -6px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: hdx-flow 2.4s linear infinite; }
.hdx .hdx-link.is-rev::after { animation-direction: reverse; animation-delay: 1.2s; }
@keyframes hdx-flow { to { left: 100%; } }
@keyframes hdx-flow-v { to { top: 100%; } }

/* Cards */
.hdx .hdx-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.hdx .hdx-card { background: var(--white); border: 1px solid var(--hairline); border-radius: 14px; padding: 28px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.hdx .hdx-card p { font-size: 15.5px; line-height: 1.55; color: var(--body); }

/* Timeline (grow steps / turning point) */
.hdx .hdx-timeline { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); gap: var(--col-gap); }
.hdx .hdx-timeline li { position: relative; padding-top: 28px; display: grid; gap: 8px; align-content: start; margin: 0; }
.hdx .hdx-timeline li::before { content: ""; position: absolute; top: 6px; left: 0; right: calc(-1 * var(--col-gap)); height: 2px; background: var(--hairline); }
.hdx .hdx-timeline li:last-child::before { right: 0; }
.hdx .hdx-timeline li::after { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 2px solid var(--gold-ink); }
.hdx .hdx-timeline li.is-now::after { background: var(--plum); border-color: var(--plum); }
.hdx .hdx-timeline li.is-next::after { background: var(--white); border: 2px dashed var(--magenta); }
.hdx .hdx-timeline li.is-next::before { background: repeating-linear-gradient(90deg, var(--hairline) 0 6px, transparent 6px 12px); }
.hdx .hdx-timeline .hdx-when { font-size: 14px; font-weight: 600; color: var(--magenta); }
.hdx .hdx-timeline li.is-next .hdx-when { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hdx .hdx-timeline .hdx-h4 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.hdx .hdx-timeline p { font-size: 15px; line-height: 1.55; color: var(--body); }
.hdx .hdx-flag { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; background: #FBEAF2; color: #8A1E4C; border: 1px solid #F0C6D8; vertical-align: middle; }

/* Buttons */
.hdx .hdx-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hdx .hdx-btn, .hdx .hdx-btn:visited { font: 600 16px/1 var(--font-hd); padding: 16px 24px; border-radius: 999px; text-decoration: none; display: inline-block; letter-spacing: 0; text-transform: none; }
.hdx .hdx-btn-primary, .hdx .hdx-btn-primary:visited { background: var(--gold); color: #1C1B1C; }
.hdx .hdx-btn-primary:hover { background: #D1B666; color: #1C1B1C; }
.hdx .hdx-btn-ghost, .hdx .hdx-btn-ghost:visited { color: #FFFFFF; border: 1px solid rgba(255,255,255,.4); }
.hdx .hdx-btn-ghost:hover { border-color: #FFFFFF; color: #FFFFFF; }

/* Closing CTA band */
.hdx .hdx-cta-band .hdx-h2 { font-weight: 200; font-size: clamp(32px, 3.4vw, 46px); }

@media (max-width: 960px) {
  .hdx .hdx-grid-2, .hdx .hdx-cards { grid-template-columns: 1fr; }
  .hdx .hdx-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdx .hdx-timeline li::before { display: none; }
}
@media (max-width: 560px) {
  .hdx .hdx-timeline { grid-template-columns: 1fr; }
  .hdx .hdx-map { flex-direction: column; }
  .hdx .hdx-link { flex: 0 0 18px; width: 2px; height: auto; align-self: flex-start; margin-left: 22px; }
  .hdx .hdx-link::after { left: -2px; top: -6px; animation-name: hdx-flow-v; }
}
@media (prefers-reduced-motion: reduce) { .hdx .hdx-link::after { animation: none; display: none; } }
