/* ==========================================================================
   Design system v2 — Premium AI / Indigo
   Aurora gradients, glow, glass, bento grid, neural-network background
   ========================================================================== */

:root {
    --bg-primary: #f7f6fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edeaf9;

    --label: rgba(15,12,30,.94);
    --label-secondary: rgba(15,12,30,.62);
    --label-tertiary: rgba(15,12,30,.34);
    --separator: rgba(30,20,60,.10);

    --accent: #6d28fd;
    --accent-2: #c026d3;
    --accent-3: #22d3ee;
    --accent-on: #ffffff;
    --accent-gradient: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);

    --glass-bg: rgba(255,255,255,.58);
    --glass-border: rgba(109,40,253,.14);
    --glass-highlight: rgba(255,255,255,.6);

    --pattern-color: 109,40,253;
    --pattern-alpha: .28;

    --aurora-1: rgba(109,40,253,.30);
    --aurora-2: rgba(192,38,211,.24);
    --aurora-3: rgba(34,211,238,.18);

    --radius-sm: 14px;
    --radius: 24px;
    --radius-lg: 34px;
    --max: 1240px;

    --ease: cubic-bezier(.22,.61,.36,1);
}

:root[data-theme="dark"] {
    --bg-primary: #07060d;
    --bg-secondary: #100e1c;
    --bg-tertiary: #191531;

    --label: rgba(245,243,255,.95);
    --label-secondary: rgba(245,243,255,.64);
    --label-tertiary: rgba(245,243,255,.34);
    --separator: rgba(200,190,255,.12);

    --accent: #8b5cf6;
    --accent-2: #e879f9;
    --accent-3: #22d3ee;
    --accent-on: #0a0714;

    --glass-bg: rgba(20,16,36,.55);
    --glass-border: rgba(200,180,255,.14);
    --glass-highlight: rgba(255,255,255,.08);

    --pattern-color: 168,130,255;
    --pattern-alpha: .38;

    --aurora-1: rgba(139,92,246,.35);
    --aurora-2: rgba(232,121,249,.22);
    --aurora-3: rgba(34,211,238,.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
                 "Segoe UI", Inter, Roboto, sans-serif;
    background:
        radial-gradient(60vw 50vh at 12% -8%, var(--aurora-1), transparent 60%),
        radial-gradient(50vw 45vh at 100% 8%, var(--aurora-2), transparent 60%),
        radial-gradient(45vw 40vh at 30% 100%, var(--aurora-3), transparent 60%),
        var(--bg-primary);
    background-attachment: fixed;
    color: var(--label);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color .25s var(--ease), color .25s var(--ease);
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.muted { color: var(--label-secondary); }
.small { font-size: .9rem; }

h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Neural-network canvas — content layer decoration */
#bg-pattern {
    position: fixed; inset: 0; width: 100vw; height: 100vh;
    z-index: 0; pointer-events: none; opacity: .8;
}

/* ===== Header — glass functional layer ===== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand img { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 2px var(--glass-border); }
.main-nav { display: flex; gap: 6px; }
.main-nav a {
    color: var(--label-secondary); font-weight: 500; font-size: 1.02rem;
    padding: 10px 18px; border-radius: 999px; transition: color .15s var(--ease), background .15s var(--ease);
}
.main-nav a:hover { color: var(--label); background: var(--bg-tertiary); }
.main-nav a.active {
    color: var(--accent-on); background: var(--accent-gradient);
}
.header-right { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: none; color: var(--label); font-size: 1.3rem; cursor: pointer; }

.theme-toggle {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--separator); background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem; transition: transform .15s var(--ease), border-color .15s;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px) scale(1.04); }
.theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: inline; }

@media (max-width: 720px) {
    .main-nav {
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--glass-bg); backdrop-filter: blur(22px) saturate(180%);
        flex-direction: column; align-items: stretch; padding: 12px 20px; gap: 4px;
        display: none; border-bottom: 1px solid var(--glass-border);
    }
    .main-nav a { text-align: left; }
    .main-nav.open { display: flex; }
    .nav-toggle { display: block; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 32px; border-radius: 999px; font-weight: 600; font-size: 1.05rem;
    border: 1px solid transparent; cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
    background: var(--accent-gradient); color: var(--accent-on);
    box-shadow: 0 8px 24px rgba(109,40,253,.35);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(109,40,253,.45); }
.btn-ghost { border-color: var(--separator); color: var(--label); background: var(--bg-secondary); }
.btn-ghost:hover { border-color: var(--accent); }

/* ===== Hero ===== */
.hero { padding: 128px 0 96px; text-align: center; }
.hero-eyebrow {
    display: inline-block; color: var(--accent); font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; font-size: .85rem; padding: 7px 16px; border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid var(--glass-border);
}
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 4.8rem); margin: 22px 0 22px; letter-spacing: -.03em; line-height: 1.03; }
.hero p { color: var(--label-secondary); max-width: 680px; margin: 0 auto 40px; font-size: 1.3rem; line-height: 1.55; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-photo-wrap {
    position: relative; width: 240px; height: 240px; margin: 0 auto 32px;
}
.hero-photo-wrap::before {
    content: ""; position: absolute; inset: -22px; border-radius: 50%;
    background: var(--accent-gradient); filter: blur(38px); opacity: .55; z-index: 0;
}
.hero-photo {
    position: relative; z-index: 1;
    width: 240px; height: 240px; border-radius: 50%;
    object-fit: cover; display: block;
    border: 4px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent), 0 24px 60px rgba(109,40,253,.4);
}
.hero-photo-stat {
    position: absolute; z-index: 2; bottom: 6px; left: 50%; transform: translateX(-50%);
    background: var(--accent-gradient); color: var(--accent-on);
    font-size: .78rem; font-weight: 700; letter-spacing: .01em;
    padding: 7px 16px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 8px 20px rgba(109,40,253,.45), 0 0 0 3px var(--bg-primary);
}
.hero-role { color: var(--label-secondary); font-weight: 600; font-size: 1.02rem; margin: 0 0 14px; }

/* ===== Sections ===== */
section { padding: 84px 0; position: relative; z-index: 1; }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 14px; letter-spacing: -.02em; }
.section-head p { color: var(--label-secondary); max-width: 620px; margin: 0 auto; font-size: 1.1rem; }

/* ===== Bento grid ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.grid-bento { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.grid-bento .card.highlight { grid-column: span 2; }
@media (max-width: 900px) { .grid-bento { grid-template-columns: 1fr; } .grid-bento .card.highlight { grid-column: span 1; } }

.card {
    position: relative;
    background: var(--bg-secondary); border: 1px solid var(--separator); border-radius: var(--radius);
    padding: 36px; overflow: hidden;
    transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
    background: var(--accent-gradient); opacity: 0;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    transition: opacity .2s var(--ease); pointer-events: none;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(109,40,253,.15); }
.card:hover::before { opacity: 1; }
.card .icon {
    font-size: 2rem; margin-bottom: 18px; display: flex; align-items: center; justify-content: center;
    width: 58px; height: 58px; border-radius: 16px; background: var(--bg-tertiary);
}
.card h3 { margin: 0 0 10px; font-size: 1.35rem; letter-spacing: -.01em; }
.card p { color: var(--label-secondary); margin: 0 0 16px; font-size: 1.02rem; }
.card a.card-link { color: var(--accent); font-weight: 600; font-size: .96rem; }
.card.highlight {
    border-color: transparent;
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
                var(--accent-gradient) border-box;
    border: 1px solid transparent;
}
.card.highlight .icon { background: var(--accent-gradient); }
.card-stats { display: flex; gap: 28px; margin: 4px 0 20px; }
.card-stat { display: flex; flex-direction: column; }
.card-stat strong { font-size: 1.6rem; letter-spacing: -.02em; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-stat span { font-size: .82rem; color: var(--label-secondary); }
.badge {
    display: inline-block; background: var(--accent-gradient); color: var(--accent-on);
    font-size: .76rem; font-weight: 700; padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
    letter-spacing: .03em; text-transform: uppercase;
}

.bullet-list { list-style: none; padding: 0; margin: 0; }
.bullet-list li { padding: 8px 0 8px 26px; position: relative; color: var(--label-secondary); }
.bullet-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ===== CTA strip ===== */
.cta-strip {
    position: relative; overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
                var(--accent-gradient) border-box;
    border-radius: var(--radius-lg);
    padding: 72px 40px; text-align: center;
}
.cta-strip h2 { margin-top: 0; letter-spacing: -.02em; font-size: clamp(1.8rem, 3.4vw, 2.4rem); }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--separator); padding: 40px 0 20px; margin-top: 40px; position: relative; z-index: 1; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 20px; }
.footer-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-contact a { color: var(--accent); font-weight: 600; }

/* ===== Contact page ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info a { display: block; color: var(--accent); font-weight: 600; margin-bottom: 10px; font-size: 1.05rem; }

/* ===== AI Chat widget — glass + glow ===== */
.ai-chat-launcher {
    position: fixed; bottom: 28px; right: 28px; z-index: 200;
    width: 66px; height: 66px; border-radius: 50%;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 10px 34px rgba(109,40,253,.5);
    font-size: 1.6rem; transition: transform .15s var(--ease);
}
.ai-chat-launcher:hover { transform: scale(1.07); }

.ai-chat-panel {
    position: fixed; bottom: 106px; right: 28px; z-index: 200;
    width: 390px; max-width: calc(100vw - 32px);
    height: 520px; max-height: calc(100vh - 150px);
    background: var(--glass-bg);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
    display: none; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 70px rgba(109,40,253,.28), inset 0 1px 0 var(--glass-highlight);
}
.ai-chat-panel.open { display: flex; }
.ai-chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid var(--separator); font-weight: 700;
}
.ai-chat-header button { background: none; border: none; color: var(--label-secondary); font-size: 1.05rem; cursor: pointer; }
.ai-chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { padding: 10px 14px; border-radius: 14px; font-size: .92rem; max-width: 85%; }
.ai-msg-bot { background: var(--bg-tertiary); border: 1px solid var(--separator); align-self: flex-start; }
.ai-msg-user { background: var(--accent-gradient); color: var(--accent-on); align-self: flex-end; font-weight: 500; }
.ai-msg-loading { color: var(--label-secondary); font-style: italic; }
.ai-chat-form { display: flex; border-top: 1px solid var(--separator); }
.ai-chat-form input {
    flex: 1; background: none; border: none; color: var(--label); padding: 12px 14px; font-size: .92rem; outline: none;
}
.ai-chat-form button {
    background: none; border: none; color: var(--accent); font-weight: 700; padding: 0 16px; cursor: pointer;
}

/* ===== Referans logoları — ilk ekranda akan şerit ===== */
.logo-marquee {
    position: relative; z-index: 1;
    padding: 22px 0 6px; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-marquee-title {
    text-align: center; margin: 0 0 14px; font-size: .95rem; color: var(--label-secondary);
}
.logo-marquee-title strong {
    background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-row { overflow: hidden; padding: 6px 0; }
.logo-track {
    display: flex; gap: 16px; width: max-content; margin: 0; padding: 0; list-style: none;
    animation: logo-scroll var(--dur, 30s) linear infinite;
}
.logo-row.reverse .logo-track { animation-direction: reverse; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
@keyframes logo-scroll { to { transform: translateX(calc(-50% - 8px)); } }

.logo-tile {
    flex: 0 0 auto; width: 168px; height: 78px;
    display: flex; align-items: center; justify-content: center; padding: 12px 18px;
    background: #fff; border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    box-shadow: 0 6px 18px rgba(30,20,60,.08);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.logo-tile:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 12px 28px rgba(109,40,253,.25); }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-text {
    font-weight: 800; font-size: .98rem; letter-spacing: -.01em; line-height: 1.15; text-align: center;
    color: #1d1340;
}
.logo-tile.is-text .logo-text {
    background: linear-gradient(120deg, #3b0fa8, #a3159b); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-tile.has-icon { gap: 10px; justify-content: flex-start; }
.logo-tile.has-icon img { height: 100%; width: auto; max-width: 42%; }
.logo-tile.has-icon .logo-text { text-align: left; font-size: .9rem; }

.hero.after-logos { padding-top: 56px; }

@media (max-width: 720px) {
    .logo-marquee { padding-top: 16px; }
    .logo-tile { width: 124px; height: 60px; padding: 9px 12px; }
    .logo-text { font-size: .82rem; }
    .logo-tile.has-icon .logo-text { font-size: .74rem; }
    .logo-track { gap: 10px; }
    @keyframes logo-scroll { to { transform: translateX(calc(-50% - 5px)); } }
    .hero.after-logos { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    .logo-track { animation-duration: calc(var(--dur, 30s) * 3); }
}

/* ===== Vaka analizleri ===== */
.case-list { display: grid; gap: 28px; }
.case { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; }
.case-logo { height: 64px; width: auto; max-width: 220px; object-fit: contain; padding: 10px 14px; border-radius: var(--radius-sm); display: block; margin-bottom: 16px; }
.case .badge { margin-bottom: 8px; }
.case h3 { font-size: 1.7rem; }
.case-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 6px 0 18px; }
.case-stats .card-stat strong { font-size: 2rem; }
.case-teasers { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.case-teaser { display: block; }
.case-teaser h3 { margin-top: 22px; }
@media (max-width: 900px) {
    .case, .case-teasers { grid-template-columns: 1fr; gap: 24px; }
}

/* Google sonuç sayfası benzeri görsel */
.serp {
    background: #fff; color: #202124; border-radius: var(--radius); padding: 18px;
    box-shadow: 0 20px 50px rgba(30,20,60,.18); border: 1px solid var(--glass-border);
    font-family: Arial, sans-serif; text-align: left;
}
.serp-bar {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
    border: 1px solid #dfe1e5; box-shadow: 0 1px 6px rgba(32,33,36,.18); margin-bottom: 14px;
}
.serp-g { font-weight: 700; font-size: 1.15rem; background: conic-gradient(#4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.serp-q { flex: 1; font-size: .98rem; }
.serp-icon { color: #4285f4; font-size: 1.1rem; }
.serp-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.serp-ghost { display: grid; gap: 6px; padding: 8px 12px; }
.serp-ghost span { height: 8px; border-radius: 4px; background: #eceef1; }
.serp-ghost span:nth-child(1) { width: 30%; }
.serp-ghost span:nth-child(2) { width: 70%; height: 11px; background: #dfe3ff; }
.serp-ghost span:nth-child(3) { width: 90%; }
.serp-hit {
    position: relative; padding: 12px 14px 12px 14px; border-radius: 14px;
    background: linear-gradient(120deg, rgba(109,40,253,.08), rgba(192,38,211,.08));
    outline: 2px solid var(--accent); animation: serp-pulse 2.4s var(--ease) infinite;
}
.serp-hit small { color: #4d5156; font-size: .78rem; display: block; }
.serp-hit b { color: #1a0dab; font-weight: 400; font-size: 1.05rem; display: block; margin: 2px 0 4px; line-height: 1.3; padding-right: 48px; }
.serp-hit p { color: #4d5156; font-size: .82rem; margin: 0; line-height: 1.45; }
.serp-rank {
    position: absolute; top: -12px; right: 12px; background: var(--accent-gradient); color: #fff;
    font-weight: 800; font-size: .95rem; padding: 6px 12px; border-radius: 999px; box-shadow: 0 6px 16px rgba(109,40,253,.4);
}
@keyframes serp-pulse { 50% { box-shadow: 0 0 0 6px rgba(109,40,253,.15); } }
@media (prefers-reduced-motion: reduce) { .serp-hit { animation: none; } }

/* Referans ızgarası */
.ref-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.ref-item { display: flex; flex-direction: column; gap: 4px; }
.ref-item .logo-tile { width: 100%; height: 96px; margin-bottom: 8px; }
.ref-item > strong { font-size: .98rem; }
.ref-item > span { font-size: .85rem; color: var(--label-secondary); }
@media (max-width: 720px) { .ref-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } .ref-item .logo-tile { height: 76px; } }

/* Tıklanabilir logolar */
.logo-link { display: flex; align-items: center; justify-content: center; gap: inherit; width: 100%; height: 100%; }
.logo-tile.has-icon .logo-link { justify-content: flex-start; }
.logo-tile.has-icon { gap: 10px; }
.logo-link img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-tile.has-icon .logo-link img { height: 100%; width: auto; max-width: 42%; }

/* ==========================================================================
   Scroll storytelling — "Bir işletmenin dijital yolculuğu"
   Bölüm ekrana sabitlenir (pin); scroll ilerledikçe sahne ve metin değişir.
   Sahne öğeleri --p (0–1, bölüm ilerlemesi) ve --d (gecikme adımı) ile canlanır.
   Sahne içi ölçüler em: sahne büyüdükçe içerik de büyür.
   ========================================================================== */
.story { padding: 40px 0 0; }
.story-head { margin-bottom: 0; }
.story-track { position: relative; height: calc(var(--n, 5) * 100vh + 100vh); }
.story-pin { position: sticky; top: 77px; height: calc(100vh - 77px); overflow: hidden; }
@supports (height: 100svh) {
    .story-track { height: calc(var(--n, 5) * 100svh + 100svh); }
    .story-pin { height: calc(100svh - 77px); }
}
.story-pin-inner { height: 100%; display: grid; grid-template-columns: 1.55fr 1fr; gap: 48px; align-items: center; padding-top: 18px; padding-bottom: 18px; }

/* Sahne */
.story-stage { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.story-rail { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; flex: none; }
.story-rail li { position: relative; height: 4px; border-radius: 4px; background: var(--separator); cursor: pointer; }
.rail-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--accent-gradient); transform-origin: left; transform: scaleX(var(--f, 0)); }
.story-rail em { position: absolute; top: 10px; left: 0; font-style: normal; font-size: .74rem; font-weight: 600; color: var(--label-tertiary); white-space: nowrap; transition: color .3s var(--ease); }
.story-rail li.is-done em { color: var(--label); }

.stage-window {
    flex: 1; min-height: 0; display: flex; flex-direction: column;
    border-radius: var(--radius); overflow: hidden;
    background: var(--bg-secondary); border: 1px solid var(--glass-border);
    box-shadow: 0 30px 80px rgba(109,40,253,.22), inset 0 1px 0 var(--glass-highlight);
}
.stage-chrome { flex: none; display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--separator); background: var(--bg-tertiary); }
.stage-chrome > span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.stage-chrome > span:nth-child(2) { background: #febc2e; }
.stage-chrome > span:nth-child(3) { background: #28c840; }
.stage-url { margin-left: 12px; flex: 1; font-size: .82rem; color: var(--label-secondary); background: var(--bg-secondary); border-radius: 999px; padding: 5px 14px; }
.stage-url b { font-weight: 400; font-size: .7rem; margin-right: 4px; }
.stage-body { position: relative; flex: 1; min-height: 0; container-type: size; font-size: clamp(12px, 2.3cqw, 19px); }

.scene { --p: 0; position: absolute; inset: 0; padding: 1.6em; opacity: 0; visibility: hidden; transform: scale(.97); transition: opacity .5s var(--ease), transform .5s var(--ease), visibility 0s .5s; }
.scene.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

/* Ortak: --d adımına göre beliren öğe */
.scene .b, .scene .tag, .scene .m, .infra-list li, .infra-live {
    --k: clamp(0, calc(var(--p) * 7 - var(--d, 0)), 1);
    opacity: var(--k);
    transform: translateY(calc((1 - var(--k)) * 1.2em)) scale(calc(.94 + var(--k) * .06));
}

/* 01 Web tasarım */
.ms-site { position: absolute; inset: 1.6em 30% 3.4em 1.6em; display: flex; flex-direction: column; gap: .7em; }
.ms-site i, .ms-phone i { display: block; border-radius: .6em; background: var(--bg-tertiary); position: relative; overflow: hidden; }
.ms-site i::after, .ms-phone i::after, .ms-site .ms-hero::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: var(--accent-gradient); opacity: calc(clamp(0, (var(--p) - .5) * 4, 1) * var(--o, .22));
}
.ms-nav { display: flex; gap: .6em; align-items: center; }
.ms-nav i { height: .7em; width: 3.2em; }
.ms-nav i.ms-logo { width: 1.8em; height: 1.8em; margin-right: auto; --o: 1; }
.ms-site .ms-hero { position: relative; overflow: hidden; border-radius: .6em; flex: 1.3; display: flex; flex-direction: column; justify-content: center; gap: .7em; padding: 1.2em; background: var(--bg-tertiary); --o: .5; }
.ms-hero > i { position: relative; z-index: 1; background: var(--separator); }
.ms-line { height: 1em; width: 80%; }
.ms-line.short { width: 55%; }
.ms-btn { height: 1.8em; width: 7.5em; border-radius: 999px !important; --o: 1; margin-top: .4em; }
.ms-cards { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7em; }
.ms-cards i { --o: .3; }
.ms-phone {
    position: absolute; right: 1.6em; bottom: 3.4em; width: 22%; aspect-ratio: 9 / 18; max-height: calc(100% - 5em);
    border-radius: 1.2em; border: .2em solid var(--label); background: var(--bg-secondary);
    padding: 1em .5em .5em; display: flex; flex-direction: column; gap: .4em;
}
.ms-phone i.ms-hero { flex: 1.4; --o: .55; }
.ms-phone i.ms-card { flex: 1; --o: .3; }
.scene-tags { position: absolute; left: 1.6em; bottom: 1.1em; display: flex; gap: .4em; }
.tag { font-size: .75em; font-weight: 700; padding: .35em .9em; border-radius: 999px; background: var(--accent-gradient); color: var(--accent-on); box-shadow: 0 6px 16px rgba(109,40,253,.35); }

/* 02 SEO */
.scene-seo { display: flex; flex-direction: column; gap: 1em; }
.seo-search { flex: none; display: flex; align-items: center; gap: .7em; padding: .6em 1.1em; border-radius: 999px; background: #fff; color: #202124; border: 1px solid #dfe1e5; font-size: .95em; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.seo-search b { font-family: Arial, sans-serif; background: conic-gradient(#4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.seo-list { --row: 3em; position: relative; flex: none; height: calc(6 * var(--row)); }
.sr { position: absolute; left: 0; right: 0; height: calc(var(--row) - .45em); border-radius: .7em; padding: .3em .9em; transform: translateY(calc(var(--slot, 0) * var(--row))); transition: transform .55s cubic-bezier(.34,1.4,.5,1); display: flex; flex-direction: column; justify-content: center; gap: .3em; }
.sr.ghost i { display: block; height: .4em; border-radius: .2em; background: var(--separator); width: 30%; }
.sr.ghost i + i { width: 72%; height: .55em; }
.sr.hit { z-index: 2; gap: 0; background: var(--bg-secondary); outline: 2px solid var(--accent); box-shadow: 0 10px 26px rgba(109,40,253,.28); padding-right: 4.5em; }
.sr.hit small { font-size: .68em; color: var(--label-secondary); line-height: 1.15; }
.sr.hit b { font-size: .92em; color: var(--accent); font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-rank { position: absolute; right: .7em; top: 50%; transform: translateY(-50%); background: var(--accent-gradient); color: var(--accent-on); font-weight: 800; font-size: .9em; padding: .25em .7em; border-radius: 999px; }
.sr.hit.is-top { outline-color: #22c55e; }
.sr.hit.is-top .sr-rank { background: linear-gradient(120deg, #16a34a, #22c55e); animation: rank-pop .6s var(--ease); }
@keyframes rank-pop { 40% { transform: translateY(-50%) scale(1.35); } }
.seo-chart { flex: 1; min-height: 0; border-radius: .8em; background: var(--bg-tertiary); padding: .6em .8em 0; display: flex; flex-direction: column; }
.seo-chart span { font-size: .72em; font-weight: 600; color: var(--label-secondary); }
.seo-chart svg { flex: 1; min-height: 0; width: 100%; }
.seo-chart .line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); vector-effect: non-scaling-stroke; }
.seo-chart .area { fill: var(--accent); opacity: calc(var(--p) * .18); }

/* 03 AI asistan */
.scene-ai { display: flex; flex-direction: column; gap: .8em; }
.ai-head { flex: none; display: flex; align-items: center; gap: .5em; font-size: .95em; padding-bottom: .7em; border-bottom: 1px solid var(--separator); }
.ai-head span { margin-left: auto; font-size: .78em; color: var(--label-secondary); }
.ai-dot { width: .6em; height: .6em; border-radius: 50%; background: #28c840; box-shadow: 0 0 0 .25em rgba(40,200,64,.2); }
.ai-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .55em; justify-content: flex-end; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 14%); mask-image: linear-gradient(transparent, #000 14%); }
.m { flex: none; margin: 0; max-width: 80%; padding: .6em .9em; border-radius: 1.1em; font-size: .9em; line-height: 1.4; }
.m.user { align-self: flex-end; background: var(--accent-gradient); color: var(--accent-on); border-bottom-right-radius: .35em; }
.m.bot { align-self: flex-start; background: var(--bg-tertiary); border: 1px solid var(--separator); border-bottom-left-radius: .35em; }
.m.typing { align-self: flex-start; background: var(--bg-tertiary); display: flex; gap: .3em; padding: .8em 1em; opacity: calc(var(--k) * (1 - clamp(0, (var(--p) - .92) * 12, 1))); }
.m.typing i { width: .4em; height: .4em; border-radius: 50%; background: var(--label-tertiary); animation: typing 1s infinite; }
.m.typing i:nth-child(2) { animation-delay: .15s; }
.m.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { transform: translateY(-.25em); background: var(--accent); } }
.ai-badge { flex: none; align-self: center; font-size: .75em; font-weight: 700; padding: .35em .9em; border-radius: 999px; border: 1px solid var(--glass-border); color: var(--accent); }

/* 04 Otomasyon — çizgi koordinatları (viewBox 400x260) ile kutu konumları eşleşir */
.flow-lines { position: absolute; left: 1.6em; top: 1.6em; width: calc(100% - 3.2em); height: calc(100% - 5.2em); }
.flow-lines path { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.flow-lines path:not(.flow) { stroke: var(--accent); stroke-dasharray: 1; stroke-dashoffset: calc(1 - clamp(0, var(--p) * 4.2 - var(--d), 1)); }
.flow-lines path.flow { stroke: var(--accent-3); stroke-width: 4; stroke-dasharray: .04 .12; opacity: clamp(0, var(--p) * 4.2 - var(--d) - .6, 1); animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -.32; } }
.node {
    --k: clamp(0, calc(var(--p) * 4.2 - var(--d, 0)), 1);
    position: absolute; translate: -50% -50%; opacity: var(--k); transform: scale(calc(.8 + var(--k) * .2));
    display: flex; flex-direction: column; align-items: center; gap: .25em; padding: .7em .85em;
    background: var(--bg-secondary); border: 1px solid var(--glass-border); border-radius: .9em;
    font-size: .78em; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 22px rgba(30,20,60,.14);
}
.node b { font-size: 1.5em; line-height: 1; }
.node.ai { background: var(--accent-gradient); color: var(--accent-on); border: none; box-shadow: 0 10px 30px rgba(109,40,253,.45); }
.flow-count { position: absolute; left: 0; right: 0; bottom: 1.1em; text-align: center; font-size: .85em; color: var(--label-secondary); }
.flow-count b { font-size: 1.5em; color: var(--label); font-variant-numeric: tabular-nums; }

/* 05 Altyapı */
.scene-infra { display: flex; flex-direction: column; justify-content: center; gap: 1.1em; }
.infra-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7em; }
.infra-list li { display: flex; align-items: center; gap: .9em; padding: .7em 1em; border-radius: .9em; background: var(--bg-tertiary); border: 1px solid var(--separator); }
.infra-list li > span { font-size: 1.35em; }
.infra-list li div { flex: 1; display: flex; flex-direction: column; }
.infra-list b { font-size: .95em; }
.infra-list small { font-size: .76em; color: var(--label-secondary); }
.infra-list li > i { font-style: normal; width: 1.7em; height: 1.7em; border-radius: 50%; display: grid; place-items: center; background: #22c55e; color: #fff; font-weight: 800; font-size: .85em; }
.infra-live { align-self: center; display: flex; align-items: center; gap: .6em; font-weight: 800; font-size: 1.15em; padding: .6em 1.4em; border-radius: 999px; background: var(--accent-gradient); color: var(--accent-on); box-shadow: 0 14px 34px rgba(109,40,253,.45); }
.infra-live i { width: .6em; height: .6em; border-radius: 50%; background: #4ade80; animation: live 1.4s infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 .45em rgba(74,222,128,.25); } }

/* Bölüm metinleri — sadece aktif bölüm görünür */
.story-captions { position: relative; height: 100%; }
.story-step {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
    opacity: 0; transform: translateY(24px); pointer-events: none;
    transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.story-step.is-active { opacity: 1; transform: none; pointer-events: auto; transition-delay: .1s; }
.step-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-no { font-size: 4.4rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story-step .badge { margin: 0; }
.step-label { margin: 14px 0 6px; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.story-step h3 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); margin: 0 0 14px; }
.story-step > p { color: var(--label-secondary); font-size: 1.1rem; margin: 0 0 16px; }
.story-step .bullet-list { margin-bottom: 18px; }
.story-step .card-link { color: var(--accent); font-weight: 600; }

/* Mobil / tablet dikey: sahne üstte büyük, aktif metin altta */
@media (max-width: 900px) {
    .story-pin-inner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; align-items: stretch; padding-top: 12px; padding-bottom: 16px; }
    .story-rail { margin-bottom: 10px; }
    .story-rail em { display: none; }
    .stage-chrome { padding: 8px 12px; }
    .stage-url { font-size: .74rem; }
    .stage-body { font-size: clamp(11px, 3.5cqw, 16px); }
    .scene { padding: 1.1em; }
    .story-captions { height: auto; min-height: 210px; }
    .story-step { justify-content: flex-start; transform: translateY(14px); }
    .step-no { font-size: 1.9rem; }
    .step-label { margin: 0; }
    .step-top { gap: 10px; margin-bottom: 6px; }
    .story-step .badge { order: 3; font-size: .62rem; padding: 3px 9px; }
    .story-step h3 { font-size: 1.35rem; margin-bottom: 8px; }
    .story-step > p { font-size: .95rem; line-height: 1.45; margin-bottom: 8px; }
    .story-step .bullet-list { display: none; }
    .scene-ai .ai-badge { display: none; }
}
@media (max-width: 900px) and (max-height: 740px) {
    .story-captions { min-height: 180px; }
    .story-step > p { font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .flow-lines path.flow, .m.typing i, .infra-live i { animation: none; }
    .sr { transition: none; }
}
@media (max-width: 900px) {
    .ai-chat-launcher { transition: opacity .3s var(--ease), transform .3s var(--ease); }
    body.story-pinned .ai-chat-launcher { opacity: 0; transform: scale(.6); pointer-events: none; }
}

/* Akan logolar — JS ile kaydırma ve elle sürükleme */
.logo-marquee.js .logo-track { animation: none; will-change: transform; }
.logo-marquee.js .logo-row { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.logo-marquee.js .logo-row.dragging { cursor: grabbing; }
.logo-marquee.js .logo-row.dragging a { pointer-events: none; }
.logo-marquee img { -webkit-user-drag: none; user-select: none; }

/* AI sohbet: açıkken baloncuk yerine telefon + WhatsApp */
.ai-chat-launcher { transition: opacity .25s var(--ease), transform .25s var(--ease); }
body.ai-chat-open .ai-chat-launcher { opacity: 0; transform: scale(.5) rotate(-90deg); pointer-events: none; }
.ai-contact-dock {
    position: fixed; bottom: 28px; right: 28px; z-index: 201;
    display: flex; gap: 12px; pointer-events: none;
}
.dock-btn {
    width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff;
    opacity: 0; transform: scale(.4) translateY(10px);
    transition: opacity .25s var(--ease), transform .3s cubic-bezier(.34,1.5,.5,1);
}
.dock-btn svg { width: 28px; height: 28px; }
.dock-wa { background: #25d366; box-shadow: 0 10px 28px rgba(37,211,102,.45); }
.dock-tel { background: var(--accent-gradient); box-shadow: 0 10px 28px rgba(109,40,253,.5); }
body.ai-chat-open .ai-contact-dock { pointer-events: auto; }
body.ai-chat-open .dock-btn { opacity: 1; transform: none; }
body.ai-chat-open .dock-wa { transition-delay: .05s; }
body.ai-chat-open .dock-tel { transition-delay: .12s; }
.dock-btn:hover { transform: scale(1.08) !important; }

.ai-msg-bot a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ai-msg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ai-msg-actions .ai-act { text-decoration: none; font-weight: 700; font-size: .85rem; padding: 7px 14px; border-radius: 999px; color: #fff; }
.ai-act-tel { background: var(--accent-gradient); color: var(--accent-on) !important; }
.ai-act-wa { background: #25d366; color: #fff !important; }

/* İletişim satırları: ikon ve metin asla ayrı satıra düşmez */
.contact-line { display: flex !important; align-items: center; gap: 12px; margin-bottom: 12px !important; min-width: 0; }
.contact-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-tertiary); font-size: 1.1rem; }
.contact-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(.92rem, 4.1vw, 1.05rem); }

/* Küçük telefonlar (S23 = 360px): kenar boşlukları daralır */
@media (max-width: 480px) {
    .wrap { padding: 0 18px; }
    .card { padding: 22px; }
}
@media (max-width: 480px) {
    section { padding: 56px 0; }
    .hero .hero-eyebrow { white-space: nowrap; font-size: .74rem; letter-spacing: .08em; padding-left: 14px; padding-right: 14px; }
    .ref-item > strong { font-size: .9rem; line-height: 1.25; }
    .ref-item > span { font-size: .78rem; line-height: 1.3; }
}
@media (max-width: 600px) {
    .hero .hero-role .role-sep { display: none; }
    .hero .hero-role .role-name, .hero .hero-role .role-title { display: block; }
    .hero .hero-role .role-name { color: var(--label); font-size: 1.1rem; }
    .hero .hero-role .role-title { font-size: .92rem; margin-top: 2px; }
}

/* Sağ alttaki buton: sohbet / WhatsApp / telefon arasında döner */
button.ai-chat-launcher { border: none; padding: 0; color: #fff; overflow: hidden; isolation: isolate; }
.ai-chat-launcher::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
    background: #25d366; opacity: 0; transition: opacity .45s var(--ease);
}
.ai-chat-launcher[data-mode="wa"]::before { opacity: 1; }
.ai-chat-launcher[data-mode="wa"] { box-shadow: 0 10px 34px rgba(37,211,102,.5); }
.ai-chat-launcher .li {
    position: absolute; inset: 0; display: grid; place-items: center;
    opacity: 0; transform: scale(.3) rotate(-40deg);
    transition: opacity .35s var(--ease), transform .45s cubic-bezier(.34,1.5,.5,1);
}
.ai-chat-launcher .li svg { width: 30px; height: 30px; }
.ai-chat-launcher[data-mode="chat"] .li-chat,
.ai-chat-launcher[data-mode="wa"] .li-wa,
.ai-chat-launcher[data-mode="tel"] .li-tel { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ai-chat-launcher .li { transition: opacity .2s; transform: none; } }

/* Mobil unvan: iki kısa ortalı satır (sağ alttaki butonla çakışmasın) */
@media (max-width: 600px) {
    .hero .hero-role .rt-dot { display: none; }
    .hero .hero-role .rt { display: block; }
}

/* Sağ alttaki butonlar: daha küçük ve kenara yakın */
.ai-chat-launcher { width: 54px; height: 54px; right: 16px; bottom: 18px; }
.ai-chat-launcher .li svg { width: 25px; height: 25px; }
.ai-contact-dock { right: 16px; bottom: 18px; gap: 10px; }
.dock-btn { width: 50px; height: 50px; }
.dock-btn svg { width: 23px; height: 23px; }
.ai-chat-panel { right: 16px; bottom: 84px; }
@media (max-width: 600px) {
    .ai-chat-launcher { width: 48px; height: 48px; right: 10px; bottom: 12px; }
    .ai-chat-launcher .li svg { width: 22px; height: 22px; }
    .ai-contact-dock { right: 10px; bottom: 12px; gap: 8px; }
    .dock-btn { width: 46px; height: 46px; }
    .dock-btn svg { width: 21px; height: 21px; }
    .ai-chat-panel { right: 10px; left: 10px; width: auto; max-width: none; bottom: 70px; max-height: calc(100svh - 150px); }
}
