/* ============================================================
   SISTEM YAZILIM — Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables — Light Theme (Default) ── */
:root {
  /* Backgrounds */
  --bg-primary:    #f0faf4;
  --bg-secondary:  #ffffff;
  --bg-tertiary:   #e4f5ec;
  --bg-card:       rgba(255, 255, 255, 0.85);
  --bg-glass:      rgba(255, 255, 255, 0.55);
  --bg-overlay:    rgba(26, 46, 34, 0.6);

  /* Text */
  --text-primary:  #1a2e22;
  --text-secondary:#3d5c47;
  --text-muted:    #7a9b87;
  --text-inverse:  #ffffff;

  /* Accent */
  --accent-primary:   #1a7a4a;
  --accent-secondary: #2ecc71;
  --accent-tertiary:  #0d5c38;
  --accent-light:     #a8e6c1;
  --accent-glow:      rgba(46, 204, 113, 0.25);
  --accent-glow-strong: rgba(46, 204, 113, 0.55);

  /* Borders */
  --border:        rgba(26, 122, 74, 0.18);
  --border-strong: rgba(26, 122, 74, 0.42);
  --border-card:   rgba(26, 122, 74, 0.12);

  /* Shadows */
  --shadow-xs:  0 1px 4px rgba(26, 122, 74, 0.08);
  --shadow-sm:  0 2px 12px rgba(26, 122, 74, 0.10);
  --shadow-md:  0 8px 32px rgba(26, 122, 74, 0.14);
  --shadow-lg:  0 20px 64px rgba(26, 122, 74, 0.18);
  --shadow-xl:  0 40px 96px rgba(26, 122, 74, 0.22);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1a7a4a 0%, #2ecc71 100%);
  --gradient-hero:    linear-gradient(135deg, #0a3d22 0%, #1a7a4a 45%, #27ae60 100%);
  --gradient-card:    linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(240,250,244,0.8) 100%);
  --gradient-bg:      linear-gradient(180deg, #f0faf4 0%, #e4f5ec 50%, #f0faf4 100%);
  --gradient-text:    linear-gradient(135deg, #1a7a4a 0%, #2ecc71 100%);
  --gradient-shine:   linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);

  /* Navigation */
  --nav-bg:    rgba(240, 250, 244, 0.88);
  --nav-blur:  blur(20px);

  /* Scrollbar */
  --scrollbar-thumb: #1a7a4a;
  --scrollbar-track: #e4f5ec;

  /* Spacing */
  --section-pad: 100px;
  --container-max: 1280px;

  /* Border Radius */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── CSS Variables — Dark Theme ── */
[data-theme="dark"] {
  /* Backgrounds */
  --bg-primary:    #0d0f1a;
  --bg-secondary:  #111320;
  --bg-tertiary:   #181b2e;
  --bg-card:       rgba(18, 20, 38, 0.88);
  --bg-glass:      rgba(13, 15, 26, 0.65);
  --bg-overlay:    rgba(0, 0, 0, 0.7);

  /* Text */
  --text-primary:  #e8eaf6;
  --text-secondary:#9fa8c7;
  --text-muted:    #5c6a9a;
  --text-inverse:  #0d0f1a;

  /* Accent */
  --accent-primary:   #7c3aed;
  --accent-secondary: #06b6d4;
  --accent-tertiary:  #5b21b6;
  --accent-light:     #c4b5fd;
  --accent-glow:      rgba(124, 58, 237, 0.35);
  --accent-glow-strong: rgba(124, 58, 237, 0.65);

  /* Borders */
  --border:        rgba(124, 58, 237, 0.22);
  --border-strong: rgba(124, 58, 237, 0.48);
  --border-card:   rgba(124, 58, 237, 0.15);

  /* Shadows */
  --shadow-xs:  0 1px 4px rgba(124, 58, 237, 0.12);
  --shadow-sm:  0 2px 12px rgba(124, 58, 237, 0.16);
  --shadow-md:  0 8px 32px rgba(124, 58, 237, 0.22);
  --shadow-lg:  0 20px 64px rgba(124, 58, 237, 0.28);
  --shadow-xl:  0 40px 96px rgba(124, 58, 237, 0.35);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --gradient-hero:    linear-gradient(135deg, #050710 0%, #1a0a3d 45%, #0a2540 100%);
  --gradient-card:    linear-gradient(145deg, rgba(18,20,38,0.95) 0%, rgba(26,28,50,0.8) 100%);
  --gradient-bg:      linear-gradient(180deg, #0d0f1a 0%, #111320 50%, #0d0f1a 100%);
  --gradient-text:    linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
  --gradient-shine:   linear-gradient(90deg, transparent 0%, rgba(124,58,237,0.15) 50%, transparent 100%);

  /* Navigation */
  --nav-bg:    rgba(13, 15, 26, 0.92);
  --nav-blur:  blur(24px);

  /* Scrollbar */
  --scrollbar-thumb: #7c3aed;
  --scrollbar-track: #181b2e;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  background-image: var(--gradient-bg);
  min-height: 100vh;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; line-height: 1.2; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { opacity: 0.8; }

/* ── Selection ── */
::selection {
  background: var(--accent-glow-strong);
  color: var(--text-primary);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section Spacing ── */
.section { padding: var(--section-pad) 0; }
.section-sm { padding: 60px 0; }

/* ── Typography ── */
.heading-xl {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.heading-lg {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.heading-md {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
}
.heading-sm {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
}
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-accent { color: var(--accent-secondary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ── Section Title ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 16px;
}
[data-theme="dark"] .section-label {
  color: var(--accent-secondary);
}
.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-secondary);
  display: inline-block;
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}
.section-header {
  margin-bottom: 64px;
}
.section-header.centered {
  text-align: center;
}
.section-header.centered .section-desc {
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-shine);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn:hover::after { transform: translateX(100%); }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow-strong);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}
[data-theme="dark"] .btn-outline {
  color: var(--accent-secondary);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.btn-sm { padding: 9px 20px; font-size: 0.85rem; }
.btn-lg { padding: 18px 40px; font-size: 1.05rem; }

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  justify-content: center;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-glow);
  color: var(--accent-primary);
  border: 1px solid var(--border);
}
[data-theme="dark"] .badge { color: var(--accent-secondary); }

.badge-success {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border-color: rgba(46, 204, 113, 0.3);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}
.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border-color: rgba(6, 182, 212, 0.3);
}

/* ── Card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

/* ── Glass Panel ── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ── Grid Helpers ── */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Flex Helpers ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; align-items: center; gap: 16px; }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ── Loading Spinner ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Toast Notification ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 360px;
  animation: toastIn 0.4s var(--transition-spring) forwards;
  color: var(--text-primary);
}
.toast.removing {
  animation: toastOut 0.3s ease forwards;
}
.toast-success { border-left: 3px solid #2ecc71; }
.toast-error { border-left: 3px solid #ef4444; }
.toast-info { border-left: 3px solid var(--accent-secondary); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-spring);
}
.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}
.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

/* ── Cursor Glow ── */
#cursor-glow {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s ease;
  opacity: 0;
}
body:hover #cursor-glow { opacity: 1; }

/* ── Particles Canvas ── */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Utility ── */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.no-select { user-select: none; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  :root { --container-max: 960px; }
}
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --section-pad: 60px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-header { margin-bottom: 40px; }
  .heading-xl { font-size: 2.4rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .heading-xl { font-size: 2rem; }
}
