/* ==========================================================================
   /berlin/ — page layout only. Tokens from theme.css (var(--…) only), no new colours or font sizes.
   Idea: "Der Stadtplan der Türen" — skyline, 12-tile key, epochs timeline, call, door-chain
   contrast pair (the signature), twelve Bezirk entries with building-type tags, honest "no office".
   ========================================================================== */

/* 01 · hero: a seven-word H1 needs a calmer display size and a slightly wider column ------ */
.ber-hero .hero__content { max-width: 46rem; }
.ber-hero .hero__title { font-size: var(--fs-3xl); max-width: 16ch; }
@media (max-width: 30em) { .ber-hero__lbl { display: none; } }

/* 02 · key: head split, then 12 numbered octagon tiles with a tagline each --------------- */
.ber-key .section-head--split { align-items: start; }
@media (min-width: 60em) { .ber-key .section-head--split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.ber-key .area-key__list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: var(--sp-3); }
.ber-key .area-key__list a { height: 100%; align-items: start; min-height: 4.75rem; padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-3); }
.ber-key .area-key__list a::before { width: 2.6rem; height: 2.6rem; }
.ber-key__label { display: grid; gap: 0.15rem; min-width: 0; padding-top: 0.1rem; }
.ber-key__name { font-weight: 700; color: var(--c-heading); line-height: 1.25; overflow-wrap: break-word; }
.ber-key__tag { font-weight: 400; font-size: var(--fs-sm); line-height: 1.35; color: var(--c-muted); }
.ber-key .area-key__title { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 700; color: var(--c-heading); }

/* 03 · why doors differ: answer paragraph, then a timeline of four epochs -------------- */
@media (min-width: 60em) {
	.ber-intro .intro { align-items: start; }
	.ber-intro .intro__media { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
}
.ber-epochs { list-style: none; margin: var(--sp-6) 0 0; padding: 0; display: grid; gap: var(--sp-6); }
.ber-epoch { position: relative; display: grid; gap: var(--sp-2); padding-left: var(--sp-7); }
.ber-epoch::before {
	content: ""; position: absolute; left: 0; top: 0.3rem; width: 1.5rem; height: 1.5rem; border-radius: 50%;
	border: 0.3rem solid var(--c-accent); background: radial-gradient(circle, var(--spark) 0 22%, var(--c-bg) 26%);
}
.ber-epoch::after {
	content: ""; position: absolute; left: calc(0.75rem - 1px); top: 2rem; bottom: calc(var(--sp-6) * -1 + 0.3rem); width: 2px;
	background: var(--c-line-strong);
}
.ber-epoch:last-child::after { display: none; }
.ber-epoch > p + p { margin-top: 0; }
.ber-epoch__label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sp-3); }
.ber-epoch__when { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.1; color: var(--c-accent); }
.ber-epoch__what { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted); }

/* 04 · Ablauf: split head, steps, night note ----------------------------------------- */
.ber-ablauf .section-head--split { align-items: start; }
.ber-ablauf .section-head--split .answer { max-width: none; }
.ber-ablauf .step__text a { font-weight: 600; }
.ber-night {
	display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4) var(--sp-5); margin-top: var(--sp-7);
	padding: var(--sp-4) var(--sp-5); background: var(--c-surface); border: 1px solid var(--c-line);
	border-left: 6px solid var(--violet-500); border-radius: var(--r-md);
}
.ber-night__icon { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; background: var(--violet-500); color: var(--white); }
.ber-night__text { flex: 1 1 22rem; max-width: none; }

/* 05 · signature: door chains of different length (contrast pair) ----------------------- */
.ber-van .section-head--split { align-items: start; }
.ber-cases { display: grid; gap: var(--sp-5); }
@media (min-width: 60em) {
	.ber-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ber-case--hof { grid-column: 1 / -1; }
}
.ber-case {
	display: grid; gap: var(--sp-5); align-content: start; min-width: 0;
	padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); background: var(--c-surface); border: 1px solid var(--c-line);
	border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.ber-case--hof { color: var(--c-fg); background-color: var(--ink-900); background-image: var(--grad-spot); border-color: var(--ink-700); box-shadow: var(--sh-lg); }
@media (min-width: 64em) { .ber-case--hof { grid-template-columns: 19rem minmax(0, 1fr); gap: var(--sp-7); } }
.ber-case__plan { margin: 0; padding: var(--sp-5); background: var(--ink-950); border: 1px solid var(--ink-700); border-radius: var(--r-lg); align-self: start; }
.ber-case__plan-caption { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--on-dark-muted); }
.ber-case__media { position: relative; }
.ber-case__body { display: grid; gap: var(--sp-4); align-content: start; min-width: 0; }
.ber-case__body > * { margin: 0; }
.ber-case__title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-xl); line-height: 1.15; color: var(--c-heading); }
.ber-case__body a { font-weight: 600; }

/* the door chain: vertical on phones, horizontal from 40em */
.ber-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.ber-chain__node { position: relative; display: grid; grid-template-columns: 2.7rem 1fr; align-items: center; gap: var(--sp-4); min-height: 2.7rem; min-width: 0; }
.ber-chain__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; background: var(--violet-500); color: var(--white); }
.ber-chain__label { font-weight: 700; color: var(--c-heading); line-height: 1.25; }
.ber-chain__node + .ber-chain__node::before {
	content: ""; position: absolute; left: calc(1.35rem - 2px); top: calc(var(--sp-4) * -1); height: var(--sp-4); width: 4px;
	background: var(--c-accent); opacity: 0.8;
}
.ber-case--hof .ber-chain__node + .ber-chain__node::before { background: var(--violet-300); }
@media (min-width: 40em) {
	.ber-chain { flex-direction: row; gap: 0; }
	.ber-chain__node { flex: 1 1 0; grid-template-columns: 1fr; justify-items: center; text-align: center; align-items: start; gap: var(--sp-2); }
	.ber-chain__node + .ber-chain__node::before { left: auto; right: 50%; top: calc(1.35rem - 2px); width: 100%; height: 4px; }
}
.ber-sidedoors { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* closing panel: dark, chamfered, with the call button */
.ber-say {
	display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4) var(--sp-6); margin-top: var(--sp-7);
	padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); background-color: var(--ink-900); background-image: var(--grad-spot); color: var(--on-dark);
	clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.ber-say__icon { display: grid; place-items: center; flex: none; width: 3.5rem; height: 3.5rem; background: var(--violet-500); color: var(--white); }
.ber-say__text { flex: 1 1 20rem; max-width: 40rem; font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.3; color: var(--white); }

/* 06 · twelve Bezirk entries ------------------------------------------------------------- */
.ber-bezirke__eyebrow { margin-top: var(--sp-7); }
.ber-bezirke .toc-bar + .container { padding-top: 0; }
.ber-bezirke__list { display: grid; margin-top: var(--sp-5); }
.ber-bz { scroll-margin-top: calc(var(--header-h) + 5rem); }
@media (min-width: 64em) { .ber-bz { scroll-margin-top: calc(var(--header-h) + 8.5rem); } } /* the chip bar wraps to two rows here */
.ber-bz .bezirk__no { font-size: var(--fs-3xl); }
.ber-bz__types { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ber-bz__types .tag-label .i { color: var(--c-accent); }
.ber-bz .bezirk__name { font-size: var(--fs-xl); line-height: 1.15; max-width: 34ch; }
.ber-bz__angle { display: block; margin-bottom: var(--sp-2); font-family: var(--font-display); font-weight: 400; font-size: var(--fs-lg); line-height: 1.3; color: var(--c-heading); }
.ber-bz .bezirk__body p { max-width: 64ch; }
.ber-interlude { margin-block: var(--sp-5) var(--sp-3); }
.ber-interlude .callstrip__title { font-size: var(--fs-lg); }

/* 07 · no office: dark band, notice re-toned to the palette, pull quote, two cards -------- */
.ber-office__grid { display: grid; gap: var(--sp-7); align-items: start; }
@media (min-width: 64em) {
	.ber-office__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--sp-8); }
	.ber-office__lead { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
}
.ber-office__quote { padding-left: var(--sp-5); border-left: 4px solid var(--violet-500); font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.35; color: var(--c-heading); }
.ber-office .notice { --n-c: var(--violet-300); --n-bg: var(--ink-800); --n-text: var(--on-dark); }
.ber-office .notice__title { color: var(--white); }
.ber-office .notice a:not(.btn) { color: var(--violet-200); text-decoration: underline; }
.ber-office__two { font-weight: 700; color: var(--c-heading); }
.ber-office__cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.ber-office__cards .icon-list__item { align-content: start; }
.ber-office__cards .icon-list__title { font-size: var(--fs-base); font-weight: 600; line-height: 1.5; color: var(--c-fg); }

/* 08 · call strip: text left, the number as the dominant button right ------------------- */
.ber-call__strip .callstrip__text { max-width: 44rem; }
.ber-call__action { display: grid; gap: var(--sp-2); justify-items: start; }
.ber-call__label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--violet-100); }

/* tablet refinements: steps as 2 x 2, the two light cases as image-left rows */
@media (min-width: 48em) and (max-width: 63.99em) {
	.ber-ablauf .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 40em) and (max-width: 59.99em) {
	.ber-case--platte, .ber-case--haus { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
}
