/* ── Marka galerisi "Sergi" (2026-10-13) — views/brand-gallery.ejs · public/js/brand-galeri.js ──
   Sicak koyu bir sergi duvari; fildisi paspartulu cerceveler, alti muze etiketi. Fare galeri spotu:
   imlecin cevresi aydinlanir, duvar los kalir. Yerlesim saf CSS: cercevenin esneme payi = en-boy orani
   (--r) → satirlar her sayida/oranda hizali; son satir .sg-son (kapanis etiketi) ile gerilmez. */
.sg { --sg-duvar: #1b1815; --sg-duvar2: #221e1a; --sg-fildisi: #f1ebe0; --sg-yazi: #e9e1d2; --sg-soluk: #a39886; --sg-altin: #d9c39c;
  --sg-h: clamp(170px, 17vw, 260px); --sg-ara: clamp(16px, 1.9vw, 30px); --sg-mat: clamp(8px, .9vw, 14px);
  background: radial-gradient(ellipse at 50% 0%, var(--sg-duvar2), var(--sg-duvar) 62%); color: var(--sg-yazi); }

/* hero: yalniz gorsel, alta dogru duvara erir */
.sg-hero { position: relative; height: clamp(320px, 58vh, 620px); overflow: hidden; background: var(--sg-duvar); }
.sg-hero-gorsel { position: absolute; inset: 0; background-size: cover; animation: sgHero 2.4s cubic-bezier(.2,.75,.2,1) both; }
.sg-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(to bottom, rgba(27,24,21,0), #1b1815); }
@keyframes sgHero { from { transform: scale(1.08); opacity: .4; } to { transform: none; opacity: 1; } }

/* duvar basligi — sergi vinil yazisi gibi */
.sg-duvar-bas { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(36px, 6vw, 96px); align-items: end;
  padding: clamp(56px, 8vh, 96px) max(24px, calc((100vw - 1240px) / 2)) clamp(40px, 6vh, 64px); }
.sg-etiket { font-family: var(--sans); font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--sg-altin); margin-bottom: 18px; }
.sg .sg-baslik { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5.4vw, 84px); line-height: .98; letter-spacing: -.015em; color: #f6f0e4; }
.sg .sg-baslik em { font-style: italic; color: var(--sg-altin); }
.sg .sg-giris { margin: 0 0 22px; font-family: var(--serif); font-size: 18px; line-height: 1.7; color: rgba(233,225,210,.78); max-width: 520px; }
.sg-kunye { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid rgba(217,195,156,.22); }
.sg .sg-adet { margin: 0; font-family: var(--sans); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--sg-soluk); }
.sg .sg-adet-yazi, .sg .sg-ici { display: inline; margin: 0; font: inherit; color: inherit; letter-spacing: inherit; }
.sg-sayi { font-family: var(--serif); font-size: 22px; letter-spacing: 0; color: var(--sg-altin); margin-right: 4px; }
.sg .sg-ipucu { margin: 0; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--sg-soluk); }
@media (hover: none), (pointer: coarse) { .sg .sg-ipucu { display: none; } }

/* duvar + spot */
.sg-duvar { position: relative; padding: 10px max(24px, calc((100vw - 1240px) / 2)) clamp(90px, 12vh, 140px); }
.sg-duvar::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(circle 440px at var(--sx, 50%) var(--sy, 30%), rgba(255,236,200,.06) 0, rgba(14,12,10,0) 40%, rgba(14,12,10,.5) 100%); }
.sg-duvar.is-spot::after { opacity: 1; }
.sg-asim { display: flex; flex-wrap: wrap; gap: calc(var(--sg-ara) + 8px) var(--sg-ara); align-items: flex-start; }
.sg-son { flex: 10 1 0; min-width: 260px; align-self: flex-end; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 0 0 34px clamp(8px, 2vw, 30px); border-left: 1px solid rgba(217,195,156,.18); } /* son satiri doldurur, fotograflar gerilmez */
.sg .sg-son-not { margin: 0; max-width: 300px; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.55; color: var(--sg-soluk); }
.sg-son-link { position: relative; padding-bottom: 7px; font-family: var(--sans); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--sg-yazi); text-decoration: none; }
.sg-son-link::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 34px; background: var(--sg-altin); transition: width .5s cubic-bezier(.2,.75,.2,1); }
.sg-son-link:hover::after { width: 100%; }
.sg-son-link span { display: inline-block; transition: transform .3s; }
.sg-son-link:hover span { transform: translateX(4px); }
.sg a:focus-visible { outline: 2px solid var(--sg-altin); outline-offset: 4px; }
/* taban = oran x hedef yukseklik + iki paspartu payi; esneme orana gore → satirdaki fotograf yukseklikleri esit */
.sg-cerceve { margin: 0; flex: var(--r) 1 calc(var(--r) * var(--sg-h) + 2 * var(--sg-mat)); min-width: 0; }
.sg-ac { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: inherit; }
.sg-paspartu { display: block; padding: var(--sg-mat); background: var(--sg-fildisi); border-radius: 1px;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 30px 50px -26px rgba(0,0,0,.85), 0 8px 14px -10px rgba(0,0,0,.6);
  transition: transform .6s cubic-bezier(.2,.75,.2,1), box-shadow .6s; }
.sg-paspartu img { display: block; width: 100%; height: auto; object-fit: cover; background: #2a2520; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.sg-ac:hover .sg-paspartu, .sg-ac:focus-visible .sg-paspartu { transform: translateY(-6px); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 46px 70px -30px rgba(0,0,0,.9), 0 10px 18px -10px rgba(0,0,0,.6); }
.sg-ac:focus-visible { outline: 2px solid var(--sg-altin); outline-offset: 6px; }
.sg-plaka { margin-top: 12px; font-family: var(--sans); font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--sg-soluk); display: flex; align-items: center; gap: 10px; }
.sg-plaka::before { content: ""; width: 14px; height: 1px; background: rgba(217,195,156,.45); }
/* dokunmatik: ekranin ortasindaki cerceve isik alir */
.sg-duvar.is-dokun .sg-paspartu img { filter: brightness(.82) saturate(.9); transition: filter .7s ease; }
.sg-duvar.is-dokun .sg-cerceve.is-isikta .sg-paspartu img { filter: none; }

/* izleme odasi */
html.sg-oda-acik { overflow: hidden; }
.sg-oda { position: fixed; inset: 0; z-index: 2000; display: grid; grid-template-rows: 1fr auto; place-items: center; background: rgba(13,12,11,.97);
  opacity: 0; transition: opacity .3s ease; padding: 56px 72px 16px; }
.sg-oda.is-acik { opacity: 1; }
.sg-oda[hidden] { display: none; }
.sg-oda-baski { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; min-height: 0; }
.sg-oda-paspartu { display: block; padding: clamp(10px, 1.2vw, 18px); background: var(--sg-fildisi); box-shadow: 0 50px 90px -40px rgba(0,0,0,.95); }
.sg-oda-img { display: block; max-width: calc(100vw - 200px); max-height: calc(100vh - 230px); width: auto; height: auto; }
.sg-oda-img.is-gel { animation: sgGel .5s cubic-bezier(.2,.75,.2,1) both; }
.sg-oda-img.is-gel-geri { animation: sgGelGeri .5s cubic-bezier(.2,.75,.2,1) both; }
@keyframes sgGel { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes sgGelGeri { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.sg-oda-alt { display: flex; align-items: baseline; gap: 18px; margin-top: 16px; font-family: var(--sans); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--sg-soluk); }
.sg-oda-no { color: var(--sg-altin); }
.sg-oda-sayac { font-family: var(--serif); font-size: 15px; letter-spacing: .06em; color: var(--sg-yazi); }
.sg-oda-kapat, .sg-oda-ok { position: absolute; background: none; border: 1px solid rgba(217,195,156,.35); color: var(--sg-yazi); border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s; }
.sg-oda-kapat { top: 18px; right: 22px; width: 44px; height: 44px; font-size: 24px; line-height: 1; }
.sg-oda-ok { top: 50%; width: 52px; height: 52px; margin-top: -60px; font-size: 26px; line-height: 1; }
.sg-oda-geri { left: 18px; } .sg-oda-ileri { right: 18px; }
.sg-oda-kapat:hover, .sg-oda-ok:hover { background: var(--sg-altin); border-color: var(--sg-altin); color: #15120d; }
.sg-oda button:focus-visible { outline: 2px solid var(--sg-altin); outline-offset: 3px; }
.sg-oda-serit { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 14px 4px 6px; scrollbar-width: none; }
.sg-oda-serit::-webkit-scrollbar { display: none; }
.sg-oda-kucuk { flex: 0 0 auto; width: 58px; height: 42px; padding: 0; border: 0; background: #2a2520; cursor: pointer; opacity: .45; transition: opacity .3s, transform .3s; outline-offset: 2px; }
.sg-oda-kucuk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-oda-kucuk:hover { opacity: .8; }
.sg-oda-kucuk.is-on { opacity: 1; transform: translateY(-3px); box-shadow: 0 0 0 1px var(--sg-altin); }

@media (max-width: 900px) {
  .sg { --sg-h: 150px; --sg-ara: 12px; --sg-mat: 6px; }
  .sg-duvar-bas { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .sg .sg-giris { font-size: 16.5px; }
  .sg-plaka { margin-top: 8px; font-size: 8.5px; }
  .sg-oda { padding: 60px 10px 12px; }
  .sg-oda-img { max-width: calc(100vw - 44px); max-height: calc(100vh - 220px); }
  .sg-oda-ok { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sg-hero-gorsel, .sg-oda-img { animation: none !important; }
  .sg-paspartu, .sg-oda { transition: none; }
}
