/* Page title in the hero (#front): Divi Text module with the class "page-title"
   One word per line in a staircase like the logo, bottom left of the full-screen hero (js/page-title.js splits the words) */

/* Hero: title sits at the bottom. Sizes in design pt (var(--u), css/design.css): 40.12 pt, line pitch 42.6 pt.
   Distance from the edges per page: --ml-tx / --ml-tb on the module (set by js/page-title.js, defaults 28.3 / 42) */
#front.et_pb_section:has(.page-title) {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 !important;
}
#front:has(.page-title) > .et_pb_row {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
#front .page-title {
  width: fit-content !important;
  margin: 0 auto calc(var(--ml-tb, 42) * var(--u)) calc(var(--ml-tx, 28.3) * var(--u)) !important;
}

#front .page-title h1,
#front .page-title h1 * {
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: calc(40.12 * var(--u)) !important;
  font-weight: 400 !important;              /* Regular */
  font-variation-settings: "wght" 400;
  line-height: 1.062 !important;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Staircase: each line steps in by a number of characters (monospaced, so ch = one letter) */
#front .page-title .page-title__line {
  display: block;
  white-space: nowrap;
}
#front .page-title .page-title__line:nth-child(2) { padding-left: 4ch; }
#front .page-title .page-title__line:nth-child(3) { padding-left: 2ch; }
#front .page-title .page-title__line:nth-child(4) { padding-left: 5ch; }
#front .page-title .page-title__line:nth-child(5) { padding-left: 1ch; }

@media (max-width: 767px) {
  #front .page-title {
    margin-bottom: 9rem !important; /* room for the Book samtale button */
    margin-left: 1.25rem !important;
  }
  #front .page-title h1,
  #front .page-title h1 * {
    font-size: 9.5vw !important;
  }
}

/* Vertical variant: add the class "page-title--vertical" next to "page-title" on the Text module
   Lines run bottom-to-top, side by side */
#front .page-title--vertical h1 {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
#front .page-title--vertical .page-title__line:nth-child(n) {
  padding-left: 0;
  padding-inline-start: 0;
}
#front .page-title--vertical .page-title__line:nth-child(1) { padding-inline-start: 1ch; }
#front .page-title--vertical .page-title__line:nth-child(2) { padding-inline-start: 1ch; }
#front .page-title--vertical .page-title__line:nth-child(3) { padding-inline-start: 0; }

/* Layouts from the design per page (js/page-title.js sets the classes and the steps per line) */
#front .page-title--custom .page-title__line:nth-child(n) {
  padding-left: 0;
}
/* Right-hand variant (Om Kathrine): at the right, left of the fixed Book samtale button with clear air between them
   (36 pt, at least 2.5rem) */
#front .page-title.page-title--right {
  margin-left: auto !important;
  margin-right: max(calc(var(--ml-tx, 28.3) * var(--u)), calc(var(--ml-book-offset-r, 23.8 * var(--u)) + var(--ml-book-size, 7.5rem) + max(2.5rem, calc(36 * var(--u))))) !important;
  margin-bottom: calc(var(--ml-tb, 42) * var(--u)) !important;
}
/* SVG version (Om Kathrine): centred vertically on the screen (the hero is one screen high) – never lower than the design */
#front .page-title.page-title--right.page-title--svg {
  margin-bottom: max(calc(var(--ml-tb, 42) * var(--u)), calc((100vh - var(--ml-th) * var(--u)) / 2)) !important;
}
@media (max-width: 767px) {
  #front .page-title.page-title--right,
  #front .page-title.page-title--right.page-title--svg { margin-right: 1.25rem !important; margin-bottom: 9rem !important; }
}

/* Aside next to the title: Divi Text module with the class "page-title-aside",
   placed in the same column right below the "page-title" module (e.g. contact info on Kontakt).
   Sits at the right edge, bottom-aligned with the title, lifted clear of the fixed Book samtale button */
#front .et_pb_column:has(.page-title-aside) {
  position: relative;
}
#front .page-title-aside {
  position: absolute !important;
  right: max(1rem, calc(28.3 * var(--u, 2px)));
  bottom: calc(var(--ml-book-offset-b, 22.7 * var(--u)) + var(--ml-book-size, 7.5rem) + 1.5rem);
  width: auto !important;
  margin: 0 !important;
  text-align: right;
}
#front .page-title-aside,
#front .page-title-aside * {
  color: #fff !important;
  font-family: "config-mono-vf", sans-serif !important;
  font-weight: 300 !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  padding-bottom: 0;
}
#front .page-title-aside a:hover {
  opacity: 0.7;
}

@media (max-width: 767px) {
  #front .page-title-aside {
    position: static !important;
    margin-top: 1.5rem !important;
    text-align: left;
  }
  #front .page-title-aside,
  #front .page-title-aside * {
    font-size: 13px !important;
  }
}

/* Tall hero (Kontakt, design Vitus_Web13): add the class "ml-hero--tall" to the hero section.
   The photo runs 892.7 pt down to the footer; the title sits near the top (js/page-title.js) */
#front.ml-hero--tall {
  height: calc(892.7 * var(--u)) !important;
  min-height: 100svh;
  background-size: cover !important;
  background-position: center bottom !important;
}
/* Contact lines next to the title: Text module with the classes "page-title-aside page-title-aside--beside" */
#front:has(.page-title-aside--beside) { position: relative; }
#front .et_pb_column:has(.page-title-aside--beside) { position: static !important; }
#front .page-title-aside.page-title-aside--beside {
  /* top edge 278 pt from the top of the 892.7 pt hero (Vitus_Web14) – measured from the bottom, because the scroll reveal
     transforms the column (which then becomes the reference box); hero and column end at the same line */
  left: calc(197.5 * var(--u));
  top: auto;
  right: auto;
  bottom: calc((892.7 - 278) * var(--u));
  translate: 0 100%;
  text-align: left;
}
#front .page-title-aside--beside,
#front .page-title-aside--beside * {
  font-size: max(12px, calc(9 * var(--u))) !important;     /* Vitus_Web14: 9 pt, 15 pt line spacing */
  line-height: max(20px, calc(15 * var(--u))) !important;
  font-weight: 400 !important;
  font-variation-settings: "wght" 400;
}
#front .page-title-aside--beside p { padding: 0; margin: 0; }
#front .page-title-aside--beside a { color: #fff !important; text-decoration: none; }
#front .page-title-aside--beside a:hover { opacity: 0.7; }
@media (max-width: 767px) {
  #front.ml-hero--tall { height: 100svh !important; }
  #front .page-title-aside.page-title-aside--beside {
    position: absolute !important;
    left: 1.25rem;
    top: auto;
    bottom: 3rem;
    translate: none;
    margin: 0 !important;
  }
  #front .page-title-aside--beside,
  #front .page-title-aside--beside * { font-size: 14px !important; line-height: 1.6 !important; }
  #front.ml-hero--tall .page-title { margin-bottom: 11rem !important; }
}

/* ---------- SVG titles (Vitus_Web14_281026) ----------
   js/page-title.js swaps the title text for a drawing (images/titles/*.svg) and adds the class "page-title--svg".
   --ml-tw / --ml-th: size of the drawing, --ml-tx / --ml-tb: distance from the left (right) / bottom edge – all in design pt */
#front .page-title.page-title--svg h1 {
  line-height: 0 !important;
  font-size: 0 !important;
}
#front .page-title.page-title--svg .page-title__svg {
  display: block;
  width: calc(var(--ml-tw) * var(--u));
  height: auto;
  max-width: none;
}
@media (max-width: 767px) {
  /* same letter size as the text titles on phones (9.5vw for 40.12 pt letters) */
  #front .page-title.page-title--svg .page-title__svg {
    width: calc(var(--ml-tw) * 9.5vw / 40.12);
  }
}
