/*
 * angie-holste.de – public site, design "Editorial Minimal".
 * Calm magazine layout: paper and ink, hairlines, a large serif with italic accents.
 * Scroll effects use CSS scroll-driven animations only (no JavaScript) and switch off
 * for reduced motion or in browsers without support.
 */

@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-latin-300-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Cormorant Garamond";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2");
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2");
}

:root {
    --paper: #f6f3ee;
    --paper-deep: #ece7df;
    --ink: #1c1b19;
    --ink-soft: #3d3a35;
    --taupe: #8c8378;      /* decorative only (large type, rules) */
    --muted: #6b645b;      /* small text on paper, contrast 5.4:1 */
    --line: rgb(28 27 25 / 0.16);
    --placeholder: #d9d2c7;

    --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
    --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;

    --nav-h: 72px;
    --gutter: clamp(20px, 5vw, 64px);
    --content: 1280px;
    --col-gap: clamp(16px, 2.2vw, 32px);
    --space: clamp(4.5rem, 10vw, 9rem);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

html:has(dialog[open]) {
    overflow: hidden;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--ink);
    color: var(--paper);
}

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

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

h1,
h2,
h3 {
    font-weight: 400;
    line-height: 1.1;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

/* Long German compounds (e.g. in legal texts) must not overflow narrow screens. */
h1,
h2,
h3,
.prose {
    overflow-wrap: break-word;
}

.legal__title,
.prose h2,
.prose h3 {
    hyphens: auto;
}

.container {
    width: min(var(--content), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.7rem 1.1rem;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.85rem;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* Neutral placeholder until an image is uploaded. */
.ph {
    display: block;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(135deg, transparent 0 16px, rgb(255 255 255 / 0.22) 16px 17px),
        var(--placeholder);
}

.prose > :first-child {
    margin-top: 0;
}

.prose > :last-child {
    margin-bottom: 0;
}

.prose p,
.prose ul {
    margin: 0 0 1em;
}

.prose h2 {
    margin: 2em 0 0.6em;
    font-family: var(--serif);
    font-size: 1.9em;
    font-weight: 300;
}

.prose h3 {
    margin: 1.6em 0 0.5em;
    font-family: var(--serif);
    font-size: 1.4em;
    font-weight: 500;
}

.prose ul {
    padding-left: 1.2em;
}

.prose li::marker {
    color: var(--taupe);
}

/* Shared pieces */

/* Heading of every section ("01 — Über mich ———"), see editorial_eyebrow(). Also used as a plain line on the legal pages. */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 clamp(2.5rem, 6vw, 5rem);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    line-height: 1;
    text-transform: uppercase;
}

.eyebrow::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.no {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.eyebrow .no::after {
    content: " —";
    font-style: normal;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.9rem 1.7rem;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.button--dark {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.button--dark:hover {
    background: transparent;
    color: var(--ink);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
    padding: 0.6rem 0 0.5rem;
    border-bottom: 1px solid currentColor;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.link-arrow__icon {
    font-size: 1.1rem;
    letter-spacing: 0;
    transition: translate 0.35s var(--ease);
}

.link-arrow:hover .link-arrow__icon {
    translate: 0.4rem 0;
}

.link-arrow--back:hover .link-arrow__icon {
    translate: -0.4rem 0;
}

/* Logo */

.logo {
    display: block;
    margin: 0;
}

.logo__img {
    width: auto;
    height: 48px;
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo__name {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-style: italic;
}

.logo__sub {
    margin-top: 0.3rem;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.5em;
    text-transform: uppercase;
}

/* Sticky menu: paper coloured; a hairline and blur appear after scrolling. */

main [id],
.hero {
    scroll-margin-top: var(--nav-h);
}

.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--nav-h);
    border-bottom: 1px solid transparent;
    background: rgb(246 243 238 / 0);
    transition: background-color 0.35s ease, border-color 0.35s ease;
    view-transition-name: site-nav;
}

.nav-sentinel {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: var(--nav-h);
    pointer-events: none;
}

.nav--scrolled,
.nav--solid {
    border-bottom-color: var(--line);
    background: rgb(246 243 238 / 0.9);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    height: 100%;
}

.nav__brand {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
    view-transition-name: brand;
}

.nav__desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav__list,
.nav__legal {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__list a,
.nav__legal a {
    display: inline-block;
    padding-block: 0.6rem;
    background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(100% - 0.35rem) / 0 1px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-size 0.35s var(--ease);
}

.nav__list a:hover,
.nav__list a[aria-current],
.nav__legal a:hover,
.nav__legal a[aria-current] {
    background-size: 100% 1px;
}

.nav__legal {
    gap: 1.1rem;
    padding-left: 1.75rem;
    border-left: 1px solid var(--line);
}

.nav__legal a {
    color: var(--muted);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
}

.nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 44px;
    min-height: 44px;
    margin-right: -0.4rem;
    padding: 0 0.4rem;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.nav__toggle-text {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.nav__toggle svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
}

@media (min-width: 1100px) {
    .nav:not(.nav--compact) .nav__desktop {
        display: flex;
    }

    .nav:not(.nav--compact) .nav__toggle {
        display: none;
    }
}

/* Offcanvas menu: full-height paper panel from the right with numbered entries. */

.offcanvas {
    inset: 0 0 0 auto;
    width: min(28rem, 92vw);
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.offcanvas[open] {
    display: flex;
    flex-direction: column;
}

.offcanvas::backdrop {
    background: rgb(28 27 25 / 0.35);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.offcanvas__head {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    padding: 0 1rem 0 clamp(1.5rem, 5vw, 2.5rem);
    border-bottom: 1px solid var(--line);
}

.offcanvas__brand {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-style: italic;
}

.offcanvas__close {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

.offcanvas__close svg {
    width: 1.4rem;
    height: 1.4rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
}

.offcanvas__list {
    margin: 0;
    padding: 1.5rem clamp(1.5rem, 5vw, 2.5rem);
    list-style: none;
}

.offcanvas__list a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    font-weight: 300;
    line-height: 1.1;
    text-decoration: none;
}

.offcanvas__num {
    flex: none;
    width: 2rem;
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 400;
    color: var(--muted);
}

.offcanvas__list a[aria-current] {
    font-style: italic;
}

.offcanvas__foot {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: auto;
    padding: 1.5rem clamp(1.5rem, 5vw, 2.5rem) 2rem;
}

.offcanvas__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
}

.offcanvas__legal a {
    display: inline-block;
    padding-block: 0.5rem;
}

/* Hero: oversized serif headline on a 12-column grid, portrait photo on the right. */

.hero {
    position: relative;
    padding: calc(var(--nav-h) + clamp(2.5rem, 7vw, 6rem)) 0 clamp(3.5rem, 8vw, 7rem);
}

.hero__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: end;
}

.hero__copy {
    grid-column: 1 / span 7;
    padding-bottom: clamp(0rem, 2vw, 2rem);
}

.hero__kicker {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero__title {
    margin: clamp(1.25rem, 2.5vw, 2rem) 0 clamp(1.75rem, 3vw, 2.75rem);
    font-family: var(--serif);
    font-size: clamp(2.25rem, 6vw, 5.75rem);
    font-weight: 300;
    letter-spacing: -0.025em;
    line-height: 0.92;
}

.hero__title em {
    font-weight: 400;
}

.hero__intro {
    max-width: 36ch;
    color: var(--ink-soft);
    font-size: 0.98rem;
    line-height: 1.75;
}

.hero__intro p {
    margin: 0 0 0.9em;
}

.hero__intro p:last-child {
    margin-bottom: 0;
}

.hero__media {
    grid-column: 8 / -1;
    margin: 0;
}

.hero__frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--placeholder);
}

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

.hero__caption {
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.5;
}

/* About */

.about {
    padding-block: var(--space);
}

.about__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: start;
}

.about__media {
    grid-column: 1 / span 5;
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
    margin: clamp(2rem, 7vw, 7rem) 0 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--placeholder);
}

.about__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    scale: 1.08;
}

.about__text {
    grid-column: 7 / -1;
}

.about__prose {
    font-family: var(--serif);
    font-size: clamp(1.18rem, 1.55vw, 1.38rem);
    font-weight: 500;
    line-height: 1.55;
}

.about__prose > p:first-child {
    margin-bottom: 0.9em;
    font-size: clamp(2.1rem, 3.8vw, 3.4rem);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.02;
}

.about__prose > p:nth-child(2)::first-letter {
    float: left;
    margin: 0.06em 0.12em 0 0;
    font-size: 4.3em;
    font-weight: 300;
    line-height: 0.78;
}

.about__prose > p:last-child:not(:first-child) {
    font-size: 1.7em;
    font-style: italic;
    font-weight: 400;
}

.about__text .social {
    margin-top: 2.5rem;
}

/* Social links */

.social {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social__link {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    transition: background-color 0.25s ease, color 0.25s ease;
}

.social__link:hover {
    background: var(--ink);
    color: var(--paper);
}

.social__icon {
    width: 1.1rem;
    height: 1.1rem;
}

/* Material: wide picture band, a paper card overlapping it, then an asymmetric pair. */

.material {
    padding-top: var(--space);
}

.material__band {
    position: relative;
}

.material__wide {
    height: clamp(320px, 52vw, 760px);
    margin: 0;
    overflow: hidden;
    background: var(--placeholder);
}

.material__wide .material__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    scale: 1.12;
}

.material__overlap {
    position: relative;
    margin-top: clamp(-11rem, -12vw, -3rem);
}

.material__card {
    width: min(38rem, 100%);
    margin-left: calc(100% / 12);
    padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3.5rem) 0;
    background: var(--paper);
}

.material__lead {
    margin: 0 0 1.5rem;
    font-family: var(--serif);
    font-size: clamp(1.5rem, 2.5vw, 2.0rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.12;
}

.material__text {
    max-width: 44ch;
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.75;
}

.material__pair {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: start;
    padding-block: clamp(3.5rem, 8vw, 7rem) 0;
}

.material__fig {
    margin: 0;
    overflow: hidden;
    background: var(--placeholder);
}

.material__fig .material__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    scale: 1.12;
}

.material__fig--a {
    grid-column: 1 / span 7;
    aspect-ratio: 3 / 2;
}

.material__fig--b {
    grid-column: 9 / -1;
    margin-top: clamp(4rem, 12vw, 11rem);
    aspect-ratio: 4 / 5;
}

/* Tile groups: bento grid. The first of every six tiles is large. */

.tiles {
    padding-block: var(--space) 0;
}

.bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(2.25rem, 4vw, 3.5rem) var(--col-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.tile {
    grid-column: span 4;
    min-width: 0;
    container-type: inline-size;
}

.tile:nth-child(6n + 1) {
    grid-column: span 7;
    grid-row: span 2;
}

.tile:nth-child(6n + 2),
.tile:nth-child(6n + 3) {
    grid-column: span 5;
}

/* Incomplete rows at the end of a group */
.tile:nth-child(6n + 1):last-child {
    grid-column: 1 / -1;
    grid-row: auto;
}

.tile:nth-child(6n + 1):nth-last-child(2) {
    grid-row: auto;
}

.tile:nth-child(6n + 4):last-child {
    grid-column: 1 / -1;
}

.tile:nth-child(6n + 4):nth-last-child(2),
.tile:nth-child(6n + 5):last-child {
    grid-column: span 6;
}

.tile__card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
}

.tile__card--link {
    cursor: pointer;
}

.tile__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--placeholder);
}

.tile:nth-child(6n + 1) .tile__media {
    flex: 1;
    min-height: 22rem;
    aspect-ratio: auto;
}

.tile:nth-child(6n + 1):last-child .tile__media,
.tile:nth-child(6n + 4):last-child .tile__media {
    flex: none;
    min-height: 0;
    aspect-ratio: 21 / 9;
}

.tile:nth-child(6n + 1):nth-last-child(2) .tile__media {
    min-height: 0;
}

.tile__img,
.tile__media > .ph {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.9s var(--ease);
}

.tile__card--link:hover .tile__img,
.tile__card--link:focus-visible .tile__img {
    scale: 1.045;
}

.tile__caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
}

.tile__name {
    font-family: var(--serif);
    font-size: clamp(1.35rem, 6cqi, 2.6rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.tile__price {
    flex: none;
    max-width: 50%;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.5;
    text-align: right;
    text-transform: uppercase;
}

.tile__more {
    align-self: flex-start;
    margin-top: 0.5rem;
    border-bottom: 1px solid currentColor;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: opacity 0.3s ease, translate 0.3s var(--ease);
}

@media (hover: hover) {
    .tile__more {
        opacity: 0;
        translate: 0 -0.3rem;
    }

    .tile__card--link:hover .tile__more,
    .tile__card--link:focus-visible .tile__more {
        opacity: 1;
        translate: 0 0;
    }
}

/* Narrow tiles: price below the name instead of squeezed next to it. */
@container (max-width: 340px) {
    .tile__caption {
        flex-direction: column;
        gap: 0.35rem;
    }

    .tile__price {
        max-width: none;
        text-align: left;
    }
}

/* Contact */

.contact {
    padding-block: var(--space);
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0 var(--col-gap);
}

.contact__lead {
    grid-column: 1 / -1;
}

.contact__intro {
    max-width: 40ch;
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.75;
}

.contact__mail {
    grid-column: 1 / -1;
    margin: clamp(2rem, 4vw, 3rem) 0;
    font-family: var(--serif);
    font-size: clamp(1.1rem, 3.2vw, 2.25rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1;
    overflow-wrap: anywhere;
}

.contact__mail a {
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 2px;
    text-decoration: none;
    transition: background-size 0.6s var(--ease);
}

.contact__mail a:hover,
.contact__mail a:focus-visible {
    background-size: 100% 2px;
}

.contact__details {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
    gap: 2rem var(--col-gap);
    margin: 0 0 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.contact__item {
    margin: 0;
}

.contact__item dt {
    margin-bottom: 0.6rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.contact__item dd {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.4;
}

.contact__item a {
    text-decoration: none;
}

.contact__item a:hover {
    text-decoration: underline;
}

/* Footer */

.footer {
    border-top: 1px solid var(--line);
    content-visibility: auto;
    contain-intrinsic-size: auto 120px;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem 2.5rem;
    padding-block: 2rem 2.5rem;
}

.footer__brand {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-style: italic;
}

.footer__copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.75rem;
    font-size: 0.8rem;
}

.footer__nav a {
    display: inline-block;
    padding-block: 0.5rem;
    text-decoration: none;
}

.footer__nav a:hover,
.footer__nav a[aria-current] {
    text-decoration: underline;
}

/* Legal pages */

.legal {
    padding: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem)) 0 var(--space);
}

.legal__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: start;
}

.legal__head {
    grid-column: 1 / span 4;
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
}

.legal__head .eyebrow {
    margin-bottom: 2rem;
}

.legal__title {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2.75rem, 5.5vw, 4.75rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 0.95;
    view-transition-name: page-title;
}

.legal__back {
    margin: 0;
}

.legal__prose {
    grid-column: 6 / -1;
    max-width: 68ch;
    color: var(--ink-soft);
    font-size: 0.98rem;
    line-height: 1.8;
}

.legal__prose h2,
.legal__prose h3 {
    color: var(--ink);
}

.legal__prose h2:first-child {
    margin-top: 0;
}

/* Lightbox */

.lightbox {
    width: min(1180px, 100% - 2rem);
    max-width: none;
    max-height: calc(100svh - 2rem);
    padding: 0;
    border: 0;
    background: var(--paper);
    color: var(--ink);
    overflow: auto;
    overscroll-behavior: contain;
}

.lightbox::backdrop {
    background: rgb(28 27 25 / 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.lightbox__close,
.lb__nav {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.lightbox__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
}

.lightbox__close:hover,
.lb__nav:hover {
    background: var(--ink);
    color: var(--paper);
}

.lightbox__close svg,
.lb__nav svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.lb {
    display: grid;
}

.lb--gallery {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.lb__gallery {
    position: relative;
    background: var(--paper-deep);
}

.lb__slides,
.lb__slide {
    height: 100%;
    margin: 0;
}

.lb__slide[hidden] {
    display: none;
}

.lb__img {
    width: 100%;
    height: min(80svh, 48rem);
    object-fit: cover;
}

.lb__nav {
    position: absolute;
    bottom: 1rem;
}

.lb__nav--prev {
    right: 4.25rem;
}

.lb__nav--next {
    right: 1rem;
}

.lb__count {
    position: absolute;
    bottom: 1.6rem;
    left: 1.25rem;
    margin: 0;
    color: var(--paper);
    font-family: var(--serif);
    font-size: 1.1rem;
    font-style: italic;
    text-shadow: 0 1px 8px rgb(0 0 0 / 0.45);
}

.lb__body {
    align-self: end;
    padding: clamp(3rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem) clamp(2rem, 4vw, 3.5rem);
}

.lb__title {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 0.95;
}

.lb__price {
    margin: 1rem 0 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.lb__text {
    margin-top: 1.5rem;
    color: var(--ink-soft);
    line-height: 1.75;
}

.lb__cta {
    margin-top: 2rem;
}

/* Start popup. Colors come from a nonce-protected <style> block as custom properties. */

.popup {
    --popup-bg: var(--paper);
    --popup-overlay: rgb(28 27 25 / 0.4);
    width: min(640px, 100% - 2rem);
    max-width: none;
    max-height: calc(100svh - 2rem);
    padding: 0;
    border: 0;
    background: var(--popup-bg);
    color: var(--ink);
    overflow: auto;
    overscroll-behavior: contain;
}

.popup--has-media {
    width: min(980px, 100% - 2rem);
}

.popup::backdrop {
    background: rgb(28 27 25 / 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.popup--text-light {
    color: #fff;
}

.popup__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
}

.popup__close svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.popup__layout {
    display: grid;
}

.popup--has-media .popup__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 28rem;
}

.popup--image-right .popup__media {
    order: 2;
}

.popup__media {
    position: relative;
    min-height: 22rem;
    background: var(--placeholder);
}

.popup__img,
.popup__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup__body {
    position: relative;
    display: grid;
    align-items: center;
}

.popup--bg-image .popup__body {
    min-height: 28rem;
}

.popup__overlay {
    position: absolute;
    inset: 0;
    background: var(--popup-overlay);
}

.popup__content {
    position: relative;
    padding: clamp(3rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 3.5rem);
}

.popup--align-center .popup__content {
    text-align: center;
}

.popup__title {
    margin: 0 0 1.25rem;
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1;
}

.popup__text {
    line-height: 1.7;
}

.popup__button {
    margin-top: 2rem;
}

.popup--text-dark .popup__button:hover {
    background: var(--ink);
    color: var(--paper);
}

.popup--text-light .popup__button:hover {
    background: #fff;
    color: var(--ink);
}

/* Dialog motion */

@media (prefers-reduced-motion: no-preference) {
    .popup[open],
    .lightbox[open] {
        animation: dialog-in 0.5s var(--ease);
    }

    .popup[open]::backdrop,
    .lightbox[open]::backdrop,
    .offcanvas[open]::backdrop {
        animation: fade-in 0.4s ease-out;
    }

    .offcanvas[open] {
        animation: offcanvas-in 0.45s var(--ease);
    }
}

@keyframes dialog-in {
    from {
        opacity: 0;
        translate: 0 1.5rem;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@keyframes offcanvas-in {
    from {
        translate: 100% 0;
    }
}

/* Page load: the hero builds up line by line, the photo opens from the bottom. */

@media (prefers-reduced-motion: no-preference) {
    .hero__kicker,
    .hero__title,
    .hero__intro,
    .hero .link-arrow {
        animation: rise 1s var(--ease) both;
    }

    .hero__title {
        animation-delay: 0.08s;
    }

    .hero__intro {
        animation-delay: 0.2s;
    }

    .hero .link-arrow {
        animation-delay: 0.3s;
    }

    .hero__frame {
        animation: open-up 1.3s var(--ease) 0.1s both;
    }

    .hero__frame .hero__bg {
        animation: settle 1.8s var(--ease) 0.1s both;
    }

    .hero__caption {
        animation: fade-in 1s ease 0.8s both;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        translate: 0 1.75rem;
    }
}

@keyframes open-up {
    from {
        clip-path: inset(100% 0 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes settle {
    from {
        scale: 1.18;
    }
}

/* Scroll-driven reveals. Without support or with reduced motion everything is simply visible. */

@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .reveal {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 5% entry 85%;
        }

        .reveal-img {
            animation: unveil linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 40%;
        }

        .reveal-img img {
            animation: drift linear both;
            animation-timeline: view();
            animation-range: cover;
        }

        .eyebrow::after {
            transform-origin: left;
            animation: draw linear both;
            animation-timeline: view();
            animation-range: entry 20% cover 35%;
        }
    }
}

@keyframes unveil {
    from {
        clip-path: inset(14% 10% 14% 10%);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes drift {
    from {
        translate: 0 -4%;
    }
    to {
        translate: 0 4%;
    }
}

@keyframes draw {
    from {
        transform: scaleX(0);
    }
}

/* Page transitions between home and legal pages (cross-document view transitions). */

@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

::view-transition-old(root) {
    animation: vt-out 0.3s ease both;
}

::view-transition-new(root) {
    animation: vt-in 0.55s var(--ease) both;
}

@keyframes vt-out {
    to {
        opacity: 0;
        translate: 0 -1rem;
    }
}

@keyframes vt-in {
    from {
        opacity: 0;
        translate: 0 1.5rem;
    }
}

/* Responsive */

@media (max-width: 1023px) {
    .bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tile,
    .tile:nth-child(6n + 2),
    .tile:nth-child(6n + 3),
    .tile:nth-child(6n + 4):nth-last-child(2),
    .tile:nth-child(6n + 5):last-child {
        grid-column: span 1;
    }

    .tile:nth-child(6n + 1),
    .tile:nth-child(6n),
    .tile:nth-child(6n + 2):last-child,
    .tile:nth-child(6n + 4):last-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .tile:nth-child(6n + 1) .tile__media,
    .tile:nth-child(6n) .tile__media,
    .tile:nth-child(6n + 2):last-child .tile__media,
    .tile:nth-child(6n + 4):last-child .tile__media {
        flex: none;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .legal__head {
        grid-column: 1 / -1;
        position: static;
        margin-bottom: 3rem;
    }

    .legal__prose {
        grid-column: 1 / -1;
    }
}

@media (max-width: 899px) {
    .hero__grid {
        row-gap: 2rem;
    }

    /* The copy block dissolves so the photo can sit between headline and intro. */
    .hero__copy {
        display: contents;
    }

    .hero__kicker,
    .hero__title,
    .hero__intro,
    .hero .link-arrow,
    .hero .edit-chip,
    .hero__media {
        grid-column: 1 / -1;
    }

    .hero__title {
        margin: 0;
    }

    .hero__media {
        order: 3;
    }

    .hero__intro {
        order: 4;
    }

    .hero .link-arrow,
    .hero .edit-chip {
        order: 5;
        justify-self: start;
        margin-top: 0;
    }

    .hero__frame {
        aspect-ratio: 4 / 3;
    }

    .about__media {
        grid-column: 1 / -1;
        position: static;
        margin: 0 0 2.5rem;
        aspect-ratio: 4 / 3;
    }

    .about__text {
        grid-column: 1 / -1;
    }

    .material__card {
        margin-left: 0;
    }

    .material__fig--a {
        grid-column: 1 / -1;
    }

    .material__fig--b {
        grid-column: 4 / -1;
        margin-top: 2rem;
        aspect-ratio: 4 / 3;
    }

    .contact__details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 699px) {
    :root {
        --nav-h: 60px;
    }

    .logo__img {
        height: 38px;
    }

    .lb--gallery {
        grid-template-columns: 1fr;
    }

    .lb__img {
        height: min(58svh, 32rem);
    }

    .lb__body {
        padding-top: 2rem;
    }

    .popup--has-media .popup__layout {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .popup--image-right .popup__media {
        order: 0;
    }

    .popup__media {
        min-height: 0;
        height: 38svh;
    }

    .popup--bg-image .popup__body {
        min-height: 60svh;
    }
}

@media (max-width: 599px) {
    .bento {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2.75rem;
    }

    .tile,
    .tile:nth-child(n) {
        grid-column: 1 / -1;
    }

    .tile:nth-child(n) .tile__media {
        aspect-ratio: 4 / 3;
    }

    .tile:nth-child(6n + 1) .tile__media {
        aspect-ratio: 4 / 5;
    }

    .hero__frame {
        aspect-ratio: 4 / 5;
    }

    .material__fig--b {
        grid-column: 3 / -1;
    }

    .lightbox {
        width: 100%;
        height: 100svh;
        max-height: 100svh;
        margin: 0;
    }
}

/* Phones in landscape: little height, so dialogs drop their minimum heights and use two columns. */
@media (max-height: 500px) and (min-width: 600px) {
    .popup--has-media .popup__layout,
    .popup__media,
    .popup--bg-image .popup__body {
        min-height: 0;
    }

    .popup__content {
        padding-block: 2rem;
    }

    .lb--gallery {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }

    .lb__img {
        height: calc(100svh - 2rem);
    }

    .lb__body {
        padding-block: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }

    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

/* ---------- Section types from the "Bereiche" kit: text, gallery, photo band, quotes, FAQ, events ---------- */

.sec {
    padding-block: var(--space) 0;
}

.sec__action {
    margin: 0;
}

.sec-text__inner,
.sec-faq__inner,
.sec-events__inner {
    width: min(58rem, 100% - 2 * var(--gutter));
}

/* Text, FAQ and events read in a narrower column. Their heading still spans the normal
   container width, like in every other section (100cqw = width of the section). */
.sec-text,
.sec-faq,
.sec-events {
    container-type: inline-size;
}

.sec-text__inner > .eyebrow,
.sec-faq__inner > .eyebrow,
.sec-events__inner > .eyebrow {
    margin-inline: calc((100% - min(var(--content), 100cqw - 2 * var(--gutter))) / 2);
}

.sec-text__body {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

.sec-text__body > p:first-child {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-style: italic;
    line-height: 1.3;
}

.sec-gallery__intro,
.sec-faq__intro,
.sec-events__intro {
    max-width: 40rem;
    margin: 0 0 clamp(2rem, 4vw, 3rem);
    color: var(--ink-soft);
}

/* Gallery: calm grid, every fifth photo wider */

.sec-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--col-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.sec-gallery__cell:nth-child(5n + 1) {
    grid-column: span 2;
    grid-row: span 2;
}

.sec-gallery__item {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: var(--placeholder);
    cursor: zoom-in;
}

.sec-gallery__cell:nth-child(5n + 1) .sec-gallery__item {
    aspect-ratio: auto;
}

.sec-gallery__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 1.2s var(--ease), filter 0.6s ease;
}

.sec-gallery__item:hover .sec-gallery__img {
    scale: 1.03;
}

.sec-gallery__item:focus-visible {
    outline: 1px solid var(--ink);
    outline-offset: 4px;
}

/* Photo band: full bleed, sentence in large italics */

.sec-band {
    position: relative;
    margin-top: var(--space);
    overflow: hidden;
    background: var(--ink);
}

.sec-band__media {
    margin: 0;
}

.band__img {
    display: block;
    width: 100%;
    height: clamp(20rem, 70vh, 46rem);
    object-fit: cover;
}

.sec-band__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(to top, rgb(28 27 25 / 0.62), rgb(28 27 25 / 0) 60%);
    pointer-events: none;
}

.sec-band__content {
    padding-block: clamp(2rem, 5vw, 4rem);
    color: var(--paper);
    pointer-events: auto;
}

.sec-band__text {
    max-width: 22ch;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 4.25rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.05;
}

.sec-band .link-arrow {
    color: var(--paper);
}

/* Quotes: large italic quotes between hairlines */

.sec-quotes__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
    gap: clamp(2rem, 4vw, 3.5rem) var(--col-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.quote {
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.quote__text {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.25;
}

.quote__text p {
    margin: 0;
}

.quote__text p::before {
    content: "„";
}

.quote__text p::after {
    content: "“";
}

.quote__by {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    margin-top: 1.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.quote__detail {
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.12em;
}

/* FAQ */

.faq {
    border-top: 1px solid var(--line);
}

.faq__item {
    border-bottom: 1px solid var(--line);
}

.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.1rem, 2vw, 1.6rem) 0;
    font-family: var(--serif);
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
    list-style: none;
}

.faq__q::-webkit-details-marker {
    display: none;
}

.faq__q:focus-visible {
    outline: 1px solid var(--ink);
    outline-offset: 4px;
}

.faq__icon {
    position: relative;
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
}

.faq__icon::before,
.faq__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transition: rotate 0.35s var(--ease);
}

.faq__icon::after {
    rotate: 90deg;
}

.faq__item[open] .faq__icon::after {
    rotate: 0deg;
}

.faq__a {
    max-width: 44rem;
    padding-bottom: 1.6rem;
    color: var(--ink-soft);
}

/* Events: date in large serif numbers */

.events {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.event {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: var(--col-gap);
    padding: clamp(1.25rem, 2.5vw, 2rem) 0;
    border-bottom: 1px solid var(--line);
}

.event__date {
    display: flex;
    flex-direction: column;
    margin: 0;
    line-height: 1;
}

.event__day {
    font-family: var(--serif);
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    font-weight: 300;
}

.event__month {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.event__title {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    font-weight: 400;
    line-height: 1.15;
}

.event__meta {
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.event__text {
    max-width: 40rem;
    margin: 0.75rem 0 0;
    color: var(--ink-soft);
}

.event__link {
    display: inline-block;
    margin-top: 0.9rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid currentColor;
    color: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-decoration: none;
    text-transform: uppercase;
}

.events__empty {
    margin: 0;
    padding: 1.5rem 0;
    border-block: 1px solid var(--line);
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-style: italic;
}

/* Lightbox for galleries: photos only, with caption */

.lb--images {
    grid-template-columns: minmax(0, 1fr);
}

.lb--images .lb__img {
    height: min(72svh, 44rem);
}

.lb__caption {
    margin: 0;
    padding: 0.9rem 1.25rem 3rem 5rem;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 1.05rem;
    font-style: italic;
}

@media (max-width: 899px) {
    .sec-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sec-gallery__cell:nth-child(5n + 1) {
        grid-row: span 1;
    }

    .sec-gallery__cell:nth-child(5n + 1) .sec-gallery__item {
        aspect-ratio: 16 / 10;
    }

    .event {
        grid-template-columns: 4rem minmax(0, 1fr);
    }
}
