/* ========================================
   Harald König SV - Visitenkarte
   Tokens, Schrift und Bewegung wie v3, ohne JavaScript
   ======================================== */

/* Fonts (lokal gehostet, DSGVO-konform) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/inter-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/inter-medium.woff2') format('woff2');
}

:root {
    --color-bg: #f2f3ef;
    --color-text: #4a4a4a;
    --color-text-light: #7d7b78;
    --color-accent: #bbafa9;
    --color-line: #d9d8d2;
    --color-dark: #3a3b3d;
    --color-on-dark: #f2f3ef;

    --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --fs-xlarge: 1.75rem;
    --fs-medium: 1.25rem;
    --fs-small: 1.125rem;
    --fs-label: 0.8125rem;

    --gutter: 20px;
    --max-width: 1440px;

    --ease: cubic-bezier(0.165, 0.84, 0.44, 1);
    --duration: 500ms;
}

@media (min-width: 768px) {
    :root {
        --gutter: 40px;
    }
}

@media (min-width: 1024px) {
    :root {
        --gutter: 56px;
        --fs-xlarge: 2.3125rem;
        --fs-medium: 1.375rem;
    }
}

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

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

body {
    display: flex;
    flex-direction: column;
    /* lvh: Foto reicht bis ganz unten, auch hinter die (durchscheinende)
       Browserleiste auf iOS; --bar hebt den Text um deren Höhe an */
    --bar: 0px;
    min-height: 100vh;
    min-height: 100lvh;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 4px;
}

/* Nur für Screenreader: unsichtbar, aber vorgelesen */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Footer bleibt auch bei wenig Inhalt unten */
body > main {
    flex: 1;
}

/* Hält „und -Fassaden" zusammen, sonst bricht die Zeile nach dem Bindestrich */
.nowrap {
    white-space: nowrap;
}

/* Links: Unterstreichung schiebt sich ein */
.hover-ul {
    position: relative;
    display: inline-block;
}

.hover-ul::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--duration) var(--ease);
}

.hover-ul:hover::after,
.hover-ul:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ========================================
   Visitenkarte
   ======================================== */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--color-on-dark);
    background: var(--color-dark);
}

.card-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Verläufe wie in v3: unten für den Text, oben für das Logo */
.card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 60%),
                linear-gradient(to bottom,
                    rgba(0, 0, 0, 0.72) 0%,
                    rgba(0, 0, 0, 0.6) 10%,
                    rgba(0, 0, 0, 0.38) 20%,
                    rgba(0, 0, 0, 0.16) 32%,
                    rgba(0, 0, 0, 0) 45%);
    pointer-events: none;
}

.card-top {
    position: relative;
    padding-top: 24px;
}

/* Nicht ganz deckend: reines Hell wirkt auf dem Foto grell (v. a. auf iOS) */
.card-logo {
    display: block;
    width: auto;
    height: 72px;
    opacity: 0.8;
}

@supports (height: 1lvh) {
    body {
        --bar: calc(100lvh - 100svh);
    }
}

.card-content {
    position: relative;
    padding-top: 64px;
    padding-bottom: calc(64px + var(--bar));
}

.card-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
}

.card-title {
    max-width: 30ch;
    margin-top: 16px;
    font-size: var(--fs-medium);
    line-height: 1.36;
}

.card-address {
    margin-top: 40px;
    padding-top: 20px;
    max-width: 360px;
    border-top: 1px solid rgba(242, 243, 239, 0.4);
    font-style: normal;
    opacity: 0.85;
}

@media (min-width: 1024px) {
    .card-top {
        padding-top: 32px;
    }

    .card-logo {
        height: 104px;
    }

    .card-content {
        padding-bottom: calc(96px + var(--bar));
    }
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 24px 0;
    color: var(--color-on-dark);
    background: var(--color-dark);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    font-size: var(--fs-label);
    opacity: 0.7;
}

.footer-bottom a + a {
    margin-left: 24px;
}

/* ========================================
   Rechtsseiten (Impressum, Datenschutz)
   ======================================== */

.legal-header {
    padding: 24px 0;
    border-bottom: 1px solid var(--color-line);
}

.legal-home {
    display: inline-block;
}

.legal-logo {
    display: block;
    width: auto;
    height: 40px;
}

@media (min-width: 1024px) {
    .legal-logo {
        height: 52px;
    }
}

.legal-content {
    padding: 80px 0;
}

.legal-content .container {
    max-width: calc(760px + 2 * var(--gutter));
}

.legal-content h1 {
    font-size: var(--fs-xlarge);
    line-height: 1.22;
    margin-bottom: 8px;
}

.legal-subtitle {
    margin-bottom: 48px;
    color: var(--color-text-light);
}

.legal-content h2 {
    margin: 40px 0 12px;
    font-size: var(--fs-medium);
    line-height: 1.36;
}

.legal-content h3 {
    margin: 24px 0 8px;
    font-size: var(--fs-small);
}

.legal-content p,
.legal-content ul {
    margin-bottom: 16px;
}

.legal-content ul {
    padding-left: 20px;
    list-style: disc;
}

.legal-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-date {
    margin-top: 48px;
    color: var(--color-text-light);
}

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