/* =========================================
   Bulak Su - Global stylesheet
   Custom utilities & animation helpers
   ========================================= */

:root {
  --bulak-50: #eff7fb;
  --bulak-500: #3987b3;
  --bulak-900: #0f3a5c;
  --bulak-950: #0a2538;
}

html {
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(57, 135, 179, 0.15);
  /* Floating header'a yapışan anchor scroll'lar için */
  scroll-padding-top: 88px;
  /* Mobil yatay kaydırma engeli */
  overflow-x: hidden;
}
body {
  padding-top: 0;
  overflow-x: hidden;
  /* iOS notch güvenli alanları */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

[x-cloak] { display: none !important; }

/* Mobil menü açıkken arkadaki scroll'u kilitle */
body.no-scroll { overflow: hidden; touch-action: none; }

/* Yatay scroll sırasında scrollbar görünmesin (chip listeleri vb.) */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Uzun TR kelimeler taşmasın */
h1, h2, h3, h4 { overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
p, span, a, li { overflow-wrap: anywhere; }

/* Touch targets — minimum 44px Apple HIG */
a, button {
  min-height: 0;
}
@media (max-width: 768px) {
  a.btn-primary, a.btn-ghost, button.btn-primary,
  .btn-primary, .btn-ghost {
    min-height: 48px;
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
  }
}

/* === REUSABLE COMPONENTS === */

.section-pad { padding-top: 3.5rem; padding-bottom: 3.5rem; }
@media (min-width: 640px) { .section-pad { padding-top: 5rem; padding-bottom: 5rem; } }
@media (min-width: 768px) { .section-pad { padding-top: 7rem; padding-bottom: 7rem; } }
@media (min-width: 1024px) { .section-pad { padding-top: 8rem; padding-bottom: 8rem; } }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bulak-500);
  position: relative;
  padding-left: 1.75rem;
}
.eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.25rem;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
  opacity: 0.6;
}

.display-h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw + 0.6rem, 5.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.display-h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.65rem, 3.2vw + 0.6rem, 3.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

/* === GLASS / FROST === */
.glass {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 10px 40px -10px rgba(15, 58, 92, 0.18);
}
.glass-dark {
  background: rgba(15, 58, 92, 0.35);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.18);
}

/* === HERO ANIMATED BACKGROUND === */
.hero-grad {
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(255,255,255,0.12), transparent 60%),
    radial-gradient(50% 40% at 80% 30%, rgba(180,220,236,0.18), transparent 60%),
    linear-gradient(180deg, rgba(15,58,92,0.10) 0%, rgba(10,37,56,0.85) 100%);
}
.hero-overlay {
  background:
    linear-gradient(180deg, rgba(10,37,56,0.20) 0%, rgba(10,37,56,0.05) 30%, rgba(10,37,56,0.55) 75%, rgba(10,37,56,0.92) 100%);
}

/* === DROPLET ANIMATION === */
@keyframes ripple {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}
.ripple::before, .ripple::after {
  content:''; position:absolute; inset:0; border-radius:9999px;
  border: 2px solid currentColor; opacity: 0;
  animation: ripple 3s ease-out infinite;
}
.ripple::after { animation-delay: 1.5s; }

/* === SCROLL REVEAL === */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* === PRODUCT CARD === */
.product-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f7fafb 0%, #ffffff 60%);
  border: 1px solid rgba(15,58,92,0.06);
  border-radius: 1.75rem;
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1), box-shadow 0.45s, border-color 0.45s;
}
.product-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(57,135,179,0.4), transparent 60%);
  -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 0.4s;
  pointer-events: none;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -20px rgba(15,58,92,0.22);
}
.product-card:hover::before { opacity: 1; }
.product-card .product-img {
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.product-card:hover .product-img { transform: translateY(-6px) scale(1.03); }

/* === PARALLAX BG IMAGE === */
.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  will-change: background-position;
}
@media (max-width: 1024px) {
  /* iOS Safari fixed bg buglıdır; tabletten aşağı scroll'a düş. */
  .parallax-bg { background-attachment: scroll; }
}

/* === MOBILE VIEWPORT HEIGHTS (small dynamic) === */
.h-screen-svh { height: 100vh; height: 100svh; }
.h-screen-dvh { height: 100vh; height: 100dvh; }
.min-h-screen-svh { min-height: 100vh; min-height: 100svh; }

/* iframe responsive defaults */
iframe { max-width: 100%; }

/* Touch / pointer ergonomi */
@media (hover: none) {
  /* Hover'a bağımlı efektler dokunmatikte off */
  .product-card:hover { transform: none; box-shadow: 0 12px 30px -12px rgba(15,58,92,0.15); }
}

/* === MARQUEE === */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 0.875rem 1.75rem; border-radius: 9999px;
  background: var(--bulak-900); color: white;
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.3s;
  box-shadow: 0 10px 25px -10px rgba(15,58,92,0.45);
}
.btn-primary:hover { background: var(--bulak-500); transform: translateY(-2px); box-shadow: 0 18px 35px -12px rgba(15,58,92,0.55); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 0.875rem 1.75rem; border-radius: 9999px;
  background: transparent; color: white;
  border: 1px solid rgba(255,255,255,0.35);
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.3s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }

.btn-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; color: var(--bulak-900); font-size: 0.9rem;
  position: relative;
}
.btn-link::after {
  content:''; position:absolute; left:0; bottom:-3px; width:100%; height:1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s;
}
.btn-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* === SWIPER OVERRIDES === */
.swiper-pagination-bullet {
  background: rgba(255,255,255,0.5) !important;
  opacity: 1 !important;
  width: 30px !important; height: 3px !important;
  border-radius: 0 !important;
}
.swiper-pagination-bullet-active { background: #fff !important; }

/* === STAT TICKER === */
.stat-num {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1;
  color: var(--bulak-900);
}

/* === SCROLLBAR PRETTIFY === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f6f9; }
::-webkit-scrollbar-thumb { background: var(--bulak-500); border-radius: 8px; border: 2px solid #f1f6f9; }
::-webkit-scrollbar-thumb:hover { background: var(--bulak-900); }
