/* ==================================================
   ROOT VARIABLES
================================================== */

:root {
    --bg: #FAF9F6;
    --body-bg: #ededeb;

    --text: #1c1c1b;
    --muted: #242323;
    --muted-2: #6a6d72;

    --line: #dedede;
    --border: #d4d8de;

    --accent: #d92c2c;
    --accent-text: #ffffff;

    --tag-bg: #eceff2;
    --tag-text: #3d4248;

    --link: #3e4650;
    --link-hover: #000000;

    --card-hover-border: #000000;

    --skip-link-text: #ffffff;

    --hero-paragraph-text: #333333;
    --hero-grid-pattern: #e2e2df;
    --hero-grid-line-main: #a7b0bb;
    --hero-grid-line-soft: #d1d5d9;
    --hero-grid-point-soft: #c5cbd1;
    --hero-grid-label: #9b5a5a;

    --section-description-text: #222222;
    --section-border: #dedede;

    --project-card-border: #d7d7d7;
    --project-card-hover-bg: #ffffff;
    --project-description-text: #222222;
    --project-tag-bg: #e9e9e7;
    --project-tag-text: #222222;

    --about-strip-bg: #e9e6df;
    --about-strip-text: #30302e;

    --principle-separator: rgba(0, 0, 0, 0.12);
    --principle-text: #222222;

    --footer-border: #dedede;
    --footer-link-text: #222222;
    --footer-meta-text: #222222;
    --footer-brand-border: #dedede;

    --shell-x: 56px;
}

/* ==================================================
   BASE
================================================== */

html {
    color-scheme: light dark;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--body-bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.005em;
}

a {
    color: var(--link);
    text-decoration: underline;
}

a:hover {
    color: var(--link-hover);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

/* ==================================================
   ACCESSIBILITY
================================================== */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 1000;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: var(--text);
    color: var(--skip-link-text);
}

/* ==================================================
   TYPOGRAPHY
================================================== */

h1,
h2,
h3,
h4 {
    margin-top: 0;
    text-wrap: balance;
}

h1 {
    margin-bottom: 1.6rem;
    font-size: 2.6rem;
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -0.055em;
}

h2 {
    margin: 0 0 1.15rem;
    padding: 0;
    color: var(--text);
    font-size: 1.55rem;
    line-height: 1.08;
    font-weight: 650;
    letter-spacing: -0.045em;
}

h3 {
    font-weight: 650;
}

p {
    margin-top: 0;
}

p + p {
    margin-top: 1rem;
}

/* ==================================================
   PAGE SHELL
================================================== */

.wrapper {
    max-width: 1240px;
    margin: 7vh auto;
    padding: 0 var(--shell-x) 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
}


/* Standard pages need breathing room before the footer.
   Home uses .about-strip as the visual transition instead. */
main:not(:has(#about)) {
    margin-bottom: 6rem;
}

main h2 {
    margin: 4rem 0 2rem 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.15;
}

main section h2 + p,
main section h2 + address {
    margin-top: 0;
}

/* ==================================================
   HEADER
================================================== */

.header {
    margin: 0;
    padding: 32px 0 55px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
}

.header-logo {
    display: block;
    width: 84px;
    height: auto;
    object-fit: contain;
}

.language-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
    justify-content: flex-end;
}

.language-switcher a {
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    opacity: 0.45;
}

.language-switcher a:hover,
.language-switcher a[aria-current="page"] {
    color: var(--text);
    opacity: 1;
}

/* Generic nav fallback */

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

nav a {
    color: var(--muted);
    text-decoration: none;
}

nav a:hover {
    color: var(--text);
}

nav a[aria-current="page"],
a[aria-current="page"] {
    font-weight: 700;
    text-decoration: none;
}

/* ==================================================
   ICONS
================================================== */

.owa-icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.principle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================================================
   HERO
================================================== */

#web-header.hero {
    position: relative;
    margin: 0;
    padding: 0 0 52px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

#web-header.hero:hover {
    transform: none;
}

#web-header.hero::after {
    display: none;
}

#web-header .hero-content {
    display: grid;
    grid-template-columns: minmax(0, 620px) minmax(260px, 1fr);
    gap: clamp(48px, 8vw, 120px);
    align-items: center;
    max-width: none;
}

.hero-main {
    min-width: 0;
}

.hero-kicker {
    display: block;
    margin: 0 0 1.25rem;
    color: var(--text);
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: -0.055em;
    text-transform: none;
}

#web-header.hero h1 {
    margin: 0 0 1.6rem;
    color: var(--text);
    font-size: clamp(1.75rem, 2.4vw, 2.65rem);
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: -0.045em;
}

.hero-main p,
#web-header.hero .hero-main p {
    margin: 0;
    color: var(--hero-paragraph-text);
    font-size: 1.12rem;
    line-height: 1.65;
}

.hero-main p + p {
    margin-top: 0.35rem;
}

.hero-art {
    display: none;
}

/* ==================================================
   HERO GRID
================================================== */

.hero-grid-art {
    width: min(38vw, 430px);
    margin: 0;
}

.hero-grid-art svg {
    display: block;
    width: 100%;
    height: auto;
}

.hero-grid-art pattern path {
    stroke: var(--hero-grid-pattern);
    stroke-width: 1;
    fill: none;
}

.hero-grid-art rect {
    opacity: 0.75;
}

.hero-grid-line-main {
    fill: none;
    stroke: var(--hero-grid-line-main);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-grid-line-soft {
    fill: none;
    stroke: var(--hero-grid-line-soft);
    stroke-width: 1.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-grid-point {
    fill: var(--accent);
}

.hero-grid-point-soft {
    fill: var(--hero-grid-point-soft);
}

.hero-grid-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    fill: var(--hero-grid-label);
}

/* ==================================================
   HERO PRINCIPLES INDEX
================================================== */

.hero-principles-index {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 12px 24px;

    margin-inline: 0;
    margin-top: 28px;

    padding: 16px var(--shell-x) 15px;
    border-top: 0;
    border-bottom: 0;

    color: var(--text);
}

.hero-principles-index::before,
.hero-principles-index::after {
    content: "";
    position: absolute;
    left: 50%;
    width: min(100%, 860px);
    height: 1px;
    background: var(--line);
    transform: translateX(-50%);
}

.hero-principles-index::before {
    top: 0;
}

.hero-principles-index::after {
    bottom: 0;
}

.hero-principles-label {
    color: var(--muted-2);
    font-size: 0.6rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-principles-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.hero-principles-items > span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.2;
    font-weight: 750;
    white-space: nowrap;
}

.hero-principles-items small {
    color: var(--hero-grid-label);
    font-size: 0.56rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.06em;
}

/* ==================================================
   SECTION HEADING
================================================== */

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
    align-items: start;
    margin-bottom: 34px;
}

.section-heading > div {
    min-width: 0;
}

.section-heading h2 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 1.55rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.section-heading p {
    max-width: 620px;
    margin: 0;
    color: var(--section-description-text);
    font-size: 1rem;
    line-height: 1.6;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-top: 6px;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    text-decoration: none;
    opacity: 1;
}

.section-link:hover {
    color: var(--text);
    opacity: 0.72;
}

/* ==================================================
   HOME SECTIONS
================================================== */

#web-header + #projects {
    margin-top: 0;
}

#projects + .principles-section {
    margin-top: 0;
}

#projects,
.principles-section {
    margin-inline: calc(var(--shell-x) * -1);
    padding: 42px var(--shell-x) 42px;
}

#projects {
    border-top: 1px solid var(--section-border);
}

.hero-principles-index + #projects {
    border-top: 0;
}

/* ==================================================
   PROJECTS
================================================== */

.projects-layout {
    display: block;
}

.projects-main {
    min-width: 0;
}

.projects-main > p {
    max-width: 42rem;
    color: var(--muted);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin: 0;
    align-items: stretch;
}

.projects-grid:has(> .project-card:only-child) {
    grid-template-columns: minmax(0, 760px);
}

.project-card {
    display: block;
    min-width: 0;
}

.project-card a {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    box-sizing: border-box;
    padding: clamp(1.2rem, 2vw, 1.75rem);
    border: 1px solid var(--project-card-border);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: transparent;
    overflow: hidden;
}

.project-card a:hover {
    border-color: var(--text);
    background: var(--project-card-hover-bg);
    transform: translateY(-3px);
}

.project-card-body {
    display: grid;
    grid-template-columns: clamp(3.8rem, 6vw, 5.25rem) minmax(0, 1fr);
    gap: clamp(1rem, 2vw, 1.4rem);
    align-items: start;
    min-width: 0;
}

.project-card-visual {
    display: grid;
    place-items: center;
    width: clamp(3.8rem, 6vw, 5.25rem);
    height: clamp(3.8rem, 6vw, 5.25rem);
    flex-shrink: 0;
    overflow: hidden;
}

.project-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-card-content {
    min-width: 0;
    max-width: 100%;
}

.project-card h3,
.project-card h4 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

.project-card h3 + p,
.project-card h4 + p,
.project-card p[id] {
    max-width: 100%;
    margin: 0;
    color: var(--project-description-text);
    font-size: clamp(0.86rem, 1.2vw, 0.96rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    padding-top: 20px;
    min-width: 0;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--project-tag-bg);
    color: var(--project-tag-text);
    font-size: 0.72rem;
    line-height: 1.4;
    font-weight: 500;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.project-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
    max-width: 100%;
    margin-top: 1.5rem;
    color: var(--text);
    font-size: 0.76rem;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    opacity: 0.75;
    overflow-wrap: anywhere;
}

.project-card a:hover .project-action {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* ==================================================
   ABOUT STRIP
================================================== */

.about-strip {
    margin-inline: calc(var(--shell-x) * -1);
    padding-inline: var(--shell-x);
    background: var(--about-strip-bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.about-strip-inner {
    display: grid;
    grid-template-columns: 210px minmax(0, 860px);
    gap: 32px;
    align-items: start;
    padding: clamp(1.35rem, 2.4vw, 1.85rem) 0;
}

.about-eyebrow {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
}

.about-text {
    margin: 0;
    color: var(--about-strip-text);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.about-text p {
    margin: 0;
}

.about-text p + p {
    margin-top: 0.55rem;
}

/* ==================================================
   OPTIONAL PRINCIPLES
   Keep only if rendered on other pages.
================================================== */

.principles-layout {
    display: block;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 34px;
    margin: 0;
}

.principle-card {
    position: relative;
    min-width: 0;
    padding-right: 28px;
}

.principle-card:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 8%;
    right: 0;
    width: 1px;
    height: 84%;
    background: var(--principle-separator);
}

.principle-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 20px;
    opacity: 0.82;
}

.principle-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 800;
}

.principle-card p {
    max-width: 180px;
    margin: 0;
    color: var(--principle-text);
    font-size: 0.94rem;
    line-height: 1.6;
}

/* ==================================================
   LEGACY / OTHER PAGES
================================================== */

.error-page {
    margin-top: 0;
}

#imprint h1,
#privacy h1 {
    font-size: 2.2rem;
    line-height: 1.05;
}

#privacy .privacy-controller-details {
    margin-bottom: 0.5rem;
    font-style: normal;
    line-height: 1.6;
}

#privacy .privacy-legal-reference {
    margin: 0.5rem 0 0;
}

/* ==================================================
   FOOTER
================================================== */

#footer {
    margin: 0 calc(var(--shell-x) * -1);
    padding: 34px var(--shell-x) 48px;
    border-top: 1px solid var(--footer-border);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

main:has(.about-strip) + #footer {
    border-top: 0;
}

#page-footer.footer-inner {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(240px, 1.3fr) 140px;
    gap: clamp(28px, 5vw, 70px);
    align-items: start;
    margin: 0 0 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

#page-footer.footer-inner:hover {
    transform: none;
}

#page-footer.footer-inner::after {
    display: none;
}

.footer-group {
    margin: 0;
    min-width: 0;
    border: none;
}

.footer-heading {
    margin: 0 0 18px;
    padding-top: 0;
    color: var(--text);
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.5;
}

#page-footer .footer-group nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
}

.footer-group a {
    display: block;
    width: fit-content;
    padding: 0;
    border: 0;
    background: none;
    color: var(--footer-link-text);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.85;
}

.footer-group a:hover {
    color: var(--text);
    opacity: 1;
}

.footer-group a[aria-current="page"] {
    color: var(--text);
    font-weight: 650;
    opacity: 1;
}

.footer-brand-card {
    justify-self: end;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 140px;
    min-height: 78px;
    box-sizing: border-box;
    padding: 18px;
    border: 1px solid var(--footer-brand-border);
    background: transparent;
}

.footer-brand-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.footer-brand-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.65rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--footer-border);
}

.footer-meta p {
    margin: 0;
    color: var(--footer-meta-text);
    font-size: 0.9rem;
}

/* ==================================================
   UTILITIES
================================================== */

.date-info {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.02em;
    opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #17191c;
        --body-bg: #0d0f12;

        --text: #f2f0ea;
        --muted: #d2d0c9;
        --muted-2: #a5a29a;

        --line: #30343a;
        --border: #343941;

        --accent: #d92c2c;
        --accent-text: #ffffff;

        --tag-bg: #262b31;
        --tag-text: #e2dfd7;

        --link: #e8e4dc;
        --link-hover: #ffffff;

        --card-hover-border: #f2f0ea;

        --skip-link-text: #17191c;

        --hero-paragraph-text: #d8d4cc;
        --hero-grid-pattern: #2b3036;
        --hero-grid-line-main: #78828f;
        --hero-grid-line-soft: #464d56;
        --hero-grid-point-soft: #59616c;
        --hero-grid-label: #c48787;

        --section-description-text: #d8d4cc;
        --section-border: #30343a;

        --project-card-border: #343941;
        --project-card-hover-bg: #202329;
        --project-description-text: #d8d4cc;
        --project-tag-bg: #262b31;
        --project-tag-text: #e2dfd7;

        --about-strip-bg: #202019;
        --about-strip-text: #ebe6dc;

        --principle-separator: rgba(255, 255, 255, 0.13);
        --principle-text: #d8d4cc;

        --footer-border: #30343a;
        --footer-link-text: #e4e0d8;
        --footer-meta-text: #c9c5bc;
        --footer-brand-border: #343941;
    }
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 1100px) {
    .wrapper {
        max-width: 920px;
    }

    #web-header .hero-content {
        grid-template-columns: 1fr;
        gap: 44px;
        max-width: 620px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card a {
        min-height: auto;
    }

    .project-card-body {
        grid-template-columns: 4.5rem minmax(0, 1fr);
    }

    .project-card-visual {
        width: 4.5rem;
        height: 4.5rem;
    }

    .project-card h3 + p,
    .project-card h4 + p,
    .project-card p[id] {
        max-width: 32rem;
    }
}

@media (max-width: 820px) {
    :root {
        --shell-x: 28px;
    }

    .wrapper {
        max-width: none;
        margin: 0;
        padding: 28px var(--shell-x) 0;
        border: 0;
        border-radius: 0;
    }

    main:not(:has(.about-strip)) {
        padding-bottom: 44px;
    }

    .header {
        padding: 0 0 48px;
    }

    #web-header.hero {
        padding-bottom: 54px;
    }

    .hero-kicker {
        font-size: clamp(3.2rem, 14vw, 5rem);
    }

    #web-header.hero h1 {
        font-size: clamp(1.65rem, 7vw, 2.4rem);
    }

    .principles-grid {
        grid-template-columns: 1fr;
    }

    .principle-card {
        padding-right: 0;
    }

    .principle-card::after {
        display: none;
    }

    #page-footer.footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 34px 28px;
    }

    .footer-brand-card {
        grid-column: 1 / -1;
        justify-self: start;
        width: min(100%, 220px);
    }

    .footer-meta {
        flex-direction: column;
        gap: 8px;
    }

    #footer {
        padding-bottom: 40px;
    }
}

@media (max-width: 700px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .language-switcher {
        justify-content: flex-start;
    }

    .hero-grid-art {
        width: min(100%, 360px);
        margin-inline: auto;
    }

    .hero-principles-index {
        display: block;
        padding-inline: 0;
    }

    .hero-principles-label {
        display: block;
        margin-bottom: 14px;
        text-align: center;
    }

    .hero-principles-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 18px;
        width: min(100%, 420px);
        margin-inline: auto;
    }

    .hero-principles-items > span {
        justify-content: flex-start;
        white-space: normal;
    }

    .section-heading {
        grid-template-columns: 1fr;
    }

    .section-link {
        margin-top: 1.2rem;
    }

    .about-strip-inner {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .about-text {
        font-size: clamp(1.25rem, 7vw, 1.65rem);
        line-height: 1.12;
    }
}

@media (max-width: 560px) {
    .hero-kicker {
        font-size: clamp(2.8rem, 16vw, 4.4rem);
    }

    #web-header.hero h1 {
        max-width: 16ch;
        font-size: clamp(1.55rem, 8vw, 2.15rem);
    }

    .hero-main p,
    #web-header.hero .hero-main p {
        font-size: 1rem;
        line-height: 1.65;
    }

    .project-card-body {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card-visual {
        width: 4.25rem;
        height: 4.25rem;
    }

    .project-card a {
        min-height: auto;
    }

}

@media (max-width: 430px) {
    #page-footer.footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-brand-card {
        grid-column: auto;
        width: 140px;
    }
}
