/* Dijimorph — tema değişkenleri ve Tailwind'in üstüne ince dokunuşlar */

/* ===== AÇIK TEMA (varsayılan) =====
   Zemin #FFFFFF / #F8FAFC · Birincil #0F172A · İkincil #334155 · CTA #2563EB · Kritik #DC2626 */
:root {
  color-scheme: light;
  --ink-950: 255 255 255;   /* sayfa zemini */
  --ink-900: 248 250 252;   /* alternatif bölüm zemini #F8FAFC */
  --ink-850: 241 245 249;
  --ink-800: 241 245 249;
  --ink-700: 226 232 240;
  --ink-600: 203 213 225;
  --ink-500: 148 163 184;
  --ivory: 15 23 42;        /* ana metin #0F172A */
  --mist: 51 65 85;         /* ikincil metin #334155 */
  --line: 15 23 42;         /* çizgi & örtüler (opaklıkla) */
  --gold-50: 239 246 255;
  --gold-100: 30 58 138;
  --gold-200: 30 64 175;
  --gold-300: 29 78 216;
  --gold-400: 37 99 235;    /* CTA #2563EB */
  --gold-500: 29 78 216;
  --gold-600: 147 197 253;
  --gold-700: 191 219 254;
  --signal: 21 128 61;   /* #15803D — beyaz zeminde AA */
  --alert: 220 38 38;       /* kritik #DC2626 */
  --onaccent: 255 255 255;

  --grad-text: linear-gradient(100deg, #0F172A 0%, #1E40AF 45%, #2563EB 70%, #1E3A8A 100%);
  --grid-line: rgba(15, 23, 42, .05);
  --header-bg: rgba(255, 255, 255, .86);
  --shadow-accent: 0 0 0 1px rgba(37,99,235,.15), 0 24px 60px -24px rgba(37,99,235,.45);
  --shadow-deep: 0 30px 80px -30px rgba(15,23,42,.22);
  --card-from: rgba(255,255,255,1);
  --card-to: rgba(248,250,252,1);
  --card-hover-from: rgba(37,99,235,.045);
  --grain-opacity: .025;
}

/* ===== KOYU TEMA ===== */
html.dark {
  color-scheme: dark;
  --ink-950: 6 10 22;
  --ink-900: 15 23 42;      /* #0F172A */
  --ink-850: 20 30 52;
  --ink-800: 24 35 60;
  --ink-700: 30 41 59;
  --ink-600: 51 65 85;
  --ink-500: 71 85 105;
  --ivory: 241 245 249;
  --mist: 148 163 184;
  --line: 255 255 255;
  --gold-50: 23 37 84;
  --gold-100: 219 234 254;
  --gold-200: 191 219 254;
  --gold-300: 147 197 253;
  --gold-400: 37 99 235;
  --gold-500: 29 78 216;    /* buton hover — beyaz yazı AA */
  --gold-600: 30 64 175;
  --gold-700: 30 58 138;
  --signal: 74 222 128;
  --alert: 248 113 113;
  --onaccent: 255 255 255;

  --grad-text: linear-gradient(100deg, #F1F5F9 0%, #93C5FD 40%, #BFDBFE 60%, #60A5FA 100%);
  --grid-line: rgba(147, 197, 253, .06);
  --header-bg: rgba(6, 10, 22, .84);
  --shadow-accent: 0 0 0 1px rgba(59,130,246,.25), 0 30px 80px -30px rgba(37,99,235,.55);
  --shadow-deep: 0 40px 120px -40px rgba(0,0,0,.8);
  --card-from: rgba(255,255,255,.03);
  --card-to: rgba(255,255,255,.008);
  --card-hover-from: rgba(59,130,246,.07);
  --grain-opacity: .05;
}

html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body {
  background: rgb(var(--ink-950));
  color: rgb(var(--ivory));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s ease, color .4s ease;
}
::selection { background: rgba(37,99,235,.25); }

/* İnce film greni */
.grain::before {
  content: "";
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html.dark .grain::before { mix-blend-mode: overlay; }

/* Mimari ızgara arka planı */
.bg-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}

/* Vurgu metni ve çizgiler */
.text-gold-grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hairline { background: linear-gradient(90deg, transparent, rgb(var(--gold-400) / .5), transparent); height: 1px; }
.hairline-v { background: linear-gradient(180deg, transparent, rgb(var(--gold-400) / .4), transparent); width: 1px; }

/* Çerçeveli kart */
.lux-card {
  position: relative;
  background: linear-gradient(180deg, var(--card-from), var(--card-to));
  border: 1px solid rgb(var(--line) / .08);
  transition: border-color .5s ease, transform .5s ease, background .5s ease, box-shadow .5s ease;
}
.lux-card::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none; border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgb(var(--gold-400) / .8), transparent 35%, transparent 65%, rgb(var(--gold-400) / .4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .5s ease;
}
.lux-card:hover::after { opacity: 1; }
.lux-card:hover { background: linear-gradient(180deg, var(--card-hover-from), var(--card-to)); box-shadow: var(--shadow-deep); }

/* Mühür */
.seal { color: rgb(var(--gold-300)); }
.seal-ring { transform-origin: 60px 60px; transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.group:hover .seal-ring { transform: rotate(40deg); }

/* Kayan logo bandı */
.marquee { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Canlı durum noktası */
.pulse-dot { position: relative; }
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 9999px;
  border: 1px solid currentColor; opacity: .6; animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.8); opacity: 0; } }

/* Kaydırınca beliren öğeler */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* Header kaydırma durumu */
#site-header.is-scrolled .header-shell { background: var(--header-bg); border-color: rgb(var(--line) / .08); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
#site-header.is-scrolled .topbar { margin-top: -2.25rem; opacity: 0; }

/* Tema düğmesi ikonları */
.theme-sun { display: none; }
html.dark .theme-sun { display: block; }
html.dark .theme-moon { display: none; }

/* Akordeon */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .acc-icon { transform: rotate(45deg); }

/* Form alanları */
select option { background: rgb(var(--ink-950)); color: rgb(var(--ivory)); }

/* Erişilebilirlik */
:focus-visible { outline: 2px solid rgb(var(--gold-400)); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .pulse-dot::after { animation: none; }
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgb(var(--ink-950)); }
::-webkit-scrollbar-thumb { background: rgb(var(--ink-700)); border: 2px solid rgb(var(--ink-950)); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--gold-400)); }

@media print {
  .grain::before, #site-header, .no-print { display: none !important; }
}
