/* Landing Page. Ruhige Fläche, große getönte Karten, echte Folien statt Symbolbildern.
   Radien: Schaltflächen 8px (wie überall), Karten und Fotos 20px, Bildschirme 4px. */
h1 {
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.625rem);
    line-height: 1.16;
    letter-spacing: -0.028em;
}

h3 {
    font-size: var(--text-l);
    letter-spacing: -0.015em;
}

.landing .section {
    padding-block: clamp(56px, 7.5vw, 112px);
}

/* Überschrift in zwei Tönen: Aussage und Ergänzung */
.duo {
    max-width: 28em;
    margin-bottom: clamp(28px, 4vw, 52px);
    text-wrap: pretty;
}

.duo span {
    display: block;
    color: var(--muted);
}

/* Hero */
.hero {
    padding-top: clamp(36px, 4.4vw, 60px);
    text-align: center;
}

.lead {
    max-width: 40ch;
    margin: 20px auto 0;
    font-size: var(--text-l);
    text-wrap: balance;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.tv-loop {
    height: 100%;
}

.case-slide .tv {
    position: absolute;
}

/* Karten */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(22px, 2.4vw, 34px);
    border-radius: var(--card-radius);
    overflow: hidden;
}

.card > p {
    max-width: 38ch;
    margin-top: 8px;
}

.card-grey { background: #e7eaee; }
.card-sky { background: #d8e9fa; }

.card-blue {
    background: var(--main);
}

.card-blue h3 {
    color: #ffffff;
}

.card-blue {
    color: #ffffff;
}

.card-grey p,
.card-sky p {
    color: #3d4853;
}

/* Online gegen vor Ort */
.bento-why > :nth-child(1) { grid-column: span 5; }
.bento-why > :nth-child(2) { grid-column: span 7; }
.bento-why > :nth-child(3) { grid-column: span 7; }
.bento-why > :nth-child(4) { grid-column: span 5; }

.card-grey.card > p,
.bento-why .card-sky > p {
    margin-bottom: 32px;
}

.phone {
    width: min(250px, 78%);
    height: 300px;
    margin: auto auto calc(-1 * clamp(22px, 2.4vw, 34px));
    padding: 14px 12px 0;
    border-radius: 26px 26px 0 0;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 24px 50px -24px rgba(38, 52, 68, 0.45);
}

.feed > * {
    display: block;
    margin-bottom: 10px;
    border-radius: 10px;
}

.post {
    height: 74px;
    background: #edf0f3;
}

.post-short {
    height: 44px;
}

.ad {
    position: relative;
    height: 96px;
    padding: 12px;
    background: var(--main);
    color: #ffffff;
    font-size: var(--text-s);
}

.ad em {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #ffffff;
    color: var(--ink);
    font-style: normal;
}

.card-photo {
    justify-content: flex-end;
    padding: 0;
    background: #ffffff;
}

.card-photo > img {
    flex: 1;
    width: 100%;
    min-height: 240px;
    object-fit: cover;
}

.card-text {
    padding: clamp(22px, 2.4vw, 34px);
}

.card-text p {
    max-width: 52ch;
    margin-top: 8px;
}

.swap {
    display: flex;
    justify-content: center;
    margin: auto 0 calc(-1 * clamp(22px, 2.4vw, 34px));
}

.swap-slide {
    display: grid;
    gap: 4px;
    width: min(440px, 100%);
    padding: 28px 32px 34px;
    border: 8px solid #0c0e11;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #20382b;
    color: #f6efdf;
}

.swap-slide span {
    color: #e2b25a;
    font-weight: 600;
}

.swap-slide strong {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.swap-price {
    height: 3.1rem;
    margin-top: 6px;
    overflow: hidden;
    font-size: 2.5rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 3.1rem;
}

.swap-price b {
    display: block;
    font-weight: 700;
}

.card-blue .big-number {
    margin: auto 0 0;
    font-size: clamp(5rem, 11vw, 9rem);
    font-weight: 600;
    letter-spacing: -0.06em;
    line-height: 1;
}

/* Folientypen: jede Karte ein Foto mit Fernseher, auf dem die Folie läuft. */
.t-clock,
.t-table { grid-column: span 6; }
.t-chart,
.t-qr,
.t-weather { grid-column: span 4; }
.t-ticker { grid-column: span 12; }

.mock {
    position: relative;
    flex: none;
    container-type: size;
    aspect-ratio: var(--ar);
    overflow: hidden;
}

/* Füllt die Karte wie object-fit: cover. So liegt der Fernseher in jedem Format auf dem Gerät im Foto. */
.mock-scene {
    position: absolute;
    top: 0;
    left: 50%;
    width: max(100cqw, 100cqh * var(--ar));
    aspect-ratio: var(--ar);
    transform: translateX(-50%);
}

.mock-scene > img {
    width: 100%;
    height: 100%;
}

.mock .tv {
    position: absolute;
}

.mock .tv-screen {
    container-type: size;
}

.bento-types .card-text {
    padding-block: 20px 24px;
}

.bento-types .card-text p {
    margin-top: 4px;
    font-size: var(--text-s);
}

/* Eine Folie in klein, alle Maße hängen am Fernseher. */
.mini {
    display: grid;
    height: 100%;
    place-items: center;
}

.mini-blue { background: var(--main); }

.mini b {
    color: var(--main);
    font-size: 7cqw;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.mini-ticker {
    grid-template-rows: 1fr auto;
}

.mini-ticker b {
    color: #ffffff;
    font-size: 9cqw;
}

/* Die analoge Uhr der Einspieler, siehe clock.css. */
.mini-clock {
    --textColor: #2c1318;
    --accentColor: #a3202f;
    align-content: center;
    background: #f8f1e6;
    color: #2c1318;
    font-size: 2.95cqw;
}

.mini-clock .analogClock {
    width: 14em;
    height: 14em;
}

.mini-clock p {
    font-size: 4cqw;
    line-height: 1.2;
}

.mini-chart {
    grid-template-rows: auto 1fr;
    padding: 4.5cqw 5cqw 3.5cqw;
    background: #0d1b2e;
    color: #ffffff;
}

.mini-chart p {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 2cqw;
    width: 100%;
    font-size: 4cqw;
    line-height: 1.15;
}

.mini-chart b {
    margin-right: auto;
    color: #ffffff;
    font-size: 5.6cqw;
}

.mini-chart strong {
    color: #c6f24e;
    font-size: 8cqw;
    letter-spacing: -0.02em;
}

.mini-chart em {
    width: 100%;
    color: #c6f24e;
    font-style: normal;
    text-align: right;
}

.bars {
    align-self: end;
    width: 100%;
    height: 31cqw;
    fill: #3f82e8;
}

.bars rect {
    transform-box: fill-box;
    transform-origin: bottom;
}

.bars rect:nth-of-type(6) {
    fill: #c6f24e;
}

.bars text {
    fill: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-anchor: middle;
}

.bars .month {
    fill: #a9bdd6;
    font-weight: 500;
}

.mini-qr {
    grid-template-columns: 1fr auto;
    gap: 4cqw;
    padding: 0 4cqw 0 6cqw;
    background: #fdeee9;
    color: #5b3a33;
    font-size: 4.4cqw;
    line-height: 1.3;
}

.mini-qr b {
    display: block;
    margin-bottom: 2.5cqw;
    color: #b1452c;
    font-size: 7cqw;
    line-height: 1.12;
}

.mini .qr {
    width: auto;
    height: 86cqh;
    border-radius: 2cqw;
}

.ticker {
    width: 100%;
    overflow: hidden;
    padding-block: 2.2cqw;
    background: #ffffff;
    color: var(--main);
    font-size: 5.5cqw;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.ticker span {
    display: inline-block;
    padding-inline: 5cqw;
}

.types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.types li {
    padding: 6px 14px;
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--ink);
    font-size: var(--text-s);
    font-weight: 500;
}

/* Schritte: Text läuft vorbei, das Bild bleibt stehen. */
.steps {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(32px, 6vw, 96px);
}

.steps ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: min(56vh, 520px);
    counter-increment: step;
}

.step h3 {
    font-size: 1.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.step h3::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--main-dark);
    font-size: var(--text-m);
    letter-spacing: 0;
}

.step p {
    max-width: 36ch;
    margin-top: 8px;
}

.step-image {
    display: none;
}

.steps-stage {
    position: sticky;
    top: calc(50vh - 190px);
    align-self: start;
    aspect-ratio: 1440 / 870;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 0 0 1px #dde2e8, 0 40px 80px -40px rgba(38, 52, 68, 0.4);
}

.steps-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0;
    transform: translateY(24px);
}

.steps-stage img.is-active {
    opacity: 1;
    transform: none;
}

/* Anwendungsfälle */
.cases {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
    gap: clamp(24px, 4vw, 64px);
}

.cases-photo {
    position: relative;
    aspect-ratio: 1024 / 688;
    border-radius: var(--card-radius);
    overflow: hidden;
    background: #e7eaee;
}

.case-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
}

.case-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
}

.case-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.case button {
    width: 100%;
    min-height: 52px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s;
}

.case button:hover,
.case.is-active button {
    color: var(--ink);
}

.case-text {
    display: grid;
    grid-template-rows: 1fr;
}

.case-text p {
    max-width: 44ch;
    padding-bottom: 14px;
}

.js .case:not(.is-active) .case-text {
    grid-template-rows: 0fr;
    visibility: hidden;
}

.js .case-text p {
    min-height: 0;
    overflow: hidden;
}

.js .case:not(.is-active) .case-text p {
    padding-bottom: 0;
}

.cases-note {
    margin-top: 24px;
    color: var(--ink);
    font-weight: 500;
}

/* Ein Link, viele Bildschirme */
.cast {
    padding: clamp(28px, 4vw, 56px) clamp(16px, 4vw, 56px);
    border-radius: var(--card-radius);
    background: #e7eaee;
}

.cast-link {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    padding: 12px 20px;
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--ink);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: clamp(0.75rem, 3.2vw, 1rem);
    overflow-wrap: anywhere;
    text-align: center;
}

.cast-wires {
    display: block;
    width: 100%;
    height: clamp(48px, 9vw, 120px);
}

.wire,
.signal {
    fill: none;
    stroke: #aab6c2;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.signal {
    stroke: var(--main);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 12 100;
    stroke-dashoffset: 12;
}

.cast-screens {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 3vw, 40px);
}

.cast-screens .tv {
    aspect-ratio: 16 / 9;
    box-shadow: 0 24px 40px -20px rgba(38, 52, 68, 0.5);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: clamp(32px, 6vw, 88px);
    margin-top: clamp(32px, 4vw, 56px);
}

.split .text:first-child {
    margin-top: 0;
}

.faq details {
    border-bottom: 1px solid var(--line-strong);
}

.faq details:first-child summary {
    padding-top: 0;
}

.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 18px;
    color: var(--ink);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    color: var(--main-dark);
    font-size: var(--text-l);
    line-height: 1.3;
}

.faq details[open] summary::after {
    content: "−";
}

.faq details p {
    padding-bottom: 18px;
}

/* Preise */
.landing .plans {
    margin-top: 0;
}

/* Abschluss */
.closing {
    padding-bottom: clamp(40px, 6vw, 80px);
}

.closing-inner {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: clamp(56px, 8vw, 112px) 24px;
    border-radius: var(--card-radius);
    overflow: hidden;
    background: var(--main);
    text-align: center;
}

.closing h2 {
    max-width: 16em;
    color: var(--white);
}

.closing-wires {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
}

.closing .wire {
    stroke: rgba(255, 255, 255, 0.22);
}

.closing .signal {
    stroke: #ffffff;
    opacity: 0.75;
}

/* Bewegung. Alles hier ist Zugabe: Ohne Unterstützung oder mit reduzierter Bewegung steht die Seite still und vollständig da. */
@media (prefers-reduced-motion: no-preference) {
    .hero h1,
    .hero .lead,
    .hero .actions {
        animation: rise 0.9s var(--ease) backwards;
    }

    .hero .lead { animation-delay: 0.08s; }
    .hero .actions { animation-delay: 0.16s; }

    .tv-loop {
        animation: tv-loop 20s var(--ease) infinite;
    }

    .feed {
        animation: feed 9s cubic-bezier(0.7, 0, 0.2, 1) infinite;
    }

    .swap-price b {
        animation: swap 7s var(--ease) infinite;
    }

    .ticker {
        white-space: nowrap;
    }

    .ticker span {
        padding-left: 0;
        animation: ticker 22s linear infinite;
    }

    .signal {
        animation: signal 3.6s linear infinite;
        animation-delay: calc(var(--i) * -1.2s);
    }

    .closing .signal {
        animation-duration: 9s;
        animation-delay: calc(var(--i) * -3s);
    }

    .steps-stage img {
        transition: opacity 0.5s, transform 0.7s var(--ease);
    }

    .case-slide {
        transition: opacity 0.6s, visibility 0s 0.6s;
    }

    .case-slide.is-active {
        transition: opacity 0.6s;
    }

    /* Erst der Raum, dann schiebt sich die Folie auf den Bildschirm. */
    .case-slide .tv-screen img {
        transform: translateY(100%);
        transition: transform 0s 0.6s;
    }

    .case-slide.is-active .tv-screen img {
        transform: none;
        transition: transform 0.9s 0.25s var(--ease);
    }

    .case-text {
        transition: grid-template-rows 0.35s var(--ease);
    }

    @supports (animation-timeline: view()) {
        .reveal {
            animation: rise linear backwards;
            animation-timeline: view();
            animation-range: entry 0% entry 60%;
        }

        .bars rect {
            animation: grow linear backwards;
            animation-timeline: view();
            animation-range: entry calc(20% + var(--i) * 8%) entry calc(70% + var(--i) * 8%);
        }
    }
}

/* Im Player läuft die Uhr immer, hier nur, wer Bewegung mag. */
@media (prefers-reduced-motion: reduce) {
    .mini .clockHand {
        animation: none;
    }
}

/* Vier Folien, je 5 Sekunden, Wechsel wie im Player nach oben */
@keyframes tv-loop {
    0%, 21% { transform: translateY(0); }
    25%, 46% { transform: translateY(-100%); }
    50%, 71% { transform: translateY(-200%); }
    75%, 96% { transform: translateY(-300%); }
    100% { transform: translateY(-400%); }
}

/* Eine Hälfte des Feeds, mit Halt bei der Anzeige */
@keyframes feed {
    0% { transform: translateY(0); }
    22%, 34% { transform: translateY(-22%); }
    44%, 60% { transform: translateY(-36%); }
    100% { transform: translateY(-50%); }
}

@keyframes swap {
    0%, 40% { transform: translateY(0); }
    50%, 92% { transform: translateY(-100%); }
    100% { transform: translateY(0); }
}

@keyframes ticker {
    from { transform: translateX(100cqw); }
    to { transform: translateX(-100%); }
}

@keyframes signal {
    to { stroke-dashoffset: -100; }
}

@keyframes grow {
    from { transform: scaleY(0); }
}

@media (max-width: 63.9375em) {
    .bento-why > * {
        grid-column: span 12 !important;
    }

    .bento-types > * {
        grid-column: span 6;
    }

    .bento-types .mock {
        aspect-ratio: 4 / 3;
    }

    .cases {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 47.9375em) {
    .actions .btn {
        flex: 1;
    }

    .bento-types > * {
        grid-column: span 12;
    }

    .steps,
    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .steps-stage {
        display: none;
    }

    .step {
        min-height: 0;
        padding-block: 24px;
    }

    .step-image {
        display: block;
        width: 100%;
        margin-top: 20px;
        border-radius: 12px;
        box-shadow: 0 0 0 1px #dde2e8, 0 24px 50px -30px rgba(38, 52, 68, 0.45);
    }

    .landing .plans {
        grid-template-columns: minmax(0, 1fr);
    }
}
