html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: 'Raleway', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #050505;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 768px) {
  .hero-scroll-margin {
    scroll-margin-top: 5.5rem;
  }
  main {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0));
  }
  /* Mobil: header’da “İHSAN AI OTONOM AGENT” tam görünsün, kesilmesin */
  #main-header {
    overflow: visible;
  }
  #main-header .max-w-7xl {
    overflow: visible;
    min-width: 0;
  }
  #main-header a[href="/"] {
    overflow: visible;
    min-width: 0;
    max-width: calc(100vw - 7rem);
  }
  #main-header a[href="/"] span.header-title-text {
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    font-size: 10px;
    line-height: 1.25;
    display: block;
    max-width: 100%;
  }
}

/* Hero: arka plan cover, tüm cihazlarda aynı (mobilde düzgün) */
.hero-video-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-video-wrap .hero-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 5, 0.75) 0%,
    rgba(5, 5, 5, 0.5) 40%,
    rgba(5, 5, 5, 0.6) 100%
  );
  pointer-events: none;
}
.hero-responsive-bg {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
}
@media (max-width: 768px) {
  .hero-responsive-bg {
    background-attachment: scroll;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(to right, #00f2fe, #4facfe, #7000ff);
}

.text-ai-accent {
  color: #ff00889f !important;
  -webkit-text-stroke: 0.4px rgba(0, 0, 0, 0.25);
  text-stroke: 0.4px rgba(0, 0, 0, 0.25);
  text-shadow:
    0 0 1.5px rgba(249, 245, 245, 0.5);
}

@media (max-width: 768px) {
  .text-ai-accent {
    -webkit-text-stroke: 0;
    text-stroke: 0;
    text-shadow: none;
  }
}

.bg-mesh {
  background-image: 
    radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
    radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
    radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
  background-color: #050505;
}

/* Kenarlarda hareketli devre ağı – başlığın üzerine gelmez */
.circuit-bg-edges {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.circuit-bg-side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(32%, 420px);
}
.circuit-bg-left { left: 0; }
.circuit-bg-right { right: 0; }
/* Mobil: devre kenarlarda kalsın, yazının üzerine gelmesin – görünür olsun */
@media (max-width: 768px) {
  .circuit-bg-side {
    width: 18%;
    max-width: 85px;
  }
  .circuit-bg-edges .circuit-lines {
    opacity: 1;
  }
  .circuit-bg-edges .circuit-nodes .node-pulse {
    opacity: 1;
  }
}
/* İçerik devre animasyonunun üstünde */
main {
  position: relative;
  z-index: 1;
}
.circuit-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}
.circuit-lines {
  animation: circuit-line-pulse 4s ease-in-out infinite;
}
@keyframes circuit-line-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
.circuit-nodes .node-pulse {
  opacity: 0.85;
  animation: node-glow 2.5s ease-in-out infinite;
}
.circuit-nodes .node-pulse:nth-child(odd) { animation-delay: 0.4s; }
.circuit-nodes .node-pulse:nth-child(3n) { animation-delay: 0.8s; }
@keyframes node-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.section-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

.section-dot:hover {
  background: rgba(0, 242, 254, 0.5);
}

.section-dot.active {
  width: 24px;
  background: #00f2fe;
}

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

.selection\:bg-ai-primary *::selection {
  background-color: #00f2fe;
}

.selection\:text-ai-black *::selection {
  color: #050505;
}

/* Özellikler sayfası: accordion ve lightbox */
.accordion-chevron {
  transition: transform 0.25s ease;
}

#ozellikler-lightbox {
  display: none;
}

#ozellikler-lightbox.flex {
  display: flex;
}

#ozellikler-lightbox .lightbox-nav-hidden {
  visibility: hidden;
  pointer-events: none;
}

/* Hero: arkaplan img, ortalanmış, doğal çözünürlüğü aşmaz */
.hero-bg {
  overflow: hidden;
}
.hero-container {
  position: relative;
  z-index: 10;
  isolation: isolate;
}
/* Mobil: CTA butonları üst üste binmesin */
@media (max-width: 768px) {
  .hero-cta-buttons {
    gap: 1rem;
    margin-top: 0.5rem;
  }
  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100%;
    min-height: 48px;
    flex-shrink: 0;
  }
  .hero-cta-secondary {
    margin-top: 0;
  }
}
.hero-bg-image {
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.hero-overlay {
  z-index: 1;
}

/* Mobil: footer ve ana içerik altında cihaz nav bar'ı için boşluk */
@media (max-width: 768px) {
  .footer-safe-bottom {
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0));
  }
}

/* Hero metin okunurluğu: kırık beyaz + hafif gölge (responsive, cover arka plan üzerinde güvenli) */
.hero-intro-text {
  color: #E6E6E6;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(0, 0, 0, 0.9);
}
