/* ============================================================
   Sivas Anadolu Kurumsal Yemek — v2 motion & holding bileşenleri
   Reveal animasyonları YALNIZCA .has-js ile devreye girer;
   JS yoksa / reduce-motion açıksa içerik varsayılan görünür.
   ============================================================ */

:root {
	--e-out: cubic-bezier(0.16, 1, 0.3, 1);        /* ease-out-expo benzeri */
	--e-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
	--rise: 26px;
}

/* ---------- Reveal sistemi (keyframe tabanlı) ----------
   İçerik varsayılan GÖRÜNÜR; yalnızca .in eklendiğinde giriş animasyonu oynar.
   Böylece JS/scroll tetiklenmezse veya transition'lar duraklarsa bölüm asla boş kalmaz. */
@keyframes revealIn {
	from { opacity: 0; transform: translate(var(--rx, 0), var(--ry, 26px)) scale(var(--rs, 1)); }
	to   { opacity: 1; transform: none; }
}
.has-js [data-reveal].in { animation: revealIn .8s var(--e-out) backwards; }
.has-js [data-reveal="up"].in    { --rx: 0;      --ry: 26px; }
.has-js [data-reveal="left"].in  { --rx: -36px;  --ry: 0; }
.has-js [data-reveal="right"].in { --rx: 36px;   --ry: 0; }
.has-js [data-reveal="scale"].in { --rx: 0; --ry: 0; --rs: .92; }
.has-js [data-reveal="clip"].in  { --rx: 0; --ry: 16px; }

/* Stagger: çocuklara --i indeksi verilir, .in eklenince sırayla girerler */
.has-js [data-stagger].in > * { animation: revealIn .7s var(--e-out) backwards; animation-delay: calc(var(--i, 0) * 90ms); }

.reduce-motion [data-reveal].in,
.reduce-motion [data-stagger].in > * { animation: none !important; }

/* ---------- Hero giriş koreografisi ---------- */
.has-js .hero-in > * { opacity: 0; }
.has-js .hero-anim .hero-in > * {
	animation: heroRise .95s var(--e-out) both;
}
.has-js .hero-anim .hero-in > *:nth-child(1) { animation-delay: .15s; }
.has-js .hero-anim .hero-in > *:nth-child(2) { animation-delay: .28s; }
.has-js .hero-anim .hero-in > *:nth-child(3) { animation-delay: .41s; }
.has-js .hero-anim .hero-in > *:nth-child(4) { animation-delay: .54s; }
.has-js .hero-anim .hero-in > *:nth-child(5) { animation-delay: .67s; }
@keyframes heroRise {
	from { opacity: 0; transform: translateY(32px); filter: blur(6px); }
	to   { opacity: 1; transform: none; filter: blur(0); }
}
.reduce-motion .hero-in > * { opacity: 1 !important; animation: none !important; }

/* Hero video hafif zoom (canlılık) */
.has-js .hero-media { animation: heroZoom 22s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.reduce-motion .hero-media { animation: none !important; }

/* Hero başlık altını çizen altın vurgu */
.hero h1 .accent { position: relative; white-space: nowrap; color: var(--amber); }

/* ---------- Bölüm başlığı: eyebrow yerine daha sakin işaret ---------- */
.sect-lead { max-width: 680px; margin-bottom: clamp(30px, 4vw, 52px); }
.sect-lead.center { margin-inline: auto; text-align: center; }
.sect-kicker {
	display: inline-flex; align-items: center; gap: 9px;
	font-weight: 700; font-size: .82rem; letter-spacing: .02em; color: var(--gold);
	margin-bottom: 16px;
}
.sect-kicker svg { color: var(--gold); }
.sect-lead h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin: 0 0 14px; }
.sect-lead p { color: var(--muted); font-size: 1.08rem; margin: 0; text-wrap: pretty; }

/* ============================================================
   GRUP / İŞTİRAK YAPISI
   ============================================================ */
.group-band {
	position: relative; overflow: hidden;
	background:
		radial-gradient(900px 480px at 82% -10%, rgba(201,151,28,.14), transparent 60%),
		linear-gradient(160deg, var(--navy), var(--primary-dark));
	color: #fff;
}
.group-band .container { position: relative; z-index: 1; }
.group-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.group-band h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 2.9rem); }
.group-band .sect-kicker { color: var(--amber); }
.group-band .sect-kicker svg { color: var(--amber); }
.group-lead { color: rgba(255,255,255,.86); font-size: 1.1rem; line-height: 1.7; text-wrap: pretty; }
.group-pillars { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.group-pillars li { display: flex; gap: 14px; align-items: flex-start; }
.group-pillars .gp-ic {
	width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
	background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); color: var(--amber);
}
.group-pillars strong { display: block; color: #fff; font-family: 'Source Sans 3', sans-serif; margin-bottom: 2px; }
.group-pillars span { color: rgba(255,255,255,.72); font-size: .95rem; }

/* Animasyonlu grup diyagramı: merkez + halkalar */
.group-orbit { position: relative; aspect-ratio: 1; max-width: 460px; margin: 0 auto; width: 100%; --r: clamp(105px, 34vw, 172px); }
.orbit-ring {
	position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255,255,255,.18);
}
.orbit-ring.r2 { inset: 15%; border-color: rgba(255,255,255,.12); }
.has-js .orbit-ring { animation: spin 60s linear infinite; }
.has-js .orbit-ring.r2 { animation: spin 44s linear infinite reverse; }
.reduce-motion .orbit-ring { animation: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-core {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 40%; height: 40%; border-radius: 26px; display: grid; place-items: center; text-align: center;
	background: linear-gradient(150deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
	border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); padding: 12px;
	box-shadow: 0 20px 50px -20px rgba(0,0,0,.5);
}
.orbit-core strong { font-family: 'Fraunces', serif; font-size: clamp(1rem, 2.4vw, 1.5rem); color: #fff; line-height: 1.1; }
.orbit-core span { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-top: 6px; }
.orbit-node {
	position: absolute; top: 50%; left: 50%; width: 62px; height: 62px; margin: -31px;
	--x: calc(sin(var(--a)) * var(--r));
	--y: calc(cos(var(--a)) * -1 * var(--r));
	border-radius: 16px; display: grid; place-items: center;
	background: #fff; color: var(--primary); box-shadow: 0 12px 28px -12px rgba(0,0,0,.55);
	transform: translate(var(--x), var(--y));
	transition: transform .4s var(--e-out);
}
@keyframes orbitPop {
	from { opacity: 0; transform: translate(0, 0) scale(.4); }
	to   { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); }
}
.has-js [data-orbit].in .orbit-node { animation: orbitPop .7s var(--e-out) backwards; animation-delay: calc(var(--n) * 110ms + 250ms); }
.reduce-motion [data-orbit].in .orbit-node { animation: none !important; }
.orbit-node:hover { transform: translate(var(--x), var(--y)) scale(1.12); z-index: 2; }
.orbit-node svg { width: 26px; height: 26px; }

/* ============================================================
   İŞTİRAK KARTLARI (temiz 3×2 grid — amiral gemi renkle ayrışır)
   ============================================================ */
.subs-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sub-card {
	position: relative; overflow: hidden; border-radius: 20px; padding: 30px 28px;
	background: #fff; border: 1px solid var(--border);
	display: flex; flex-direction: column; gap: 13px; min-height: 250px;
	transition: transform .4s var(--e-out), box-shadow .4s var(--e-out), border-color .3s ease;
}
.sub-card:hover { transform: translateY(-6px); box-shadow: 0 30px 55px -28px rgba(15,18,32,.3); border-color: transparent; }
.sub-card.flagship { color: #fff; border: 0;
	background: radial-gradient(500px 300px at 85% -10%, rgba(233,185,73,.28), transparent 62%), linear-gradient(155deg, var(--primary), var(--primary-dark)); }
.sub-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sub-icn {
	width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; flex-shrink: 0;
	background: color-mix(in srgb, var(--sub-accent, var(--primary)) 12%, #fff);
	color: var(--sub-accent, var(--primary));
}
.sub-card.flagship .sub-icn { background: rgba(255,255,255,.18); color: #fff; }
.sub-tag { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sub-accent, var(--primary)); }
.sub-card.flagship .sub-tag { color: var(--amber); }
.sub-card h3 { margin: 0; font-size: 1.28rem; line-height: 1.22; }
.sub-card.flagship h3 { color: #fff; }
.sub-card p { margin: 0; color: var(--muted); font-size: .95rem; text-wrap: pretty; flex: 1; }
.sub-card.flagship p { color: rgba(255,255,255,.88); }
.sub-flagbadge {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--gold); color: #2a1e02; font-weight: 700; font-size: .72rem;
	padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.sub-more { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--sub-accent, var(--primary)); display: inline-flex; align-items: center; gap: 7px; }
.sub-card.flagship .sub-more { color: #fff; }
.sub-more svg { transition: transform .2s ease; }
.sub-card:hover .sub-more svg { transform: translateX(4px); }
.sub-card::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
	background: var(--sub-accent, var(--primary)); transform: scaleX(0); transform-origin: left;
	transition: transform .4s var(--e-out);
}
.sub-card:not(.flagship):hover::after { transform: scaleX(1); }

/* ============================================================
   Sayaç bandına dokunuş: ışık huzmeleri
   ============================================================ */
.counters { position: relative; overflow: hidden; }
.counters::before {
	content: ""; position: absolute; top: -50%; left: -10%; width: 60%; height: 200%;
	background: radial-gradient(closest-side, rgba(233,185,73,.14), transparent);
	transform: rotate(18deg); pointer-events: none;
}

/* ============================================================
   Sonraki-bölüm geçiş çizgisi (altın ince ayraç)
   ============================================================ */
.rule-gold { height: 3px; width: 64px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--amber)); border: 0; margin: 0 0 22px; }
.center .rule-gold { margin-inline: auto; }

/* ============================================================
   Kariyer / İştirak sayfa bileşenleri
   ============================================================ */
.sub-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.sub-detail {
	position: relative; border-radius: 20px; padding: 32px; background: #fff; border: 1px solid var(--border);
	display: flex; flex-direction: column; gap: 16px;
	transition: transform .4s var(--e-out), box-shadow .4s var(--e-out);
}
.sub-detail:hover { transform: translateY(-5px); box-shadow: 0 28px 50px -26px rgba(14,27,69,.3); }
.sub-detail .sub-icn { width: 60px; height: 60px; }
.sub-detail h3 { margin: 0; font-size: 1.4rem; }
.sub-detail .sub-tag { margin-bottom: -6px; }
.sub-detail p { color: var(--muted); margin: 0; text-wrap: pretty; }

.career-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 8px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
	.group-grid { grid-template-columns: 1fr; }
	.group-orbit { max-width: 380px; order: -1; }
	.subs-wrap { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.subs-wrap { grid-template-columns: 1fr; }
	.group-orbit { max-width: 300px; }
}

/* ============================================================
   v3 — Yüzen iletişim, mobil app tab-bar, XOR kredisi
   ============================================================ */

/* Yüzen hızlı aksiyonlar (sol alt köşe) */
.quick-actions {
	position: fixed; left: 20px; bottom: 22px; z-index: 95;
	display: flex; flex-direction: column; gap: 12px;
}
.qa-btn {
	position: relative; display: inline-flex; align-items: center; gap: 0;
	height: 56px; width: 56px; padding: 0; border-radius: 999px;
	color: #fff; overflow: hidden; white-space: nowrap;
	box-shadow: 0 12px 30px -10px rgba(0,0,0,.4);
	transition: width .35s var(--e-out), transform .2s var(--e-out), box-shadow .2s ease;
}
.qa-btn svg { flex: 0 0 56px; height: 56px; padding: 16px; box-sizing: border-box; }
.qa-label { font-weight: 700; font-size: .95rem; padding-right: 22px; opacity: 0; transition: opacity .25s ease; }
.qa-phone { background: linear-gradient(135deg, var(--gold), #b8860f); color: #241a02; }
.qa-whatsapp { background: linear-gradient(135deg, #25D366, #17a94c); }
.qa-btn:hover { width: 168px; transform: translateY(-2px); color: #fff; box-shadow: 0 16px 36px -10px rgba(0,0,0,.5); }
.qa-phone:hover { color: #241a02; }
.qa-btn:hover .qa-label { opacity: 1; }
/* nabız halkası */
.qa-ring { position: absolute; inset: 0; border-radius: 999px; z-index: -1; }
.qa-phone .qa-ring { box-shadow: 0 0 0 0 rgba(201,151,28,.55); animation: qaPulse 2.4s ease-out infinite; }
.qa-whatsapp .qa-ring { box-shadow: 0 0 0 0 rgba(37,211,102,.5); animation: qaPulse 2.4s ease-out infinite .6s; }
@keyframes qaPulse { 0% { box-shadow: 0 0 0 0 rgba(201,151,28,.5); } 70%,100% { box-shadow: 0 0 0 16px rgba(201,151,28,0); } }
.reduce-motion .qa-ring { animation: none !important; }

/* Eski sağ-alt whatsapp fab kaldırıldı; back-top sağ altta kalır */
.whatsapp-fab { display: none !important; }

/* Mobil app tab-bar */
.app-tabbar { display: none; }
@media (max-width: 768px) {
	.app-tabbar {
		display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
		background: rgba(15, 18, 32, .96); backdrop-filter: blur(14px);
		border-top: 1px solid rgba(255,255,255,.08);
		padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
		justify-content: space-around; align-items: flex-end;
		transition: transform .3s var(--e-out);
	}
	.app-tabbar.hide { transform: translateY(110%); }
	.app-tabbar a {
		flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
		color: rgba(255,255,255,.62); font-size: .64rem; font-weight: 600; padding: 4px 2px;
		position: relative;
	}
	.app-tabbar a.on { color: var(--amber); }
	.app-tabbar a.on::before {
		content: ""; position: absolute; top: -8px; width: 22px; height: 3px; border-radius: 3px; background: var(--amber);
	}
	.app-tabbar svg { width: 22px; height: 22px; }
	/* orta vurgulu CTA (WhatsApp) */
	.app-tabbar .tab-cta {
		color: #fff; transform: translateY(-14px);
	}
	.app-tabbar .tab-cta svg {
		width: 54px; height: 54px; padding: 15px; box-sizing: border-box;
		background: linear-gradient(135deg, #25D366, #17a94c); border-radius: 50%;
		box-shadow: 0 10px 24px -8px rgba(37,211,102,.6); border: 3px solid var(--navy);
	}

	/* İçerik tab-bar arkasında kalmasın */
	body { padding-bottom: 68px; }
	.site-footer { margin-bottom: 4px; }
	/* Yüzen butonlar tab-bar üstünde */
	.quick-actions { left: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); gap: 10px; }
	.qa-btn { height: 50px; width: 50px; }
	.qa-btn svg { flex-basis: 50px; height: 50px; padding: 14px; }
	.qa-btn:hover { width: 50px; }
	.qa-btn:hover .qa-label { opacity: 0; }
	.qa-label { display: none; }
	.back-top { bottom: calc(80px + env(safe-area-inset-bottom)); right: 14px; }
}

/* Footer XOR kredisi */
.footer-credit { margin: 0; color: rgba(255,255,255,.5); font-size: .82rem; }
.footer-credit a { color: rgba(255,255,255,.75); font-weight: 600; }
.footer-credit a:hover { color: var(--amber); }

/* PWA standalone modda: app hissi (adres çubuğu yok) */
@media (display-mode: standalone) {
	.topbar { display: none; }
	.app-tabbar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   v4 — Mobil "tam app" deneyimi
   ============================================================ */
@media (max-width: 768px) {
	/* Yüzen telefon/WhatsApp mobilde gizli — alt tab-bar zaten kapsıyor (temiz app hissi) */
	.quick-actions { display: none !important; }
	.back-top { bottom: calc(84px + env(safe-area-inset-bottom)); right: 14px; width: 42px; height: 42px; }

	/* Header: kompakt app-bar */
	.header-in { min-height: 66px; }
	.topbar { display: none; } /* mobilde adres çubuğu gibi topbar gizli — app feel */
	.hero-video { margin-top: 0; min-height: 88svh; }

	/* Mobil menü: app-tarzı tam yükseklik panel */
	.main-nav {
		width: min(360px, 90vw) !important; padding: 0 !important;
		background: var(--cream) !important;
		display: flex; flex-direction: column;
	}
	.main-nav::before {
		content: ""; display: block; height: 4px; flex-shrink: 0;
		background: linear-gradient(90deg, var(--primary), var(--gold));
	}
	.main-nav ul { padding: 14px 14px calc(30px + env(safe-area-inset-bottom)) !important; overflow-y: auto; }
	.main-nav > ul > li > a, .main-nav > ul > li > button {
		border-radius: 12px; font-weight: 700; font-size: 1.05rem; color: var(--ink) !important;
	}
	.main-nav > ul > li { border-bottom: 1px solid rgba(15,18,32,.06); }
	.submenu::before { display: none; } /* mobilde caret ok gizli */
	.submenu a { color: var(--muted) !important; font-size: .98rem; }
	.submenu a::before { display: none; }
	.has-sub.open > button { color: var(--primary) !important; background: rgba(42,71,149,.06); }

	/* Bölüm boşlukları mobilde biraz sıkı (app density) */
	.section { padding: clamp(44px, 9vw, 68px) 0; }
}

/* Dokunmatik hedefler ve app parlaklığı */
@media (max-width: 768px) and (hover: none) {
	.btn:active, .sub-card:active, .service-card:active { transform: scale(.98); }
	.app-tabbar a:active { opacity: .6; }
}

/* PWA standalone: gerçek app gibi */
@media (display-mode: standalone) {
	.topbar { display: none; }
	.site-header { padding-top: env(safe-area-inset-top); }
}

/* Mobil menü akordiyonu: alt menüler kapalı başlar, üst öğeye dokununca açılır */
@media (max-width: 1024px) {
	.main-nav .submenu { display: none !important; opacity: 1 !important; visibility: visible !important;
		position: static !important; box-shadow: none !important; border: 0 !important;
		background: transparent !important; padding: 2px 0 8px 14px !important; transform: none !important; }
	.main-nav .has-sub.open .submenu { display: flex !important; }
	.main-nav .submenu::before { display: none !important; }
	.main-nav .has-sub > button::after { display: none; }
}
