/*
 * netzkonsorten.de — Shared Stylesheet
 * Version: 1.0
 */

/* ══════════════════════════════════════════════════════════════
   FONTS
══════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'DM Mono';
    src: url('./fonts/dm-mono-v16-latin-regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'DM Mono';
    src: url('./fonts/dm-mono-v16-latin-500.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('./fonts/inter-v20-latin-regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('./fonts/inter-v20-latin-500.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('./fonts/inter-v20-latin-600.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}


/* ══════════════════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════════════════ */

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

:root {
    --black:    #0a0a0a;
    --white:    #ffffff;
    --red:      #dc2626;
    --orange:#ffa500;
    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --green:    #16a34a;
    --grid:     #efefef;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--white);
    color: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}


/* ══════════════════════════════════════════════════════════════
   LAYOUT HELPERS
══════════════════════════════════════════════════════════════ */

.grid-bg {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right,  var(--grid) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
}

.z-content { position: relative; z-index: 10; }


/* ══════════════════════════════════════════════════════════════
   NAVIGATION — gemeinsam
══════════════════════════════════════════════════════════════ */

nav {
    display: flex; flex-direction: column;
    justify-content: space-between; align-items: flex-start;
    padding: 2.5rem 3rem; gap: 1.5rem;
}
@media (min-width: 768px) { nav { flex-direction: row; gap: 0; } }

.logo {
    font-family: 'Arial', sans-serif;;
    font-size: 2rem; font-weight: 800;
    letter-spacing: -0.04em; line-height: 1;
    text-decoration: none; color: var(--black);
    transition: opacity .2s;
}
.logo:hover { opacity: .7; }
.logo span { color: var(--red); }

/* ─── Variante: Startseite (Status-Anzeige) ─── */
.nav-status { text-align: left; }
@media (min-width: 768px) { .nav-status { text-align: right; } }

.status-label {
    font-family: 'DM Mono', monospace;
    font-size: .65rem; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: .25rem;
}
.status-dot { display: flex; align-items: center; gap: .5rem; }
.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--orange); flex-shrink: 0;
    animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.35; } }
.status-text { font-size: .875rem; font-weight: 600; }

/* ─── Variante: Legal-Seiten (Seitenname) ─── */
.nav-right { text-align: left; }
@media (min-width: 768px) { .nav-right { text-align: right; } }

.nav-label {
    font-family: 'DM Mono', monospace;
    font-size: .65rem; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: .25rem;
}
.nav-page {
    font-size: .875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
}

/* Shared */
.hero-inner {
    border-left: 4px solid var(--black);
    padding: 1rem 2rem;
}
@media (min-width: 768px) { .hero-inner { padding-left: 4rem; } }

h1 {
    font-family: 'Arial', sans-serif;
    font-weight: 800; letter-spacing: -0.04em; line-height: 0.95;
}

/* Startseite */
body.page-home header {
    padding: 5rem 1rem;
    max-width: 90rem; margin: 0 auto;
    flex-grow: 1; width: 100%;
}
@media (min-width: 768px) { body.page-home header { padding: 5rem 3rem; } }
body.page-home h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    margin-bottom: 2rem;
}
.hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 500; max-width: 38rem;
    line-height: 1.5; color: var(--gray-800);
}

/* Legal-Seiten */
body.page-legal header {
    padding: 3rem 3rem 2rem;
    max-width: 90rem; margin: 0 auto; width: 100%;
}
body.page-legal h1 {
    font-size: clamp(2rem, 7vw, 5rem);
    margin-bottom: 1rem;
}
.header-sub {
    font-size: 1.1rem; font-weight: 500; color: var(--gray-500);
}


/* ══════════════════════════════════════════════════════════════
   FOOTER — gemeinsam
══════════════════════════════════════════════════════════════ */

footer {
    display: flex; flex-direction: column;
    align-items: center; gap: 1rem;
    padding: 0 3rem 1.5rem;
}
@media (min-width: 768px) {
    footer { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}
.footer-links { display: flex; gap: 1.5rem; order: 2; }
@media (min-width: 768px) { .footer-links { order: 1; } }

.footer-links a, .footer-copy {
    font-family: 'DM Mono', monospace;
    font-size: .65rem; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: .1em;
    text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--black); }
.footer-copy { order: 1; }
@media (min-width: 768px) { .footer-copy { order: 2; } }


/* ══════════════════════════════════════════════════════════════
   STARTSEITE — Content Grid
══════════════════════════════════════════════════════════════ */

.content-grid {
    display: grid; grid-template-columns: 1fr;
    gap: 3rem; border-top: 4px solid var(--black);
    margin: auto 1.5rem 3rem;
    padding: 5rem 0 0;
    background: rgba(255,255,255,.5);
    backdrop-filter: blur(4px);
}
@media (min-width: 768px) {
    .content-grid { grid-template-columns: repeat(3,1fr); margin: auto 3rem 3rem; }
}

.col-label {
    font-family: 'DM Mono', monospace;
    font-size: .65rem; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: .15em; margin-bottom: 1rem;
}
.col-text { font-weight: 600; line-height: 1.4; }
.col-cta  { display: flex; flex-direction: column; }

.cta-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; background: var(--black); color: var(--white);
    padding: 1.5rem; border: none; cursor: pointer;
    text-align: left; text-decoration: none;
    transition: background-color .3s ease; margin-top: auto;
}
.cta-btn:hover { background: var(--red); }
.cta-btn-label { font-weight: 700; font-size: 1.1rem; display: block; }
.cta-btn-sub {
    font-family: 'DM Mono', monospace;
    font-size: .6rem; text-transform: uppercase;
    letter-spacing: .15em; opacity: .6;
    margin-top: .25rem; display: block;
}
.cta-btn svg { flex-shrink: 0; transition: transform .2s; }
.cta-btn:hover svg { transform: scale(1.1); }


/* ══════════════════════════════════════════════════════════════
   STARTSEITE — Gatekeeper Modal
══════════════════════════════════════════════════════════════ */

.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 50;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px); padding: 1rem;
}
.modal-overlay.is-open { display: flex; }

.modal-box {
    background: var(--white); border: 2px solid var(--black);
    width: 100%; max-width: 32rem; padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.2);
    position: relative; max-height: 90vh; overflow-y: auto;
}

.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; cursor: pointer;
    color: var(--gray-400); line-height: 0; padding: .25rem;
    transition: color .2s;
}
.modal-close:hover { color: var(--black); }

.modal-view { display: none; }
.modal-view.is-active { display: block; }

/* Progress */
.progress-bar {
    height: 2px; background: var(--gray-100);
    margin-bottom: 2rem; position: relative; overflow: hidden;
}
.progress-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: var(--black); transition: width .4s ease;
}

/* Modal Typografie */
.modal-h2 {
    font-size: 1.5rem; font-weight: 800;
    letter-spacing: -0.02em; margin-bottom: .5rem;
}
.modal-sub {
    font-size: .875rem; color: var(--gray-500);
    line-height: 1.6; margin-bottom: 2rem;
}

/* Formularfelder */
.field { margin-bottom: 1.25rem; }
.field-label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: .65rem; text-transform: uppercase;
    letter-spacing: .1em; margin-bottom: .4rem;
    color: var(--gray-600);
}
.field-label .optional { opacity: .5; }

.select-wrapper { position: relative; }
.select-wrapper::after {
    content: ''; position: absolute;
    right: 1rem; top: 50%; transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--gray-500);
    pointer-events: none;
}

.field-select, .field-textarea {
    width: 100%; background: var(--gray-50);
    border: 1px solid var(--gray-300);
    padding: .875rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: .875rem; color: var(--black);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: none; -webkit-appearance: none;
}
.field-select:focus, .field-textarea:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 1px var(--black);
}
.field-textarea { resize: vertical; min-height: 90px; }

.char-count {
    font-family: 'DM Mono', monospace;
    font-size: .6rem; color: var(--gray-400);
    text-align: right; margin-top: .25rem;
}
.char-count.near-limit { color: var(--red); }

/* Buttons */
.btn-primary {
    width: 100%; background: var(--black); color: var(--white);
    border: none; padding: 1rem;
    font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700;
    cursor: pointer; display: flex;
    justify-content: center; align-items: center; gap: .5rem;
    transition: background-color .2s; margin-top: 1.5rem;
}
.btn-primary:hover { background: var(--gray-800); }

.btn-ghost {
    background: none; border: none;
    font-family: 'Inter', sans-serif; font-size: .75rem;
    color: var(--gray-400); cursor: pointer;
    text-decoration: underline; text-underline-offset: 4px;
    transition: color .2s; width: 100%;
    text-align: center; padding: .25rem 0;
}
.btn-ghost:hover { color: var(--black); }

.divider { border: none; border-top: 1px solid var(--gray-100); margin: 1.5rem 0; }

/* Low Priority Badge + Button */
.badge {
    display: inline-block; background: #fee2e2; color: #991b1b;
    font-family: 'DM Mono', monospace; font-size: .6rem;
    font-weight: 700; text-transform: uppercase;
    letter-spacing: .15em; padding: .25rem .5rem; margin-bottom: 1rem;
}
.btn-secondary {
    display: block; width: 100%;
    background: var(--gray-200); color: var(--gray-800);
    border: none; padding: 1rem;
    font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700;
    cursor: pointer; text-align: center;
    text-decoration: none; transition: background-color .2s;
}
.btn-secondary:hover { background: var(--gray-300); }


/* ─── Text-Input (Name, E-Mail) ─── */
.field-input {
    width: 100%; background: var(--gray-50);
    border: 1px solid var(--gray-300);
    padding: .875rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: .875rem; color: var(--black);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.field-input:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 1px var(--black);
}
.field-input.is-error { border-color: var(--red); }

/* ─── Inline-Fehlermeldungen ─── */
.field-error {
    font-family: 'DM Mono', monospace;
    font-size: .65rem; color: var(--red);
    font-weight: 700; margin-top: .35rem;
    display: none;
}
.field-error.is-visible { display: block; }

/* ─── Button-States: Loading & Success ─── */
.btn-primary.is-loading {
    opacity: .65;
    pointer-events: none;
    cursor: not-allowed;
}
.btn-primary.is-success { background: var(--green); }

/* ─── Success View ─── */
.modal-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px; height: 64px;
    border: 2px solid var(--black);
    margin-bottom: 1.5rem;
    color: var(--black);
}

/* ══════════════════════════════════════════════════════════════
   LEGAL-SEITEN — gemeinsame Struktur
══════════════════════════════════════════════════════════════ */

main {
    padding: 2rem 3rem 4rem;
    max-width: 90rem; margin: 0 auto;
    width: 100%; flex-grow: 1;
}

.content-wrapper {
    border-top: 4px solid var(--black);
    background: rgba(255,255,255,.5);
    backdrop-filter: blur(4px);
}

.legal-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem 3rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--gray-200);
}
.legal-section:last-child { border-bottom: none; }

@media (min-width: 768px) {
    .legal-section { grid-template-columns: 4fr 8fr; gap: 2rem 3rem; }
}

.section-label {
    font-family: 'DM Mono', monospace;
    font-size: .65rem; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: .15em;
}
@media (min-width: 768px) { .section-label { position: sticky; top: 1.5rem; } }

/* Datenschutz */
.legal-body { color: var(--gray-800); }
.legal-body > * + * { margin-top: 2rem; }

.legal-body h4 {
    font-weight: 700; font-size: 1.1rem;
    color: var(--black); margin-bottom: .5rem;
}
.legal-body p { line-height: 1.7; font-size: .975rem; }
.legal-body p + p { margin-top: .75rem; }

.legal-body ul {
    list-style: disc; padding-left: 1.25rem;
    margin: .5rem 0; line-height: 1.7; font-size: .975rem;
}
.legal-body ul li + li { margin-top: .25rem; }

.legal-body a {
    color: var(--black);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}
.legal-body a:hover { color: var(--red); }

/* Adressblock (Datenschutz) */
.address-block {
    font-family: 'DM Mono', monospace;
    font-size: .875rem; line-height: 1.8;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    display: inline-block;
    margin-top: .5rem;
}
.address-block a { font-family: 'DM Mono', monospace; }

/* Widerspruchs-Box (Datenschutz) */
.notice-box {
    background: var(--gray-50);
    border-left: 4px solid var(--black);
    padding: 1.5rem;
}
.notice-box h4 {
    font-size: .75rem !important;
    text-transform: uppercase;
    letter-spacing: .1em; margin-bottom: 1rem;
}
.notice-box p {
    font-size: .875rem !important;
    font-weight: 700; text-transform: uppercase;
    line-height: 1.6 !important;
}
.notice-box p + p { margin-top: 1rem; }

/* Impressum */
.legal-body--compact {
    font-size: 1.05rem; font-weight: 500;
    line-height: 1.7;
}
.legal-body--compact p + p { margin-top: .35rem; }

.legal-body--compact a {
    color: var(--black);
    text-decoration: none;
    transition: color .2s;
}
.legal-body--compact a:hover { color: var(--red); }

.legal-body--compact .meta {
    font-size: .875rem; color: var(--gray-500);
    margin-bottom: .35rem;
}
.legal-body--compact h4 {
    font-weight: 700; font-size: 1rem;
    margin-bottom: .5rem; margin-top: 1.5rem;
}
.legal-body--compact h4:first-child { margin-top: 0; }

.legal-body--compact .subdued {
    color: var(--gray-600); font-size: .975rem;
}
