/**
 * Startseite cuive.de
 * Leitmotiv: Kassenbon → Buchungssatz. Kontenblatt-Grau, Tinte, Signalrot als Stempel.
 * Alle Regeln unter .home gekapselt.
 */

.home {
    --ink: #141a22;
    --ink-soft: #4a5563;
    --paper: #f2f4f0;
    --rule: #d8e0d8;
    --surface: #ffffff;
    --stamp: #cc3300;
    --stamp-hover: #a82a00;
    --haben: #2e6b4f;
    --mark: rgba(46, 107, 79, 0.16);

    --font-display: 'Archivo', 'Arial Narrow', sans-serif;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    /* main.css/theme.css geben <main> Abstand, Rahmen und Hintergrund – hier neutralisieren */
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] .home {
    --ink: #e7ebee;
    --ink-soft: #9ba6b2;
    --paper: #141a20;
    --rule: #26303a;
    --surface: #0f1419;
    --stamp: #ff6a3d;
    --stamp-hover: #ff8a63;
    --haben: #74c49a;
    --mark: rgba(116, 196, 154, 0.2);
    background: var(--surface);
}

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

/* ---------- Typografie ---------- */

.home .home-kicker {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
    margin: 0 0 1rem;
}

.home .home-h1,
.home .home-h2,
.home .process h3,
.home .door-title {
    font-family: var(--font-display);
    font-stretch: 118%;
    color: var(--ink);
    text-align: left;
}

.home .home-h1 {
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    font-weight: 760;
    line-height: 1.06;
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem;
    max-width: 17ch;
}

.home .home-h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 720;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 0 0 1.25rem;
    max-width: 22ch;
}

.home .home-lead {
    font-size: 1.2rem;
    color: var(--ink-soft);
    max-width: 36rem;
    margin: 0 0 2rem;
}

.home .home-lead strong {
    color: var(--ink);
    font-weight: 600;
}

.home .home-body {
    color: var(--ink-soft);
    max-width: 34rem;
    margin: 0 0 1.5rem;
}

.home a {
    color: inherit;
}

.home .home-link {
    display: inline-flex;
    gap: 0.4em;
    font-weight: 600;
    color: var(--stamp);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

.home .home-link:hover {
    color: var(--stamp-hover);
}

/* ---------- Buttons ---------- */

.home .home-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.home .home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.home .home-btn-primary {
    background: var(--stamp);
    color: #fff;
    padding: 0.85rem 1.4rem;
}

.home .home-btn-primary:hover {
    background: var(--stamp-hover);
    color: #fff;
}

.home .home-btn-quiet {
    color: var(--ink);
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
}

.home .home-btn-quiet:hover {
    border-color: var(--ink);
}

.home a:focus-visible,
.home input:focus-visible,
.home .vat-switch input:focus-visible + label {
    outline: 3px solid var(--stamp);
    outline-offset: 3px;
}

/* ---------- Hero ---------- */

.home .home-hero {
    background:
        repeating-linear-gradient(to bottom, transparent 0 31px, color-mix(in srgb, var(--rule) 55%, transparent) 31px 32px),
        var(--paper);
    padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
    border-bottom: 1px solid var(--rule);
}

.home .home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

/* Signatur: Kassenbon + Buchungssatz */
.home .ledger-demo {
    margin: 0;
}

.home .ledger-stage {
    position: relative;
    min-height: 440px;
}

.home .receipt {
    position: absolute;
    top: 0;
    left: 0;
    width: min(300px, 78%);
    padding: 1.25rem 1.25rem 2rem;
    background: #fdfdfb;
    color: #1d2127;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.65;
    transform: rotate(-2.5deg);
    box-shadow: 0 1px 1px rgba(20, 26, 34, 0.08), 0 14px 30px -12px rgba(20, 26, 34, 0.35);
    /* Abrisskante unten */
    -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
    mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}

[data-theme="dark"] .home .receipt {
    background: #e9eae4;
}

.home .receipt-head {
    text-align: center;
    display: grid;
    margin-bottom: 0.5rem;
}

.home .receipt-head strong {
    font-weight: 500;
    letter-spacing: 0.08em;
}

.home .receipt-head span,
.home .receipt-meta,
.home .receipt-small,
.home .receipt-foot {
    color: #6a717b;
}

.home .receipt-rule {
    border-top: 1px dashed #9aa1a9;
    margin: 0.4rem 0;
}

.home .receipt-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.25rem;
    margin: 0 -0.25rem;
}

.home .receipt-mark {
    font-weight: 500;
    background: linear-gradient(var(--mark), var(--mark)) no-repeat left / 0% 100%;
    background-color: transparent;
}

.home .receipt-foot {
    text-align: center;
    margin-top: 0.75rem;
}

.home .booking {
    position: absolute;
    right: 0;
    bottom: 1.5rem;
    width: min(360px, 88%);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 1.1rem 1.25rem 1.25rem;
    box-shadow: 0 24px 50px -24px rgba(20, 26, 34, 0.45);
}

.home .booking-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--font-display);
    font-stretch: 112%;
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--ink);
    margin-bottom: 0.25rem;
}

.home .booking-title span {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--ink-soft);
}

.home .booking-lines {
    margin: 0;
}

.home .booking-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 0.9rem;
}

.home .booking-line dt {
    font-weight: 400;
    color: var(--ink);
}

.home .booking-line dt b {
    display: inline-block;
    min-width: 3.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.home .booking-line dd {
    margin: 0;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.home .booking-line.line-3 dd {
    color: var(--haben);
    font-weight: 500;
}

.home .booking-stamp {
    position: absolute;
    right: 1rem;
    top: -1.4rem;
    font-family: var(--font-display);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--stamp);
    border: 2.5px solid currentColor;
    border-radius: 4px;
    padding: 0.15rem 0.6rem;
    transform: rotate(-7deg);
    background: color-mix(in srgb, var(--surface) 85%, transparent);
}

.home .ledger-demo figcaption {
    margin-top: 1.25rem;
    max-width: 30rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* Ablauf: Bon markieren → Zeilen füllen → Stempel. Einmalig beim Laden. */
@media (prefers-reduced-motion: no-preference) {
    .home .receipt-mark {
        animation: markSweep 0.5s ease-out forwards;
    }
    .home .mark-1 { animation-delay: 0.5s; }
    .home .mark-2 { animation-delay: 0.85s; }

    .home .booking-line {
        opacity: 0;
        transform: translateY(4px);
        animation: lineIn 0.35s ease-out forwards;
    }
    .home .line-1 { animation-delay: 1.3s; }
    .home .line-2 { animation-delay: 1.55s; }
    .home .line-3 { animation-delay: 1.8s; }

    .home .booking-stamp {
        opacity: 0;
        animation: stampIn 0.32s cubic-bezier(0.3, 1.4, 0.6, 1) 2.3s forwards;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home .receipt-mark {
        background-size: 100% 100%;
    }
}

@keyframes markSweep {
    to { background-size: 100% 100%; }
}

@keyframes lineIn {
    to { opacity: 1; transform: none; }
}

@keyframes stampIn {
    from { opacity: 0; transform: rotate(-7deg) scale(1.6); }
    to   { opacity: 1; transform: rotate(-7deg) scale(1); }
}

/* ---------- Drei Wege ---------- */

.home .home-doors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-left: 1px solid var(--rule);
    margin-top: -1px;
}

.home .door {
    display: grid;
    gap: 0.35rem;
    align-content: start;
    padding: 1.75rem 1.75rem 2rem;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: var(--ink);
    transition: background-color 0.15s ease;
}

.home .door:hover {
    background: var(--paper);
}

.home .door-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-soft);
}

.home .door-title {
    font-size: 1.45rem;
    font-weight: 720;
    line-height: 1.2;
}

.home .door-text {
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.home .door-meta {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--stamp);
}

/* ---------- Abschnitte ---------- */

.home .home-section {
    padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.home .home-section-alt {
    background: var(--paper);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.home .home-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
}

/* Onbu-Funktionen als Kontenblatt */
.home .feature-ledger {
    margin: 0;
    border-top: 2px solid var(--ink);
}

.home .feature-ledger > div {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
}

.home .feature-ledger dt {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    padding-top: 0.15rem;
}

.home .feature-ledger dd {
    margin: 0;
    color: var(--ink-soft);
}

.home .feature-ledger dd a {
    color: var(--stamp);
}

/* Projektablauf – echte Reihenfolge, daher nummeriert */
.home .process {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
    border-top: 2px solid var(--ink);
}

.home .process li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 3rem 1fr;
    column-gap: 0.75rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--rule);
}

.home .process li::before {
    content: counter(step);
    grid-row: span 2;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--stamp);
    padding-top: 0.2rem;
}

.home .process h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
}

.home .process p {
    margin: 0;
    color: var(--ink-soft);
}

/* Mini-MwSt-Rechner */
.home .vat-mini {
    margin-top: 1rem;
    border: 1px solid var(--rule);
    border-radius: 8px;
    background: var(--surface);
    padding: 1.25rem;
    max-width: 30rem;
}

.home .vat-mini-row {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.home .vat-mini-row label,
.home .vat-mini-label {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0;
}

.home .vat-mini input[type="text"] {
    width: 100%;
    margin: 0;
    padding: 0.6rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
}

.home .vat-switch {
    display: inline-flex;
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow: hidden;
    justify-self: start;
}

.home .vat-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.home .vat-switch label {
    padding: 0.45rem 0.95rem;
    font-size: 0.9rem;
    color: var(--ink);
    cursor: pointer;
    margin: 0;
}

.home .vat-switch label + input + label {
    border-left: 1px solid var(--rule);
}

.home .vat-switch input:checked + label {
    background: var(--ink);
    color: var(--surface);
}

.home .vat-mini-result {
    margin: 1.1rem 0 0;
    border-top: 2px solid var(--ink);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.home .vat-mini-result > div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rule);
}

.home .vat-mini-result dt {
    font-weight: 400;
    color: var(--ink-soft);
}

.home .vat-mini-result dd {
    margin: 0;
    color: var(--ink);
}

.home .vat-mini-result .vat-total dd {
    font-weight: 500;
    font-size: 1.15rem;
}

/* Linklisten (Rechner, Portale) */
.home .index-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    border-top: 2px solid var(--ink);
}

.home .index-list li {
    border-bottom: 1px solid var(--rule);
}

.home .index-list a {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 1rem;
    padding: 0.85rem 0;
    text-decoration: none;
    color: var(--ink);
}

.home .index-list a::after {
    content: '→';
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--ink-soft);
    transition: transform 0.15s ease, color 0.15s ease;
}

.home .index-list a:hover::after {
    color: var(--stamp);
    transform: translateX(3px);
}

.home .index-list span {
    font-weight: 600;
}

.home .index-list small {
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.home .index-list-cols {
    columns: 2;
    column-gap: clamp(2rem, 6vw, 6rem);
    border-top: 0;
}

.home .index-list-cols li {
    break-inside: avoid;
}

/* Kontakt */
.home .contact-card {
    border-top: 2px solid var(--ink);
    padding-top: 1.5rem;
}

.home .contact-card dl {
    margin: 1.75rem 0 0;
}

.home .contact-card dl > div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
}

.home .contact-card dt {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--ink-soft);
    padding-top: 0.15rem;
}

.home .contact-card dd {
    margin: 0;
    font-weight: 500;
}

.home .contact-card dd a {
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
}

.home .contact-card dd a:hover {
    border-color: var(--stamp);
    color: var(--stamp);
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .home .home-hero-grid,
    .home .home-split {
        grid-template-columns: 1fr;
    }

    .home .ledger-demo {
        max-width: 520px;
    }

    .home .home-doors {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    .home .ledger-stage {
        min-height: 500px;
    }

    .home .receipt {
        width: 82%;
    }

    .home .booking {
        width: 94%;
        bottom: 0;
    }

    .home .feature-ledger > div,
    .home .vat-mini-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .home .index-list-cols {
        columns: 1;
    }
}

/* main.css setzt a { font-weight: bold } – Link-Blöcke auf der Startseite normal setzen */
.home .door,
.home .index-list a,
.home .home-doors a {
    font-weight: 400;
}

@media (max-width: 575.98px) {
    .home .home-doors {
        grid-template-columns: 1fr;
        border-left: 0;
    }

    .home .door {
        border-right: 0;
    }
}

/* Offizielles Store-Badge (unverändert lt. Google-Richtlinien); PNG hat transparenten Rand */
.home .store-badge {
    display: inline-block;
    line-height: 0;
    margin: -7px 0;
    border-radius: 10px;
}

.home .store-badge img {
    height: 64px;
    width: auto;
}

/* App-Store-Badge (SVG ohne Rand) – auf die sichtbare Höhe des Google-Badges abgestimmt */
.home .store-badge-apple {
    margin: 0;
    border-radius: 8px;
}

.home .store-badge-apple img {
    height: 48px;
}

.home .store-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0;
}

/* Eigenes Badge im Stil der Store-Badges: schwarz, grauer Rand, Icon + zweizeiliger Text */
.home .web-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 48px;
    padding: 0 16px 0 11px;
    background: #000;
    border: 1px solid #a6a6a6;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
}

.home .web-badge:hover,
.home .web-badge:focus-visible {
    color: #fff;
    background: #1a1a1a;
}

.home .web-badge-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.home .web-badge-text {
    display: grid;
    line-height: 1;
}

.home .web-badge-text small {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.home .web-badge-text strong {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
