/* Draft D: the original theme stays in charge. These rules only dress the three pieces taken from
   the other drafts, in the theme's palette (white, the grey of "Über uns", black, brand pink) and
   its own ABC Whyte faces, inside its 1080px content width. */
:root {
  --d-pink: #e7618b;
  --d-light: #efefef;
  --d-gap: 20px;
  --d-bar: 61px; /* lower edge of the theme's fixed bar, kept current by motion.js */
}

/* ---- Über uns: key figures ---------------------------------------------------------------- */
.d-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--d-gap); margin-top: 24px; }
.d-fig { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 240px; padding: 28px; color: #000; }
.d-fig-white { background: #fff; }
.d-fig-pink { background: var(--d-pink); }
.d-fig-light { background: var(--d-light); }
.d-fig-black { background: #000; color: #fff; }
#Content .d-fig-n { margin: 0; color: inherit; font: 400 clamp(56px, 6.4vw, 96px)/.85 "ABCWhyteInktrap-Book", sans-serif; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
#Content .d-fig-l { margin: 0; color: inherit; font: 400 18px/1.3 "ABCWhyte-Medium", sans-serif; letter-spacing: 0; }

/* ---- Die Schöne Töchter Gruppe: holdings as a logo list ------------------------------------- */
.d-cos { display: grid; }
.d-co { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--d-gap); padding: 28px 0; }
.d-co-logo { grid-column: 1 / span 4; display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 9% 14%; background: #fff; }
.d-co-logo img { width: 100%; height: 100%; object-fit: contain; }
.d-co-text { grid-column: 6 / -1; align-self: start; }
#Content .d-co-text h4 { margin-bottom: 12px; }
#Content .d-co-text h4 a { color: #000; text-decoration: none; }
#Content .d-co-text h4 a:hover { text-decoration: underline; }
#Content .d-co-text h5 { margin: 0; }

/* ---- Beteiligungshistorie: decade chapters, the decade stands while its entries scroll ------- */
.d-chapter { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--d-gap); align-items: start; padding-top: 104px; }
.d-chapter:first-child { padding-top: 48px; }
#Content .d-decade { grid-column: 1 / span 4; position: sticky; top: calc(var(--d-bar) + 16px); margin: 0; color: var(--d-pink); font: 400 clamp(64px, 7.4vw, 108px)/.85 "ABCWhyteInktrap-Book", sans-serif; letter-spacing: -.05em; }
.d-entries { grid-column: 5 / -1; display: grid; gap: 80px; }
.d-entry-logo { display: block; width: 300px; max-width: 100%; height: auto; margin-bottom: 24px; }
#Content .d-entry h4 { margin-bottom: 16px; }
#Content .d-entry h5:last-child { margin-bottom: 0; }

/* On phones the theme sets overflow-x: hidden on html and body, which turns body into a scroll box
   that never scrolls, so nothing inside could stick. clip cuts off the same way without that. */
@supports (overflow: clip) {
  html.d-js, html.d-js body { overflow-x: clip; overflow-y: visible; }
}

/* ---- Headings: one h1 per page (seo.py), the look stays the theme's ---------------------------
   .st-h1: former h1 lines, now p/h2; .st-h2: former h2, now the page's h1. Sizes as in the theme. */
#Wrapper .st-h1, #Wrapper .st-h2 { margin: 0 0 15px; color: #232b46; font-family: "ABCWhyteInktrap-Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-weight: 400; letter-spacing: 0; }
#Wrapper .st-h1 { font-size: 65px; line-height: 75px; }
#Wrapper .st-h2 { font-size: 50px; line-height: 60px; }
@media only screen and (min-width: 768px) and (max-width: 959px) {
  #Wrapper .st-h1 { font-size: 55px; line-height: 64px; }
  #Wrapper .st-h2 { font-size: 43px; line-height: 51px; }
}
@media only screen and (min-width: 480px) and (max-width: 767px) {
  #Wrapper .st-h1 { font-size: 49px; line-height: 56px; }
  #Wrapper .st-h2 { font-size: 38px; line-height: 45px; }
}
@media only screen and (max-width: 479px) {
  #Wrapper .st-h1 { font-size: 39px; line-height: 45px; }
  #Wrapper .st-h2 { font-size: 30px; line-height: 36px; }
}

/* ---- Entrances -------------------------------------------------------------------------------- */
.d-js .d-rv { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0ms); }
.d-js .d-rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .d-js .d-rv { opacity: 1; transform: none; transition: none; }
}

/* ---- Tablet and phone ------------------------------------------------------------------------- */
@media (max-width: 959px) {
  .d-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-fig { min-height: 200px; }
  .d-entries { grid-column: 5 / -1; }
}
@media (max-width: 767px) {
  .d-fig { min-height: 168px; padding: 20px; }
  .d-co { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .d-co > * { grid-column: 1 / -1; }
  .d-co-logo { max-width: 360px; }
  /* The decade becomes a band that stays at the top of the screen until the next one pushes it out */
  .d-chapter { display: block; padding-top: 56px; }
  #Content .d-decade { top: var(--d-bar); z-index: 5; margin-bottom: 28px; padding: 10px 0 8px; background: #fff; border-bottom: 1px solid #000; box-shadow: 0 -8px 0 #fff; /* covers the sub-pixel seam below the bar */ font-size: 48px; line-height: 1; }
  .d-entries { gap: 56px; }
}
/* Narrow phones: one tile per line, so "MitarbeiterInnen" fits */
@media (max-width: 479px) {
  .d-figs { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .d-fig { gap: 14px; min-height: 0; padding: 20px; }
  #Content .d-fig-n { font-size: 64px; }
}
