/* ===================================================================
   AY MİMARLIK — CORE (ortak değişkenler + temel stiller)
   Bu dosya TÜM sayfalarda kullanılır.
   - Kökteki değişkenler (font, renk, ölçü)
   - Reset/temel layout
   - Topbar + üst blur şeridi
   - Genel arkaplan, linkler
   - Ortak efektler: .reveal, .cursor-glow
   - CTA bandı + Sosyal alt bar
   =================================================================== */
html { scroll-behavior: auto !important; }
/* ---------- 0) KÖK DEĞİŞKENLER ---------- */
:root{
  /* Yazı aileleri */
  --app-font: 'GloberThinFree', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --title-font: 'GloberThinFree', sans-serif;

  /* Renk paleti */
  --bg: #121111;
  --fg: #E7E9EC;

  /* Top boşluk/başlık */
  --topbar-h: 86px;
  --page-headroom: clamp(24px, 6vh, 56px);
  --title-weight: 400;
  
  --page-gap-base: 150px;  /* projeler/servisler için taban boşluk */

  /* Topbar */
  --brand-size: 42px;
  --menu-underline-h: 2px;
  --menu-underline-gap: 4px;
  --menu-underline: #e5e5e5;
  --menu-underline-active: #ffffff;

  /* Sheen için varsayılanlar (servis kartları kullanır) */
  --sheen-angle: 20deg;
  --sheen-width: 28%;
  --sheen-blur: 20px;
  --sheen-opacity: .10;
  --sheen-ease: cubic-bezier(.22,.61,.36,1);
  --sheen-left: -30%;
  --sheen-travel: 200%;
  --sheen-cap: 78%;

  /* Lightbox ölçekleri */
  --lb-w: 45vw;
  --lb-h: auto;
  --lb-max-w: clamp(520px, 92vw, 1400px);
  --lb-max-h: 86vh;

  /* Sosyal alt bar */
  --social-bg: rgba(10, 14, 18, 0.55);
  --social-border: rgba(255,255,255,0.08);
  --social-fg: var(--fg, #E7E9EC);
  --social-hover: rgba(255,255,255,0.12);
  --social-accent: var(--accent, #5D7285);

  /* İpucu ve site etiketi (gerekirse) */
  --hint1-left: 50%;
  --hint1-top:  63%;
  --hand-size:  40px;
  --arrow-w:    80px;
  --arrow-iters: 5;
  --arrow-dur:  2.6s;
  --label2-right: 8%;
  --label2-bottom: 18%;
}

/* ---------- 1) FONT + TEMEL ---------- */
@font-face{
  font-family: 'GloberThinFree';
  src: url('../fonts/GloberThinFree.woff2') format('woff2'),
       url('../fonts/GloberThinFree.woff')  format('woff');
  font-weight: 100 400;
  font-style: normal;
  font-display: swap;
}

*{ box-sizing: border-box; }
/* =========================
   1) YÜKSEKLİK KİLİTLERİNİ KALDIR
   - body/html 100vh'e kilitlenmesin
   ========================= */
html, body{
  margin: 0;
  height: auto;          /* viewport'a sabitlenmesin */
  min-height: 100%;      /* en az 1 ekran */
}

/* =========================
   2) SABİT ARKA PLAN — KÖKE (HTML) KOY
   - Tek parça SVG, no-repeat
   - En üste çak (top), scroll boyunca arkada kalır (fixed)
   - Genişlik: %100, yükseklik: orantılı (kırpma yok)
   ========================= */
html{
  background-color: var(--bg);                         /* sayfa zemin rengi */
  background-image: url('../medias/back-ground-3.svg');/* ← klasörüne göre ../ veya ./ */
  background-repeat: no-repeat;                        /* tek parça */
  background-position: center top;                     /* en üste hizala */
  background-attachment: fixed;                        /* ← KRİTİK: kaydırırken arkada sabit kal */
  background-size: 105% auto;                          /* tam genişlik, oran koru */
}

/* =========================
   3) BODY'Yİ ŞEFFAF BIRAK
   - HTML'deki arka plan görünsün
   ========================= */
body{
  background: transparent;                             /* html'deki BG görünsün */
  color: var(--fg);
  font-family: var(--app-font, 'GloberThinFree', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
}

/* link ve üst boşluk kalsın */
a{ color: var(--fg); text-decoration: none; }
.page-content{ padding-top: calc(var(--topbar-h) + var(--page-headroom)); }

/* =========================
   4) SAYFA ÖZEL BG'LERİ İPTAL ET
   - Başka dosyalardaki fixed/cover BG'ler kökteki resmi kapatmasın
   ========================= */
[class*="-page"], .page, .page-wrap, .page-content, main{
  background-image: none !important;        /* içerik tarafında BG yok */
  background-attachment: scroll !important; /* olası fixed'leri kapat */
  background-color: transparent !important; /* zemin: html'den gelsin */
}

/* ---------- 2) TOPBAR + üst blur şeridi ---------- */
.topbar{
  position: fixed; inset: 0 0 auto 0; height: 100px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px; padding-right: 50px;
  background: transparent; border-bottom: none; z-index: 2000;
}
.topbar .brand{ display:inline-flex; align-items:center; gap:10px; color:inherit; }
.topbar .logo-small{ width: 100px; height: 100px; object-fit: contain; }
.brand-strong{ font-weight:800; font-size:var(--brand-size); line-height:1; }
.brand-thin{ font-family:'GloberThinFree',sans-serif; font-weight:100; font-size:var(--brand-size); line-height:1; letter-spacing:.06em; }
.topbar .menu a{
  position: relative; padding:10px 12px; margin-inline:15px;
  filter:none!important; text-shadow:none!important; transform:none!important;
  transition: color .15s ease;
}
.topbar .menu a::before{ content:none!important; } /* eski glowları kapat */
.topbar .menu a::after{
  content:""; position:absolute; left:0; bottom:calc(-1 * var(--menu-underline-gap));
  height:var(--menu-underline-h); width:0%; background:var(--menu-underline);
  transition:width .28s ease; transform-origin:left center;
}
.topbar .menu a:hover::after, .topbar .menu a:focus-visible::after{ width:100%; }
.topbar .menu a.active::after{ width:100%; background:var(--menu-underline-active); }

/* Topbar arkasındaki blur şeridi */
body::before{
  content:""; position:fixed; left:0; right:0; top:0; height:clamp(140px,20vh,240px);
  z-index:1950; pointer-events:none;
  background: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,1) 90px, rgba(0,0,0,0) 100px);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
          backdrop-filter: blur(20px) saturate(120%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
          mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
}
@supports (top: env(safe-area-inset-top)){ body::before{ top: env(safe-area-inset-top); } }

/* ---------- 3) ORTAK EFEKTLER ---------- */
/* Scroll reveal */
.reveal{ opacity:0; transform: translateY(12px) scale(.995); transition: opacity .5s, transform .5s; will-change: opacity, transform; }
.reveal.in{ opacity:1; transform:none; }

/* 3D viewer alanı (anasayfa) */
#three-container{ width:100%; height:100vh; background: var(--bg); position:relative; z-index:1; overflow:hidden; }

/* ---------- 4) CTA bandı ---------- */
.cta-band{
  max-width: clamp(960px, 88vw, 1280px);
  margin: 0 auto 96px;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  text-align: center; position: relative; z-index:1;
}
.cta-band h3{ margin:0 0 8px; font-weight:700; letter-spacing:.3px; }
.cta-band p{ margin:0 0 18px; opacity:.9; }
.cta{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 20px; border-radius:12px; font-weight:700; letter-spacing:.4px;
  background: rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.16);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.cta:hover{ transform: translateY(-1px); background: rgba(255,255,255,.18); box-shadow: 0 10px 24px rgba(0,0,0,.25); }

/* ---------- 5) SOSYAL ALT BAR ---------- */
.social-bar{
  position: fixed; left:0; right:0; bottom:0; z-index:2100;
  display:flex; justify-content:center; gap:10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--social-bg); border-top: 1px solid var(--social-border);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.social-bar .social-link{
  --pad-y: 9px; --pad-x: 12px;
  display:inline-flex; align-items:center; gap:8px;
  padding: var(--pad-y) var(--pad-x); color: var(--social-fg);
  border-radius: 12px; border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  transition: background .2s ease, transform .2s ease, color .2s ease, border-color .2s ease;
  line-height: 1;
}
.social-bar .social-link:hover{ background: var(--social-hover); transform: translateY(-3px); border-color: rgba(255,255,255,0.16); }
.social-bar .social-link svg{ display:block; width:18px; height:18px; color: currentColor; overflow: visible; flex-shrink:0; shape-rendering: geometricPrecision; }

/* ---------- 6) Sayfa başlığı (ortak) ---------- */
.page-title{
  font-family: var(--title-font);
  font-weight: var(--title-weight);
  letter-spacing: .6px;
  font-size: clamp(22px, 2.4vw, 32px);
  margin: 0 0 12px;
}

/* ==========================
   2) INTRO (logo parçaları + başlık)
   ========================== */
#intro{
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(30,30,30,.82);
  backdrop-filter: blur(20px);
  z-index: 3000;
  transition: opacity 1.5s ease, backdrop-filter 1.5s ease;
}
#intro.fade-out{ opacity: 0; backdrop-filter: blur(0); }

#pieces-group{ position: absolute; inset: 0; transition: transform 1.2s ease-in-out; z-index: 1400; pointer-events: none; }

.piece{
  position: absolute; width: 100px; filter: blur(15px); opacity: 0;
  transition: all 1.8s cubic-bezier(.77,0,.175,1);
}
.piece.top{    width:105px; top:-150px; left:50%; transform:translateX(-50%); }
.piece.left{   bottom:-150px; left:-150px; }
.piece.right{  bottom:-150px; left:calc(100% + 150px); }

.piece.top.final   { top: calc(50% - 88px); left: calc(50% + 3px);  transform: translateX(-50%); filter: blur(0); opacity:1; }
.piece.left.final  { top: calc(50% + 0px);  left: calc(50% - 102px);                            filter: blur(0); opacity:1; }
.piece.right.final { top: calc(50% + 0px);  left: calc(50% + 7px);                              filter: blur(0); opacity:1; }

/* “architecture” — İNCE ve 16px (senin istediğin) */
#intro .title{
  position: absolute; top: calc(50% + 100px);
  font-family: 'GloberThinFree', sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--fg);
  opacity: 0; filter: blur(15px);
  transition: all 1.5s ease;
}
#intro .title.show{ opacity: 1; filter: blur(0); }

/* ==================  D) HINT ANİMASYONU ve SAĞ ALT LOKASYON YAZISI  ================== */
.hint-drag{
  position: absolute;
  left: var(--hint1-left); top: var(--hint1-top);
  transform: translate(-50%,-50%);
  display: flex; align-items: center; gap: 12px;
  pointer-events: none;
  color: rgba(255,255,255,.92);         /* ← 0.92 */
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); /* ← 0.35 */
  opacity: 0; visibility: hidden;       /* başlangıçta gizli */
}

/* Görsellerin boyutları */
.hint-drag .hand-img{
  height: var(--hand-size); width: auto; display:block;
  animation: hand-pulse 1.2s ease-in-out 1.2s infinite;
}
/* Ok görseli: sağa doğru 3 tur kayıp sönümlensin */
.hint-drag .arrow-img{
  width: var(--arrow-w); height:auto; display:block; transform-origin:left center;
  /* ok, elin sağından başlayıp sağa doğru kayar ve sönümlenir → 3 tekrar */
  animation: arrow-fly var(--arrow-dur) ease-in-out .8s var(--arrow-iters);
}

/* Kapatılırken yumuşakça sönsün */
.hint-drag.is-fading{
  transition: opacity .45s ease, visibility 0s .45s;
  opacity: 0; visibility: hidden;
}

/* ---- Intro bitince body'ye .hint-play eklenir → animasyon başlar ---- */
body.hint-play .hint-drag{
  visibility: visible;
  animation: hint-in .5s ease .2s forwards; /* opacity 1’e çıkar */
}
body.hint-play .hint-drag .arrow-img{
  animation: arrow-fly var(--arrow-dur) ease-in-out .8s var(--arrow-iters);
}

/* Ana animasyonlar */
@keyframes hint-in{
  from{ transform: translate(-50%,-50%) scale(.92); opacity:0; }
  to  { transform: translate(-50%,-50%) scale(1);   opacity:1; }
}
@keyframes hand-pulse{ 0%,100%{ transform:scale(1) } 50%{ transform:scale(1.06) } }
@keyframes arrow-fly{
  0%   { opacity:0;  transform:translateX(0) }
  12%  { opacity:.95 }
  70%  { opacity:.95; transform:translateX(68px) }
  100% { opacity:0;  transform:translateX(96px) }
}

/* Kullanıcı etkileşiminde ipucunu tamamen kapat (mevcut js 'hints-off' ekliyor) */
.hints-off .hint-drag{ opacity: 0; transition: opacity .45s ease; pointer-events: none; 
/*display: none; transition biter bitmez çıkmak istersek bunu açacaz */}


/* (2) METİN ETİKETİ — sağ-alt bilgi kartı */
.site-label{
  position: absolute;
  right: var(--label2-right);
  bottom: var(--label2-bottom);
  padding: 12px 14px;
  border-radius: 12px;
  background: relative;
  border: none;
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.5;
  letter-spacing: .2px;
}

.footer-right {
  position: absolute;
  right: 16px;
  top: 50%;                 /* üstten %50 hizala */
  transform: translateY(-50%); /* kendi yüksekliğinin yarısı kadar yukarı taşı → dikey ortalama */
  color: #ededed;
  font-size: 1rem;
  white-space: nowrap;
  pointer-events: none;
}

.footer-right a {
  pointer-events: auto;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: #ffffff;
}