/* Dot Hero 2026. Inspired by the Article Hero Section: the light blue gradient that fades into
   white, navy text, text to the left and the image to the right. Tokens and buttons come from
   the shared building blocks (#653, docs/dl-ui.md).

   Every background is a fixed choice, so the text colours never need to change per page. On
   the light ones the H1 is --dl-ink and the rest --dl-ink-2: at least 6.29:1 on the darkest
   point (#B6D5EF). On navy all text is white (13.6:1).

   The gradients run top to bottom and end in white, so the hero melts into the page below. */

.dlh {
  --dlh-bg: var(--dl-hvid);
  /* The H1 never grows past this share of its text column (#1126), see .dlh__title. */
  --dlh-h1-fit: 10.5cqi;
  --dlh-title: var(--dl-ink);
  --dlh-text: var(--dl-ink-2);
  background: var(--dlh-bg);
  box-sizing: border-box;
  color: var(--dlh-text);
  padding: clamp(56px, 9vw, 140px) var(--dl-section-x) clamp(56px, 8vw, 120px);
}

/* Gradients: from the colour at the top to white at the bottom. */
.dlh--gradient-blue {
  --dlh-bg: linear-gradient(to bottom, #D3E6F5 0%, var(--dl-hvid) 100%);
}

.dlh--gradient-sky {
  --dlh-bg: linear-gradient(to bottom, var(--dl-lys-blaa) 0%, var(--dl-hvid) 100%);
}

.dlh--gradient-lilac {
  --dlh-bg: linear-gradient(to bottom, #DDE2FE 0%, var(--dl-hvid) 100%);
}

.dlh--gradient-mint {
  --dlh-bg: linear-gradient(to bottom, var(--dl-groen-lys) 0%, var(--dl-hvid) 100%);
}

/* Flat: one colour. */
.dlh--flat-white {
  --dlh-bg: var(--dl-hvid);
}

.dlh--flat-soft {
  --dlh-bg: var(--dl-bg-soft);
}

.dlh--flat-blue {
  --dlh-bg: #D3E6F5;
}

.dlh--flat-navy {
  --dlh-bg: var(--dl-ink);
  --dlh-title: var(--dl-hvid);
  --dlh-text: var(--dl-hvid);
}

/* Layout --------------------------------------------------------------------------------- */

.dlh__inner {
  display: grid;
  gap: 40px;
  grid-template-areas: "content" "media" "buttons";
  grid-template-columns: minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1124px;
}

/* The text column is a size container, so the H1 can scale with the column it sits in (cqi)
   rather than with the viewport (#1126). */
.dlh__content {
  container-type: inline-size;
  grid-area: content;
  min-width: 0;
}

.dlh__media {
  grid-area: media;
  justify-self: center;
  max-width: 560px;
  width: 100%;
}

.dlh--centered .dlh__inner {
  max-width: 820px;
  text-align: center;
}

@media (min-width: 992px) {
  .dlh--with-image .dlh__inner {
    align-items: center;
    column-gap: 64px;
    grid-template-areas: "content media" "buttons buttons";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .dlh--with-image .dlh__media {
    justify-self: end;
  }
}

/* Text ----------------------------------------------------------------------------------- */

.dlh__eyebrow {
  color: var(--dlh-text);
  font-family: var(--dl-font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.4;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.dlh__title {
  color: var(--dlh-title);
  font-family: var(--dl-font-display);
  font-size: clamp(36px, 4.6vw, 60px);
  letter-spacing: var(--dl-display-tracking);
  line-height: 1.08;
  margin: 0;
  overflow-wrap: break-word;
}

.dlh__intro {
  color: var(--dlh-text);
  font-family: var(--dl-font-body);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.7;
  margin: 24px 0 0;
}

/* Buttons -------------------------------------------------------------------------------- */

.dlh__buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 32px;
}

.dlh--centered .dlh__buttons,
.dlh__buttons--center {
  justify-content: center;
}

.dlh__buttons--center {
  grid-area: buttons;
  margin-top: 0;
}

/* Image ---------------------------------------------------------------------------------- */

.dlh__image {
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.dlh__image--rounded {
  border-radius: var(--dl-radius-lg);
}

.dlh__image--circle,
.dlh__image--blob {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.dlh__image--circle {
  border-radius: 50%;
}

.dlh__image--blob {
  border-radius: var(--dl-blob);
}

/* Designed hero types ------------------------------------------------------------------------
   Five fixed heroes from the Claude Design project "Design revamp for multiple pages"
   (Onboarding, Support, Kontakt, Om os, Bagom .legal). Values from its pages and tokens.css,
   mapped onto the theme's tokens: --dl-moerk-blaa is --dl-ink, and its lilacs #7264FA and
   #5A51A8 are the wrong values (#653), so --dl-lys-lilla becomes --dl-lilla and --dl-lilla
   becomes --dl-lilla-moerk. The design system's ink-7, blob shapes and elevations have no
   theme token yet and live here. */

.dlh--designed {
  --dlh-ink-7: #F2F4FA;
  --dlh-blob-a: 62% 38% 55% 45% / 48% 62% 38% 52%;
  --dlh-blob-b: 42% 58% 38% 62% / 55% 45% 55% 45%;
  --dlh-elev-1: 0 2px 8px rgba(3, 36, 123, .05);
  --dlh-elev-3: 0 8px 20px rgba(3, 36, 123, .10), 0 20px 48px rgba(3, 36, 123, .10);
  --dlh-elev-4: 0 20px 50px rgba(3, 36, 123, .30);
  --dlh-h1: clamp(40px, 5.5vw, 72px);
  --dlh-h1-lh: 1.02;
  --dlh-media-h: 440px;
  --dlh-media-radius: var(--dlh-blob-b);
  --dlh-media-bg: var(--dl-ink-2);
  overflow: hidden;
  padding: clamp(56px, 8vw, 88px) 24px clamp(72px, 10vw, 120px);
  position: relative;
}

.dlh--designed .dlh__inner {
  max-width: 1152px;
}

.dlh--designed.dlh--centered .dlh__inner {
  max-width: 772px;
}

.dlh--designed .dlh__content,
.dlh--designed .dlh__media,
.dlh--designed .dlh__buttons--center {
  position: relative;
  z-index: 1;
}

.dlh--designed .dlh__title {
  font-size: var(--dlh-h1);
  line-height: var(--dlh-h1-lh);
  text-wrap: balance;
}

/* A word is never broken in the middle (#1126): "databehandlere" came out as "databehandler / e"
   at 1440 px. The H1 shrinks to fit its column instead: --dlh-h1-fit is 10.5 % of the text
   column, so a word up to 9.5 em stays on one line at every width (Poppins Bold:
   "Standardsoftware" is 9.1 em, "databehandlere" 7.9 em). Lines still break at spaces and
   hyphens. Only where container units exist: a var() holding cqi would otherwise pass the
   parser and leave the H1 at the inherited body size, so a browser without them keeps the
   rules above, break-word included. */
@supports (width: 1cqi) {
  .dlh__title {
    font-size: min(clamp(36px, 4.6vw, 60px), var(--dlh-h1-fit));
    hyphens: manual;
    overflow-wrap: normal;
    word-break: normal;
  }

  .dlh--designed .dlh__title {
    font-size: min(var(--dlh-h1), var(--dlh-h1-fit));
  }
}

.dlh--designed .dlh__intro {
  font-size: 18px;
  line-height: 1.55;
  margin-top: 22px;
  max-width: 520px;
}

.dlh--designed.dlh--centered .dlh__intro {
  margin-left: auto;
  margin-right: auto;
}

.dlh__deco {
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

/* The pill above the H1 on the designed types, and on any type when it links somewhere. */
.dlh--designed .dlh__eyebrow,
.dlh__eyebrow--link {
  align-items: center;
  background-color: var(--dl-hvid);
  border-radius: var(--dl-radius-pill);
  color: var(--dl-ink);
  display: inline-flex;
  font-size: 12px;
  gap: 8px;
  letter-spacing: 0;
  line-height: 1.4;
  margin: 0 0 22px;
  padding: 5px 14px;
  text-transform: none;
}

.dlh__eyebrow--link,
.dlh__eyebrow--link:visited {
  font-size: 13px;
  padding: 6px 16px 6px 12px;
  position: relative;
  text-decoration: none;
}

/* A 44 px hit area around the 30 px pill. */
.dlh__eyebrow--link::after {
  bottom: -7px;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: -7px;
}

.dlh__eyebrow--link:hover,
.dlh__eyebrow--link:focus {
  color: var(--dl-ink);
  text-decoration: underline;
}

.dlh__eyebrow--link:focus-visible {
  outline: var(--dl-focus);
  outline-offset: 3px;
}

/* Oh Dear's live status badge. Its own colours change with the platform's status. */
.dlh__status-badge {
  display: block;
  flex: none;
  height: 20px;
  width: auto;
}

.dlh__crumb-list {
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}

.dlh__crumb {
  color: var(--dlh-title);
  margin: 0;
}

.dlh__crumb + .dlh__crumb::before {
  content: "›";
  margin-right: 8px;
}

.dlh__crumb-link,
.dlh__crumb-link:visited,
.dlh__crumb-link:hover,
.dlh__crumb-link:focus {
  color: inherit;
}

.dlh__checks {
  color: var(--dlh-text);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px 18px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.dlh__check {
  margin: 0;
}

.dlh--centered .dlh__checks {
  justify-content: center;
}

/* On navy and lilac, primary is a white button with navy text, as in the design. */
.dl-btn--ghost.dlh__btn--solid,
.dl-btn--ghost.dlh__btn--solid:visited {
  background-color: var(--dl-hvid);
  border-color: var(--dl-hvid);
  color: var(--dl-ink);
}

.dl-btn--ghost.dlh__btn--solid:hover,
.dl-btn--ghost.dlh__btn--solid:focus {
  background-color: var(--dl-lys-blaa);
  border-color: var(--dl-lys-blaa);
  color: var(--dl-ink);
}

/* Media: a blob-shaped box that the image covers. */
.dlh--designed .dlh__media {
  height: var(--dlh-media-h);
  max-width: none;
  position: relative;
  width: 100%;
}

.dlh--designed .dlh__frame {
  background-color: var(--dlh-media-bg);
  border-radius: var(--dlh-media-radius);
  box-shadow: var(--dlh-elev-4);
  inset: 0;
  overflow: hidden;
  position: absolute;
}

.dlh__image--cover {
  height: 100%;
  object-fit: cover;
}

.dlh__portrait {
  overflow: hidden;
  position: absolute;
}

.dlh__portrait-img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.dlh__portrait--1 {
  background-color: var(--dl-lys-blaa);
  border-radius: var(--dlh-blob-a);
  height: 62%;
  left: 0;
  top: 60px;
  width: 46%;
}

.dlh__portrait--2 {
  background-color: var(--dl-ink-2);
  border-radius: var(--dlh-blob-b);
  height: 52%;
  right: 4%;
  top: 0;
  width: 42%;
}

.dlh__portrait--3 {
  background-color: var(--dl-lilla);
  border-radius: 55% 45% 40% 60% / 45% 55% 45% 55%;
  bottom: 0;
  height: 50%;
  right: 0;
  width: 44%;
}

.dlh__dot {
  background-color: var(--dl-dot-blaa);
  border-radius: var(--dlh-blob-a);
  display: none;
  height: 58px;
  pointer-events: none;
  position: absolute;
  right: 50px;
  top: -10px;
  width: 70px;
  z-index: 2;
}

.dlh__badge {
  align-items: center;
  background-color: var(--dl-hvid);
  border-radius: var(--dl-radius-pill);
  bottom: 24px;
  box-shadow: var(--dlh-elev-3);
  color: var(--dl-ink);
  display: flex;
  font-size: 13px;
  gap: 10px;
  left: -16px;
  line-height: 1.3;
  max-width: calc(100% - 16px);
  padding: 10px 20px 10px 10px;
  position: absolute;
  text-align: left;
  z-index: 3;
}

.dlh__badge-title {
  font-weight: 600;
}

.dlh__badge-img {
  border-radius: 50%;
  flex: none;
  height: 36px;
  object-fit: cover;
  width: 36px;
}

.dlh__badge-dot {
  background-color: var(--dl-dot-blaa);
  border-radius: 50%;
  flex: none;
  height: 10px;
  width: 10px;
}

.dlh__badge-tick {
  background-color: var(--dl-ink);
  border-radius: 50%;
  color: var(--dl-hvid);
  display: grid;
  flex: none;
  font-size: 15px;
  height: 34px;
  place-items: center;
  width: 34px;
}

/* Onboarding: navy, a lilac blob top left. White and light blue text on navy: 8.9:1 or better. */
.dlh--type-onboarding {
  --dlh-bg: var(--dl-ink);
  --dlh-title: var(--dl-hvid);
  --dlh-text: var(--dl-lys-blaa);
}

.dlh--type-onboarding .dlh__deco--one {
  background-color: var(--dl-lilla);
  border-radius: var(--dlh-blob-a);
  height: 360px;
  left: -140px;
  top: -160px;
  width: 520px;
}

.dlh--type-onboarding .dlh__dot,
.dlh--type-om-os .dlh__dot,
.dlh--type-bagom .dlh__dot {
  display: block;
}

/* Support: light, a light blue blob top left, a white curve at the bottom, three portraits. */
.dlh--type-support {
  --dlh-bg: var(--dlh-ink-7);
}

.dlh--type-support .dlh__deco--one,
.dlh--type-om-os .dlh__deco--one {
  border-radius: var(--dlh-blob-a);
  height: 360px;
  left: -140px;
  top: -160px;
  width: 520px;
}

.dlh--type-support .dlh__deco--one {
  background-color: var(--dl-lys-blaa);
}

.dlh--type-support .dlh__deco--two,
.dlh--type-om-os .dlh__deco--two {
  background-color: var(--dl-hvid);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  bottom: -120px;
  height: 220px;
  right: -10%;
  width: 70%;
}

.dlh--type-support .dlh__eyebrow--link {
  box-shadow: var(--dlh-elev-1);
}

.dlh--type-support .dlh__badge {
  border-radius: 20px;
  display: block;
  left: 0;
  max-width: 240px;
  padding: 14px 20px;
}

.dlh--type-support .dlh__badge-title {
  display: block;
  font-family: var(--dl-font-hand);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 4px;
}

.dlh--type-support .dlh__badge-text {
  color: var(--dl-ink-3);
  font-size: 12px;
}

.dlh--type-support .dlh__badge-text br {
  display: none;
}

/* Kontakt: light blue, centred, no media. The design's cards overlap the hero from below, so
   the hero keeps the room at the bottom. */
.dlh--type-kontakt {
  --dlh-bg: var(--dl-lys-blaa);
  --dlh-h1: clamp(44px, 6vw, 80px);
  --dlh-h1-lh: 1;
  padding-bottom: clamp(96px, 14vw, 200px);
}

.dlh--type-kontakt .dlh__deco--one {
  background-color: var(--dl-dot-blaa);
  border-radius: var(--dlh-blob-b);
  height: 320px;
  right: -120px;
  top: 40px;
  width: 420px;
}

.dlh--type-kontakt .dlh__deco--two {
  background-color: var(--dl-hvid);
  border-radius: var(--dlh-blob-a);
  height: 360px;
  left: -140px;
  opacity: .55;
  top: -160px;
  width: 520px;
}

/* Om os: lilac with white text (3.28:1, the deviation accepted on #662), a dark lilac blob top
   left and a white curve at the bottom. */
.dlh--type-om-os {
  --dlh-bg: var(--dl-lilla);
  --dlh-title: var(--dl-hvid);
  --dlh-text: var(--dl-hvid);
  --dlh-h1: clamp(40px, 5vw, 64px);
  /* A short, fixed line: it keeps its designed size (#1126). */
  --dlh-h1-fit: var(--dlh-h1);
  --dlh-media-radius: var(--dlh-blob-a);
  padding-bottom: 120px;
  padding-top: clamp(56px, 9vw, 96px);
}

.dlh--type-om-os .dlh__deco--one {
  background-color: var(--dl-lilla-moerk);
}

.dlh--type-om-os .dlh__dot {
  background-color: var(--dl-ink);
  border-radius: var(--dlh-blob-b);
  height: 56px;
  right: 30px;
  top: -18px;
}

.dlh--type-om-os .dlh__badge {
  bottom: 20px;
  left: -12px;
  padding-left: 12px;
}

/* Bagom .legal: a lilac card inside the page column, not full bleed. White text on the lilac
   (3.28:1, as Om os). */
.dlh--type-bagom {
  --dlh-bg: var(--dl-hvid);
  --dlh-title: var(--dl-hvid);
  --dlh-text: var(--dl-hvid);
  --dlh-h1: clamp(48px, 6vw, 84px);
  /* A short, fixed line: it keeps its designed size (#1126). */
  --dlh-h1-fit: var(--dlh-h1);
  --dlh-h1-lh: .98;
  --dlh-media-h: 380px;
  --dlh-media-bg: var(--dl-lys-blaa);
  overflow: visible;
  padding: 32px 24px 0;
}

.dlh--type-bagom .dlh__inner {
  background-color: var(--dl-lilla);
  border-radius: 36px;
  max-width: 1232px;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 56px);
  position: relative;
}

.dlh--type-bagom .dlh__deco--one {
  background-color: var(--dl-lilla-moerk);
  border-radius: var(--dlh-blob-a);
  bottom: -140px;
  height: 320px;
  left: -100px;
  width: 460px;
}

.dlh--type-bagom .dlh__dot {
  height: 56px;
  right: 40px;
  top: -8px;
  width: 68px;
}

.dlh--type-bagom .dlh__badge-text {
  font-size: 14px;
  font-weight: 600;
}

/* Below the two-column layout the media is lower and the badge stays inside the column. */
@media (max-width: 991px) {
  .dlh--designed {
    --dlh-media-h: 320px;
  }

  /* Stacked, the media box would span the whole column (up to ~943 px at 991 px) and outgrow
     the 560 px and 280 px slots the images declare (#552). Cap it at the slot, centred. */
  .dlh--designed .dlh__media {
    justify-self: center;
    max-width: 560px;
  }

  .dlh--designed .dlh__badge {
    left: 0;
  }

  /* Onboarding carries the product illustrations (1200 x 1100, content up to the edges). In the
     320 px box the cover crop pushed their bottom-right toast into the blob's corner curve, so
     "Your record is up to date" lost its last word (#1126). Stacked, the box takes the image's
     own height instead: the whole illustration shows, masked only by the blob as on desktop. */
  .dlh--type-onboarding .dlh__media {
    height: auto;
  }

  .dlh--type-onboarding .dlh__frame {
    position: relative;
  }

  .dlh--type-onboarding .dlh__image--cover {
    height: auto;
  }
}

/* On a phone the big corner blobs would reach far into the text: they shrink towards their
   corner. */
@media (max-width: 767px) {
  .dlh--designed .dlh__deco {
    transform: scale(.55);
    transform-origin: 0 0;
  }

  .dlh--type-kontakt .dlh__deco--one {
    transform-origin: 100% 0;
  }

  .dlh--type-support .dlh__deco--two,
  .dlh--type-om-os .dlh__deco--two,
  .dlh--type-bagom .dlh__deco--one {
    transform-origin: 50% 100%;
  }
}
