/* ============================================================
   Selbst gehostete Schriften — keine externen Requests.
   Subsets: latin + latin-ext (deckt Deutsch/Westeuropa ab).
   Quelle: Google Fonts, SIL Open Font License 1.1.
   ============================================================ */

/* IBM Plex Mono — latin */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono — latin-ext */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/ibm-plex-mono-latin-ext-400.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono — latin */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/ibm-plex-mono-latin-500.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono — latin-ext */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/ibm-plex-mono-latin-ext-500.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono — latin */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/ibm-plex-mono-latin-600.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono — latin-ext */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/ibm-plex-mono-latin-ext-600.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Sans — latin */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/ibm-plex-sans-latin-400-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans — latin-ext */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/ibm-plex-sans-latin-ext-400-700.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Newsreader — latin */
@font-face {
    font-family: 'Newsreader';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/newsreader-latin-400-italic.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Newsreader — latin-ext */
@font-face {
    font-family: 'Newsreader';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/newsreader-latin-ext-400-italic.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Newsreader — latin */
@font-face {
    font-family: 'Newsreader';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/newsreader-latin-400-600.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Newsreader — latin-ext */
@font-face {
    font-family: 'Newsreader';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/newsreader-latin-ext-400-600.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================
   primeRAG — "Akte & Kanzlei"
   Editorial legal-tech: warm paper, deep ink, wax-seal red,
   brass. Sections alternate paper/ink so the page reads as a
   set of distinct bands rather than one uniform surface.
   ============================================================ */
:root {
    /* Base materials */
    --paper:          #f2efe8;
    --paper-raised:   #fbfaf6;
    --paper-sunk:     #e8e4da;
    --ink-900:        #0a1119;
    --ink-850:        #0f1a25;
    --ink-800:        #152331;
    --ink-750:        #1d3040;

    /* Signal colours */
    --seal:           #8f2438;   /* wax-seal red — accent on paper */
    --seal-bright:    #ac2c44;
    --brass:          #c69a4b;   /* accent on ink */
    --brass-bright:   #dbb164;

    /* Type */
    --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
    --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

    --radius:       3px;
    --radius-lg:    5px;

    --transition-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-raised: 0 1px 2px rgba(10, 17, 25, 0.06), 0 8px 24px -12px rgba(10, 17, 25, 0.25);
    --shadow-lift:   0 2px 4px rgba(10, 17, 25, 0.08), 0 20px 40px -20px rgba(10, 17, 25, 0.4);
}

/* --- Band tokens: every component reads these, so flipping a
       section from paper to ink needs no component overrides. --- */
body,
.band-paper {
    --surface:        var(--paper);
    --surface-raised: var(--paper-raised);
    --surface-sunk:   var(--paper-sunk);
    --text:           #131c26;
    --text-dim:       #56636f;
    --text-faint:     #7d8893;
    --rule:           rgba(19, 28, 38, 0.14);
    --rule-strong:    rgba(19, 28, 38, 0.32);
    --accent:         var(--seal);
    --accent-bright:  var(--seal-bright);
    --on-accent:      #fdf8f1;
}

.band-ink {
    --surface:        var(--ink-850);
    --surface-raised: var(--ink-800);
    --surface-sunk:   var(--ink-900);
    --text:           #ece7dc;
    --text-dim:       #98a6b4;
    --text-faint:     #6d7d8c;
    --rule:           rgba(236, 231, 220, 0.14);
    --rule-strong:    rgba(236, 231, 220, 0.34);
    --accent:         var(--brass);
    --accent-bright:  var(--brass-bright);
    --on-accent:      #0f1a25;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--text);
}

/* ============================ Bands ============================ */
.band {
    position: relative;
    background: var(--surface);
    color: var(--text);
    border-top: 1px solid var(--rule);
}

/* Blueprint grid + grain, only where the ink is dark enough to carry it */
.band-ink::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(236, 231, 220, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(236, 231, 220, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
    pointer-events: none;
}

.band > * {
    position: relative;
    z-index: 1;
}

.shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.section {
    padding: 7rem 0;
}

/* ========================= Navigation ========================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    background: rgba(15, 26, 37, 0.72);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(236, 231, 220, 0.1);
    transition: padding var(--transition-medium), background var(--transition-medium);
}

.nav.scrolled {
    padding: 0.75rem 0;
    background: rgba(10, 17, 25, 0.94);
    border-bottom-color: rgba(198, 154, 75, 0.28);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    text-decoration: none;
    color: #ece7dc;
}

.nav-logo-mark {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--brass);
    border: 1px solid rgba(198, 154, 75, 0.45);
    border-radius: var(--radius);
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    list-style: none;
}

.nav-links a {
    position: relative;
    color: #98a6b4;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.nav-links a:hover {
    color: #ece7dc;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-cta {
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: var(--brass);
    border: 1px solid rgba(198, 154, 75, 0.5);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-cta:hover {
    background: var(--brass);
    color: var(--ink-900);
}

/* =========================== Hero =========================== */
.hero {
    padding: 11rem 0 0;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 4.5rem;
    align-items: center;
    padding-bottom: 5rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.hero .eyebrow {
    margin-bottom: 1.75rem;
}

.hero h1 {
    font-size: clamp(2.75rem, 5.2vw, 4.25rem);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin-bottom: 1.6rem;
}

.hero h1 em {
    font-style: italic;
    color: var(--brass);
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 34rem;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Staggered entrance */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.15s; }
.reveal-3 { animation-delay: 0.25s; }
.reveal-4 { animation-delay: 0.35s; }
.reveal-5 { animation-delay: 0.5s; }

@keyframes rise {
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------- Buttons --------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.6rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
}

.btn-primary svg {
    transition: transform var(--transition-fast);
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--rule-strong);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ------------------- Hero document mock panel ------------------- */
.hero-panel {
    background: linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 100%);
    border: 1px solid rgba(236, 231, 220, 0.13);
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    transform: perspective(1400px) rotateY(-3.5deg) rotateX(1.5deg);
}

.panel-chrome {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.15rem;
    border-bottom: 1px solid rgba(236, 231, 220, 0.1);
    background: rgba(236, 231, 220, 0.03);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7d8893;
}

.panel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brass);
    box-shadow: 0 0 0 3px rgba(198, 154, 75, 0.16);
    animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

.panel-body {
    padding: 1.5rem 1.4rem 1.6rem;
}

.panel-query {
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.45;
    color: #ece7dc;
    padding-left: 0.9rem;
    border-left: 2px solid var(--brass);
    margin-bottom: 1.1rem;
}

.panel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: #6d7d8c;
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px dashed rgba(236, 231, 220, 0.14);
}

.panel-meta span {
    white-space: nowrap;
}

.panel-meta b {
    color: var(--brass);
    font-weight: 500;
}

.panel-answer {
    font-size: 0.9rem;
    line-height: 1.72;
    color: #b9c4cf;
    margin-bottom: 1.4rem;
}

.panel-answer mark {
    background: rgba(198, 154, 75, 0.16);
    color: #ece7dc;
    padding: 0.1em 0.25em;
    border-radius: 2px;
}

.panel-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.src {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: #98a6b4;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(236, 231, 220, 0.16);
    border-radius: 2px;
}

.src::before {
    content: '§ ';
    color: var(--brass);
}

/* ------------------------- Ledger stats ------------------------- */
.hero-ledger {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--rule);
}

.stat {
    padding: 2.25rem 2rem;
    border-right: 1px solid var(--rule);
}

.stat:last-child {
    border-right: none;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 400;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    line-height: 1.5;
}

/* ======================= Section headers ======================= */
.section-header {
    max-width: 46rem;
    margin-bottom: 3.75rem;
}

.section-header.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-header.centered .eyebrow::before {
    display: none;
}

.section-header .eyebrow {
    margin-bottom: 1.1rem;
}

.section h2 {
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    font-weight: 400;
    margin-bottom: 0.9rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 40rem;
}

.section-header.centered .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* ========================== Feature grid ========================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.feature-card {
    grid-column: span 2;
    background: var(--surface);
    padding: 2.25rem 2rem 2.5rem;
    transition: background var(--transition-medium);
    position: relative;
}

/* Deliberately uneven: the first card takes half the row */
.feature-card.wide {
    grid-column: span 3;
}

.feature-card.wide + .feature-card {
    grid-column: span 3;
}

.feature-card:hover {
    background: var(--surface-raised);
}

.feature-index {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--accent);
    display: block;
    margin-bottom: 1.5rem;
}

.feature-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 1.1rem;
    display: block;
    filter: saturate(0.85);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.94rem;
    line-height: 1.7;
    max-width: 34rem;
}

/* ========================= Integrations ========================= */
.integrations-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.integration-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.5rem 1.1rem 1.2rem;
    background: var(--surface-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.integration-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.integration-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.integration-name {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text);
}

.integration-item.is-new .integration-name::after {
    content: 'NEU';
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--on-accent);
    background: var(--accent);
    padding: 0.12rem 0.32rem;
    border-radius: 2px;
    margin-left: 0.6rem;
    vertical-align: 0.12em;
}

/* =================== Querverweis auf primeAGENTS =================== */
.xref {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    padding: 1.5rem 1.75rem;
    background: var(--surface-sunk);
    border: 1px solid var(--rule);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius);
}

.xref p {
    flex: 1 1 30rem;
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.xref strong {
    color: var(--text);
    font-weight: 600;
}

.xref-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.xref-link:hover {
    border-bottom-color: var(--accent);
}

/* =========================== Use cases =========================== */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.use-case-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 2rem 1.85rem;
    box-shadow: var(--shadow-raised);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium), border-color var(--transition-medium);
}

.use-case-card:hover {
    transform: translateY(-4px);
    border-color: var(--rule-strong);
    box-shadow: var(--shadow-lift);
}

.use-case-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--rule);
}

.use-case-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--surface-sunk);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.use-case-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
}

.use-case-card > p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.use-case-bullets {
    list-style: none;
    margin-top: auto; /* pin to the card floor so uneven cards still align */
}

.use-case-bullets li {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    color: var(--text-faint);
    font-size: 0.86rem;
    line-height: 1.6;
    padding: 0.4rem 0;
    border-top: 1px dotted var(--rule);
}

.use-case-bullets li::before {
    content: '—';
    color: var(--accent);
    flex-shrink: 0;
}

/* ============================ Security ============================ */
.security-wrapper {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4.5rem;
    align-items: center;
}

.security-box {
    background:
        radial-gradient(circle at 30% 0%, rgba(198, 154, 75, 0.12) 0%, transparent 60%),
        var(--surface-sunk);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 2.75rem 2.5rem;
}

.hardware-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: var(--accent);
    padding-bottom: 0.9rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid var(--rule);
}

.hardware-model {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hardware-badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border-radius: 2px;
    margin-bottom: 2.25rem;
}

.security-box-icon {
    font-size: 3.25rem;
    line-height: 1;
    text-align: right;
    opacity: 0.9;
}

.security-content h2 {
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    font-weight: 400;
    margin: 0.9rem 0 1rem;
}

.security-content > p {
    color: var(--text-dim);
    font-size: 1.02rem;
    margin-bottom: 2.25rem;
    max-width: 38rem;
}

.security-features {
    display: grid;
    gap: 1.5rem;
}

.security-feature {
    display: flex;
    gap: 1.1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

.security-feature-icon {
    font-size: 1.15rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.security-feature-text h4 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 0.3rem;
}

.security-feature-text p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* =========================== Deployment =========================== */
.deployment-wrapper {
    max-width: 60rem;
    margin: 0 auto;
}

.deployment-toggle {
    display: inline-flex;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    padding: 3px;
    margin: 0 auto 2.75rem;
    gap: 3px;
}

.toggle-shell {
    display: flex;
    justify-content: center;
}

.deployment-toggle-btn {
    padding: 0.65rem 1.75rem;
    background: transparent;
    border: none;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.deployment-toggle-btn:hover {
    color: var(--text);
}

.deployment-toggle-btn.active {
    background: var(--accent);
    color: var(--on-accent);
}

.deployment-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.deployment-card {
    background: var(--surface-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    position: relative;
    transition: all var(--transition-medium);
}

.deployment-card.featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-raised);
}

.deployment-card.featured::before {
    content: 'EMPFOHLEN';
    position: absolute;
    top: 0;
    right: 1.5rem;
    transform: translateY(-50%);
    padding: 0.25rem 0.7rem;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    border-radius: 2px;
}

.deployment-card h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.deployment-card .subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 1.5rem;
}

.deployment-features {
    list-style: none;
    margin-bottom: 1.75rem;
}

.deployment-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dim);
    font-size: 0.92rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--rule);
}

.deployment-features li:last-child {
    border-bottom: none;
}

.deployment-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
}

.deployment-price {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--accent);
}

/* ============================== CTA ============================== */
.cta-section {
    /* deepest ink on the page — the final beat before the footer */
    --surface: var(--ink-900);
    --surface-raised: var(--ink-850);
    padding: 6.5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(2.1rem, 4vw, 3.1rem);
    font-weight: 400;
    max-width: 22ch;
    margin: 0 auto 1rem;
}

.cta-section h2 em {
    font-style: italic;
    color: var(--brass);
}

.cta-section > .shell > p {
    font-size: 1.08rem;
    color: var(--text-dim);
    margin-bottom: 2.25rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-mail {
    margin-top: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--text-faint);
}

.cta-mail a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.cta-mail a:hover {
    border-bottom-color: var(--accent);
}

/* ============================= Footer ============================= */
.footer {
    padding: 4.5rem 0 2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3.5rem;
    padding-bottom: 3rem;
}

.footer-brand .logo {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.footer-brand .logo-mark {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1;
}

.footer-brand .logo-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
}

.footer-brand p {
    color: var(--text-dim);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    max-width: 22rem;
}

.footer-brand .made-in {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.footer-links h4 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 1.25rem;
    color: var(--accent);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    padding-top: 1.75rem;
    border-top: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-bottom p {
    color: var(--text-faint);
    font-size: 0.82rem;
    max-width: 52rem;
}

.footer-legal {
    display: flex;
    gap: 1.75rem;
    flex-shrink: 0;
}

.footer-legal a {
    color: var(--text-faint);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--accent);
}

/* ======================= Dialog / Formulare ======================= */
.modal {
    /* the global `* { margin: 0 }` reset kills the dialog's
       default `margin: auto`, so restore it to keep it centred */
    margin: auto;
    width: min(46rem, calc(100vw - 2rem));
    /*max-height: min(88vh, 52rem);*/
    padding: 0;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-lg);
    background: var(--paper-raised);
    color: var(--text);
    box-shadow: 0 40px 90px -30px rgba(10, 17, 25, 0.65);
    overflow: hidden;
}

.modal::backdrop {
    background: rgba(10, 17, 25, 0.62);
    backdrop-filter: blur(3px);
}

.modal[open] {
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal[open]::backdrop {
    animation: fadeIn 0.35s ease;
}

.modal.closing {
    animation: modalOut 0.18s ease forwards;
}

.modal.closing::backdrop {
    animation: fadeOut 0.18s ease forwards;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

@keyframes modalOut {
    to { opacity: 0; transform: translateY(6px); }
}

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

/* Head reuses the ink band language — an Aktendeckel over paper */
.modal-head {
    position: relative;
    padding: 1.6rem 3.5rem 1.5rem 2rem;
    background: var(--ink-850);
    border-bottom: 1px solid var(--rule-strong);
}

.modal-head .eyebrow {
    color: var(--brass);
    margin-bottom: 0.7rem;
}

.modal-head .eyebrow::before {
    background: var(--brass);
}

.modal-head h2 {
    font-size: 1.7rem;
    font-weight: 400;
    color: #ece7dc;
    margin-bottom: 0.35rem;
}

.modal-head p {
    font-size: 0.92rem;
    color: #98a6b4;
    max-width: 38rem;
}

.modal-close {
    position: absolute;
    top: 1.15rem;
    right: 1.15rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(236, 231, 220, 0.22);
    border-radius: var(--radius);
    color: #98a6b4;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    border-color: var(--brass);
    color: var(--brass);
}

.modal-body {
    padding: 1.75rem 2rem 2rem;
    overflow-y: auto;
    max-height: calc(88vh - 11rem);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.form-grid > .span-2 {
    grid-column: span 2;
}

.field label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.field .req {
    color: var(--seal);
}

.field input,
.field select,
.field textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    padding: 0.7rem 0.85rem;
    width: 100%;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field textarea {
    resize: vertical;
    min-height: 6.5rem;
    line-height: 1.6;
}

.field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2356636f' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.2rem;
    cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--seal);
    box-shadow: 0 0 0 3px rgba(143, 36, 56, 0.14);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border-color: var(--seal);
    background: rgba(143, 36, 56, 0.04);
}

.field-error {
    font-size: 0.8rem;
    color: var(--seal);
}

.field-error[hidden] {
    display: none;
}

/* Honeypot — off-screen, never shown to humans */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-consent {
    grid-column: span 2;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.form-consent input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
    accent-color: var(--seal);
}

.form-consent label {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-dim);
}

.form-consent a {
    color: var(--seal);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.form-consent .field-error {
    grid-column: span 2;
}

/* ---------------------------- Captcha ----------------------------
   ALTCHA rendert im Shadow DOM; gesteuert wird ausschließlich über
   die --altcha-* Custom Properties, die dorthin vererbt werden.    */
.form-captcha[hidden] {
    display: none;
}

.form-captcha altcha-widget {
    --altcha-max-width: 100%;
    --altcha-border-width: 1px;
    --altcha-border-radius: var(--radius);
    --altcha-border-color: var(--rule);
    --altcha-padding: 0.9rem 1rem;

    --altcha-color-base: var(--paper);
    --altcha-color-base-content: var(--text);
    --altcha-color-neutral: var(--paper-sunk);
    --altcha-color-neutral-content: var(--text-dim);
    --altcha-color-primary: var(--seal);
    --altcha-color-primary-content: var(--on-accent);
    --altcha-color-success: var(--seal);
    --altcha-color-success-content: var(--on-accent);
    --altcha-color-error: var(--seal);
    --altcha-color-error-content: var(--on-accent);

    --altcha-checkbox-border-color: var(--rule-strong);
    --altcha-checkbox-border-radius: var(--radius);
    --altcha-checkbox-outline-color: var(--seal);
    --altcha-spinner-color: var(--seal);

    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.form-captcha .captcha-note {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--text-faint);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--rule);
}

.form-note {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--text-faint);
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-status {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--seal);
    border-radius: var(--radius);
    background: rgba(143, 36, 56, 0.06);
    font-size: 0.88rem;
    color: var(--seal);
}

.form-status[hidden] {
    display: none;
}

/* Success panel replaces the form after submit */
.form-success {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

.form-success[hidden] {
    display: none;
}

.form-success-mark {
    width: 54px;
    height: 54px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--seal);
    border-radius: 50%;
    color: var(--seal);
    font-size: 1.4rem;
}

.form-success h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
}

.form-success p {
    color: var(--text-dim);
    font-size: 0.95rem;
    max-width: 30rem;
    margin: 0 auto 1.75rem;
}

/* ============================ Responsive ============================ */
@media (max-width: 1100px) {
    .hero-grid,
    .security-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-panel {
        transform: none;
    }

    .hero-ledger {
        grid-template-columns: 1fr 1fr;
    }

    .stat:nth-child(2n) {
        border-right: none;
    }

    .stat:nth-child(n + 3) {
        border-top: 1px solid var(--rule);
    }

    .feature-card,
    .feature-card.wide,
    .feature-card.wide + .feature-card {
        grid-column: span 3;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .shell {
        padding: 0 1.5rem;
    }

    .section {
        padding: 4.5rem 0;
    }

    .hero {
        padding-top: 8.5rem;
    }

    .nav-links {
        display: none;
    }

    .hero-ledger {
        grid-template-columns: 1fr;
    }

    .stat {
        border-right: none;
        padding: 1.5rem 0;
    }

    .stat + .stat {
        border-top: 1px solid var(--rule);
    }

    .feature-card,
    .feature-card.wide,
    .feature-card.wide + .feature-card {
        grid-column: span 6;
    }

    .xref {
        padding: 1.25rem 1.25rem;
    }

    .deployment-cards {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
        margin: 0;
        border: none;
        border-radius: 0;
    }

    .modal-body {
        max-height: calc(100vh - 12rem);
        padding: 1.5rem 1.25rem 2rem;
    }

    .modal-head {
        padding: 1.4rem 3.25rem 1.25rem 1.25rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid > .span-2,
    .form-consent {
        grid-column: span 1;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions .btn {
        justify-content: center;
    }

    .form-note {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
