/* D&D Organizasyon - hareket ve arka plan motifleri (site.css'in üstüne eklenir)
   Motifler: tören kemeri, truss şeridi, konfeti noktaları, soğuk ışık kıvılcımı, sahne ışık hüzmeleri.
   Hepsi dekoratiftir, içeriğin arkasında kalır. Yalnızca transform/opacity canlandırılır.
   prefers-reduced-motion: tüm hareketler kapanır, motifler sabit kalır. */

:root {
  --m-arch: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500' fill='none' stroke='%23b9a4e2' stroke-width='1.5' stroke-opacity='1'%3E%3Cpath d='M20 490V210a180 180 0 0 1 360 0v280'/%3E%3Cpath d='M70 490V210a130 130 0 0 1 260 0v280'/%3E%3Cpath d='M120 490V210a80 80 0 0 1 160 0v280'/%3E%3Cpath d='M170 490V210a30 30 0 0 1 60 0v280'/%3E%3C/svg%3E");
  --m-arch-d: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500' fill='none' stroke='%238f76c8' stroke-width='1.5' stroke-opacity='0.55'%3E%3Cpath d='M20 490V210a180 180 0 0 1 360 0v280'/%3E%3Cpath d='M70 490V210a130 130 0 0 1 260 0v280'/%3E%3Cpath d='M120 490V210a80 80 0 0 1 160 0v280'/%3E%3Cpath d='M170 490V210a30 30 0 0 1 60 0v280'/%3E%3C/svg%3E");
  --m-dots: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'%3E%3Ccircle cx='40' cy='60' r='6' fill='%23b9a4e2'/%3E%3Ccircle cx='120' cy='28' r='3' fill='%23b9a4e2'/%3E%3Ccircle cx='212' cy='80' r='9' fill='%23b9a4e2'/%3E%3Ccircle cx='262' cy='172' r='4' fill='%23b9a4e2'/%3E%3Ccircle cx='70' cy='172' r='3.5' fill='%23b9a4e2'/%3E%3Ccircle cx='150' cy='140' r='13' fill='none' stroke='%23b9a4e2' stroke-width='1.3'/%3E%3Ccircle cx='108' cy='252' r='5' fill='%23b9a4e2'/%3E%3Ccircle cx='232' cy='262' r='7' fill='%23b9a4e2'/%3E%3Ccircle cx='24' cy='236' r='10' fill='none' stroke='%23b9a4e2' stroke-width='1.3'/%3E%3Ccircle cx='176' cy='214' r='3' fill='%23b9a4e2'/%3E%3C/svg%3E");
  --m-star: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C13 8 16 11 24 12C16 13 13 16 12 24C11 16 8 13 0 12C8 11 11 8 12 0Z' fill='%23d2c4ec'/%3E%3C/svg%3E");
  --m-truss: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 22' fill='none' stroke='%238f76c8' stroke-width='1'%3E%3Cpath d='M0 1.5H60M0 20.5H60M0 20.5L15 1.5L30 20.5L45 1.5L60 20.5'/%3E%3C/svg%3E");
  --m-truss-d: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 22' fill='none' stroke='%23b9a4e2' stroke-width='1'%3E%3Cpath d='M0 1.5H60M0 20.5H60M0 20.5L15 1.5L30 20.5L45 1.5L60 20.5'/%3E%3C/svg%3E");
  --ease-cine: cubic-bezier(0.65, 0, 0.2, 1);
}

/* ---------- Arka plan motifleri ---------- */
.hero, .sec, .page-head { position: relative; isolation: isolate; }
.sec, .page-head { overflow: clip; }

.sec::before, .page-head::before, .hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  background: var(--m-arch) center / contain no-repeat;
}
/* Varsayılan bölüm: köşede iç içe kemerler (tek sağda, çift solda) */
.sec::before { width: clamp(200px, 28vw, 400px); aspect-ratio: 4 / 5; right: -3%; top: 4%; opacity: 0.36; }
.sec:nth-of-type(even)::before { right: auto; left: -4%; transform: scaleX(-1); }
.sec--tight::before { opacity: 0.26; }
/* Açık gri-lavanta bölüm: kemer + sürüklenen konfeti noktaları */
.sec--alt::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: clamp(160px, 20vw, 300px); aspect-ratio: 1; left: 3%; bottom: 3%;
  background: var(--m-dots) center / contain no-repeat; opacity: 0.6;
  animation: float 11s ease-in-out infinite alternate;
}
.sec--alt:nth-of-type(even)::after { left: auto; right: 4%; }

/* Koyu mürdüm bölüm: sahne ışık hüzmeleri + kıvılcım + kemer */
.sec--plum {
  background-image: var(--m-arch-d);
  background-repeat: no-repeat;
  background-size: clamp(200px, 24vw, 360px) auto;
  background-position: 97% 135%;
}
.sec--plum::before {
  inset: -10% -25% auto -25%; width: auto; height: 130%; aspect-ratio: auto; transform: none; opacity: 1; left: -25%; right: -25%; top: -10%;
  transform-origin: 50% 0;
  background: conic-gradient(from 180deg at 50% 0%,
    transparent 0 5deg, rgba(185, 164, 226, 0.15) 11deg, transparent 19deg, transparent 33deg,
    rgba(210, 196, 236, 0.1) 39deg, transparent 47deg, transparent 313deg,
    rgba(210, 196, 236, 0.1) 321deg, transparent 327deg, transparent 341deg,
    rgba(185, 164, 226, 0.15) 349deg, transparent 355deg);
  -webkit-mask-image: linear-gradient(#000 0%, transparent 78%); mask-image: linear-gradient(#000 0%, transparent 78%);
  animation: sway 11s ease-in-out infinite alternate;
}
.sec--plum::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--m-star), var(--m-star), var(--m-star), var(--m-star), var(--m-star);
  background-repeat: no-repeat;
  background-size: 20px 20px, 12px 12px, 16px 16px, 10px 10px, 14px 14px;
  background-position: 12% 24%, 41% 14%, 78% 30%, 90% 70%, 56% 82%;
  animation: twinkle 5s ease-in-out infinite alternate;
}

/* İç sayfa kapağı: büyük kemerler nefes alır, nokta bulutu süzülür */
.page-head::before { width: clamp(240px, 36vw, 520px); aspect-ratio: 4 / 5; right: 1%; top: -12%; opacity: 0.5; animation: breathe 13s ease-in-out infinite alternate; }
.page-head::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; width: clamp(120px, 16vw, 230px); aspect-ratio: 1; right: 34%; bottom: -6%;
  background: var(--m-dots) center / contain no-repeat; opacity: 0.7; animation: float 10s ease-in-out infinite alternate;
}

/* Ana sayfa kapağı: büyük kemer ve yumuşak ışık lekesi */
.hero::before { width: clamp(380px, 54vw, 780px); aspect-ratio: 4 / 5; right: -8%; top: -14%; opacity: 0.42; animation: breathe 14s ease-in-out infinite alternate; }
.hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; left: -12%; top: -20%; width: 62vw; max-width: 820px; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(210, 196, 236, 0.5), rgba(210, 196, 236, 0));
  animation: drift 16s ease-in-out infinite alternate;
}

/* Alt alan: truss (sahne iskelesi) şeridi */
.site-footer { position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: var(--m-truss-d) repeat-x 0 0 / 60px 22px; opacity: 0.5; }

/* ---------- Duyuru şeridi (hizmet adları, yavaş akar) ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--paper); padding-block: 1.05rem; position: relative; }
.ticker__track { display: flex; width: max-content; animation: ticker 46s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; align-items: center; gap: 2.25rem; padding-right: 2.25rem; flex: none; }
.ticker__group span { font-family: var(--font-display); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.1; color: var(--plum-600); white-space: nowrap; }
.ticker__group i { flex: none; width: 0.55rem; height: 0.8rem; border-radius: 999px 999px 2px 2px; background: var(--lav-400); }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: clamp(2rem, 8vw, 6rem); z-index: 2; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--paper), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, var(--paper), transparent); }

/* ---------- Başlıklarda kelime kelime yükselen giriş ---------- */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.04em 0.16em; margin: 0 -0.04em -0.16em; }
.sw__i { display: inline-block; transform: translateY(112%); transition: transform 1.05s var(--ease); transition-delay: calc(var(--base, 0ms) + var(--w, 0) * 70ms); }
.is-split.sw-in .sw__i { transform: none; }
.is-split[data-in] { animation: none; }

/* ---------- Kaydırmayla giriş çeşitleri ---------- */
.js [data-mv] { opacity: 0.001; transition: opacity 0.9s var(--ease), transform 1s var(--ease), clip-path 1.2s var(--ease-cine); transition-delay: var(--d, 0ms); }
.js [data-mv="up"] { transform: translateY(28px); }
.js [data-mv="left"] { transform: translateX(-36px); }
.js [data-mv="right"] { transform: translateX(36px); }
.js [data-mv="pop"] { transform: translateY(22px) scale(0.965); }
.js [data-mv="clip"] { opacity: 1; clip-path: inset(0 0 100% 0); }
.js [data-mv="clip"] img { transform: scale(1.2); transition: transform 2s var(--ease), opacity 0.6s var(--ease), scale 0.9s var(--ease); transition-delay: var(--d, 0ms), 0s, 0s; }
.js [data-mv].mv-in { opacity: 1; transform: none; }
.js [data-mv="clip"].mv-in { clip-path: inset(0 0 0 0); }
.js [data-mv="clip"].mv-in img { transform: scale(1); }

/* ---------- Etkileşim: düğme ışığı, görsel yaklaşması ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%); transform: translateX(-130%); transition: transform 0.9s var(--ease); }
.btn:hover::after { transform: translateX(130%); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.media img { scale: 1; transition: opacity 0.6s var(--ease), scale 1s var(--ease), transform 2s var(--ease); }
.svc-row:hover .media img, .tile:hover img, .svc-card:hover .media img { scale: 1.07; }
.hero__facts { border-top: 0; position: relative; }
.hero__facts::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: left; animation: draw 1.4s var(--ease-cine) 0.9s both; }
.lightbox.is-open { animation: fade 0.35s var(--ease) both; }
.lightbox.is-open figure { animation: pop 0.55s var(--ease) both; }
.draft.is-shown { animation: rise 0.7s var(--ease) both; }
.nav__menu { transition-duration: 0.3s; }

/* ---------- Anasayfa kapağı: fotoğrafa çok yavaş yaklaşma ---------- */
.hero__arch .media img { animation: kenburns 18s ease-in-out 1.4s infinite alternate; }

/* ---------- Kaydırma ilerleme çizgisi ve paralaks (destekleyen tarayıcıda) ---------- */
@supports (animation-timeline: scroll()) {
  .site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--lav-400), var(--plum-600)); transform-origin: 0 50%; transform: scaleX(0); animation: progress linear both; animation-timeline: scroll(root); }
  .sec::before { animation: par linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  .page-head::before { animation: breathe 13s ease-in-out infinite alternate, par linear both; animation-timeline: auto, view(); animation-range: normal, cover 0% cover 100%; }
  .hero__block { animation: par-s linear both; animation-timeline: scroll(root); animation-range: 0 70vh; }
  .hero__small { animation: par-u linear both; animation-timeline: scroll(root); animation-range: 0 70vh; }
}

/* ---------- Sayfalar arası sinematik geçiş ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out 0.6s cubic-bezier(0.4, 0, 0.6, 1) both; }
  ::view-transition-new(root) { animation: vt-in 0.95s var(--ease-cine) both; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-group(site-header) { animation-duration: 0s; }
}
/* Geçiş API'sini bilmeyen tarayıcılar için perde: çıkışta kapanır, yeni sayfada açılır */
html.pt-out::after, html.pt-in::after { content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; background: linear-gradient(180deg, var(--plum-800), var(--plum-900)); }
html.pt-out::after { border-radius: 50% 50% 0 0 / 14vh 14vh 0 0; animation: pt-close 0.55s var(--ease-cine) both; }
html.pt-in::after { border-radius: 0 0 50% 50% / 0 0 14vh 14vh; animation: pt-open 0.9s var(--ease-cine) 0.05s both; }

@keyframes vt-out { to { opacity: 0.3; transform: scale(0.965) translateY(-1.5%); filter: brightness(0.7); } }
@keyframes vt-in { from { clip-path: circle(0% at 50% 100%); } to { clip-path: circle(150% at 50% 100%); } }
@keyframes pt-close { from { transform: translateY(101%); } to { transform: none; } }
@keyframes pt-open { from { transform: none; } to { transform: translateY(-101%); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes float { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(14px, -22px, 0) rotate(5deg); } }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(8vw, 6vh, 0) scale(1.08); } }
@keyframes breathe { from { scale: 1; } to { scale: 1.06; } }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes twinkle { 0% { opacity: 0.15; } 50% { opacity: 0.85; } 100% { opacity: 0.3; } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07) translate(-1%, -1%); } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes progress { to { transform: scaleX(1); } }
@keyframes par { from { translate: 0 44px; } to { translate: 0 -44px; } }
@keyframes par-s { to { translate: 0 36px; } }
@keyframes par-u { to { translate: 0 -34px; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Mobil: motifleri sadeleştir ---------- */
@media (max-width: 760px) {
  .sec::before { opacity: 0.3; width: 56vw; }
  .sec--tight::before { opacity: 0.18; }
  .sec--alt::after { width: 34vw; opacity: 0.6; }
  .page-head::after { display: none; }
  .hero::before { width: 90vw; right: -30%; top: -4%; opacity: 0.32; }
  .sec--plum::before { height: 110%; }
  .ticker__track { animation-duration: 34s; }
}

/* ---------- Hareket azaltma: sabit, okunur ve motifli ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-mv] { opacity: 1; transform: none; clip-path: none; }
  .js [data-mv="clip"] img { transform: none; }
  .sw__i { transform: none; }
  .ticker__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .ticker__group + .ticker__group { display: none; }
  .ticker__group { flex-wrap: wrap; justify-content: center; padding: 0 1rem; row-gap: 0.4rem; }
  .ticker::before, .ticker::after { display: none; }
  .site-header::after, html.pt-out::after, html.pt-in::after { display: none; }
}
@media print { .js [data-mv] { opacity: 1 !important; transform: none !important; clip-path: none !important; } .sw__i { transform: none !important; } .ticker { display: none; } }

/* ---------- Açılış ekranı (oturumda bir kez, yalnızca ana sayfa) ---------- */
.intro { display: none; }
html.intro-live .intro {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 10000; overflow: hidden; pointer-events: auto; cursor: pointer;
  background: radial-gradient(60% 50% at 50% 46%, rgba(92, 53, 115, 0.55), rgba(27, 12, 34, 0) 70%), var(--plum-950);
  border-radius: 0 0 50% 50% / 0 0 14vh 14vh;
  animation: intro-out 0.85s var(--ease-cine) 2.1s both;
}
html.intro-live .intro::before { content: ""; position: absolute; inset: 0; background-image: var(--grain); background-size: 200px 200px; opacity: 0.35; mix-blend-mode: screen; pointer-events: none; }
html.intro-skip .intro { animation: intro-quick 0.6s var(--ease-cine) both; }
.intro__stage { position: relative; width: min(88vw, 400px, 54vh); aspect-ratio: 400 / 520; container-type: inline-size; }
.intro__arches { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; -webkit-mask-image: linear-gradient(#000 72%, transparent 100%); mask-image: linear-gradient(#000 72%, transparent 100%); }
.intro__arches path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0.8; animation: intro-draw 1.7s var(--ease-cine) both; }
.intro__arches path:nth-child(2) { animation-delay: 0.18s; opacity: 0.55; }
.intro__arches path:nth-child(3) { animation-delay: 0.36s; opacity: 0.4; }
.intro__in { position: absolute; left: 0; right: 0; top: 40%; display: grid; justify-items: center; gap: 0.9rem; text-align: center; animation: intro-fade-out 0.35s ease 1.95s both; }
.intro__logo { font-family: var(--font-display); font-size: 6.5rem; font-size: 31cqw; line-height: 1; letter-spacing: -0.02em; color: var(--paper); animation: intro-rise 1s var(--ease) 0.35s both; }
.intro__logo i { font-style: italic; color: var(--lav-400); padding-inline: 0.04em; }
.intro__hi { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.7rem; font-size: clamp(1.2rem, 8cqw, 1.9rem); color: var(--lav-200); animation: intro-hi 1.2s var(--ease) 0.95s both; }
@keyframes intro-draw { to { stroke-dashoffset: 0; } }
@keyframes intro-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes intro-hi { from { opacity: 0; filter: blur(7px); letter-spacing: 0.22em; } to { opacity: 1; filter: blur(0); letter-spacing: 0.02em; } }
@keyframes intro-fade-out { to { opacity: 0; } }
@keyframes intro-out { from { transform: none; visibility: visible; } 99% { visibility: visible; } to { transform: translateY(-101%); visibility: hidden; } }
@keyframes intro-quick { from { transform: none; } to { transform: translateY(-101%); visibility: hidden; } }
/* Açılış sürerken kapak animasyonları bekler; ekran kalkarken başlar */
html.intro-on .hero__curtain, html.intro-on [data-in], html.intro-on .hero__facts::before, html.intro-on .hero__arch .media img { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .intro, html.intro-live .intro { display: none !important; } }
@media print { .intro { display: none !important; } }
