/*
 * IG MOWAG - Hier entsteht (Variante "Onepager")
 * Dunkler Hero, Saira-Condensed-Schlagzeilen, Mono-Labels.
 * Keine externen Schriften oder CDNs - alles lokal.
 */

/* ---------------------------------------------------------------
 * Lokale Schriften - liegen unter fonts/ und werden lokal geladen.
 * Keine Verbindung zu Google Fonts, damit keine IP an Dritte geht.
 * Lizenz: SIL Open Font License (frei verwendbar).
 *   - Saira Condensed (700, 800)     -> Schlagzeilen
 *   - IBM Plex Sans (400, 500)        -> Fliesstext
 *   - IBM Plex Mono (400, 500, 600)   -> Labels
 * --------------------------------------------------------------- */
@font-face {
    font-family: "Saira Condensed";
    src: url("../fonts/saira-condensed-700.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Saira Condensed";
    src: url("../fonts/saira-condensed-800.woff2") format("woff2");
    font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "IBM Plex Sans";
    src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "IBM Plex Sans";
    src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2");
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("../fonts/ibm-plex-mono-600.woff2") format("woff2");
    font-weight: 600; font-style: normal; font-display: swap;
}

:root {
    /* Akzentfarbe. Alternativen: Oxblood #9e3b22, Oliv #5a6038 */
    --accent: #a3702a;

    --papier: #f4f1e8;
    --papier-2: #fbf9f2;
    --tinte: #24281c;
    --topbar: #e0d9d3;
    --form-bg: #ece6d6;
    --hell: #f4f1e8;

    --font-head: "Saira Condensed", "Oswald", "Arial Narrow", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--papier);
}

::selection { background: #d8cca8; color: var(--tinte); }

@keyframes igblink {
    0%, 100% { opacity: 1; }
    50% { opacity: .2; }
}

body {
    font-family: var(--font-body);
    color: var(--tinte);
    background: var(--papier);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Feine Raster-Koernung ueber der Seite (rein dekorativ) */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    opacity: .05;
    mix-blend-mode: multiply;
    background-image:
        repeating-linear-gradient(0deg, #000 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, #000 0 1px, transparent 1px 3px);
    background-size: 3px 3px;
}

/* ============ TOPBAR ============ */
.topbar {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 9px clamp(16px, 4vw, 36px);
    background: var(--topbar);
    border-bottom: 1px solid rgba(36, 40, 28, .18);
    z-index: 10;
}

.brand { line-height: 1; }

.brand-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .22em;
    color: rgba(36, 40, 28, .55);
    text-transform: uppercase;
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(36, 40, 28, .6);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: igblink 1.8s ease-in-out infinite;
}

.status-text { white-space: nowrap; }

/* Schweizerkreuz (rein per CSS) */
.swiss {
    position: relative;
    width: 24px;
    height: 24px;
    background: #9e3b22;
    border-radius: 3px;
    flex: none;
}
.swiss span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--papier);
}
.swiss .bar-h { width: 54%; height: 16%; }
.swiss .bar-v { width: 16%; height: 54%; }

/* ============ LAYOUT ============ */
.layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
}

/* ---- LINKS: Hero ---- */
.hero-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--tinte);
    color: var(--hell);
}

.hero {
    position: relative;
    flex: 1;
    min-height: 320px;
    overflow: hidden;
}

/*
 * Hero-Bild: Platzhalter mit Schraffur. Fuer das echte Foto die
 * Zeile background-image aktivieren und eine lokale Datei nach
 * img/ legen (kein externer Dienst, damit keine IP leakt).
 */
.hero-img {
    position: absolute;
    inset: 0;
    /* Echtes MOWAG-Foto. Zum Austauschen einfach img/hero.jpg ersetzen. */
    background: #2c3122 url("../img/hero.jpg") center / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(20, 22, 16, .82) 0%,
        rgba(20, 22, 16, .55) 42%,
        rgba(20, 22, 16, .48) 70%,
        rgba(20, 22, 16, .70) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: clamp(26px, 3.4vw, 48px);
}

.hero-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero-kicker .line {
    width: 30px;
    height: 2px;
    background: var(--accent);
}
.hero-kicker .text {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: #d8cca8;
}

.hero-title {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(30px, 3.8vw, 56px);
    line-height: .92;
    letter-spacing: -.005em;
    max-width: 14ch;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .5);
}

.hero-lead {
    margin: 0;
    max-width: 44ch;
    font-size: clamp(14px, 1.05vw, 16px);
    line-height: 1.55;
    color: rgba(244, 241, 232, .9);
    text-shadow: 0 1px 10px rgba(0, 0, 0, .6), 0 1px 2px rgba(0, 0, 0, .5);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}
.tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #d8cca8;
    border: 1px solid rgba(216, 204, 138, .45);
    padding: 5px 10px;
    border-radius: 2px;
}

.corner {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 16px;
    height: 16px;
    border-top: 2px solid rgba(244, 241, 232, .8);
    border-right: 2px solid rgba(244, 241, 232, .8);
}

/* ---- RECHTS: Formular ---- */
.form-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--form-bg);
    padding: clamp(20px, 3vw, 44px);
}

.card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--papier-2);
    border: 1px solid rgba(36, 40, 28, .16);
    border-radius: 3px;
    box-shadow: 0 24px 56px -34px rgba(36, 40, 28, .55);
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--tinte);
    color: var(--hell);
    padding: 13px clamp(18px, 3vw, 26px);
}

.card-title {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: clamp(20px, 2.6vw, 27px);
}

.card-tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .16em;
    color: #c8b88a;
    white-space: nowrap;
}

.card-body { padding: clamp(20px, 3vw, 30px); }

/* Fehlerbox */
.alert {
    background: #f6e7dc;
    border: 1px solid #d9a784;
    border-radius: 2px;
    padding: 11px 14px;
    margin-bottom: 18px;
}
.alert-title {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #9e3b22;
    font-weight: 600;
}
.alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: #7a3b22;
}
.alert li { margin: 2px 0; }

/* Felder */
.feld { margin-bottom: 14px; }

.feld-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(36, 40, 28, .7);
    margin-bottom: 6px;
}
.pflicht { color: var(--accent); }
.optional { color: rgba(36, 40, 28, .45); }

.input,
.textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--tinte);
    background: var(--papier);
    border: 1px solid rgba(36, 40, 28, .25);
    border-radius: 2px;
    padding: 11px 13px;
    outline: none;
}
.textarea {
    resize: vertical;
    line-height: 1.45;
    min-height: 76px;
}
.input:focus,
.textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(163, 112, 42, .18);
}

/* Honeypot: fuer Menschen unsichtbar, Koeder fuer Bots */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Datenschutzhinweis */
.datenschutz {
    margin: 2px 0 16px;
    padding-top: 13px;
    border-top: 1px solid rgba(36, 40, 28, .14);
    font-size: 11.5px;
    line-height: 1.5;
    color: rgba(36, 40, 28, .6);
}

/* Buttons */
.btn {
    appearance: none;
    cursor: pointer;
    width: 100%;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 20px;
    color: var(--hell);
    background: var(--tinte);
    border: none;
    border-radius: 2px;
    padding: 14px 20px;
    transition: background .15s, color .15s;
}
.btn:hover,
.btn:focus {
    background: var(--accent);
    color: var(--tinte);
}

.btn-ghost {
    appearance: none;
    cursor: pointer;
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 15px;
    color: var(--tinte);
    background: transparent;
    border: 1px solid rgba(36, 40, 28, .3);
    border-radius: 2px;
    padding: 11px 20px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.btn-ghost:hover,
.btn-ghost:focus {
    background: var(--tinte);
    color: var(--hell);
}

/* Danke-Ansicht */
.danke {
    text-align: center;
    padding: 10px 0 6px;
}
.stamp {
    display: inline-block;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 20px;
    padding: 7px 18px;
    border-radius: 3px;
    transform: rotate(-5deg);
    margin-bottom: 22px;
}
.danke-title {
    margin: 0 0 12px;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: clamp(26px, 3.4vw, 36px);
    color: var(--tinte);
}
.danke-text {
    margin: 0 auto 22px;
    max-width: 40ch;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(36, 40, 28, .72);
}

/* Fusszeile unter der Karte */
.form-fuss {
    margin: 14px auto 0;
    max-width: 480px;
    width: 100%;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(36, 40, 28, .5);
}

/* Inline-Hinweise per JS (Progressive Enhancement) */
.js-hinweis {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: #8a4a3c;
    font-family: var(--font-mono);
    letter-spacing: .04em;
}
.feld--fehler .input,
.feld--fehler .textarea {
    border-color: #8a4a3c;
}

/* Schmale Bildschirme: Spalten stapeln, Hero oben */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .hero { min-height: 300px; }
}
