/* Ars-Vitae-Sanae – site styles */

:root {
    --navy: #002140;
    --gold: #a47620;
    --gold-light: #c99a3f;
    --gold-text: #8a6218;
    --gold-text-dark: #6f4e11;
    --ink: #1c2733;
    --muted: #5a6675;
    --paper: #ffffff;
    --tint: #eef2f6;
    --line: #d9dee5;
    --gold-tint: #f6efe0;
    --serif: 'Alegreya', Georgia, 'Times New Roman', serif;
    --sans: 'Alegreya Sans', 'Gill Sans', system-ui, sans-serif;
    --measure: 66ch;
    --container: 1120px;
    --stroke: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 12'%3E%3Cpath d='M2 8C14 1 22 13 36 6S58 1 74 6' fill='none' stroke='%23a47620' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    --stroke-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 12'%3E%3Cpath d='M2 8C14 1 22 13 36 6S58 1 74 6' fill='none' stroke='%23c99a3f' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

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

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

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

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

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

[id] { scroll-margin-top: 5rem; }

a {
    color: var(--navy);
    text-decoration: underline;
    text-decoration-color: rgba(164, 118, 32, .55);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
    transition: text-decoration-color 150ms ease;
}

a:hover { text-decoration-color: var(--gold); }

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

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.15;
    color: var(--navy);
    margin: 0 0 .5em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem); margin-top: 1.75em; }
h4 { font-size: 1.25rem; margin-top: 1.5em; }

h2 + h3, h3 + h4, .stroke + h3 { margin-top: 0; }

p, ul, ol, blockquote { margin: 0 0 1em; }

ul, ol { padding-left: 1.4em; }

li { margin-bottom: .35em; }

strong { font-weight: 700; }

.container {
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
}

.prose { max-width: var(--measure); }

.prose--wide { max-width: 80ch; }

.prose > h2:not(:first-child) { margin-top: 1.5em; }

.lead { font-size: 1.3rem; font-family: var(--serif); color: var(--navy); }

.stroke {
    display: block;
    width: 104px;
    height: 16px;
    margin: .6rem 0 1.5rem;
    background: var(--stroke) no-repeat center / contain;
}

.stroke--light { background-image: var(--stroke-light); }

.section { padding-block: clamp(3rem, 7vw, 6rem); }

.band { background: var(--tint); }

.band--gold {
    position: relative;
    overflow: hidden;
    background: var(--gold-tint);
}

.band--gold::after {
    content: "";
    position: absolute;
    right: -4%;
    top: 50%;
    width: min(55vw, 640px);
    height: 100px;
    transform: translateY(-50%) rotate(-5deg);
    background: var(--stroke) no-repeat center / contain;
    opacity: .16;
    pointer-events: none;
}

.band--gold .container { position: relative; z-index: 1; }

.band--gold .lead { color: var(--gold-text-dark); }

.band--navy { background: var(--navy); color: #e8edf3; }

.band--navy h2, .band--navy h3 a { color: #fff; }

.band--navy a { color: #fff; text-decoration-color: rgba(201, 154, 63, .7); }

.section--tight { padding-block: 0; }

@media (max-width: 760px) {
    .band--gold::after { width: 70vw; height: 70px; right: -15%; top: auto; bottom: -.5rem; transform: rotate(-5deg); }
}

/* ---------- Navigation ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    text-decoration: none;
}

.brand__mark { width: 44px; height: auto; }

.brand__word { height: 26px; width: auto; }

.nav__panel { display: contents; }

.nav__meta { display: none; }

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

.nav__links li { margin: 0; }

.nav__links a {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--navy);
    text-decoration: none;
    padding: .3rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 150ms ease;
}

.nav__links > li > a:hover { border-bottom-color: var(--gold); }

.has-sub { position: relative; }

.has-sub > a::after {
    content: "";
    display: inline-block;
    width: .45em;
    height: .45em;
    margin-left: .45em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-.2em) rotate(45deg);
    opacity: .7;
}

.sub {
    display: none;
    position: absolute;
    top: calc(100% + .5rem);
    left: -1rem;
    min-width: 17rem;
    margin: 0;
    padding: .5rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 2px solid var(--gold);
    box-shadow: 0 12px 30px rgba(0, 33, 64, .12);
}

.sub::before {
    content: "";
    position: absolute;
    top: -.75rem;
    left: 0;
    right: 0;
    height: .75rem;
}

@media (hover: hover) {
    .has-sub:hover .sub { display: block; }
}

.has-sub:focus-within .sub,
.has-sub.is-open .sub { display: block; }

.nav__links .sub a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .45rem 1rem;
    font-family: var(--sans);
    font-size: 1.05rem;
    border-bottom: 0;
}

.sub img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.nav__links .sub a:hover { background: var(--tint); }

.nav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
}

.nav__toggle svg { width: 26px; height: 26px; }

.nav__toggle .icon-close { display: none; }

.nav[data-open] .nav__toggle .icon-close { display: block; }

.nav[data-open] .nav__toggle .icon-menu { display: none; }

html.nav-open { overflow: hidden; }

@media (max-width: 700px) {
    .nav__inner { height: 3.75rem; min-height: 0; }

    .brand__mark { width: 36px; }

    .brand__word { height: 22px; }

    .nav__toggle { display: inline-flex; margin-right: -.5rem; }

    .nav__panel {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: calc(100vh - 3.75rem);
        height: calc(100dvh - 3.75rem);
        padding: 1rem 1.25rem 1.5rem;
        overflow-y: auto;
        background: var(--navy);
        color: #fff;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-.5rem);
        transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
    }

    .nav[data-open] .nav__panel {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: opacity 200ms ease, transform 200ms ease;
    }

    .nav__links { flex-direction: column; gap: 0; }

    .nav__links > li > a {
        display: block;
        padding: 1rem 0;
        font-size: 1.9rem;
        color: #fff;
        border-bottom: 0;
    }

    .nav__links > li > a:hover { color: var(--gold-light); }

    .has-sub > a::after { display: none; }

    .sub {
        display: block;
        position: static;
        min-width: 0;
        margin: 0 0 .75rem;
        padding: 0;
        background: none;
        border: 0;
        border-top: 1px solid rgba(201, 154, 63, .4);
        box-shadow: none;
    }

    .sub::before { display: none; }

    .nav__links .sub a {
        gap: .9rem;
        padding: .7rem 0;
        font-size: 1.15rem;
        color: #e8edf3;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }

    .nav__links .sub a:hover { background: none; color: var(--gold-light); }

    .sub img { width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .25); }

    .nav__links .sub li:last-child a { border-bottom: 0; }

    .nav__links > li:last-child > a { border-top: 1px solid rgba(201, 154, 63, .4); }

    .nav__meta {
        display: block;
        margin: auto 0 0;
        padding-top: 1.5rem;
        font-size: .95rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, .6);
    }

    [id] { scroll-margin-top: 4rem; }
}

@media (max-width: 380px) {
    .brand__word { display: none; }
}

/* ---------- Home hero ---------- */

.hero { padding-block: clamp(2rem, 5vw, 5rem); }

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.hero__mark { width: min(100%, 440px); margin-inline: auto; }

.hero__mark img { width: 100%; }

.hero__welcome {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.4rem;
    color: var(--gold-text);
    margin-bottom: .5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);
    font-weight: 400;
    margin-bottom: .25em;
}

.hero__sub {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 1rem + 1vw, 1.7rem);
    color: var(--muted);
    margin: 0;
}

@media (max-width: 760px) {
    .hero__grid { grid-template-columns: 1fr; text-align: center; }
    .hero__mark { width: min(62%, 280px); }
    .hero .stroke { margin-inline: auto; }
}

/* ---------- Home sections ---------- */

.intro__claim {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    color: var(--navy);
    line-height: 1.3;
    margin: 0 0 1.25rem;
    max-width: 30ch;
}

.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.feature__img img { border-radius: 6px; }

.feature--text { grid-template-columns: 1fr; gap: 0; }

.quote__grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.quote__photo { margin: 0; }

.quote__photo img { border-radius: 6px; }

blockquote.pull {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem);
    line-height: 1.35;
    color: var(--navy);
    margin: 0 0 1.5rem;
}

blockquote.pull cite {
    display: block;
    margin-top: .75rem;
    font-family: var(--sans);
    font-style: normal;
    font-size: 1rem;
    color: var(--muted);
}

.partner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem 3rem;
}

.partner__logo { flex: 0 0 auto; width: 200px; }

.partner__title { font-size: 1.5rem; margin: 0 0 .25em; }

.partner--ruled {
    padding-block: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .feature, .quote__grid { grid-template-columns: 1fr; }
    .feature__img { max-width: 560px; }
}

/* ---------- Page hero (impressum, agb) ---------- */

.page-hero {
    background: var(--tint);
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.page-hero h1 { margin: 0; }

.page-hero .stroke { margin-bottom: 0; }

/* ---------- Team ---------- */

.team {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 0 3rem;
}

.member {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 1.25rem;
    align-items: center;
    padding-block: 1.5rem;
    border-top: 1px solid var(--line);
}

.member img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }

.member h3 { font-size: 1.5rem; margin: 0 0 .35rem; }

.member h3 a { text-decoration: none; }

.member h3 a:hover { text-decoration: underline; }

.member p { margin: 0; color: var(--muted); }

.band--navy .member { border-top-color: rgba(255, 255, 255, .15); }

.band--navy .member img { box-shadow: 0 0 0 3px var(--gold-light); }

.band--navy .member p { color: rgba(255, 255, 255, .72); }

/* ---------- Person pages ---------- */

.person-hero {
    background: var(--navy);
    color: #e8edf3;
    padding-block: clamp(2.5rem, 6vw, 5rem);
}

.person-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.person-hero__photo img {
    max-height: 440px;
    width: auto;
    margin-inline: auto;
    border-radius: 6px;
}

.person-hero h1 { color: #fff; margin-bottom: .25em; }

.person-hero a { color: #fff; text-decoration-color: rgba(201, 154, 63, .7); }

.person-hero .contact { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.5rem; }

.person-hero .contact a { display: inline-block; }

.services {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 34rem;
}

.services li {
    margin: 0;
    padding: .4rem 0;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

@media (max-width: 760px) {
    .person-hero__grid { grid-template-columns: 1fr; }
    .person-hero__photo img { max-height: 320px; }
}

.credentials {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--navy);
}

.plain-list { list-style: none; padding: 0; }

.plain-list li { padding-left: 1.2em; text-indent: -1.2em; }

/* ---------- Footer ---------- */

.footer {
    background: var(--navy);
    color: #dfe6ee;
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

.footer a { color: #fff; text-decoration-color: rgba(201, 154, 63, .7); }

.footer a:hover { text-decoration-color: var(--gold-light); }

.footer h2 { color: #fff; font-size: 1.5rem; margin-bottom: .75rem; }

.footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 3rem clamp(3rem, 6vw, 6rem);
}

.footer__block + .footer__block { margin-top: 2.5rem; }

.footer p { margin-bottom: .5rem; }

.footer .links { list-style: none; padding: 0; margin: 0; }

.footer .links li { margin-bottom: .4rem; }

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form input[type="text"],
.form textarea {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    padding: .8rem 1rem;
    font: inherit;
    color: #fff;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 4px;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.form input::placeholder, .form textarea::placeholder { color: rgba(255, 255, 255, .6); }

.form input[type="text"]:focus, .form textarea:focus {
    outline: none;
    border-color: var(--gold-light);
    background: rgba(255, 255, 255, .1);
}

.form textarea { min-height: 11rem; resize: vertical; }

.form__consent {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.form__consent input { margin-top: .35rem; accent-color: var(--gold); }

.form__notice {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--gold-light);
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.form__notice--error { border-left-color: #e07a7a; }

.btn {
    display: inline-block;
    padding: .8rem 1.75rem;
    font: 700 1.05rem var(--sans);
    color: #fff;
    background: var(--gold-text);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.btn:hover { background: var(--gold-text-dark); }

@media (max-width: 760px) {
    .footer__grid, .form__row { grid-template-columns: 1fr; }
}

/* ---------- Lightbox ---------- */

.lightbox {
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 33, 64, .35);
}

.lightbox:not([open]) { display: none; }

.lightbox::backdrop { background: rgba(0, 33, 64, .7); }

.lightbox img { max-height: 92vh; width: auto; margin-inline: auto; }

.lightbox__close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 33, 64, .85);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

a[data-lightbox] { display: block; cursor: zoom-in; }
