/* ============================================================
   NKTD Marketing — shared primitives
   Global, but namespaced under .mk-root so nothing leaks into
   the Bootstrap-styled Identity / portal pages.
   ============================================================ */

html { scroll-behavior: smooth; }

/* Root wrapper applied by MarketingLayout. Establishes the
   marketing visual context (bg, body font, colour). */
.mk-root {
    background: var(--c-sand);
    color: var(--c-ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    /* clip (not hidden) contains horizontal overflow WITHOUT making .mk-root a
       scroll container — hidden would force overflow-y to compute to auto and
       break position:sticky on the header + sub-nav. */
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.mk-root ::selection { background: var(--c-ink); color: var(--c-sand); }

/* Border-box everywhere in the marketing context — so width:100% + padding
   never overflows (fixes full-width CTA/hero buttons on mobile). */
.mk-root *, .mk-root *::before, .mk-root *::after { box-sizing: border-box; }

@keyframes nktd-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes nktd-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

/* — Layout helpers — */
.mk-container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.mk-section { padding-block: var(--section-y); }

/* — Typography defaults inside the marketing context — */
.mk-root h1, .mk-root h2, .mk-root h3, .mk-root h4 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    margin: 0;
    /* Long German compounds (Datenschutzerklärung, …) must wrap, not clip,
       on narrow screens. hyphens:auto uses the page's lang="de". */
    overflow-wrap: break-word;
    hyphens: auto;
}
.mk-root p { margin: 0; overflow-wrap: break-word; }
/* Links inherit text colour — EXCEPT buttons, which set their own
   (:where keeps this reset at zero specificity so .mk-btn colours win). */
.mk-root a { text-decoration: none; }
.mk-root a:where(:not(.mk-btn)) { color: inherit; }

/* Header + sub-nav are no longer sticky, so anchor jumps just need a little
   breathing room at the top — there's no sticky chrome to clear. */
.mk-root section[id], .mk-root main[id] { scroll-margin-top: 24px; }

/* Display headings — default scale matches the inner-page mockups.
   The homepage opts into a larger scale via the .mk-home wrapper (below). */
.mk-h1 { font-weight: 700; font-size: clamp(44px, 5.4vw, 76px); line-height: 0.98; letter-spacing: -0.025em; text-wrap: balance; }
.mk-h2 { font-weight: 700; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.03; }
.mk-h3 { font-weight: 700; font-size: 23px; letter-spacing: -0.01em; }
.mk-lead { font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.55; color: var(--c-ink-3); }

/* Homepage display scale (larger than the inner pages, per its mockup). */
.mk-home .mk-h1 { font-size: clamp(46px, 6vw, 84px); line-height: 0.97; }
.mk-home .mk-h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.02; }
@media (min-width: 881px) { .mk-home .mk-section { padding-block: 108px; } }

/* — Eyebrow / section kicker (mono, accent, uppercase) — */
.mk-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}
.mk-eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--accent);
}
.mk-eyebrow.mk-eyebrow--plain { gap: 0; }
.mk-eyebrow.mk-eyebrow--plain::before { display: none; }

/* — Mono utility — */
.mk-mono { font-family: var(--font-mono); }

/* — Accent text — */
.mk-accent { color: var(--accent); }

/* — Buttons — */
.mk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15.5px;
    font-weight: 600;
    padding: 16px 26px;
    border-radius: var(--r-btn);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
    white-space: nowrap;
}
.mk-btn .mk-arrow { font-family: var(--font-mono); }
.mk-btn--accent { background: var(--accent); color: var(--accent-ink); }
.mk-btn--accent:hover { background: var(--c-ink); color: var(--c-on-dark); }
.mk-btn--dark { background: var(--c-ink); color: var(--c-on-dark); font-size: 14px; padding: 11px 18px; }
.mk-btn--dark:hover { background: var(--accent); }
.mk-btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--line-strong); }
.mk-btn--ghost:hover { border-color: var(--c-ink); }
/* Utility: fully hide an element (kept in the DOM). Used for the Kundenportal
   button until the portal exists to link to. */
.mk-hidden { display: none !important; }
.mk-btn--block { width: 100%; }

/* On dark sections the accent button inverts to cream */
.mk-on-dark .mk-btn--accent:hover { background: var(--c-sand); color: var(--c-ink); }

/* — Inline "learn more" link with accent underline — */
.mk-textlink {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--c-ink);
    border-bottom: 1px solid var(--accent);
    padding-bottom: 3px;
}
.mk-textlink .mk-arrow { color: var(--accent); }

/* — Card surface — */
.mk-card {
    background: var(--c-surface);
    border: 1px solid var(--line-2);
    border-radius: var(--r-card);
}

/* — Status pill — */
.mk-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--r-pill);
}
.mk-pill--online { color: var(--c-success); background: var(--c-success-tint); }
.mk-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mk-pill--online .mk-pill__dot { animation: nktd-pulse 2s ease-in-out infinite; }

/* — Decorative masked grid overlay (hero backdrop) — */
.mk-grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(26, 24, 19, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 24, 19, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(120% 90% at 70% 30%, #000 30%, transparent 78%);
    mask-image: radial-gradient(120% 90% at 70% 30%, #000 30%, transparent 78%);
}

/* — Dark section context — */
.mk-on-dark { background: var(--c-ink); color: var(--c-on-dark); }
.mk-on-dark .mk-h2, .mk-on-dark .mk-h3 { color: var(--c-on-dark); }
.mk-on-dark .mk-lead { color: var(--c-on-dark-62); }

/* — Section header block (eyebrow + h2 + lead) — */
.mk-section-head { max-width: 640px; margin-bottom: 52px; }
.mk-section-head .mk-eyebrow { margin-bottom: 18px; }
.mk-section-head > .mk-h2 { margin: 0 0 16px; }

/* — Numbered info card (mono numeral + title + body) — */
.mk-numcard {
    background: var(--c-surface);
    border: 1px solid var(--line-2);
    border-radius: var(--r-card);
    padding: 32px;
}
.mk-numcard__num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-bottom: 18px; }
.mk-numcard__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 0 0 10px; }
.mk-numcard__body { font-size: 15px; line-height: 1.55; color: var(--c-muted); }

/* — Check / feature row (accent tick + title + body) — */
.mk-checkrow { display: flex; gap: 16px; align-items: flex-start; }
.mk-checkrow__tick {
    flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent); color: var(--accent-ink);
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.mk-checkrow__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.mk-checkrow__body { font-size: 15px; line-height: 1.55; color: var(--c-muted); }
.mk-on-dark .mk-checkrow__body { color: var(--c-on-dark-58); }

/* — Skip-to-content link (visible only on keyboard focus) — */
.mk-skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--c-ink);
    color: var(--c-on-dark);
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--r-btn);
    transition: top .15s ease;
}
.mk-skip:focus { top: 12px; }

/* — Keyboard focus indicator (reuses the accent; no new colours) — */
.mk-root a:focus-visible,
.mk-root .mk-btn:focus-visible,
.mk-root button:focus-visible,
.mk-root summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}
.mk-on-dark a:focus-visible,
.mk-on-dark .mk-btn:focus-visible,
.mk-on-dark summary:focus-visible { outline-color: var(--c-on-dark); }
.mk-root main:focus { outline: none; }

/* — System-page centered content (authored inside <SystemScreen>; global
   because a component's scoped CSS does not reach its ChildContent) — */
.sys__eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; margin-bottom: 18px; }
.sys__code { font-family: var(--font-display); font-weight: 800; font-size: clamp(96px, 16vw, 168px); line-height: 0.9; letter-spacing: -0.04em; color: var(--accent); margin-bottom: 8px; }
.sys__code--ink { color: var(--c-ink); }
.sys__code__accent { color: var(--accent); }
/* .mk-root-scoped so these win over the .mk-root p / h margin reset
   (EmptyLayout wraps the system pages in .mk-root). */
.mk-root .sys__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 14px; }
.mk-root .sys__lead { font-size: 17px; line-height: 1.55; color: var(--c-ink-3); margin: 0 0 30px; }
.sys--dark .sys__lead { color: var(--c-on-dark-62); }
.sys__actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.sys__meta { font-family: var(--font-mono); font-size: 12px; color: var(--c-muted-2); max-width: 100%; overflow-wrap: anywhere; }
.sys--dark .sys__meta { color: var(--c-on-dark-40); }
.sys__icon { width: 96px; height: 96px; margin: 0 auto 26px; display: flex; align-items: center; justify-content: center; }
