/* ==========================================================================
   PamukkaleHTA – Shared premium layer
   Loaded on every page after the inline styles. Additive only: does not
   override the existing design system (#FDFDFD, Inter, zinc, sky accents).
   ========================================================================== */

/* ---------- Page enter transition (CSS-only, no JS dependency) ---------- */
@keyframes ptEnter { from { opacity: 0; } to { opacity: 1; } }
body { animation: ptEnter 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
html.pt-leaving body {
    opacity: 0;
    transition: opacity 0.32s cubic-bezier(0.7, 0, 0.84, 0);
}

/* ---------- Header right cluster (CTA + mobile toggle) ---------- */
.mm-right { position: relative; z-index: 10; display: flex; align-items: center; gap: 0.5rem; }
@media (max-width: 479px) { .mm-right .header-cta { display: none; } }

.mm-toggle {
    width: 2.5rem; height: 2.5rem; border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #09090b; color: #fff; border: 0; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.mm-toggle:hover { background: #0284c7; }
.mm-toggle:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 3px; }
.mm-toggle .mm-lines { position: relative; width: 16px; height: 10px; }
.mm-toggle .mm-lines span {
    position: absolute; left: 0; width: 100%; height: 1.5px; border-radius: 2px;
    background: currentColor;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), top 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.mm-toggle .mm-lines span:nth-child(1) { top: 1px; }
.mm-toggle .mm-lines span:nth-child(2) { top: 7.5px; }
html.mm-open .mm-toggle .mm-lines span:nth-child(1) { top: 4.25px; transform: rotate(45deg); }
html.mm-open .mm-toggle .mm-lines span:nth-child(2) { top: 4.25px; transform: rotate(-45deg); }
@media (min-width: 768px) { .mm-toggle { display: none; } }

/* ---------- Mobile menu panel ---------- */
.mm-panel {
    position: fixed; inset: 0; z-index: 999;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 7.5rem 1.75rem 2rem;
    background: rgba(253, 253, 253, 0.9);
    backdrop-filter: blur(28px) saturate(1.2);
    -webkit-backdrop-filter: blur(28px) saturate(1.2);
    opacity: 0; visibility: hidden;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.45s;
}
html.mm-open .mm-panel {
    opacity: 1; visibility: visible;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}
@media (min-width: 768px) { .mm-panel { display: none; } }

.mm-label {
    font-size: 10px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
    color: #a1a1aa; margin-bottom: 1rem;
}
.mm-links { list-style: none; margin: 0; padding: 0; }
.mm-links li { border-bottom: 1px solid rgba(228, 228, 231, 0.8); }
.mm-links a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 0; font-size: 1.65rem; font-weight: 300; letter-spacing: -0.02em;
    color: #09090b; text-decoration: none;
    opacity: 0; transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}
.mm-links a.is-active { font-weight: 500; }
.mm-links a svg { width: 18px; height: 18px; color: #a1a1aa; transition: transform 0.3s ease, color 0.3s ease; }
.mm-links a:hover, .mm-links a:focus-visible { color: #0284c7; }
.mm-links a:hover svg { color: #0284c7; transform: translateX(4px); }
html.mm-open .mm-links a { opacity: 1; transform: none; }
html.mm-open .mm-links li:nth-child(1) a { transition-delay: 0.06s; }
html.mm-open .mm-links li:nth-child(2) a { transition-delay: 0.10s; }
html.mm-open .mm-links li:nth-child(3) a { transition-delay: 0.14s; }
html.mm-open .mm-links li:nth-child(4) a { transition-delay: 0.18s; }
html.mm-open .mm-links li:nth-child(5) a { transition-delay: 0.22s; }
html.mm-open .mm-links li:nth-child(6) a { transition-delay: 0.26s; }
html.mm-open .mm-links li:nth-child(7) a { transition-delay: 0.30s; }

.mm-actions {
    display: grid; gap: 0.65rem;
    opacity: 0; transform: translateY(14px);
    transition: opacity 0.5s ease 0.3s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
html.mm-open .mm-actions { opacity: 1; transform: none; }
.mm-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    padding: 1rem; border-radius: 9999px; font-size: 0.9rem; font-weight: 500; text-decoration: none;
}
.mm-btn svg { width: 18px; height: 18px; }
.mm-btn-dark { background: #09090b; color: #fff; }
.mm-btn-light { background: #fff; color: #09090b; border: 1px solid #e4e4e7; }

html.mm-open, html.mm-open body { overflow: hidden; }

/* ---------- Back to top with scroll-progress ring ---------- */
.btt {
    position: fixed; right: 1.25rem; bottom: 4.85rem; z-index: 900;
    width: 3rem; height: 3rem; border-radius: 9999px; border: 1px solid rgba(228, 228, 231, 0.9);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    background: rgba(255, 255, 255, 0.85); color: #09090b;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.92);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s, background-color 0.3s ease, color 0.3s ease;
}
.btt.is-visible {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s, background-color 0.3s ease, color 0.3s ease;
}
.btt:hover { background: #09090b; color: #fff; }
.btt:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 3px; }
.btt .btt-ring { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); transform: rotate(-90deg); }
.btt .btt-ring circle { fill: none; stroke-width: 1.5; }
.btt .btt-ring .btt-track { stroke: transparent; }
.btt .btt-ring .btt-bar { stroke: #0ea5e9; stroke-linecap: round; transition: stroke-dashoffset 0.1s linear; }
.btt .btt-arrow { width: 16px; height: 16px; position: relative; }
@media (min-width: 768px) { .btt { right: 2rem; bottom: 5.75rem; } }
html.mm-open .btt { opacity: 0; visibility: hidden; }

/* ---------- Floating Telegram Action Button (UI-connected) ---------- */
.floating-telegram {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 900;
    width: 3rem; height: 3rem; border-radius: 9999px;
    background: #229ED9;
    color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px -4px rgba(34, 158, 217, 0.45), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background-color 0.2s ease;
}
.floating-telegram:hover {
    transform: translateY(-2px) scale(1.05);
    background: #1c8ec4;
    box-shadow: 0 14px 30px -4px rgba(34, 158, 217, 0.55), 0 6px 16px -2px rgba(0, 0, 0, 0.12);
}
.floating-telegram:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 3px;
}
.floating-telegram .ft-icon {
    width: 20px; height: 20px;
    display: block;
    transform: translate(-1px, 0.5px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.floating-telegram:hover .ft-icon {
    transform: translate(0px, -1px) scale(1.08);
}
.floating-telegram .ft-tooltip {
    position: absolute; right: calc(100% + 10px);
    padding: 6px 12px; border-radius: 9999px;
    background: rgba(9, 9, 11, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: #ffffff; font-size: 12px; font-weight: 500; letter-spacing: -0.01em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translateX(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.floating-telegram:hover .ft-tooltip {
    opacity: 1; transform: translateX(0);
}
@media (min-width: 768px) {
    .floating-telegram { right: 2rem; bottom: 2rem; }
}
html.mm-open .floating-telegram { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------- Cursor-following glow on cards (pointer devices only) ---------- */
.pg-card { isolation: isolate; }
.pg-glow {
    position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
    opacity: 0; transition: opacity 0.45s ease;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(14, 165, 233, 0.11), transparent 62%);
}
.pg-card:hover > .pg-glow { opacity: 1; }

/* ---------- Count-up numbers keep width stable ---------- */
[data-count] { font-variant-numeric: tabular-nums; }

/* ---------- Contact form success card ---------- */
.form-success {
    text-align: center; padding: 3rem 1.5rem;
    animation: ptEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.form-success .fs-icon {
    width: 4.5rem; height: 4.5rem; margin: 0 auto 1.5rem; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    background: #f0f9ff; color: #0284c7;
}
.form-success .fs-icon svg { width: 2rem; height: 2rem; }
.form-success .fs-icon path {
    stroke-dasharray: 30; stroke-dashoffset: 30;
    animation: fsDraw 0.7s cubic-bezier(0.65, 0, 0.35, 1) 0.25s forwards;
}
@keyframes fsDraw { to { stroke-dashoffset: 0; } }

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
    .pg-glow { display: none; }
}
