/* Ana sayfaya özel stiller (src/views/site/index.eta). Ortak stiller: site.css */
/* ---------- 7. Loader ---------- */
#loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--white); animation: loader-safety .4s ease 2.6s forwards; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loader-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--text); }
.loader-track { width: 140px; height: 2px; border-radius: 2px; background: var(--gray-100); overflow: hidden; }
#loader-bar { display: block; width: 100%; height: 100%; background: var(--brand-red); transform: scaleX(0); transform-origin: left; }
@keyframes loader-safety { to { opacity: 0; visibility: hidden; } }

/* ---------- 9. Hero ---------- */
/* Tam ekran fotoğraflı banner (sonnen tarzı) */
.hero {
  position: relative; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate;
  /* Ekran boyu (svh: mobil tarayıcı çubukları açıkken de sığar). En az 520px — yatay tutulan telefonda da.
     min-height olduğu için içerik sığmazsa hero uzar; metin taşmaz/kırpılmaz. */
  min-height: max(520px, 100vh); min-height: max(520px, 100svh);
  padding-top: calc(var(--header-h) + 40px); padding-bottom: clamp(56px, 10vh, 120px);
  background: var(--text); color: var(--white);
}
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-parallax { position: absolute; inset: -6% 0; will-change: transform; }
.hero-parallax picture { display: block; width: 100%; height: 100%; }
.hero-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; transform-origin: 50% 55%; will-change: transform; }
/* Okunabilirlik: sol alttan siyahtan şeffafa (en fazla %55) + header için üstte ince ton */
.hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.30) 0, rgba(0,0,0,0) 180px),
    linear-gradient(22deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.40) 30%, rgba(0,0,0,.12) 55%, rgba(0,0,0,0) 72%);
}
@media (max-width: 767px) {
  /* Dikey mobil görsel: ürünler üst-orta bölümde, alt kısım boş zemin → metin altta */
  .hero { padding-top: calc(var(--header-h) + 24px); padding-bottom: calc(var(--mb-stack) + 28px + env(safe-area-inset-bottom)); }
  .hero-img { object-position: 50% 45%; transform-origin: 50% 40%; }
  /* Gradyan alttan yukarı: altta ~%60, ortada şeffaf (+ header için üstte ince ton) */
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(0,0,0,.28) 0, rgba(0,0,0,0) 120px),
      linear-gradient(0deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.5) 28%, rgba(0,0,0,.18) 46%, rgba(0,0,0,0) 58%);
  }
}
/* Dikey telefon: görsel tam genişlikte ve üste hizalı (kırpılmaz, ürünler üst yarıda kalır);
   alt kenarı koyu hero zeminine solar, metin bu koyu zeminde okunur */
@media (max-width: 767px) and (orientation: portrait) {
  .hero-parallax { bottom: auto; }
  .hero-parallax picture { height: auto; }
  .hero-img {
    height: auto; aspect-ratio: 2 / 3; transform-origin: 50% 30%;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 98%); mask-image: linear-gradient(180deg, #000 70%, transparent 98%);
  }
}
.hero-content { position: relative; width: 100%; }
.hero .h1 { color: var(--white); text-shadow: 0 2px 30px rgba(0,0,0,.18); }
.hero-lead { font-size: clamp(1.05rem, .98rem + .35vw, 1.25rem); line-height: 1.6; color: rgba(255,255,255,.88); max-width: 29em; }
@media (max-width: 767px) { .hero .h1 { text-shadow: 0 2px 24px rgba(0,0,0,.35); } }
/* Kısa dikey ekranlar (≈360×640): metin bloğu görselin alt kısmına uzanır → gradyan biraz daha yukarı çıkar, boşluklar sıkılaşır */
@media (max-width: 767px) and (orientation: portrait) and (max-height: 740px) {
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(0,0,0,.28) 0, rgba(0,0,0,0) 120px),
      linear-gradient(0deg, rgba(0,0,0,.66) 0%, rgba(0,0,0,.58) 42%, rgba(0,0,0,.22) 62%, rgba(0,0,0,0) 74%);
  }
  .hero .hero-lead { margin-top: 16px; }
  .hero .hero-actions { margin-top: 24px; }
}
/* Yatay tutulan telefon: hero 520px; başlık ve boşluklar küçülür, butonlar yan yana */
@media (orientation: landscape) and (max-height: 540px) {
  .hero { padding-top: calc(var(--header-h) + 12px); padding-bottom: 28px; }
  .hero .h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3rem); }
  .hero .hero-lead { margin-top: 12px; font-size: 1rem; line-height: 1.5; }
  .hero .hero-actions { flex-direction: row; flex-wrap: wrap; margin-top: 20px; }
  .hero-actions .btn-lg { height: 48px; }
  .hero-scroll { display: none !important; }
}
@media (orientation: landscape) and (max-height: 540px) and (max-width: 767px) {
  .hero { padding-bottom: calc(var(--mb-stack) + 16px + env(safe-area-inset-bottom)); }
}
.btn-outline-light { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.75); }
.btn-outline-light:hover { background: var(--white); color: var(--text); border-color: var(--white); }
.hero-scroll { position: absolute; left: 0; right: 0; margin-inline: auto; width: max-content; bottom: clamp(24px, 4vh, 40px); display: none; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.hero-scroll span { position: relative; width: 1px; height: 44px; background: rgba(255,255,255,.3); overflow: hidden; }
.hero-scroll span::after { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--white); animation: scroll-cue 2.2s var(--ease-out) infinite; }
@keyframes scroll-cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }
@media (min-width: 1024px) { .hero-scroll { display: flex; } }
.stats-band { padding-block: clamp(40px, 5vw, 64px); background: var(--white); }
.hero-line { display: block; overflow: hidden; padding: .1em 0 .08em; margin: -.1em 0 -.08em; }
.hero-line-inner { display: inline-block; will-change: transform; }
.stats { border: 1px solid var(--gray-100); border-radius: var(--radius-card); background: var(--white); box-shadow: var(--shadow-sm); }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; padding: 22px 20px; }
@media (min-width: 768px) { .stat { padding: 28px 32px; } .stat + .stat { border-left: 1px solid var(--gray-100); } }
@media (max-width: 767px) { .stat:nth-child(even) { border-left: 1px solid var(--gray-100); } .stat:nth-child(n+3) { border-top: 1px solid var(--gray-100); } }
.stat-num { font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem); line-height: 1; font-weight: 600; letter-spacing: -0.03em; color: var(--brand-red); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14px; font-weight: 500; color: var(--text-muted); }

/* Ürün fotoğrafları (kullanım alanı kartları) */
.product-media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 4; padding: 16px; border-radius: 18px; background: var(--gray-50); overflow: hidden; }
.product-img { height: 100%; width: auto; max-width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 14px; box-shadow: var(--shadow-md); transition: transform .8s var(--ease-out); }
.card-hover:hover .product-img { transform: scale(1.03); }
@media (hover: none) {
  .card-hover:hover .product-img { transform: none; }
  .brand-logo:hover { opacity: .55; filter: grayscale(1); box-shadow: none; border-color: var(--gray-100); }
}

/* ---------- 11. Doğru akü seçimi (sekmeler + şemalar) ---------- */
.factor-tab { position: relative; display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 18px 20px; border-radius: 18px; border: 1px solid transparent; text-align: left; color: var(--text-muted); transition: background-color .4s, border-color .4s, box-shadow .4s, color .3s; }
.factor-tab:hover { background: var(--gray-50); color: var(--text); }
.factor-tab.is-active { background: var(--white); border-color: var(--gray-100); box-shadow: var(--shadow-md); color: var(--text); }
.factor-num { font-size: 13px; font-weight: 600; color: var(--gray-300); padding-top: 3px; font-variant-numeric: tabular-nums; transition: color .3s; }
.factor-tab.is-active .factor-num { color: var(--brand-red); }
.factor-tab .ft-title { display: block; font-weight: 600; font-size: 16px; color: inherit; }
.factor-tab .ft-sub { display: block; font-size: 14px; color: var(--text-muted); margin-top: 2px; }
@media (max-width: 1023px) {
  /* Yatay kaydırılır; scrollbar gizli, kenar solması .scroll-fade (site.css) ile */
  .factor-tabs { display: flex; gap: 8px; padding: 4px; margin: -4px; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; }
  .factor-tab { width: auto; flex-shrink: 0; padding: 12px 16px; border-radius: 999px; border-color: var(--gray-300); background: var(--white); scroll-snap-align: start; align-items: center; gap: 10px; }
  .factor-tab.is-active { border-color: var(--brand-red); }
  .factor-tab .ft-sub { display: none; }
  .factor-tab .ft-title { font-size: 14.5px; white-space: nowrap; }
  .factor-num { padding-top: 0; }
}
/* Masaüstünde sekmeler dikey liste: kaydırma ve maske yok (aktif sekmenin gölgesi kırpılmasın) */
@media (min-width: 1024px) { .factor-tabs.scroll-fade { overflow: visible; -webkit-mask-image: none; mask-image: none; } }
.diagram { position: relative; border-radius: 20px; background: var(--gray-50); border: 1px solid var(--gray-100); aspect-ratio: 3 / 2; overflow: hidden; }
.diagram::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--gray-300) 1px, transparent 1px); background-size: 18px 18px; opacity: .55; }
.diagram svg { position: relative; width: 100%; height: 100%; }
.dg-draw { stroke-dasharray: 1; }
.dg-play .dg-draw { animation: dg-draw 1.1s var(--ease-out) both; animation-delay: var(--d, 0s); }
.dg-play .dg-fade { animation: dg-fade .8s var(--ease-out) both; animation-delay: var(--d, 0s); }
.dg-play .dg-needle { animation: dg-needle 1.6s var(--ease-out) .2s both; }
.dg-needle { transform-origin: 180px 150px; transform-box: view-box; }
@keyframes dg-needle { from { transform: rotate(-126deg); } to { transform: rotate(0); } }

/* ---------- 13. Marquee (markalar) ---------- */
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-group { display: flex; flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
.brand-logo {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: clamp(180px, 22vw, 248px); height: 112px; margin-right: 16px; border-radius: 20px;
  background: var(--white); border: 1px solid var(--gray-100);
  filter: grayscale(1); opacity: .55; transition: opacity .45s, filter .45s, box-shadow .45s, border-color .45s;
}
.brand-logo:hover { opacity: 1; filter: none; box-shadow: var(--shadow-md); border-color: var(--gray-300); }
.brand-logo img { width: 84%; height: 100%; object-fit: contain; mix-blend-mode: multiply; pointer-events: none; user-select: none; }
.brand-logo .bl-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
/* Mutlu Akü Yetkili Servisi kartı. Görsel şeffaf zeminli bir logo: kutusu tam 3:1 olduğu için
   object-fit: cover kırpmaz; paneldeki pay sayesinde scroll'da hafif parallax yapabilir. */
.svc-card { display: grid; overflow: hidden; border-radius: 24px; background: var(--white); border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm); }
@media (min-width: 1024px) { .svc-card { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.svc-panel { display: grid; align-items: center; padding: clamp(16px, 3vw, 36px); background: var(--white); border-bottom: 1px solid var(--gray-100); }
@media (min-width: 1024px) { .svc-panel { border-bottom: 0; border-right: 1px solid var(--gray-100); } }
.svc-media { position: relative; aspect-ratio: 3.6 / 1; overflow: hidden; }
.svc-media img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.svc-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3.5vw, 44px); background: var(--gray-50); }
.brand-logo .bl-tag { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }

/* ---------- 15. Şubeler (harita yer tutucu) ---------- */
/* Google Maps embed (API anahtarı gerektirmez). Ziyaretçi bölüme yaklaşınca (~300 px önce) iframe eklenir (home.js);
   o zamana kadar ve yüklenirken açık gri iskelet. Sayfa açılırken Google'a istek gitmez. */
.map-embed { position: relative; height: 240px; border-radius: 23px 23px 0 0; background: var(--gray-100); overflow: hidden; isolation: isolate; }
@media (min-width: 768px) { .map-embed { height: 280px; } }
@media (min-width: 1024px) { .map-embed { height: 320px; } }
/* İskelet yalnızca arka katman: iframe üstte durur, yüklenince iskeleti örter (is-ready: animasyon durur). */
.map-embed::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%) var(--gray-100); background-size: 220% 100%; animation: map-skeleton 1.6s linear infinite; }
.map-embed.is-ready::before { animation: none; }
@media (prefers-reduced-motion: reduce) { .map-embed::before { animation: none; } }
.map-embed iframe { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; border: 0; background: transparent; }
/* Şube etiketi: çerçevesiz, küçük, büyük harfli */
.branch-label { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.branch-label.is-main { color: var(--brand-red); }

/* Hareket azaltma (sayfaya özel) */
@media (prefers-reduced-motion: reduce) {
  #loader { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: 100%; flex-wrap: wrap; justify-content: center; }
  .marquee-group { flex-wrap: wrap; justify-content: center; row-gap: 16px; }
  .marquee-group[aria-hidden="true"] { display: none; }
}
