/* --- 1. FARBSCHEMA & VARIABLEN --- */
:root {
    --bg-color: #0d1117;
    --bg-deep: #0a0e14;
    --surface-color: #161b22;
    --surface-raised: #1c2230;
    --border-color: #30363d;
    --border-soft: rgba(240, 246, 252, 0.08);
    --text-main: #f8fafc;
    --text-muted: #8b949e;
    --text-dim: #848d97;        /* ≥ 4.5:1 auf allen Flächen (WCAG AA) */
    --text-headline-muted: #6e7681; /* nur für große Überschriften, ≥ 3:1 */
    --accent-glow: #1e5aa0;
    --accent-bright: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1e5aa0 100%);
    --success: #27c93f;
    --online: #10b981;

    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --radius-lg: 20px;
    --radius-md: 14px;
    --header-h: 76px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--accent-bright);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 16px;
}

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

.text-muted {
    color: var(--text-headline-muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-bright);
}

.status-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--online);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18), 0 0 10px rgba(16, 185, 129, 0.6);
}

/* --- 2. HEADER & NAVIGATION --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--border-soft);
    background: rgba(13, 17, 23, 0.82);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
}

.header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    box-shadow: 0 0 0 1px var(--border-color), 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: rotate(-6deg) scale(1.05);
}

.logo-text span {
    color: var(--accent-bright);
}

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    position: relative;
    padding: 6px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

/* Feine Akzentlinie beim Überfahren */
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-bright);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.main-nav a:hover {
    color: var(--text-main);
}

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

/* --- 3. BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--accent-gradient);
    box-shadow: 0 6px 20px rgba(30, 90, 160, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    color: var(--text-main);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--accent-glow);
    background: var(--surface-raised);
}

.btn-arrow {
    display: inline-flex;
    transition: transform 0.25s ease;
}

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

.btn-header {
    padding: 10px 18px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.btn-header svg {
    flex-shrink: 0;
}

.action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.action-group--center {
    justify-content: center;
}

/* --- 4. HERO --- */
.hero {
    position: relative;
    margin-top: calc(-1 * var(--header-h));
    padding: calc(var(--header-h) + 72px) 0 110px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -260px;
    right: -120px;
    width: 820px;
    height: 620px;
    background: radial-gradient(closest-side, rgba(59, 130, 246, 0.2), rgba(13, 17, 23, 0));
    pointer-events: none;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(240, 246, 252, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240, 246, 252, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
    align-items: center;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 4.6vw, 3.9rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin: 0 0 28px 0;
}

.hero-lead {
    font-size: 1.18rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 0 36px 0;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    list-style: none;
    padding: 28px 0 0 0;
    margin: 40px 0 0 0;
    border-top: 1px solid var(--border-soft);
}

.hero-facts li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.hero-facts svg {
    color: var(--accent-bright);
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.hero-content > * {
    animation: rise-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-content > *:nth-child(2) { animation-delay: 0.06s; }
.hero-content > *:nth-child(3) { animation-delay: 0.12s; }
.hero-content > *:nth-child(4) { animation-delay: 0.18s; }
.hero-content > *:nth-child(5) { animation-delay: 0.24s; }

.hero-visual {
    position: relative;
    animation: rise-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
}

/* Terminal */
.terminal-window {
    position: relative;
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(59, 130, 246, 0.06);
    font-family: var(--font-mono);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.terminal-dot--red { background: #ff5f56; }
.terminal-dot--yellow { background: #ffbd2e; }
.terminal-dot--green { background: #27c93f; }

.terminal-title {
    margin-left: 10px;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.terminal-body {
    padding: 22px 22px 26px;
    font-size: 0.85rem;
    line-height: 1.75;
}

.terminal-body pre {
    margin: 0 0 12px 0;
    white-space: pre-wrap;
    font-family: inherit;
}

.terminal-body pre:last-child {
    margin-bottom: 0;
}

.terminal-prompt {
    color: var(--accent-bright);
    font-weight: 700;
}

.terminal-output {
    color: var(--text-muted);
}

.terminal-success {
    color: var(--success);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1.05em;
    background: var(--accent-bright);
    vertical-align: text-bottom;
    animation: terminal-blink 1s steps(1) infinite;
}

@keyframes terminal-blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* Schwebende Info-Karten */
.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(22, 27, 34, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.float-card strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
}

.float-card small {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.float-card--score {
    left: -44px;
    bottom: -38px;
    animation: float 6s ease-in-out infinite;
}

.float-card--server {
    right: -22px;
    top: -26px;
    animation: float 6s ease-in-out 1.5s infinite;
}

.score-ring {
    position: relative;
    width: 52px;
    height: 52px;
}

.score-ring span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--success);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* --- 5. SEKTIONEN ALLGEMEIN --- */
.section {
    padding: 110px 0;
}

.section-header {
    max-width: 760px;
    margin-bottom: 56px;
}

.section h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0;
}

/* --- 6. LEISTUNGEN --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px;
    background: linear-gradient(180deg, var(--surface-color) 0%, rgba(22, 27, 34, 0.4) 100%);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.service-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-4px);
}

.service-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: var(--accent-bright);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.service-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.service-card h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.45rem;
    letter-spacing: -0.01em;
    margin: 0 0 12px 0;
}

.service-card > p {
    color: var(--text-muted);
    margin: 0 0 24px 0;
    font-size: 0.97rem;
}

.check-list {
    list-style: none;
    padding: 20px 0 0 0;
    margin: auto 0 0 0;
    border-top: 1px solid var(--border-soft);
    display: grid;
    gap: 10px;
}

.check-list li,
.feature-list li {
    position: relative;
    padding-left: 28px;
    font-size: 0.93rem;
    color: var(--text-main);
}

.check-list li::before,
.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* --- 7. PLANAGO --- */
.product-panel {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
    padding: 64px;
    background:
        radial-gradient(600px 400px at 100% 0%, rgba(30, 90, 160, 0.22), transparent 70%),
        var(--surface-color);
    border: 1px solid var(--border-soft);
    border-radius: 28px;
    overflow: hidden;
}

.product-logo {
    display: block;
    width: 180px;
    height: auto;
    margin: -12px 0 20px -14px;
}

.product-lead {
    color: var(--text-muted);
    font-size: 1.08rem;
    margin: 24px 0 28px 0;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.agency-note {
    padding: 18px 20px;
    margin-bottom: 32px;
    background: rgba(13, 17, 23, 0.55);
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--accent-bright);
    border-radius: 12px;
}

.agency-note strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.agency-note p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* Screenshot der echten Buchungsansicht */
.product-shot {
    position: relative;
    margin: 0;
    justify-self: center;
    width: 100%;
    max-width: 420px;
    transform: rotate(1.5deg);
    transition: transform 0.5s ease;
}

.product-panel:hover .product-shot {
    transform: rotate(0deg);
}

.product-shot::before {
    content: '';
    position: absolute;
    inset: 10% -12% 20%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(59, 130, 246, 0.28), transparent);
    pointer-events: none;
}

.product-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    /* Unteres Formular weich ausblenden (Kalender und Uhrzeiten bleiben voll sichtbar) */
    -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
}

.product-shot figcaption {
    margin-top: -8px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* --- 8. PROJEKTE --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.project-card--wide {
    grid-column: span 2;
    flex-direction: row;
}

.project-media {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 170px;
    background:
        radial-gradient(circle at 50% 120%, rgba(59, 130, 246, 0.22), transparent 65%),
        var(--bg-deep);
    border-bottom: 1px solid var(--border-soft);
}

.project-card--wide .project-body {
    justify-content: center;
    padding: 40px;
}

.project-card--wide .card-link {
    margin-top: 4px;
}

.project-card--wide .project-media {
    flex: 0 0 42%;
    border-bottom: 0;
    border-right: 1px solid var(--border-soft);
}

.project-logo {
    transition: transform 0.4s ease;
}

.project-card:hover .project-logo {
    transform: scale(1.06);
}

.project-logo--pfoten {
    width: 210px;
}

.project-logo--app {
    width: 72px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.project-status {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 999px;
}

.project-media--code {
    background:
        repeating-linear-gradient(0deg, rgba(240, 246, 252, 0.03) 0 1px, transparent 1px 22px),
        radial-gradient(circle at 50% 120%, rgba(59, 130, 246, 0.22), transparent 65%),
        var(--bg-deep);
}

.project-mono {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: 0.08em;
    background: linear-gradient(180deg, #ffffff, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 28px;
}

.project-kind {
    margin: 0 0 8px 0;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.project-body h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.4rem;
    margin: 0 0 10px 0;
}

.project-body > p:not(.project-kind) {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 20px 0;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}

.tag {
    padding: 3px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(139, 148, 158, 0.08);
    border: 1px solid rgba(139, 148, 158, 0.18);
    border-radius: 6px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.card-link svg {
    transition: transform 0.2s ease;
}

.card-link:hover {
    color: var(--accent-bright);
}

.card-link:hover svg {
    transform: translateX(4px);
}

.project-card--github {
    grid-column: span 2;
    background:
        radial-gradient(400px 260px at 100% 100%, rgba(30, 90, 160, 0.2), transparent 70%),
        var(--surface-color);
}

.project-card--github .project-body {
    justify-content: flex-end;
}

/* --- 9. ABLAUF --- */
.process {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    counter-reset: step;
}

.process li {
    position: relative;
    padding: 28px 24px 0 0;
    border-top: 1px solid var(--border-color);
}

.process li::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-bright);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.process-num {
    display: block;
    margin-bottom: 14px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-bright);
}

.process h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 0 8px 0;
}

.process p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

/* --- 10. KONTAKT --- */
.cta-panel {
    position: relative;
    padding: 80px 40px;
    text-align: center;
    background:
        radial-gradient(700px 320px at 50% 0%, rgba(59, 130, 246, 0.22), transparent 70%),
        var(--surface-color);
    border: 1px solid var(--border-soft);
    border-radius: 28px;
    overflow: hidden;
}

.cta-panel h2 {
    max-width: 700px;
    margin: 0 auto 20px auto;
}

.cta-panel > p:not(.eyebrow):not(.cta-note) {
    max-width: 560px;
    margin: 0 auto 36px auto;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.cta-note {
    margin: 24px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* --- 11. FOOTER --- */
.site-footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-soft);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
}

.footer-brand .logo {
    font-size: 1.1rem;
}

.footer-brand .logo-img {
    width: 32px;
    height: 32px;
}

.footer-brand p {
    margin: 10px 0 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

.copyright {
    margin: 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* --- 12. SCROLL-REVEAL (Klasse wird per JS gesetzt, siehe js/reveal.js) --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* --- 13. RESPONSIVE --- */
@media (max-width: 1024px) {
    .hero-inner,
    .product-panel {
        grid-template-columns: 1fr;
        gap: 72px;
    }
    .hero-visual {
        max-width: 560px;
        margin: 0 auto;
        width: calc(100% - 40px);
    }
    .product-panel {
        padding: 48px;
    }
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
    .process {
        grid-template-columns: 1fr 1fr;
        row-gap: 40px;
    }
}

@media (max-width: 860px) {
    .main-nav {
        display: none;
    }
}

@media (max-width: 720px) {
    :root {
        --header-h: 64px;
    }
    .container {
        padding: 0 16px;
    }
    .logo {
        font-size: 1.05rem;
    }
    .hero {
        padding: calc(var(--header-h) + 40px) 0 90px;
    }
    .hero-lead {
        font-size: 1.05rem;
    }
    .hero-visual {
        width: 100%;
    }
    .float-card--score {
        left: 8px;
        bottom: -40px;
    }
    .float-card--server {
        right: 8px;
        top: -30px;
    }
    .terminal-body {
        font-size: 0.78rem;
        padding: 18px;
    }
    .section {
        padding: 64px 0;
    }
    .section-header {
        margin-bottom: 40px;
    }
    .services-grid,
    .projects-grid,
    .process {
        grid-template-columns: 1fr;
    }
    .project-card--wide,
    .project-card--github {
        grid-column: auto;
        flex-direction: column;
    }
    .project-card--wide .project-media {
        flex-basis: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
    }
    .product-panel {
        padding: 32px 20px;
        border-radius: 22px;
    }
    .feature-list {
        grid-template-columns: 1fr;
    }
    .product-shot {
        transform: none;
    }
    .cta-panel {
        padding: 56px 20px;
        border-radius: 22px;
    }
    .action-group .btn {
        width: 100%;
    }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .hero-content > *,
    .hero-visual,
    .float-card,
    .terminal-cursor {
        animation: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- 14. TERMINBUCHUNG ALS POP-UP (siehe js/booking-dialog.js) --- */
html.has-dialog {
    overflow: hidden;
}

.booking-dialog {
    /* 420px Planago-Karte + 2 × 20px Innenabstand der Buchungsseite */
    width: min(460px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: hidden;
    color: var(--text-main);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.booking-dialog[open] {
    animation: dialog-in 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.booking-dialog::backdrop {
    background: rgba(1, 4, 9, 0.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.booking-frame {
    display: block;
    width: 100%;
    /* Startwert bis zur Messung, danach setzt das JS die exakte Inhaltshöhe */
    height: 640px;
    max-height: calc(100dvh - 34px);
    border: 0;
    background: transparent;
    transition: opacity 0.2s ease;
}

.booking-dialog.is-loading .booking-frame {
    opacity: 0;
}

.booking-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--text-main);
    background: rgba(13, 17, 23, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.booking-dialog-close:hover {
    background: var(--accent-glow);
    transform: rotate(90deg);
}

.booking-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-bright);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.booking-dialog.is-loading .booking-spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .booking-dialog[open] {
        animation: none;
    }
}

/* --- 15. MOBILE SECTION-PILOT (Ersatz für die Schnellnavigation, die unter
   860px verschwindet - siehe js/section-pilot.js) --- */
.section-pilot {
    display: none;
    position: fixed;
    right: 18px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(22, 27, 34, 0.35);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* visibility erst NACH dem Opacity-Fade umschalten (Delay = Fade-Dauer),
       sonst verschwindet die Pille beim Ausblenden abrupt statt zu faden. */
    transition: opacity 0.35s ease, visibility 0s linear 0.35s, background 0.25s ease, border-color 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.section-pilot.is-visible {
    opacity: 0.7;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0s linear 0s, background 0.25s ease, border-color 0.25s ease;
}

.section-pilot:active,
.section-pilot:focus-visible {
    opacity: 1;
    background: rgba(22, 27, 34, 0.7);
    border-color: var(--accent-glow);
}

.section-pilot-label {
    white-space: nowrap;
}

/* Nur für Screenreader: steht visuell unsichtbar vor dem Label, damit VoiceOver
   z.B. "Weiter zu Projekte" statt nur "Projekte" vorliest. */
.section-pilot-direction {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section-pilot-arrows {
    display: flex;
    flex-direction: column;
    gap: 1px;
    transition: transform 0.3s ease;
}

.section-pilot-arrows.is-up {
    transform: rotate(180deg);
}

.sp-arrow {
    display: block;
    color: var(--accent-bright);
    opacity: 0.2;
    animation: sp-chase 1.1s ease-in-out infinite;
}
.sp-arrow:nth-child(1) { animation-delay: 0s; }
.sp-arrow:nth-child(2) { animation-delay: 0.15s; }
.sp-arrow:nth-child(3) { animation-delay: 0.3s; }

@keyframes sp-chase {
    0%, 60%, 100% { opacity: 0.2; }
    20% { opacity: 1; }
}

@media (max-width: 860px) {
    .section-pilot {
        display: inline-flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-arrow {
        animation: none;
        opacity: 0.55;
    }
}
