/*
 * Landing page of the documentation hub (pages/index.adoc of the ROOT component, :page-role: home).
 * Loaded only on that page (partials/head-meta.hbs). Hero markup: partials/article.hbs,
 * lens artwork: partials/hdv-hero-art.hbs. Brand colours as in brand.css.
 */
body.home {
  --hdv-ink: #1f1f1f;
  --hdv-ink-2: #4a4a48;
  --hdv-ink-3: #6e6e6b;
  --hdv-line: #e2e3df;
  --hdv-paper: #f6f6f3;
  --hdv-card: #ffffff;
  --hdv-radius: 10px;
}

body.home .doc {
  max-width: 74rem;
  hyphens: manual;
  padding-bottom: 3rem;
}

/* ---------------- Hero ---------------- */
.hdv-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 2rem;
  align-items: center;
  margin: 1.25rem 0 3rem;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  border-radius: var(--hdv-radius);
  color: #f3f3f0;
  background:
    radial-gradient(60rem 30rem at 85% 20%, rgba(200, 179, 47, 0.18), transparent 60%),
    linear-gradient(160deg, #262626 0%, #161616 100%);
  overflow: hidden;
  isolation: isolate;
}
.hdv-hero::after {                     /* fine gold rule at the bottom edge */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--hdv-gold), rgba(200, 179, 47, 0));
}
.hdv-hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bdbdb8;
}
.doc .hdv-hero h1.page {
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  font-weight: 700;
  font-size: clamp(2.1rem, 1.2rem + 3vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hdv-hero-tagline {
  margin: 0.6rem 0 0.2rem;
  font-size: clamp(1.25rem, 0.9rem + 1.4vw, 1.8rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--hdv-gold);
}
.hdv-hero-lede {
  margin: 1.1rem 0 0;
  max-width: 40rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #d6d6d2;
}
.hdv-hero-search {
  margin-top: 1.6rem;
  max-width: 38rem;
}
.hdv-hero .hdv-search .hdv-search-box {
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.85rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  color: var(--hdv-ink);
}
.hdv-hero .hdv-search .hdv-search-box input[type=search] {
  font-size: 1.05rem;
  padding: 0.6rem 0;
}
.hdv-hero .hdv-search .hdv-search-scopes legend,
.hdv-hero .hdv-search .hdv-search-status {
  color: #bdbdb8;
}
.hdv-hero .hdv-search .hdv-search-panel,
.hdv-hero .hdv-search .hdv-search-list {
  color: var(--hdv-ink);
}
.hdv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.6rem 0 0;
}
.doc .hdv-btn,
.doc .hdv-btn:link,
.doc .hdv-btn:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.3rem;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.doc .hdv-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-1px);
}
.doc .hdv-btn--primary,
.doc .hdv-btn--primary:link,
.doc .hdv-btn--primary:visited {
  background: var(--hdv-gold);
  border-color: var(--hdv-gold);
  color: #161616;
}
.doc .hdv-btn--primary:hover {
  background: #dcc63a;
  border-color: #dcc63a;
  color: #161616;
}
.doc .hdv-btn--primary::after {
  content: '→';
}
.doc .hdv-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.doc .hdv-hero-chips li {
  margin: 0;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: #d6d6d2;
}

/* microlens array: every lens sees the point from its own angle (light-field principle) */
.hdv-hero-art svg {
  display: block;
  width: 100%;
  height: auto;
}
.hdv-hero-lens .l {
  fill: rgba(255, 255, 255, 0.05);
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1;
}
.hdv-hero-lens .s {
  fill: #9a9a96;
  transform: translate(var(--x), var(--y));
  animation: hdv-focus 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(0.3s + var(--d));
}
.hdv-hero-lens .s.h {
  fill: var(--hdv-gold);
  filter: drop-shadow(0 0 4px rgba(200, 179, 47, 0.7));
}
@keyframes hdv-focus {
  from { transform: translate(0, 0); opacity: 0.3; }
  to { transform: translate(var(--x), var(--y)); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hdv-hero-lens .s { animation: none; }
  .doc .hdv-btn, .hdv-cards li, .hdv-paths li, .hdv-help li { transition: none; }
}

/* ---------------- Sections ---------------- */
body.home .doc h2 {
  color: var(--hdv-ink);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  letter-spacing: -0.01em;
  margin-top: 3.5rem;
  padding-top: 0;
  border: 0;
}
body.home .doc h2::before {
  content: '';
  display: block;
  width: 2.5rem;
  height: 4px;
  margin-bottom: 0.9rem;
  border-radius: 2px;
  background: var(--hdv-gold);
}
body.home .doc .sect1:first-of-type h2 {
  margin-top: 0;
}
body.home .doc h3 {
  color: var(--hdv-ink);
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 2.5rem;
}
.doc .hdv-lede p {
  font-size: 1.125rem;
  color: var(--hdv-ink-2);
  max-width: 44rem;
}
.doc .hdv-catlede p {
  margin-top: 0.15rem;
  color: var(--hdv-ink-3);
  font-size: 0.95rem;
}

/* cards: the whole card is clickable through the link's ::after */
.hdv-paths ol,
.hdv-cards ul,
.hdv-help ul {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.hdv-paths li, .hdv-cards li, .hdv-help li { list-style: none; }
.hdv-paths ol { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); counter-reset: hdv-step; }
.hdv-cards ul { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.hdv-help ul { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.hdv-paths li,
.hdv-cards li,
.hdv-help li {
  position: relative;
  margin: 0;
  padding: 1.15rem 1.2rem;
  background: var(--hdv-card);
  border: 1px solid var(--hdv-line);
  border-radius: var(--hdv-radius);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.hdv-paths li:hover,
.hdv-cards li:hover,
.hdv-help li:hover,
.hdv-paths li:focus-within,
.hdv-cards li:focus-within,
.hdv-help li:focus-within {
  border-color: var(--hdv-gold);
  box-shadow: 0 10px 28px rgba(31, 31, 31, 0.09);
  transform: translateY(-2px);
}
.hdv-paths li p,
.hdv-cards li p,
.hdv-help li p {
  margin: 0;
  line-height: 1.5;
  color: var(--hdv-ink-3);
  font-size: 0.95rem;
}
.hdv-paths li strong,
.hdv-cards li strong,
.hdv-help li strong {
  display: inline-block;
  margin-bottom: 0.2rem;
  font-size: 1.05rem;
  line-height: 1.3;
}
.doc .hdv-paths li a,
.doc .hdv-cards li a,
.doc .hdv-help li a {
  color: var(--hdv-ink);
  text-decoration: none;
}
.doc .hdv-paths li a::after,
.doc .hdv-cards li a::after,
.doc .hdv-help li a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--hdv-radius);
}
.doc .hdv-paths li a:focus-visible,
.doc .hdv-cards li a:focus-visible,
.doc .hdv-help li a:focus-visible {
  outline: none;
}
.doc .hdv-paths li a:focus-visible::after,
.doc .hdv-cards li a:focus-visible::after,
.doc .hdv-help li a:focus-visible::after {
  box-shadow: 0 0 0 3px rgba(200, 179, 47, 0.6);
}

/* starting points: numbered, with a dark top */
.hdv-paths li {
  counter-increment: hdv-step;
  padding-top: 3.6rem;
  background:
    linear-gradient(#1f1f1f, #1f1f1f) top / 100% 0.35rem no-repeat,
    var(--hdv-card);
}
.hdv-paths li::before {
  content: counter(hdv-step);
  position: absolute;
  top: 1.15rem;
  left: 1.2rem;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--hdv-gold);
  color: #161616;
  font-weight: 700;
}
.hdv-paths .hdv-tag {
  position: absolute;
  top: 1.45rem;
  left: 3.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hdv-ink-3);
}
.hdv-paths li p br:first-of-type {
  display: none;                      /* the tag sits in the header row */
}

/* manuals with app icon */
.hdv-cards li {
  padding-left: 5rem;
  min-height: 5.6rem;
}
.hdv-cards .hdv-ico {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  width: 48px;
  height: 48px;
  border-radius: 10px;
}
.hdv-cards .hdv-ico--mono {
  display: grid;
  place-items: center;
  background: #575756;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 2px rgba(200, 179, 47, 0.0);
}
.hdv-cards .hdv-ico--mono::before {   /* echo of the round HD mark on the official icons */
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--hdv-gold);
  border: 2px solid #fff;
}

/* help */
.hdv-help li {
  border-left: 4px solid var(--hdv-gold);
}
.doc .hdv-contact {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--hdv-radius);
  background: rgba(200, 179, 47, 0.12);
  color: var(--hdv-ink);
}
.doc .hdv-contact p {
  margin: 0;
}

/* imprint: fine print */
body.home .doc .hdv-legal {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hdv-line);
  font-size: 0.8125rem;
  color: var(--hdv-ink-3);
}
body.home .doc .hdv-legal h2 {
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
  color: var(--hdv-ink-2);
}
body.home .doc .hdv-legal h2::before {
  display: none;
}
body.home .doc .hdv-legal p {
  font-size: 0.8125rem;
  color: var(--hdv-ink-3);
}
.hdv-legal-cols > .content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.5rem 2rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 1023px) {
  .hdv-hero {
    grid-template-columns: 1fr;
  }
  .hdv-hero-art {
    display: none;
  }
}

/* ---------------- Page not found (partials/article-404.hbs, layouts/404.hbs) ---------------- */
.hdv-404-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 2rem;
  align-items: center;
  margin: 1.25rem 0 2.5rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--hdv-radius);
  color: #f3f3f0;
  background:
    radial-gradient(50rem 26rem at 90% 10%, rgba(200, 179, 47, 0.16), transparent 60%),
    linear-gradient(160deg, #262626 0%, #161616 100%);
  isolation: isolate;
}
.hdv-404-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 0 0 var(--hdv-radius) var(--hdv-radius);
  background: linear-gradient(90deg, var(--hdv-gold), rgba(200, 179, 47, 0));
}
.hdv-404-code {
  margin: 0;
  font-size: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--hdv-gold);
}
.doc .hdv-404-card h1.page {
  margin: 0.6rem 0 0;
  padding: 0;
  border: 0;
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.7rem, 1.1rem + 2vw, 2.5rem);
  line-height: 1.1;
}
.doc .hdv-404-lede {
  margin: 0.9rem 0 0;
  max-width: 36rem;
  color: #d6d6d2;
  font-size: 1.0625rem;
  line-height: 1.6;
}
.hdv-404-search {
  margin-top: 1.5rem;
  max-width: 40rem;
}
.hdv-404-card .hdv-search .hdv-search-box {
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.85rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  color: var(--hdv-ink);
}
.hdv-404-card .hdv-search .hdv-search-box input[type=search] {
  font-size: 1.05rem;
  padding: 0.6rem 0;
}
.hdv-404-card .hdv-search .hdv-search-panel {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fff;
  color: var(--hdv-ink);
}
.hdv-404-card .hdv-search .hdv-search-panel:not(:has(li)) .hdv-search-scopes { margin: 0; }
.hdv-404-art svg {
  display: block;
  width: 100%;
  height: auto;
}
.doc .hdv-404-links,
.doc .hdv-404-manuals {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.doc .hdv-404-links { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.doc .hdv-404-manuals { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.4rem 1rem; }
.doc .hdv-404-links li,
.doc .hdv-404-manuals li { margin: 0; list-style: none; }
.doc .hdv-404-links a {
  display: block;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hdv-line);
  border-left: 4px solid var(--hdv-gold);
  border-radius: var(--hdv-radius);
  background: var(--hdv-card);
  color: var(--hdv-ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.doc .hdv-404-links a:hover {
  border-color: var(--hdv-gold);
  box-shadow: 0 10px 28px rgba(31, 31, 31, 0.09);
  transform: translateY(-2px);
}
.hdv-404-links strong { display: block; font-size: 1.05rem; }
.hdv-404-links span { display: block; margin-top: 0.2rem; font-size: 0.9rem; color: var(--hdv-ink-3); }
.doc .hdv-404-manuals a {
  display: block;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--hdv-line);
  color: var(--hdv-ink);
  text-decoration: none;
}
.doc .hdv-404-manuals a:hover { color: var(--hdv-gold-dark); }
.doc .hdv-404-foot {
  margin-top: 2.5rem;
  font-size: 0.875rem;
  color: var(--hdv-ink-3);
}
.hdv-404-url { word-break: break-all; }
body.status-404 .toolbar .breadcrumbs { visibility: hidden; }
@media (max-width: 1023px) {
  .hdv-404-card { grid-template-columns: 1fr; }
  .hdv-404-art { display: none; }
}
