@CHARSET "UTF-8";

/* ==========================================================
   Kanzlei Peter Seidl – Styles
   ========================================================== */

/* ========= Tokens ========= */
:root {
    --color-primary:    hsl(210, 60%, 25%);
    --color-accent:     hsl(210, 60%, 25%, 0.75);
    --color-bg:         #f3efe8;
    --color-text:       hsl(0, 0%, 12%);
    --color-nav:        hsl(0, 0%, 98%);
    --color-footer:     var(--color-nav);
    --color-bg-header:  hsla(210, 60%, 25%, 85%);

    --color-logo:           var(--color-nav);
    --color-logo-highlight: hsl(210, 60%, 25%);
    --color-logo-border:    hsl(160, 35%, 45%);
    --color-on-dark:        hsl(155, 60%, 70%);
    --color-nav-accent:     hsl(160, 35%, 45%, 0.55);
    --color-nav-border-bottom: hsl(160, 35%, 45%);
    --border-thickness: 0.25em;

    --font-display: ui-serif, 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
    --font-body:    Optima, Candara, 'Gill Sans MT', 'Trebuchet MS', sans-serif;

    --space-xs: 0.5rem;
    --space-s:  1rem;
    --space-m:  2rem;
    --space-l:  4rem;
    --space-xl: 8rem;
    --radius:   0.25rem;

    --header-h: min(12vh, 6rem);

    --rule:        1px solid rgba(28, 43, 58, 0.12);
    --rule-accent: 1px solid hsl(160, 35%, 45%, 0.4);

    --list-icon-tel:        url(/images/icon_tel.png);
    --list-icon-fax:        url(/images/icon_fax.png);
    --list-icon-email:      url(/images/icon_email.png);
    --list-icon-tel-dark:   url(/images/icon_tel_dark.png);
    --list-icon-fax-dark:   url(/images/icon_fax_dark.png);
    --list-icon-email-dark: url(/images/icon_email_dark.png);
}

/* ========= Dark Mode ========= */
@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: hsl(160, 35%, 45%);
        --color-accent:  hsl(160, 35%, 45%, 0.75);
        --color-bg:      hsl(210, 50%, 10%);
        --color-text:    hsl(0, 0%, 93%);
        --rule:          1px solid rgba(255, 255, 255, 0.12);
        --list-icon-tel:   var(--list-icon-tel-dark);
        --list-icon-fax:   var(--list-icon-fax-dark);
        --list-icon-email: var(--list-icon-email-dark);
    }
}

/* ========= Reset & Base ========= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    margin-top: var(--header-h);
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/* ========= Skip Link ========= */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--space-xs) var(--space-s);
    z-index: 1000;

    &:focus {
        top: 0;
    }
}

/* ========= Logo ========= */
.logo {
    margin: 0;
    color: var(--color-logo);

    & table {
        border-collapse: collapse;

        & td {
            padding: 0 0.2em;
        }

        & .highlight {
            color: var(--color-logo-highlight);
            font-size: 1.5em;
            font-weight: bold;
            padding: 0 0.1em;
            background-color: white;
            border-radius: 0.1em;
            margin: 0 0.1em;
        }

        & .border-radius { border-radius: 0.1em; }
        & .border-top    { border-top:    var(--border-thickness) solid var(--color-logo-border); }
        & .border-bottom { border-bottom: var(--border-thickness) solid var(--color-logo-border); }
        & .border-right  { border-right:  var(--border-thickness) solid var(--color-logo-border); }
        & .border-left   { border-left:   var(--border-thickness) solid var(--color-logo-border); }
    }
}

/* ========= Header ========= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-m);
    background-color: var(--color-bg-header);
    backdrop-filter: blur(10px);
    border-bottom: var(--rule-accent);
    z-index: 100;

    & .logo {
        font-size: 0.7em;
        min-width: fit-content;
    }
}

/* ========= Navigation ========= */
.hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4em;
    background: none;
    border: none;
    cursor: pointer;

    & svg {
        stroke: var(--color-nav);
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 2;
    }

    & .hamburger_lineX { stroke-width: 0; }
}

.hamburger-open {
    .hamburger_line  { stroke-width: 0; }
    .hamburger_lineX { stroke-width: 2; }
}

nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    margin: 0;
    position: relative;

    & ul {
        display: none;
        list-style: none;
        flex-wrap: nowrap;
        margin: 0;
        padding: 0;
        padding-right: 1em;
    }

    & .navigation-list-open {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        font-size: 0.9em;
        position: absolute;
        top: calc(var(--header-h) / 2);
        right: 0;
        background: var(--color-bg-header);
        backdrop-filter: blur(8px);
        padding: var(--space-s) var(--space-s);
        min-width: 12rem;
        text-align: right;
        gap: 0.4rem;
        border-left: var(--rule-accent);
        border-bottom: var(--rule-accent);
    }

    & a {
        text-decoration: none;
        font-family: var(--font-body);
        font-weight: 400;
        font-size: 0.72rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--color-nav);
    }

    & a:focus,
    & a:hover {
        color: var(--color-nav-accent);
        border-bottom: 0.2em solid var(--color-nav-accent);
    }
}

[aria-current="page"] {
    border-bottom: 0.2em solid var(--color-nav-border-bottom);
}

@media all and (min-width: 50em) {
    .hamburger { display: none; }

    header { align-items: center; }

    nav {
        & ul {
            position: static;
            display: flex;
            flex-direction: row;
            justify-content: center;
            gap: var(--space-s);
            backdrop-filter: none;

            & li { margin: 0; }
        }
    }
}

/* ========= Hauptinhalt ========= */
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;

    & section { padding: 1em; }

    & a { color: var(--color-text); }
}

@media (min-width: 50em) {
    main {
        align-items: center;

        & section { width: 50em; }
    }
}

/* ========= Überschriften ========= */
h1, h2 {
    line-height: 1.3;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-primary);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: var(--space-m);
    position: relative;

    &::after {
        content: '';
        display: block;
        width: 2rem;
        height: 2px;
        background: var(--color-accent);
        margin-top: 0.5rem;
    }
}

p, li {
    margin-bottom: var(--space-s);
}

/* ========= Info-Listen (Kontakt) ========= */
.info ul {
    padding-left: 0;
    list-style-type: none;

    & li {
        background-size: contain;
        background-repeat: no-repeat;
    }

    & li.tel   { padding-left: 2em; background-image: var(--list-icon-tel); }
    & li.fax   { padding-left: 2em; background-image: var(--list-icon-fax); }
    & li.email { padding-left: 2em; background-image: var(--list-icon-email); }
}

/* ========= Rechtliche Seiten ========= */
#impressum a,
#datenschutz a {
    text-decoration: underline;
}

/* ========= Bild-Wrapper / Hero ========= */
.image-wrapper {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.intro {
    background-image: url("/images/header.svg");
}

.intro-year {
    display: none;
}

.intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        130deg,
        rgba(26, 40, 64, 0.72) 0%,
        rgba(26, 40, 64, 0.25) 100%
    );
    pointer-events: none;
}

.intro #intro {
    position: relative;
    z-index: 1;
    color: var(--color-nav);
    padding: var(--space-xl) var(--space-m) var(--space-l);
    max-width: 44rem;
    width: 100%;
    animation: fadeUp 0.75s ease both;
}

.intro #intro-heading {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-on-dark);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: var(--space-s);

    &::after { display: none; }
}

.intro-name {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 6.5rem);
    font-weight: 700;
    line-height: 0.92;
    color: white;
    margin: 0 0 var(--space-s);
    letter-spacing: -0.02em;
}

.intro-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    font-weight: 400;
    color: hsla(0, 0%, 98%, 0.78);
    margin-bottom: var(--space-m);
    line-height: 1.5;
}

/* ========= Leistungen ========= */
.leistungen {
    & ul {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
        grid-auto-rows: minmax(9rem, auto);
        gap: var(--space-s);
        padding: 0;
        justify-content: start;
        align-items: stretch;
    }

    & li {
        list-style-type: none;
        font-size: 1rem;
        width: auto;
        padding: var(--space-s) var(--space-xs);
        border: var(--rule);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        & img {
            height: 2.8rem;
            opacity: 0.75;
        }

        & p {
            font-size: 0.9rem;
            font-weight: 400;
            text-align: center;
            color: var(--color-text);
            opacity: 0.75;
            margin: 1rem auto;
        }
    }
}

/* ========= Button ========= */
.button {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    padding: var(--space-xs) var(--space-m);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;

    &:hover,
    &:focus {
        background: var(--color-primary);
    }
}

.intro .button {
    background: transparent;
    border: 1px solid hsla(0, 0%, 98%, 0.5);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 0.1rem;
    padding: 0.65rem 1.75rem;

    &:hover,
    &:focus {
        background: hsla(0, 0%, 98%, 0.12);
        border-color: hsla(0, 0%, 98%, 0.8);
    }
}

/* ========= Footer ========= */
footer {
    display: flex;
    flex-direction: column;
    gap: 1em;
    background: var(--color-bg-header);
    color: var(--color-footer);
    border-top: var(--rule-accent);
    padding: var(--space-l) var(--space-m) var(--space-m);
    font-size: 0.9rem;

    & .logo { margin-top: 1.5em; }

    & h4 {
        font-family: var(--font-body);
        font-size: 0.62rem;
        font-weight: 500;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--color-on-dark);
        margin-bottom: 0.5rem;
    }

    & a { color: var(--color-footer); }

    & .info {
        & li.tel   { background-image: var(--list-icon-tel-dark); }
        & li.fax   { background-image: var(--list-icon-fax-dark); }
        & li.email { background-image: var(--list-icon-email-dark); }
    }
}

/* ========= Responsive ========= */
@media (min-width: 50em) {
    main {
        align-items: center;

        & section { width: 50em; }
    }

    .leistungen {
        & ul { justify-content: flex-start; }
    }

    h1 { font-size: 2rem; }

    footer {
        flex-direction: row;
        gap: 4rem;
        align-items: flex-start;
        justify-content: center;
    }
}

/* ========= Animationen ========= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(1.5rem);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
