/* ==========================================================================
   Hoş geldin penceresi (v10) — <dialog class="welcome">, partials/welcome.php
   Sade: opak panel, 1px çizgi, üstte turuncu çizgi, satır satır eylemler. Blur yok; arka plan düz koyu perde.
   ========================================================================== */

.welcome {
    width: min(31rem, calc(100% - 2rem));
    max-width: none;
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    color: var(--text);
}

.welcome::backdrop {
    background: rgb(10 5 2 / 0.7);
}

.welcome[open]::backdrop {
    animation: welcome-fade 0.45s var(--ease) both;
}

.welcome.is-closing::backdrop {
    animation: welcome-fade 0.25s var(--ease) reverse both;
}

.welcome__panel {
    position: relative;
    max-height: calc(100dvh - 2rem);
    padding: clamp(1.5rem, 4vw, 2.25rem);
    overflow: auto;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

/* Üstte soldan sağa çizilen turuncu çizgi */
.welcome__panel::before {
    content: "";
    position: absolute;
    top: -1px;
    right: 2rem;
    left: 2rem;
    height: 2px;
    background: var(--brand);
    transform-origin: 0 50%;
}

.welcome[open] .welcome__panel {
    animation: welcome-in 0.6s var(--ease) both;
}

.welcome[open] .welcome__panel::before {
    animation: welcome-draw 0.9s var(--ease) 0.25s both;
}

.welcome.is-closing .welcome__panel {
    animation: welcome-out 0.25s var(--ease) both;
}

.welcome__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-2);
    background: transparent;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}

.welcome__close:hover,
.welcome__close:focus-visible {
    color: var(--text);
    background: var(--surface-2);
    border-color: var(--line-2);
    transform: rotate(90deg);
}

.welcome__close .icon {
    width: 18px;
    height: 18px;
}

.welcome__eyebrow {
    margin-bottom: 0.9rem;
}

.welcome__eyebrow::before {
    display: none;
}

.welcome__dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
}

.welcome__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--brand);
    animation: ping 2.4s var(--ease) infinite;
}

.welcome__title {
    max-width: 14em;
    margin-bottom: 0.75rem;
    font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem);
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: var(--ls-head);
    color: var(--text);
}

.welcome__text {
    margin-bottom: 1.5rem;
    max-width: 30em;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-2);
}

.welcome__actions {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.welcome__act {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 0.25rem;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s, padding 0.3s var(--ease), background-color 0.2s;
    --flame-inset: 0.25rem;
    --flame-bottom: 0px;
    --flame-h: 10px;
}

.welcome__act:hover,
.welcome__act:focus-visible {
    padding-inline: 0.7rem;
    background: var(--surface-2);
}

.welcome__ico {
    flex: none;
    width: 22px;
    height: 22px;
    color: var(--brand-600);
}

.welcome__act-text {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.welcome__act-label {
    font-size: 1.02rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.welcome__act-sub {
    font-size: 0.84rem;
    line-height: 1.3;
    color: var(--text-2);
}

.welcome__arrow {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--text-3);
    transition: transform 0.3s var(--ease), color 0.2s;
}

.welcome__act:hover .welcome__arrow,
.welcome__act:focus-visible .welcome__arrow {
    color: var(--brand-600);
    transform: translateX(3px);
}

/* Birincil eylem (WhatsApp): dolu turuncu yüzey */
.welcome__act--primary {
    margin-bottom: 0.75rem;
    padding: 0.95rem 1.1rem;
    border: 0;
    border-radius: var(--radius-sm);
    color: #fff;
    /* AA: beyaz yazı için koyulaştırılmış turuncu (≈5:1) */
    background: color-mix(in srgb, var(--brand) 76%, #000);
    --flame-color: #ffd36b;
    --flame-tip: #fff3c4;
    --flame-inset: 10%;
}

.welcome__act--primary:hover,
.welcome__act--primary:focus-visible {
    padding-inline: 1.1rem;
    background: color-mix(in srgb, var(--brand) 68%, #000);
}

.welcome__act--primary .welcome__ico,
.welcome__act--primary .welcome__arrow,
.welcome__act--primary .welcome__act-sub {
    color: var(--brand-ink);
}

.welcome__act--primary .welcome__act-label,
.welcome__act--primary .welcome__act-sub {
    color: #fff;
    opacity: 1;
}

.welcome__act--primary:hover .welcome__arrow {
    color: var(--brand-ink);
    transform: translate(2px, -2px);
}

/* Sıralı belirme */
.welcome[open] .welcome__actions > li {
    animation: welcome-row 0.55s var(--ease) both;
}

.welcome[open] .welcome__actions > li:nth-child(1) { animation-delay: 0.3s; }
.welcome[open] .welcome__actions > li:nth-child(2) { animation-delay: 0.38s; }
.welcome[open] .welcome__actions > li:nth-child(3) { animation-delay: 0.46s; }

@keyframes welcome-fade {
    from { opacity: 0; }
}

@keyframes welcome-in {
    from {
        opacity: 0;
        transform: translate3d(0, 28px, 0) scale(0.97);
    }
}

@keyframes welcome-out {
    to {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.98);
    }
}

@keyframes welcome-draw {
    from { transform: scaleX(0); }
}

@keyframes welcome-row {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome[open]::backdrop,
    .welcome[open] .welcome__panel,
    .welcome[open] .welcome__panel::before,
    .welcome[open] .welcome__actions > li,
    .welcome.is-closing::backdrop,
    .welcome.is-closing .welcome__panel,
    .welcome__dot::after {
        animation: none;
    }
}

html[data-motion="off"] .welcome[open]::backdrop,
html[data-motion="off"] .welcome[open] .welcome__panel,
html[data-motion="off"] .welcome[open] .welcome__panel::before,
html[data-motion="off"] .welcome[open] .welcome__actions > li,
html[data-motion="off"] .welcome.is-closing::backdrop,
html[data-motion="off"] .welcome.is-closing .welcome__panel,
html[data-motion="off"] .welcome__dot::after {
    animation: none;
}

html[data-motion="calm"] .welcome__dot::after {
    animation: none;
}

@media print {
    .welcome {
        display: none !important;
    }
}
