/* ==========================================================================
   Marmarotay UI — paylaşılan stiller
   Tailwind CDN ile birlikte kullanılır. Tailwind ile yazılamayan
   (veya her yerde tekrar eden) her şey burada durur.
   Kullanım: <link rel="stylesheet" href="marmarotay.css">
   ========================================================================== */

/* ---------- Fonts (self-hosted, no Google Fonts) ----------
   Inter (variable, 100-900, with italics) and JetBrains Mono, both SIL Open Font License
   (fonts/Inter-OFL.txt, fonts/JetBrainsMono-OFL.txt). PP Mori isn't licensed yet: its rules wait
   in pp-mori.css, and the "mori" font name points at Inter (_build/tailwind.config.js). */

@font-face {
    font-family: 'Inter';
    src: url('fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/InterVariable-Italic.woff2') format('woff2');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/JetBrainsMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/JetBrainsMono-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

body { -webkit-font-smoothing: antialiased; }
html { scroll-padding-top: 4.5rem; }

/* ---------- Metin ---------- */

/* Beyazdan griye dikey geçiş. DİKKAT: başlığın kendisine değil,
   içindeki <span>'e verin; yoksa ğ, y, ç gibi harflerin kuyrukları kesilir. */
.text-gradient {
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.55) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Marka geçişi (mavi → mor → pembe). Vurgu için, sayfa başına 1-2 kez. */
.text-brand-gradient {
    background: linear-gradient(90deg, #60a5fa, #a78bfa 50%, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Yüzeyler ---------- */

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.08);
}
.card-hover { transition: border-color .2s; }
.card-hover:hover { border-color: rgba(255,255,255,0.16); }

/* Vercel tarzı ızgara arka plan (üstten aşağı solar) */
.grid-bg {
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Form ---------- */

.field {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 0.6rem 0.8rem;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: rgba(96,165,250,.6); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.field::placeholder { color: rgba(255,255,255,.3); }
.field:disabled { opacity: .5; cursor: not-allowed; }
select.field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff80' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 16px;
    padding-right: 2.2rem;
}
select.field option { background: #0a0a0a; }
input[type="time"].field::-webkit-calendar-picker-indicator,
input[type="date"].field::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .5; }

/* Anahtar: <button role="switch" aria-checked="true" class="switch"> */
.switch { position: relative; width: 38px; height: 22px; border-radius: 9999px; background: rgba(255,255,255,.12); transition: background .2s; flex-shrink: 0; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 9999px; background: #fff; transition: transform .25s cubic-bezier(.2,.7,.2,1); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch[aria-checked="true"] { background: #3b82f6; }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

/* ---------- Hareket ---------- */

/* Kaydırınca belirme — JS'te IntersectionObserver ile .in eklenir */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* "Canlı" noktası: <span class="relative inline-block h-1.5 w-1.5 rounded-full bg-emerald-400 text-emerald-400 pulse-ring"> */
@keyframes pulse-ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.6); opacity: 0; } }
.pulse-ring::after { content: ''; position: absolute; inset: 0; border-radius: 9999px; background: currentColor; animation: pulse-ring 1.8s cubic-bezier(.2,.7,.2,1) infinite; }

@keyframes marquee { to { transform: translateX(-50%); } }
.marquee { animation: marquee 40s linear infinite; }

@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.fade-down { animation: fade-down .4s cubic-bezier(.2,.7,.2,1); }

/* ---------- SSS ---------- */
details summary::-webkit-details-marker { display: none; }
details[open] .faq-icon { transform: rotate(45deg); }

/* ---------- Dashboard ---------- */

/* Üst köşe ışıması; sayfa kayarken sabit kalır. <body class="bg-black bg-glow ..."> */
.bg-glow {
    background-image: radial-gradient(1700px circle at 95% 0%, rgba(255, 255, 255, 0.08), transparent 23%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Yerel <dialog>: <dialog class="dialog"> içine panel içeriğini koyun */
dialog.dialog {
    width: calc(100% - 2rem);
    max-width: 32rem;
    margin: auto;
    padding: 0;
    color: #fff;
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.5rem;
    box-shadow: 0 24px 80px rgba(0,0,0,.8);
}
dialog.dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
dialog.dialog[open] { animation: fade-down .3s cubic-bezier(.2,.7,.2,1); }

/* ---------- Hesap sayfaları (giris, sifremi-unuttum, davetler…; auth-page.js) ---------- */

/* Busy button / loading icon: <svg class="spinner"> */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin .8s linear infinite; }
/* The app's sign-in WebView (?mobile=1) shows only the form: no links that lead away from it */
.is-app [data-web-only] { display: none !important; }
/* Dashboard pages hide their content until session.js has confirmed the session */
html[data-auth="pending"] main { visibility: hidden; }

/* ---------- Kaydırma çubuğu ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 9999px; border: 3px solid #000; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .marquee, .pulse-ring::after, .fade-down { animation: none; }
    .spinner { animation-duration: 2s; }
}

