/*
 * davidsonhorizon.co.uk — the company site. Brand tokens, fonts and the
 * site foot come from products/cinema-tools/shared/brand/ (copied into
 * dist/brand/ by build.py), so the company page looks like the two product
 * sites it is the parent of.
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--ct-font-body);
  color: var(--ct-color-fg);
  background: var(--ct-color-bg);
  font-size: 16px;
  line-height: 1.5;
}

.dh-header {
  background: var(--ct-color-primary);
  color: var(--ct-color-primary-contrast);
  padding: var(--ct-space-8) 0;
}

.dh-header > * {
  max-width: var(--ct-page);
  margin-inline: auto;
  padding-inline: var(--ct-space-8);
}

/* The logo, white on the brand slate, as the guidelines show it. The
   artwork is the guide's own vector; never redrawn or recoloured. */
.dh-logo {
  display: block;
  line-height: 0;
  margin: 0 auto var(--ct-space-6);
}

.dh-logo img {
  height: 96px;
  width: auto;
}

.dh-header h1 {
  margin: 0 auto;
  font-family: var(--ct-font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 2rem;
  text-wrap: balance;
}

/* On the home page the logo is the title; the heading is for assistive
   technology and search only. */
.dh-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.dh-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ct-space-4);
  margin-top: var(--ct-space-4);
  font-family: var(--ct-font-display);
  font-weight: 600;
  font-size: 0.9375rem;
}

.dh-nav a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
}

.dh-nav a:hover,
.dh-nav a:focus-visible,
.dh-nav a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
}

.dh-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ct-space-8);
  padding: var(--ct-space-8);
  max-width: var(--ct-page);
  margin: 0 auto;
}

.dh-section h2 {
  margin: 0 0 var(--ct-space-4);
  font-family: var(--ct-font-display);
  font-size: 1.375rem;
  font-weight: 700;
}

.dh-section h2 a {
  color: inherit;
  text-decoration: none;
}

.dh-section h2 a:hover,
.dh-section h2 a:focus-visible {
  text-decoration: underline;
}

.dh-section h3 {
  margin: var(--ct-space-6) 0 var(--ct-space-2);
  font-family: var(--ct-font-display);
  font-size: 1.0625rem;
  font-weight: 600;
}

.dh-section p,
.dh-section ul {
  margin: 0 0 var(--ct-space-4);
  font-size: 1.0625rem;
}

.dh-section ul {
  padding-left: 1.25rem;
}

.dh-section li {
  margin-bottom: var(--ct-space-2);
}

.dh-section p:last-child {
  margin-bottom: 0;
}

.dh-section a {
  color: var(--ct-color-accent);
}

/* Each category: an overview paragraph, then a block of cards for its
   links. The cards carry a name, a line of text and a link, nothing
   else, so they all have the same shape. */
.dh-overview {
  font-size: 1.125rem;
}

.dh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--ct-space-4);
  margin-top: var(--ct-space-6);
}

.dh-card {
  display: grid;
  gap: var(--ct-space-2);
  align-content: start;
  background: var(--ct-color-surface);
  border: 1px solid var(--ct-color-border);
  border-radius: 8px;
  padding: var(--ct-space-6);
  min-width: 0;
}

.dh-card h3 {
  margin: 0;
  font-family: var(--ct-font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.dh-card p {
  margin: 0;
  font-size: 1rem;
}

.dh-card__link {
  color: var(--ct-color-accent);
  font-weight: 700;
  text-decoration: none;
  margin-top: var(--ct-space-2);
}

.dh-card__link:hover,
.dh-card__link:focus-visible {
  text-decoration: underline;
}

.dh-card__status {
  color: var(--ct-color-muted);
  font-size: 0.9375rem;
}

/* The date line on the legal pages. */
.dh-updated {
  margin: 0;
  color: var(--ct-color-muted);
  font-size: 0.9375rem;
}

.dh-main > .dh-updated + .dh-section {
  margin-top: calc(-1 * var(--ct-space-4));
}

/* Company details: a definition list laid out as rows. */
.dh-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--ct-space-2) var(--ct-space-6);
  margin: 0;
  font-size: 1rem;
}

.dh-details dt {
  color: var(--ct-color-muted);
}

.dh-details dd {
  margin: 0;
}

@media (max-width: 520px) {
  .dh-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .dh-details dd {
    margin-bottom: var(--ct-space-3);
  }
}

.dh-footer {
  max-width: var(--ct-page);
  margin: 0 auto;
  padding: 0 var(--ct-space-8) var(--ct-space-8);
}

.dh-foot__links a + a::before {
  content: '·';
  margin: 0 var(--ct-space-2);
  color: var(--ct-color-muted);
}
