/* K2b: header, menu and footer after Landing V2 "Film" (in Kontor's own palette), the twelve-step ruler,
   and on phones the chapter cards that stack like P3 "Stapel". Loaded last, it overrides main.css and day.css. */

/* ---------- Header: mark left, one quiet "Menü" right; the waitlist action joins after the hero ---------- */
.nav__bar { position: relative; display: flex; align-items: center; gap: 16px; height: var(--nav-h); max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.nav.is-solid { border-bottom-color: var(--line); }
.brand { margin-right: auto; min-height: 44px; }
.brand__by { align-self: center; margin-left: 2px; padding-left: 12px; border-left: 1px solid var(--line); font-size: .875rem; color: var(--dim); }
.nav__cta { visibility: hidden; opacity: 0; transform: translateY(-12px); transition: opacity var(--dur-out) var(--ease-out), transform var(--dur-out) var(--ease-out), visibility 0s linear var(--dur-out), background-color var(--dur-fast) var(--ease-std); }
.nav.is-past-hero .nav__cta { visibility: visible; opacity: 1; transform: none; transition: opacity var(--dur-mod) var(--ease-in), transform var(--dur-mod) var(--ease-in), visibility 0s, background-color var(--dur-fast) var(--ease-std); }
.nav.menu-open .nav__cta { visibility: hidden; opacity: 0; }
.nav__toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; color: var(--fg); font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer; transition: border-color var(--dur-out) var(--ease-out); }
.nav__toggle:hover { border-color: currentColor; transition: border-color var(--dur-fast) var(--ease-in); }
.nav__toggle-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; transition: transform var(--dur-fast) var(--ease-std); }
.nav__toggle[aria-expanded="true"] .nav__toggle-dot { transform: scale(1.5); }
.dock-ruler { visibility: hidden; transition-property: opacity, transform, background-color, visibility; transition-delay: 0s, 0s, 0s, var(--dur-out); }
.dock-ruler.is-shown { visibility: visible; transition-delay: 0s; }
.dock-ruler__name { min-width: 6.5em; font-weight: 600; color: var(--fg); }

/* The menu grows as a Papier circle out of "Menü" and shrinks back into it. */
.menu { position: fixed; inset: 0; z-index: -1; display: block; border: 0; background: var(--papier); color: var(--tinte); visibility: hidden; clip-path: circle(0 at 100% 0);
  --fg: var(--tinte); --dim: var(--gedimmt); --line: #C9C5BE; }
.menu[hidden] { display: block; }
.menu nav { display: grid; padding: 0; }
.menu.is-open { visibility: visible; }
.menu__inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-content: center; height: 100%; max-width: var(--wrap); margin-inline: auto; padding: calc(var(--nav-h) + 32px) var(--pad) 48px; overflow-y: auto; }
.menu__pages { grid-column: 1 / 8; }
.menu__links { list-style: none; display: grid; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.menu .menu__links a { display: flex; align-items: baseline; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: clamp(2.25rem, min(5.4vw, 8svh), 4.5rem); line-height: 1; font-weight: 200; letter-spacing: -.03em; text-decoration: none; color: var(--tinte); }
.menu .menu__links a:hover, .menu .menu__links a:focus-visible { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.12em; }
.menu__num { min-width: 2.2em; font-size: .8125rem; font-weight: 500; letter-spacing: .08em; }
.menu__side { grid-column: 9 / 13; align-self: end; display: grid; gap: 36px; justify-items: start; }
.menu__group { display: grid; gap: 10px; }
.menu__head { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gedimmt); }
.menu__site { list-style: none; display: grid; grid-template-columns: repeat(2, auto); gap: 0 28px; margin: 0; padding: 0; }
.menu .menu__site a, .menu .menu__contact a { display: inline-flex; align-items: center; min-height: 40px; padding: 0; border: 0; font-size: 1rem; font-weight: 500; color: var(--tinte); }
.menu__products { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.menu .menu__products a { display: grid; min-height: 44px; padding: 0; border: 0; text-decoration: none; color: var(--tinte); }
.menu__product { font-size: 1.75rem; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; }
.menu__domain { font-size: .875rem; color: var(--gedimmt); }
.menu__contact { display: grid; margin: 0; }
.menu .menu__cta { margin-top: 0; }
.nav.menu-open { --fg: var(--tinte); --dim: var(--gedimmt); --line: #C9C5BE; background: transparent; border-bottom-color: transparent; color: var(--tinte); }
.nav.menu-open .brand__mark { color: var(--tinte); }
.nav.menu-open .seal { fill: var(--blau); }
.nav.menu-open .dock-ruler { opacity: 0; }

/* ---------- Hero ruler: twelve moments in two rows (morning, afternoon) ---------- */
.ruler ol { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 18px; }
.ruler time { font-size: 1rem; }

/* ---------- Chapters: the function line under each text ---------- */
.chapter { min-height: 84vh; }
.chapter__face { position: relative; }
.chapter__fn { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: var(--dim); }
.chapter__fn svg { width: 18px; height: 18px; color: var(--fg); flex: none; }
.chapter > .chapter__face > h3 { margin: 0 0 14px; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); line-height: 1.1; font-weight: 720; letter-spacing: -.02em; text-wrap: balance; max-width: 17ch; }
.chapter__face > p:not([class]) { margin: 0; max-width: 40ch; color: var(--dim); }
.js .story.is-live .chapter > .chapter__face > h3 { transition: color var(--dur-mod) var(--ease-std); }
.js .story.is-live .chapter:not(.is-active) > .chapter__face > h3, .js .story.is-live .chapter:not(.is-active) .chapter__time time { color: var(--dim); }
.chapter:last-child { min-height: 100vh; }

/* ---------- Footer after V2: sentence on top, four columns, the word across the width, legal line ---------- */
.footer { background: var(--grund-dunkel); color: var(--papier); padding: 128px 0 32px; border-top: 1px solid var(--linie-dunkel); }
.footer__wrap { container-type: inline-size; }
.footer a { color: var(--papier); }
.footer :focus-visible { outline-color: var(--blau-dunkel); }
.footer__top { display: flex; justify-content: space-between; align-items: baseline; gap: 32px; padding-bottom: 64px; border-bottom: 1px solid var(--linie-dunkel); }
.footer__claim { margin: 0; max-width: 24ch; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.5rem); line-height: 1.05; font-weight: 300; letter-spacing: -.025em; text-wrap: balance; }
.footer__claim em { font-style: italic; font-weight: 300; color: var(--gedimmt-dunkel); }
.footer__up { flex: none; }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 64px 0 112px; font-size: .9375rem; }
.footer__head { margin: 0 0 16px; font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gedimmt-dunkel); }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { line-height: 1.5; }
.footer__col a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1px; background-position: 0 85%; background-repeat: no-repeat; transition: background-size var(--dur-out) var(--ease-out); }
.footer__col a:hover { background-size: 100% 1px; transition: background-size var(--dur-fast) var(--ease-in); }
.footer__col address { font-style: normal; color: var(--papier); }
.footer__small { margin-top: 8px; font-size: .8125rem; color: var(--gedimmt-dunkel); }
.footer__mark { display: flex; align-items: center; gap: .14em; margin: 0; font-size: calc(100cqw / 4.12); line-height: .9; font-weight: 700; letter-spacing: -.045em; white-space: nowrap; color: var(--papier); }
.footer__logo { width: .86em; height: .86em; flex: none; color: var(--papier); }
.footer__logo .seal { fill: var(--blau-dunkel); }
.footer__legal { display: flex; justify-content: space-between; gap: 16px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--linie-dunkel); font-size: .8125rem; color: var(--gedimmt-dunkel); }
.footer__legal a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }

@media (max-width: 1080px) {
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .menu__pages { grid-column: 1 / -1; }
  .menu__side { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; align-self: start; }
}

/* ---------- Phones: chapter cards stack (P3 "Stapel"); the sticky card is never transformed, its face recedes ---------- */
@media (max-width: 860px) {
  .story.is-stack .chapters { padding-bottom: 8px; }
  .story.is-stack .chapter { position: sticky; top: calc(var(--nav-h) + 36px); height: calc(100svh - var(--nav-h) - 36px); min-height: 0; padding: 0; border-top: 0; margin: 0 calc(-1 * var(--pad)); }
  .story.is-stack .chapter + .chapter { margin-top: 12svh; }
  .story.is-stack .chapter__face { display: flex; flex-direction: column; height: 100%; padding: 24px var(--pad) 0; border-radius: 24px 24px 0 0; background: var(--grund); color: var(--tinte); box-shadow: 0 -14px 30px -22px rgba(29, 26, 20, .45), 0 -1px 0 var(--linie); overflow: hidden; transform-origin: 50% 0; --dim: var(--gedimmt); --fg: var(--tinte); }
  .story.is-stack .chapter__face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grund-dunkel); opacity: var(--shade, 0); pointer-events: none; }
  .story.is-stack .chapter[data-tone="mittag"] .chapter__face, .story.is-stack .chapter[data-tone="nachmittag"] .chapter__face { background: var(--ruhe); }
  .story.is-stack .chapter[data-tone="abend"] .chapter__face { background: var(--papier); }
  .story.is-stack .chapter[data-tone="nacht"] .chapter__face { background: var(--flaeche-dunkel); color: var(--papier); --dim: var(--gedimmt-dunkel); --fg: var(--papier); box-shadow: 0 -14px 30px -22px rgba(0, 0, 0, .6), 0 -1px 0 var(--linie-dunkel); }
  .story.is-stack .chapter:last-child { height: calc(100svh - var(--nav-h) - 36px); }
  .story.is-stack .chapter__time { margin-bottom: 10px; }
  .story.is-stack .chapter > .chapter__face > h3 { font-size: 1.75rem; margin-bottom: 10px; color: var(--fg); }
  .story.is-stack .chapter__face > p:not([class]) { font-size: 1rem; line-height: 1.5; }
  .story.is-stack .chapter__fn { margin-top: 12px; }
  .story.is-stack .phone--mini { flex: 1 1 auto; min-height: 0; max-width: 340px; width: 100%; margin: 18px auto 0; }
  .story.is-stack .phone--mini .kapp { height: calc(100% + 40px); min-height: 0; border-width: 7px; border-radius: 30px; }
  .js .story.is-stack .chapter:not(.is-active) > .chapter__face > h3, .js .story.is-stack .chapter:not(.is-active) .chapter__time time { color: var(--fg); }
  .footer { padding-top: 96px; }
}

@media (max-width: 760px) {
  .nav__cta { display: none; }
  .ruler ol { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 12px; }
  .ruler a { padding-right: 4px; }
  .ruler time { font-size: .9375rem; }
  .ruler span { font-size: .75rem; }
  .menu__inner { align-content: start; padding-top: calc(var(--nav-h) + 24px); }
  .menu .menu__links a { font-size: 2.5rem; padding: 12px 0; }
  .menu__side { grid-template-columns: 1fr; gap: 28px; margin-top: 32px; }
  .menu .menu__cta { width: 100%; }
  .footer__top { flex-direction: column; gap: 20px; padding-bottom: 48px; }
  .footer__claim { font-size: 2rem; }
  .footer__cols { grid-template-columns: 1fr 1fr; padding: 48px 0 72px; }
  .footer__legal { flex-direction: column; padding-bottom: 88px; }
}

/* Without JS the menu cannot open: no dead button. */
html:not(.js) .nav__toggle { display: none; }

@media (max-width: 420px) {
  .brand__by { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav__cta, .nav.is-past-hero .nav__cta { transform: none; transition: opacity 120ms linear, visibility 0s; }
  .menu .menu__links a, .footer__col a { transition: none; }
}
