/* ============================================================
   Editorial Hero — einfachgrün
   .page-hero is the reusable pattern; .hero is the home variant.
   ============================================================ */

/* ---------- Generic page-hero (used everywhere except home) ---------- */
.page-hero {
    position: relative;
    padding: 80px 0 56px;
    border-bottom: 1px solid var(--border-subtle);
    isolation: isolate;
    overflow: clip;       /* keep the ambient glow inside the hero */
    max-width: 100%;
}
.page-hero--narrow { max-width: 760px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.page-hero--center { text-align: center; }

.page-hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brand-primary);
    margin: 0 0 22px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.page-hero__eyebrow::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 12px var(--brand-primary-glow);
    flex-shrink: 0;
}

.page-hero__title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--text-primary);
    text-wrap: balance;
    word-break: normal;
    overflow-wrap: anywhere;   /* break long compound words as a last resort */
    hyphens: auto;
    max-width: 100%;
}
.page-hero--center .page-hero__title { margin-left: auto; margin-right: auto; }

.page-hero__title em {
    font-style: italic;
    font-weight: 400;
    color: var(--brand-primary);
}

.page-hero__lede {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 60ch;
    margin: 0;
    text-wrap: pretty;
}
.page-hero--center .page-hero__lede { margin-left: auto; margin-right: auto; }

.page-hero__meta {
    margin-top: 22px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.page-hero--center .page-hero__meta { justify-content: center; }
.page-hero__meta strong { color: var(--text-primary); font-weight: 500; }

@media (max-width: 720px) {
    .page-hero { padding: 48px 0 36px; }
    .page-hero__title { font-size: clamp(28px, 9vw, 40px); }
}

/* ============================================================
   Home — wide hero with optional aside meta column
   ============================================================ */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 64px;
    align-items: end;
    padding: 88px 0 96px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    isolation: isolate;
    overflow: clip;
    max-width: 100%;
}

.hero__inner { min-width: 0; max-width: 880px; }

.hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brand-primary);
    margin: 0 0 28px;
    font-weight: 500;
    display: inline-flex; align-items: center; gap: 10px;
}
.hero__eyebrow::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 12px var(--brand-primary-glow);
    flex-shrink: 0;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6.4vw, 80px);
    line-height: 1.0;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin: 0 0 28px;
    color: var(--text-primary);
    text-wrap: balance;
    word-break: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
    max-width: 100%;
}
.hero__title em {
    font-style: italic;
    color: var(--brand-primary);
    font-weight: 400;
}

.hero__lede {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 56ch;
    margin: 0 0 36px;
    letter-spacing: -0.005em;
    text-wrap: pretty;
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__cta { text-decoration: none; box-shadow: var(--shadow-brand); }

.hero__meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}
.hero__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-surface);
    font-size: 12px;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}
.hero__meta-row span { color: var(--text-muted); }
.hero__meta-row strong { color: var(--text-primary); font-weight: 500; }

/* ============================================================
   Section title
   ============================================================ */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin: 0 0 40px;
    color: var(--text-primary);
}
.section-title em { font-style: italic; font-weight: 400; color: var(--brand-primary); }

/* ============================================================
   Features grid
   ============================================================ */
.features { padding: 80px 0; }

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
}
.feature {
    background: var(--bg-surface);
    padding: 36px 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: background-color 240ms;
    position: relative;
}
.feature::before {
    content: "";
    position: absolute;
    top: 0; left: 30px;
    width: 24px; height: 2px;
    background: var(--brand-primary);
    opacity: 0;
    transition: opacity 240ms;
}
.feature:hover { background: var(--bg-elevated); }
.feature:hover::before { opacity: 1; }
.feature__num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--brand-primary);
    letter-spacing: 0.16em;
    font-weight: 500;
}
.feature__title {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.015em;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    hyphens: auto;
}
.feature__body {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}
.feature code {
    font-size: 12.5px;
    background: var(--bg-elevated);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--text-primary);
}

/* ============================================================
   Footnote
   ============================================================ */
.footnote {
    padding: 60px 0 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}
.footnote__rule { width: 32px; height: 1px; background: var(--border-default); }
.footnote code {
    color: var(--text-secondary);
    font-size: 12px;
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ============================================================
   Auth shell
   ============================================================ */
.auth-shell {
    max-width: 460px;
    margin: 60px auto 80px;
    padding: 0 24px;
}
.auth-shell .page-hero {
    padding: 24px 0 36px;
    border-bottom: 0;
    text-align: center;
}
.auth-shell .page-hero__title {
    font-size: clamp(28px, 5vw, 36px);
    margin-left: auto; margin-right: auto;
    max-width: 18ch;
}
.auth-shell .page-hero__lede {
    font-size: 15.5px;
    margin-left: auto; margin-right: auto;
    max-width: 40ch;
}
.auth-shell .auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
}
.auth-shell__footer {
    text-align: center;
    margin-top: 22px;
    color: var(--text-secondary);
    font-size: 14.5px;
}

/* ============================================================
   Article hero (Blog/Post)
   ============================================================ */
.article-hero {
    max-width: 760px;
    margin: 0 auto;
    padding: 64px 24px 32px;
    position: relative;
    isolation: isolate;
    overflow: clip;
}
.article-hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brand-primary);
    margin: 0 0 18px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.article-hero__eyebrow::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 12px var(--brand-primary-glow);
    flex-shrink: 0;
}
.article-hero__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.2vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.022em;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--text-primary);
    text-wrap: balance;
    overflow-wrap: anywhere;
    hyphens: auto;
}
.article-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ============================================================
   Responsive — home grid collapses
   ============================================================ */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 48px 0 56px;
    }
    .features__grid { grid-template-columns: 1fr; }
    .hero__meta { max-width: 100%; }
    .hero__title { font-size: clamp(32px, 8vw, 52px); }
    .hero__lede  { font-size: 16.5px; }
}

@media (max-width: 480px) {
    .hero  { padding: 36px 0 44px; }
    .hero__title { font-size: clamp(28px, 9vw, 40px); }
    .page-hero { padding: 36px 0 32px; }
    .page-hero__title { font-size: clamp(26px, 8vw, 36px); }
    .article-hero { padding: 44px 20px 24px; }
    .article-hero__title { font-size: clamp(24px, 7.5vw, 34px); }
}
