/* ==========================================================================
   PBC GmbH – Design Foundation
   Tokens, Reset, Typografie, Raster
   ========================================================================== */

:root {
    /* --- Marke --- */
    --signal: #e5171b;
    --signal-dark: #b31114;
    --signal-tint: #fef2f2;

    /* --- Neutral (Werkstatt-Anthrazit) --- */
    --ink: #101113;
    --ink-2: #2b2d31;
    --ink-3: #545454;
    --ink-4: #7c7f85;
    --ink-5: #a8abb1;

    /* --- Flächen --- */
    --paper: #ffffff;
    --paper-2: #f7f7f6;
    --paper-3: #efefed;

    /* --- Linien (Hairline / Baustellen-Raster) --- */
    --rule: #e2e2df;
    --rule-strong: #cfcfcb;

    /* --- Typo --- */
    --font-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo,
        monospace;

    /* --- Rhythmus --- */
    --gutter: clamp(1.25rem, 4vw, 3.5rem);
    --measure: 1440px;
    --section-y: clamp(4.5rem, 9vw, 9rem);

    /* --- Bewegung --- */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 0.55s;

    /* --- Header --- */
    --header-h: 84px;
    --alert-h: 40px;
}

@media (max-width: 900px) {
    :root {
        --header-h: 68px;
        --alert-h: 0px;
    }
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-2);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-feature-settings: "ss01", "cv11";
}

img,
svg,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

::selection {
    background: var(--signal);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
}

/* ==========================================================================
   Typografie
   ========================================================================== */

h1,
h2,
h3,
h4 {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

/* Display – Hero */
.t-display {
    font-size: clamp(2.65rem, 7.4vw, 6.25rem);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-transform: uppercase;
}

/* Section-Headline */
.t-h2 {
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.t-h3 {
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    letter-spacing: -0.03em;
}

.t-h4 {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    letter-spacing: -0.02em;
}

/* Lead-Text */
.t-lead {
    font-size: clamp(1.075rem, 1.55vw, 1.375rem);
    line-height: 1.55;
    color: var(--ink-3);
    max-width: 62ch;
    font-weight: 350;
}

.t-body {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink-3);
    max-width: 68ch;
}

.t-small {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ink-4);
}

/* Kapitel-Label „01 / SCHADENSANIERUNG“ */
.t-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-4);
}

.t-kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--signal);
}

.t-kicker--plain::before {
    display: none;
}

.t-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--signal);
}

.u-red {
    color: var(--signal);
}

.u-mark {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

/* Handwerker-Unterstreichung: dicker Pinselstrich */
.u-mark::after {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: 0.07em;
    height: 0.28em;
    background: var(--signal);
    opacity: 0.22;
    transform: skewX(-14deg);
    z-index: -1;
}

/* ==========================================================================
   Raster
   ========================================================================== */

.shell {
    width: 100%;
    max-width: var(--measure);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.shell--narrow {
    max-width: 900px;
}

.shell--wide {
    max-width: 1680px;
}

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

.section--tight {
    padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section--paper2 {
    background: var(--paper-2);
}

.section--ink {
    background: var(--ink);
    color: #fff;
}

.section--ink h1,
.section--ink h2,
.section--ink h3,
.section--ink h4 {
    color: #fff;
}

.section--ink .t-lead,
.section--ink .t-body {
    color: rgba(255, 255, 255, 0.72);
}

/* Sichtbares Baustellen-Raster als Hintergrund */
.grid-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(
        90deg,
        var(--rule) 0 1px,
        transparent 1px 100%
    );
    background-size: 25% 100%;
    opacity: 0.55;
}

.section--ink .grid-lines {
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.08) 0 1px,
        transparent 1px 100%
    );
    opacity: 1;
}

/* Section-Kopf */
.sec-head {
    display: grid;
    gap: clamp(1rem, 2vw, 1.75rem);
    margin-bottom: clamp(2.5rem, 4.5vw, 4.5rem);
}

.sec-head--split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: clamp(1.5rem, 4vw, 4rem);
}

@media (max-width: 900px) {
    .sec-head--split {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

.hr-rule {
    height: 1px;
    background: var(--rule);
    border: 0;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.u-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.u-nowrap {
    white-space: nowrap;
}

.u-center {
    text-align: center;
}

.u-center .t-lead,
.u-center .t-body {
    margin-inline: auto;
}

.u-stack {
    display: grid;
    gap: 1rem;
}

.u-stack-lg {
    display: grid;
    gap: 2rem;
}

/* Skip-Link */
.skip {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    background: var(--ink);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: top 0.2s;
}

.skip:focus {
    top: 1rem;
}
