/*
 * site.css
 * Seitenaufbau der Softwinsky-Website. Farben, Schriften und Controls kommen aus gui.css.
 */

@import url("gui.css");

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

html {
    background: var(--gui-colorWindowBackground);
    -webkit-text-size-adjust: 100%;     /* iOS: Schrift im Querformat nicht selbst vergrößern */
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;                 /* iOS Safari: Höhe ohne ein- und ausfahrende Adressleiste */
    display: flex;
    flex-direction: column;
    color: var(--gui-colorText);
    font-family: var(--gui-fontname_normal);
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: var(--gui-colorBorderHighlite);
}

h1, h2, h3 {
    font-family: var(--gui-fontname_bold);
    font-weight: var(--gui-fontname_bold-weight);
    line-height: 1.2;
    hyphens: auto;                      /* lange deutsche Wörter auf schmalen Displays trennen */
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

h1 {
    font-size: clamp(26px, 7vw, 32px);
}

/* Überschrift 2 mit Cyan-Strich davor (CI, Seite 9) */
h2 {
    font-size: 20px;
    margin: 2em 0 0.6em;
    padding-left: 10px;
    border-left: 3px solid var(--gui-colorBorderHighlite);
}

h3 {
    font-size: 16px;
    margin: 1.5em 0 0.4em;
}

main {
    flex: 1;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px;
}


/* ---------- Visitenkarte (Startseite) ---------- */

.card-page main {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    width: 100%;
    max-width: 560px;
    padding: 40px;
    text-align: center;
}

/* Logo: H = 64 px, Schutzzone 0,5 H rundum (CI, Seite 6) */
.card .logo {
    display: block;
    height: 64px;
    width: auto;
    margin: 32px auto;
    max-width: calc(100% - 64px);
    object-fit: contain;
}

.card .tagline {
    margin: 0 0 32px;
    font-size: 18px;
}

.card .actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}


/* ---------- Kopfzeile der Unterseiten ---------- */

.site-header {
    padding: 24px max(24px, env(safe-area-inset-left));
    border-bottom: var(--gui-UIborderWidth) solid var(--gui-colorBorder);
    background: var(--gui-colorBackground);
}

.site-header a {
    display: inline-block;
    line-height: 0;
}

/* Logo H = 40 px, Abstand zum Rand mind. 0,5 H */
.site-header img {
    height: 40px;
    width: auto;
}


/* ---------- Fußzeile ---------- */

.site-footer {
    padding: 10px 24px calc(10px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 14px;
    color: var(--gui-colorLightGray);
    border-top: var(--gui-UIborderWidth) solid var(--gui-colorBorder);
    background: var(--gui-colorBackground);
}

.site-footer a {
    display: inline-block;
    padding: 6px 0;                     /* größere Tippfläche */
    color: var(--gui-colorLightGray);
    text-decoration: none;
    margin: 0 10px;
}

.site-footer a:hover {
    color: var(--gui-colorBorderHighlite);
}


/* ---------- Rechtstexte ---------- */

.legal address {
    font-style: normal;
}

.legal .gui-view {
    margin: 1em 0;
}

/* Platzhalter, die noch ausgefüllt werden müssen: fallen im Testbereich sofort auf */
.todo {
    background: var(--gui-colorErrorBackground);
    color: var(--gui-colorText);
    padding: 0 4px;
    border-radius: 3px;
    font-family: var(--gui-fontname_number);
}


@media (max-width: 480px) {
    main { padding: 24px 16px; }
    .card { padding: 24px 16px; }
    .card .logo { height: 48px; margin: 24px auto; max-width: calc(100% - 48px); }
}


/* ---------- Sprachumschalter auf den zweisprachigen Rechtsseiten ---------- */

.lang-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.legal section + section {
    margin-top: 64px;
    padding-top: 32px;
    border-top: var(--gui-UIborderWidth) solid var(--gui-colorBorder);
}
