/**
 * Softwaire AI — Emil Kowalski Tasarım Mühendisliği ve Hareket Sistemi (Design Engineering Tokens)
 * Standart ve Kaynak: github.com/emilkowalski/skills (emil-design-eng, improve-animations, ask-sonner, apple-design)
 */

:root {
  /* 1. Özel Easing Eğrileri (Standart CSS eğrilerinden belirgin şekilde daha güçlü ve çevik) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);          /* Giriş ve tıklama animasyonları (starts fast, feels snappy) */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);        /* Emil Kowalski yay eğrisi (fluid deceleration) */
  --ease-elastic: cubic-bezier(0.34, 1.35, 0.64, 1);   /* Mikro sekme ve elastik geri bildirim */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);      /* Ekran içi yer değiştirme ve morflar */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);       /* iOS çekmece / modal açılış eğrisi */
  --ease-button: cubic-bezier(0.2, 0.8, 0.2, 1);       /* Dokunsal basış ve geri sekme */

  /* 2. Animasyon Süreleri (Emil Kuralı: UI etkileşimleri kesinlikle 300ms altında olmalıdır) */
  --duration-press: 140ms;                             /* Düğmeye basış geri bildirimi */
  --duration-fast: 160ms;                              /* İpucu ve küçük popover */
  --duration-normal: 200ms;                            /* Dropdown, açılır menü ve filtreler */
  --duration-modal: 260ms;                             /* Modal, diyalog ve çekmeceler */

  /* 3. Yarı Saydam Katmanlı Gölgeler (Sert siyah border yerine derinlik ve ışık) */
  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 1px 0 rgba(0, 0, 0, 0.02);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
  --shadow-dropdown: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Fiziksel Gölge ve Yüzey Yardımcı Sınıfları (Shadows & Surfaces)
   ========================================================================== */
.shadow-subtle {
  box-shadow: var(--shadow-subtle);
}

.shadow-card {
  box-shadow: var(--shadow-card);
}

.shadow-dropdown {
  box-shadow: var(--shadow-dropdown);
}

.shadow-modal {
  box-shadow: var(--shadow-modal);
}

/* Cam Efekti ve İnce Kenarlık (Glassmorphism & Inset Highlight) */
.glass-panel {
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-subtle), inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Dokunsal Geri Bildirim (Tactile Button & Pressable Feedback: scale 0.97)
   ========================================================================== */
button,
.btn,
a.btn,
input[type="submit"],
input[type="button"],
.pressable {
  transition: transform var(--duration-press) var(--ease-out),
              background-color var(--duration-press) ease,
              border-color var(--duration-press) ease,
              opacity var(--duration-press) ease;
}

button:active,
.btn:active,
a.btn:active,
input[type="submit"]:active,
input[type="button"]:active,
.pressable:active,
.active\:scale-95:active,
[class*="active:scale-95"]:active {
  transform: scale(0.97) !important;
}

/* ==========================================================================
   Fiziksel Diyalog & Modal Girişi (Never scale from 0 - starts at 0.96)
   ========================================================================== */
.modal-content,
[data-modal-content] {
  animation: modalEnter var(--duration-modal) var(--ease-out) forwards;
  transform-origin: center;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   Tetikleyiciye Duyarlı Açılır Menüler (Origin-Aware Popovers & Dropdowns)
   ========================================================================== */
.dropdown-menu,
[data-popover] {
  transform-origin: var(--transform-origin, top right);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.dropdown-menu[data-state="closed"] {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.dropdown-menu[data-state="open"] {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ==========================================================================
   Sayısal Titremeyi Önleme (Tabular Numbers for Timestamps, Durations, Money)
   ========================================================================== */
.tabular-nums,
.font-mono,
table td,
table th,
.kpi-number,
.stat-number {
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
}

/* Tablo Satırı Hover Yumuşatması (Layout Thrashing Yapmaz) */
tr {
  transition: background-color 120ms ease;
}

/* ==========================================================================
   Akıcı Sayfa Geçişleri (View Transitions & SPA Soft Transitions)
   ========================================================================== */
::view-transition-old(root) {
  animation: 120ms var(--ease-out) both pageFadeOut;
}
::view-transition-new(root) {
  animation: 160ms var(--ease-out) both pageFadeIn;
}

@keyframes pageFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-4px); }
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-enter {
  animation: pageFadeIn 160ms var(--ease-out) forwards;
}

/* ==========================================================================
   Etkileşimli Kart Yükselmesi (Card Hover Lift & Micro-Interactions)
   ========================================================================== */
.card-lift,
.hover-lift,
.kpi-card {
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.card-lift:hover,
.hover-lift:hover,
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-dropdown) !important;
}

/* ==========================================================================
   Üst İnce İlerleme Çubuğu (Fluid Top Progress Bar)
   ========================================================================== */
#softwaire-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, #4f46e5, #6366f1, #06b6d4);
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.7);
  z-index: 999999;
  pointer-events: none;
  transition: width 220ms cubic-bezier(0.23, 1, 0.32, 1), opacity 150ms ease;
  opacity: 0;
}

/* ==========================================================================
   Emil Kowalski Zanaat: Hero Ses Konsolu & Donanım Katmanları (Voice Cockpit)
   ========================================================================== */
.craft-cockpit-shell {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03),
              0 6px 16px -4px rgba(0, 0, 0, 0.04),
              0 24px 48px -12px rgba(15, 23, 42, 0.08),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.95);
  border-radius: 1.5rem;
}

.tactile-primary-btn {
  background-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(15, 23, 42, 0.9),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
  transition: all 140ms var(--ease-out);
}
.tactile-primary-btn:hover {
  background-color: #1e293b;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(15, 23, 42, 1),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.28);
}
.tactile-primary-btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.2),
              0 0 0 1px rgba(15, 23, 42, 1),
              inset 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}

.tactile-secondary-btn {
  background-color: #ffffff;
  color: #334155;
  border: 1px solid rgba(203, 213, 225, 0.85);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  transition: all 140ms var(--ease-out);
}
.tactile-secondary-btn:hover {
  background-color: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}
.tactile-secondary-btn:active {
  transform: scale(0.97);
  background-color: #f1f5f9;
}

.segmented-control-track {
  background-color: #f1f5f9;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 3px;
  border-radius: 0.875rem;
}

.segmented-btn {
  transition: all 140ms var(--ease-out);
  border-radius: 0.65rem;
}
.segmented-btn.active {
  background-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}
.segmented-btn:not(.active) {
  color: #64748b;
}
.segmented-btn:not(.active):hover {
  color: #0f172a;
  background-color: rgba(255, 255, 255, 0.6);
}

/* Canlı Dalga Boyu Çubukları */
.wave-bar {
  transition: height 80ms ease, background-color 140ms ease;
  min-height: 3px;
}
.wave-bar.is-active {
  background-color: #4f46e5;
}

/* ==========================================================================
   Emil Kowalski Hero Yetenek Kartları & Donanım Çipleri (Zero Plain Text)
   ========================================================================== */
.hero-capability-card {
  transition: transform 160ms var(--ease-out),
              border-color 160ms var(--ease-out),
              box-shadow 160ms var(--ease-out),
              background-color 160ms var(--ease-out);
  border: 1px solid rgba(226, 232, 240, 0.9);
  background-color: #ffffff;
  border-radius: 0.875rem;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.hero-capability-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
}
.hero-capability-card.is-active {
  border-color: #4f46e5;
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15), 0 6px 16px -3px rgba(79, 70, 229, 0.12);
}
.hero-capability-card:active {
  transform: scale(0.98);
}

.hardware-chip {
  transition: all 140ms var(--ease-out);
  border: 1px solid rgba(226, 232, 240, 0.85);
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.hardware-chip:hover {
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}

/* ==========================================================================
   Emil Kowalski Hero Kademeli Giriş Animasyonları (Hero Staggered Entrance)
   Küçük mesafeler (8-10px) ve akıcı yay sönümlenmesi (snappy spring deceleration)
   ========================================================================== */
@keyframes emilHeroReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-stagger-1 { animation: emilHeroReveal 460ms var(--ease-spring) 0ms both; }
.hero-stagger-2 { animation: emilHeroReveal 490ms var(--ease-spring) 70ms both; }
.hero-stagger-3 { animation: emilHeroReveal 520ms var(--ease-spring) 140ms both; }
.hero-stagger-4 { animation: emilHeroReveal 550ms var(--ease-spring) 210ms both; }
.hero-stagger-5 { animation: emilHeroReveal 580ms var(--ease-spring) 280ms both; }
.hero-stagger-6 { animation: emilHeroReveal 610ms var(--ease-spring) 350ms both; }
.hero-stagger-7 { animation: emilHeroReveal 650ms var(--ease-spring) 420ms both; }
.hero-stagger-8 { animation: emilHeroReveal 690ms var(--ease-spring) 490ms both; }

/* Canlı Telemetri Parlama Halkası (Beacon Glow Pulse) */
@keyframes beaconGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}
.beacon-pulse {
  animation: beaconGlow 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Dokunsal Segmented Control Kayar Hap Göstergesi (Emil Floating Pill Indicator) */
.segmented-control-track {
  position: relative;
}
#segmented-pill-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 0.65rem;
  background-color: #0f172a;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
  transition: transform 240ms var(--ease-spring),
              width 240ms var(--ease-spring);
  pointer-events: none;
  z-index: 1;
}
.segmented-btn {
  position: relative;
  z-index: 2;
  transition: color 180ms ease;
  background: transparent !important;
  box-shadow: none !important;
}
.segmented-btn.active {
  color: #ffffff !important;
}
.segmented-btn:not(.active) {
  color: #64748b;
}
.segmented-btn:not(.active):hover {
  color: #0f172a;
}

/* ==========================================================================
   Emil Kowalski Sayfa İçi Kaydırma Animasyonları (Scroll Reveals)
   ========================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--ease-spring),
              transform 520ms var(--ease-spring);
  will-change: opacity, transform;
}
.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms var(--ease-spring),
              transform 480ms var(--ease-spring);
  will-change: opacity, transform;
}
.scroll-stagger.is-revealed > * {
  opacity: 1;
  transform: translateY(0);
}
.scroll-stagger.is-revealed > *:nth-child(1) { transition-delay: 40ms; }
.scroll-stagger.is-revealed > *:nth-child(2) { transition-delay: 100ms; }
.scroll-stagger.is-revealed > *:nth-child(3) { transition-delay: 160ms; }
.scroll-stagger.is-revealed > *:nth-child(4) { transition-delay: 220ms; }
.scroll-stagger.is-revealed > *:nth-child(5) { transition-delay: 280ms; }
.scroll-stagger.is-revealed > *:nth-child(6) { transition-delay: 340ms; }

/* Yaylı Kart Hover Hissi (Spring Hover Lift) */
.hover-spring {
  transition: transform 220ms var(--ease-spring),
              box-shadow 220ms var(--ease-spring),
              border-color 180ms ease;
}
.hover-spring:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}
.hover-spring:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Emil Kowalski Akıcı Akordiyon (CSS Grid Height Transition: 0fr -> 1fr)
   max-height takılmaları olmadan GPU hızlandırmalı kusursuz yükseklik geçişi
   ========================================================================== */
.faq-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms var(--ease-spring);
}
.faq-collapse.is-open {
  grid-template-rows: 1fr;
}
.faq-collapse-inner {
  overflow: hidden;
  opacity: 0;
  transition: opacity 180ms ease;
}
.faq-collapse.is-open .faq-collapse-inner {
  opacity: 1;
}

/* Fiyatlandırma Switch Yaylı Geçiş */
.pricing-switch-thumb {
  transition: transform 220ms var(--ease-spring);
}

/* ==========================================================================
   Emil Kowalski / Linear İmza Özelliği: Mouse Spotlight & Parlama Efekti
   ========================================================================== */
.card-spotlight {
  position: relative;
  isolation: isolate;
}
.card-spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    450px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(99, 102, 241, 0.08),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
  z-index: 0;
}
.card-spotlight:hover::before {
  opacity: 1;
}

.card-spotlight-dark {
  position: relative;
  isolation: isolate;
}
.card-spotlight-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    450px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(99, 102, 241, 0.18),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
  z-index: 0;
}
.card-spotlight-dark:hover::before {
  opacity: 1;
}

/* Düğme ve Rozet Işık Hüzmesi (Shimmer Sheen Sweep) */
.tactile-primary-btn,
.shimmer-sweep {
  position: relative;
  overflow: hidden;
}
.tactile-primary-btn::after,
.shimmer-sweep::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    65deg,
    transparent 30%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 70%
  );
  transform: translateX(-120%) rotate(25deg);
  animation: buttonSheen 5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}
@keyframes buttonSheen {
  0% { transform: translateX(-120%) rotate(25deg); }
  28%, 100% { transform: translateX(120%) rotate(25deg); }
}

/* Canlı Pipeline Veri Akış Hattı (Continuous Data Beam) */
.pipeline-stream-connector {
  position: relative;
  width: 28px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 9999px;
  flex-shrink: 0;
  overflow: hidden;
}
.pipeline-stream-connector .stream-dot {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  background: linear-gradient(90deg, transparent, #4f46e5, transparent);
  border-radius: 9999px;
  animation: streamDotFlow 1.6s linear infinite;
}
@keyframes streamDotFlow {
  0% { transform: translateX(-15px); }
  100% { transform: translateX(35px); }
}

/* Dalga Boyu Canlı Dinleme Nefesi (Idle Wave Undulation) */
@keyframes idleWaveBreath {
  0%, 100% {
    transform: scaleY(0.35);
    opacity: 0.45;
  }
  50% {
    transform: scaleY(1);
    opacity: 0.95;
  }
}
.wave-bar.idle-breath {
  animation: idleWaveBreath 2.4s ease-in-out infinite;
  animation-delay: calc(var(--bar-idx, 0) * 65ms);
  transform-origin: bottom;
}

/* Bento İkon ve Mikro Öğeler */
.bento-icon-spring {
  transition: transform 240ms var(--ease-spring),
              box-shadow 240ms var(--ease-spring);
}
.group:hover .bento-icon-spring {
  transform: scale(1.12) rotate(-3deg);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.22);
}

/* Adımlar Arası Akış Çizgisi (Nasıl Çalışır) */
.steps-rail-line {
  position: absolute;
  top: 52px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, rgba(79,70,229,0.15) 0%, rgba(99,102,241,0.4) 50%, rgba(16,185,129,0.4) 100%);
  z-index: 0;
}
.steps-rail-dot {
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4f46e5;
  box-shadow: 0 0 10px #4f46e5;
  animation: stepRailPulse 4.5s ease-in-out infinite alternate;
}
@keyframes stepRailPulse {
  0% { left: 0%; opacity: 0.2; }
  50% { opacity: 1; transform: scale(1.3); }
  100% { left: 98%; opacity: 0.2; }
}

/* Sayı Değişim Parlaması (Number Update Flash) */
.num-updated {
  animation: numFlash 340ms var(--ease-spring);
}
@keyframes numFlash {
  0% { color: #34d399; transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Karşılaştırmalı Maliyet Çubuğu (Comparative Cost Bar) */
.roi-bar-fill {
  transition: width 350ms var(--ease-spring);
}

/* ==========================================================================
   Erişilebilirlik: İndirgenmiş Hareket Tercihi (prefers-reduced-motion)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

