/* Omnitral — ana sayfaya gömülen sahne sayfaları için uyarlama katmanı. */

/* ---------- Sahne yerleşimi ---------- */

.scene {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: clamp(24px, 3.4vw, 44px);
    max-width: 1180px;
    margin-inline: auto;
    padding: clamp(48px, 6vw, 88px) 24px;
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}

/* Altın oran: metin 1.618 · içerik 1 */
.scene--split {
    grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr);
    align-items: center;
}

.scene-copy {
    display: grid;
    justify-items: start;
    gap: 12px;
    max-width: 640px;
}

.scene--split .scene-copy { max-width: none; }

.scene-embed {
    position: relative;
    width: 100%;
    min-width: 0;
}

/* ---------- Neon çerçeve + açılış animasyonu ---------- */

.scene-embed::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.scene-embed.in::before { transform: scaleX(1); }

/* Paneller: görünür olunca ince neon hale */
.scene-embed .window,
.scene-embed .picker,
.scene-embed .wk-panel,
.scene-embed .auto-card,
.scene-embed .wt-card,
.scene-embed .phone {
    transition: box-shadow 700ms ease, border-color 700ms ease;
}

.scene-embed.in .window,
.scene-embed.in .picker,
.scene-embed.in .wk-panel,
.scene-embed.in .auto-card,
.scene-embed.in .wt-card {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 28px 80px rgba(0, 0, 0, 0.62),
        0 0 70px rgba(255, 255, 255, 0.045);
}

.scene-embed.in .phone {
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 20px 50px rgba(0, 0, 0, 0.65),
        0 0 46px rgba(255, 255, 255, 0.06);
}

/* ---------- Gömülü sayfa sarmalayıcıları ---------- */

.scene-embed .demo-wrap,
.scene-embed .agents-main {
    padding: 0;
    max-width: none;
}

/* Tekrarlanan kopya sütunları gizle (metin ana sayfada) */
.scene-embed .agents-split { grid-template-columns: minmax(0, 1fr); }
.scene-embed .agents-copy { display: none; }
.scene-embed--flows .wk-copy { display: none; }
.scene-embed--flows .wk-grid { grid-template-columns: minmax(0, 1fr); }
.scene-embed--flows .wk-section { padding: 0 0 18px; }
.scene-embed--flows .wk-section:last-child { padding-bottom: 0; }
.scene-embed--mobile .mob-hero { display: none; }

/* Ajan seçici: altın oranın küçük tarafında, sağa yaslı */
.scene-embed--agents .picker-wrap {
    justify-items: end;
    margin: 0;
    width: 100%;
}

.scene-embed--agents .picker { max-width: 420px; }

/* Mobil sahne: sabit yükseklik yerine içeriğe göre */
.scene-embed--mobile .mob-stage {
    height: auto;
    min-height: 0;
    padding: 4px 0 18px;
}

/* Notlar */
.scene-embed .demo-note,
.scene-embed .mob-note {
    margin: 14px 0 0;
    max-width: 78ch;
}

/* Sahne içi reveal'ler ana sayfa reveal'iyle çakışmasın */
.scene-embed .reveal {
    opacity: 1;
    transform: none;
    filter: none;
}

/* ---------- Duyarlı ---------- */

@media (max-width: 1080px) {
    .scene--split {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .scene-embed--agents .picker-wrap { justify-items: start; }
    .scene-embed--agents .picker { max-width: 460px; }
}

@media (max-width: 720px) {
    .scene-embed .demo-stage { grid-template-columns: minmax(0, 1fr); }
    .scene-embed .feature-list { flex-direction: row; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .scene-embed::before { transition: none; transform: scaleX(1); }
}

/* Demo sahnesi: senaryo rayı panel gibi görünsün */
.scene-embed .demo-stage {
    grid-template-columns: minmax(200px, 232px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(14px, 2vw, 26px);
}

.scene-embed .feature-list {
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.scene-embed .feature-list .feature {
    border-radius: 9px;
    padding: 9px 10px;
}

.scene-embed .feature-list .feature.is-active {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
    .scene-embed .demo-stage { grid-template-columns: minmax(0, 1fr); }
    .scene-embed .feature-list { grid-auto-flow: column; overflow-x: auto; }
}

/* Tablet: tek kolon, paneller tam genişlik */
@media (max-width: 1080px) {
    .scene {
        padding: clamp(32px, 5vw, 56px) 20px;
    }

    .scene-embed--agents .picker-wrap { justify-items: stretch; }
    .scene-embed--agents .picker { max-width: 100%; }
}

/* ==========================================================================
   Mobil: sahne içi taşmaları düzelt
   ========================================================================== */

@media (max-width: 720px) {
    /* Mobil sahne: yalnız orta telefon, yatay kaydırma yok */
    .scene-embed--mobile .mob-stage {
        overflow: visible;
        justify-content: center;
        scroll-snap-type: none;
        gap: 0;
        padding-inline: 0;
        height: auto;
    }

    .scene-embed--mobile .phone--left,
    .scene-embed--mobile .phone--right {
        display: none;
    }

    .scene-embed--mobile .phone {
        margin: 0;
    }

    .scene-embed--mobile .phone-frame {
        transform: none;
    }

    /* Demo: sekme şeridi kaydırılabilir, senaryo rayı dikey */
    .scene-embed .win-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .scene-embed .win-tabs::-webkit-scrollbar { display: none; }

    .scene-embed .feature-list {
        grid-auto-flow: row;
        overflow: visible;
    }

    /* Uzun başlıklar kırpılmasın */
    .scene-embed .wk-win-title,
    .scene-embed .win-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Akış panelleri: tek kolon, içerik taşmasın */
    .scene-embed--flows .wk-panel,
    .scene-embed--flows .wk-window {
        min-width: 0;
    }

    .scene-embed--flows .wk-split,
    .scene-embed--flows .wk-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Mobil: senaryo rayı yatay şerit (yalnız başlıklar) */
@media (max-width: 720px) {
    .scene-embed .feature-list {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        padding: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        border-radius: 12px;
    }

    .scene-embed .feature-list::-webkit-scrollbar { display: none; }

    .scene-embed .feature {
        flex: 0 0 auto;
        padding: 7px 11px;
        border-radius: 9px;
        white-space: nowrap;
    }

    .scene-embed .feature span {
        font-size: 12px;
    }

    .scene-embed .feature small {
        display: none;
    }
}

/* Mobil: otomasyon tablosu üç bilgiyi de gösterir (kart düzeni) */
@media (max-width: 720px) {
    .scene-embed .wk-auto {
        display: block;
        width: 100%;
    }

    .scene-embed .wk-auto thead { display: none; }

    .scene-embed .wk-auto tbody { display: block; }

    .scene-embed .wk-auto tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 2px 10px;
        padding: 11px 2px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 0;
    }

    .scene-embed .wk-auto td {
        display: block;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .scene-embed .wk-auto td:nth-child(1) { grid-column: 1; grid-row: 1; }

    .scene-embed .wk-auto td:nth-child(3) {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
    }

    .scene-embed .wk-auto td:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
        display: block;
        font-family: var(--font-mono);
        font-size: 10px;
        color: rgba(255, 255, 255, 0.55);
    }
}

/* Mobil: yatay şeritlerde sağ kenar solması (kaydırılabilir ipucu) */
@media (max-width: 720px) {
    .scene-embed .feature-list {
        -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent 100%);
        mask-image: linear-gradient(90deg, #000 82%, transparent 100%);
    }
}
