/* Arakot Render Lab · v14 · KATALOG · Sarmal (sarmal.js), ara an 'sarmal'
   Koyu sahne (visuvate): zemin, ışık çizgileri, kartlar ve ortadaki dev yazı
   WebGL'de çizilir; bu dosya yalnız çevresini giydirir: künye, "Hepsine
   bakın", ekran okuyucu ve klavye için kart düğmeleri, CSS yedek yolu,
   telefon şeridi, azaltılmış hareket ızgarası ve yakın bakış.
   Dört düzen, .sm üzerindeki data-mode ile:
     gl      WebGL2 sarmal (masaüstü)
     css     WebGL2 yoksa: ince dilimli CSS 3B sarmal
     serit   telefon: kendi içinde yana kayan şerit
     izgara  azaltılmış hareket: sakin ızgara
   Yeşil yok. Koyu zeminde yazı #F4F2ED / #C4C9CF (≥ 10:1 ve 8:1).
   v15 (V15-BRIEF 8): lacivert-siyah zemin sıcak grafite döndü (sayfanın
   mürekkebi, --sm-zemin); cam yüzeyler ve yakın bakış da aynı tonda. */

.sm-ara { position: absolute; inset: 0; overflow: hidden; }
.sm {
  --sm-ink: #F4F2ED; --sm-soft: #C4C9CF; --sm-line: rgba(255, 255, 255, 0.14); --sm-glass: rgba(24, 22, 21, 0.86);
  --sm-blue: #8FB4FF; --sm-zemin: #1E1C1A;
  position: absolute; inset: 0; overflow: hidden; background: var(--sm-zemin); color: var(--sm-ink);
  font-family: var(--sc-font-text, "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif); contain: layout paint style;
}
.sm__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sm__hit { position: absolute; inset: 0; pointer-events: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.sm.is-etkin[data-mode="gl"] .sm__hit, .sm.is-etkin[data-mode="css"] .sm__hit { pointer-events: auto; cursor: grab; }
.sm.is-cek .sm__hit { cursor: grabbing !important; }

/* in the 3D modes the words and the card buttons are there for screen readers
   and the keyboard only: the canvas draws them */
.sm[data-mode="gl"] .sm__bas, .sm[data-mode="css"] .sm__bas,
.sm[data-mode="gl"] .sm__kartlar, .sm[data-mode="css"] .sm__kartlar {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.sm__duz { pointer-events: none; }
.sm.is-etkin .sm__duz { pointer-events: auto; }

/* ===================================================== the museum label */
.sm__kunye {
  position: absolute; left: clamp(16px, 2.4vw, 40px); bottom: clamp(16px, 3.2vh, 34px); z-index: 3;
  width: min(330px, calc(100% - 32px)); box-sizing: border-box; padding: 12px 14px 12px;
  border-radius: 12px; background: var(--sm-glass); box-shadow: 0 0 0 1px var(--sm-line), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  color: var(--sm-ink); pointer-events: none; opacity: 0; transition: opacity 300ms var(--sc-ease-out, ease-out);
}
.sm.is-etkin .sm__kunye { opacity: 1; }
.sm[data-mode="serit"] .sm__kunye, .sm[data-mode="izgara"] .sm__kunye { display: none; }
.sm__kunye p { margin: 0; }
.sm__kn { display: flex; align-items: center; gap: 8px; font-family: var(--sc-font-text); font-size: 15px; line-height: 1.3; font-weight: 400; }
.sm__kn b { font-weight: 640; }
.sm__ks { margin-left: auto; padding-left: 8px; color: var(--sm-soft); font-family: var(--sc-font-num); font-variant-numeric: tabular-nums lining-nums; font-size: 14px; white-space: nowrap; }
.sm__ki { margin-top: 5px !important; color: var(--sm-soft); font-size: 14px; line-height: 1.42; font-variant-numeric: lining-nums; }
.sm__etk, .yb__etk {
  display: inline-block; flex: none; padding: 1px 8px 2px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  font-family: var(--sc-font-text); font-size: 12.5px; font-weight: 640; letter-spacing: 0.01em; line-height: 1.5; color: var(--sm-ink); white-space: nowrap;
}
.sm__pul { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--sm-ink); color: #1F292E; }
.sm__pul svg { width: 14px; height: 14px; }

/* ================================================= "Hepsine bakın" (View all) */
.sm__hepsi {
  position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%);
  margin: 0; padding: 0.06em 0.32em 0.14em; border: 0; border-radius: 14px; background: none;
  color: var(--sm-ink); font-family: var(--sc-font-accent, Newsreader, Georgia, serif); font-style: italic; font-weight: 380;
  font-size: clamp(56px, 10.6vh, 128px); line-height: 1; letter-spacing: -0.03em; white-space: nowrap;
  text-shadow: 0 2px 34px rgba(0, 0, 0, 0.55); cursor: pointer; opacity: 0; visibility: hidden; will-change: transform, opacity;
}
.sm__hepsi span { background: linear-gradient(currentColor, currentColor) 0 100% / 0% 2px no-repeat; transition: background-size 380ms var(--sc-ease-out, ease-out); }
@media (hover: hover) and (pointer: fine) { .sm__hepsi:hover span { background-size: 100% 2px; } }
.sm__hepsi:focus { outline: none; }
.sm__hepsi:focus-visible { outline: 2px solid var(--sm-ink); outline-offset: 4px; }
.sm[data-mode="serit"] .sm__hepsi, .sm[data-mode="izgara"] .sm__hepsi { display: none; }

/* ============================================ CSS fallback (no WebGL2) */
.sm__uzay { position: absolute; inset: 0; display: none; perspective-origin: 50% 50%; }
.sm[data-mode="css"] { background: radial-gradient(60% 40% at 18% 80%, rgba(242, 170, 150, 0.16), transparent 70%), radial-gradient(50% 36% at 84% 22%, rgba(146, 182, 220, 0.14), transparent 70%), linear-gradient(#2A2724, #141312); }
.sm[data-mode="css"] .sm__uzay { display: block; }
.sm__uzay::after { content: ""; position: absolute; inset: 0; background: #000; opacity: calc(1 - var(--dim, 1)); pointer-events: none; }
.sm__kok { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.sm__dl {
  position: absolute; left: 0; top: 0; display: block; background-color: #24211F; background-repeat: no-repeat;
  backface-visibility: visible; outline: 1px solid transparent;
}
.sm__dl.is-on { filter: brightness(1.1); }
.sm__cip {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; padding: 2px 7px; border-radius: 6px; white-space: nowrap;
  background: rgba(244, 242, 237, 0.94); color: #1F292E; font: 600 10px/1.4 var(--sc-font-text); backface-visibility: visible;
}
.sm__cip.is-ornek { background: rgba(22, 20, 19, 0.78); color: var(--sm-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.sm__soz { position: absolute; left: 0; top: 0; color: var(--sm-ink); text-align: center; white-space: nowrap; pointer-events: none; font-size: 110px; }
.sm__soz span { display: inline; font-family: var(--sc-font-display); font-weight: 650; line-height: 0.94; letter-spacing: -0.045em; }
.sm__soz em { display: inline; margin-left: 0.24em; font-family: var(--sc-font-accent); font-style: italic; font-weight: 380; font-size: 1.08em; line-height: 1; letter-spacing: -0.03em; }

/* ================================================ the flat modes' cards */
.sm__h { margin: 0; color: var(--sm-ink); font-family: var(--sc-font-display); font-weight: 650; line-height: 0.94; letter-spacing: -0.045em; }
.sm__h > span { display: block; }
.sm__h > em { display: block; font-family: var(--sc-font-accent); font-style: italic; font-weight: 380; letter-spacing: -0.03em; padding-bottom: 0.06em; }
.sm__h:focus { outline: none; }
.sm__lead { margin: 12px 0 0; max-width: 46ch; color: var(--sm-soft); font-size: 16px; line-height: 1.45; }
.sm__k {
  position: relative; display: block; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sm__ki2 { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 10px; background: #24211F; box-shadow: 0 0 0 1px rgba(255, 245, 235, 0.16); }
.sm__ki2 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sm__cp {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); box-sizing: border-box;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 5px; border-radius: 8px; overflow: hidden;
  background: rgba(244, 242, 237, 0.94); color: #1F292E; font-family: var(--sc-font-text); font-size: 13px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; text-overflow: ellipsis;
}
.sm__cp > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.sm__cp .sm__pul { width: 16px; height: 16px; background: none; color: #1F292E; }
.sm__cp .sm__pul svg { width: 15px; height: 15px; }
.sm__cp.is-ornek { background: rgba(22, 20, 19, 0.8); color: var(--sm-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); font-weight: 400; }
.sm__cp.is-ornek b { font-weight: 650; }
.sm__k:focus { outline: none; }
.sm__k:focus-visible .sm__ki2 { box-shadow: 0 0 0 2px var(--sm-zemin), 0 0 0 4px var(--sm-ink); }

/* phone: a strip that slides sideways, inside the dark moment */
.sm[data-mode="serit"] .sm__duz {
  position: absolute; left: 0; right: 0; top: calc(var(--hb, 56px) + 14px); bottom: 12px;
  display: flex; flex-direction: column; justify-content: center; gap: 18px; will-change: transform;
}
.sm[data-mode="serit"] .sm__bas { padding: 0 16px; }
.sm[data-mode="serit"] .sm__h { font-size: clamp(40px, 11.5vw, 58px); }
.sm[data-mode="serit"] .sm__lead { font-size: 15px; }
.sm[data-mode="serit"] .sm__kartlar {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 4px 16px 10px; scroll-padding-inline: 16px; scrollbar-width: none; touch-action: pan-x pan-y;
}
.sm[data-mode="serit"] .sm__kartlar::-webkit-scrollbar { display: none; }
.sm[data-mode="serit"] .sm__k { flex: 0 0 auto; width: min(76vw, 330px); scroll-snap-align: start; }

/* reduced motion: a calm grid that moves like the page under the scroll */
.sm[data-mode="izgara"] .sm__duz {
  position: absolute; left: 0; right: 0; top: 0; box-sizing: border-box;
  padding: calc(var(--hb, 56px) + 44px) clamp(16px, 4vw, 40px) 64px; will-change: transform;
}
.sm[data-mode="izgara"] .sm__bas { max-width: 1240px; margin: 0 auto 28px; }
.sm[data-mode="izgara"] .sm__h { font-size: clamp(44px, 6vw, 88px); }
.sm[data-mode="izgara"] .sm__kartlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; max-width: 1240px; margin: 0 auto; }

/* ========================================================= the closer look
   v19 · FIYAT3: nearly the whole screen (Sadullah: "var olanın neredeyse 2 katı, 2.5 katına"). The
   picture's width --ybw: the screen less its margins, or what the height allows less the slim row
   under it (104 px: the margins, the card's frame and one 44 px row of buttons), 1920 px at most
   (the files' own width). sarmal.js zoomWidth() reads the same numbers to pick the file. */
.yb {
  --ar: 1.78;
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: #F4F2ED; overflow: auto;
  font-family: var(--sc-font-text, "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif);
}
.yb::backdrop { background: rgba(16, 15, 14, 0.86); }
.yb__in { min-height: 100%; display: grid; place-items: center; padding: 12px; box-sizing: border-box; }
.yb__kart {
  --ybw: min(calc(100vw - 48px), calc((100svh - 104px) * var(--ar)), 1920px);
  width: calc(var(--ybw) + 16px); max-width: 100%; box-sizing: border-box; padding: 8px 8px 10px;
  background: #1A1817; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 90px -30px rgba(0, 0, 0, 0.85);
}
.yb__fig { margin: 0; }
.yb__img {
  --x: 50%;
  position: relative; overflow: hidden; margin: 0; border-radius: 9px; background: #24211F;
  width: 100%; aspect-ratio: var(--ar);
  touch-action: pan-y;
}
.yb__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.yb__a { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.yb__ayrac { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #F4F2ED; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); pointer-events: none; }
.yb__ayrac::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  background: #F4F2ED url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 5 3 8l3 3M10 5l3 3-3 3' fill='none' stroke='%231F292E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 50% 50% / 20px 20px no-repeat;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 6px 14px -6px rgba(0, 0, 0, 0.7);
}
.yb__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none; background: none;
}
.yb__range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 4px; height: 400px; }
.yb__range::-moz-range-thumb { width: 4px; height: 400px; border: 0; }
.yb__range:focus-visible ~ .yb__ayrac::after { box-shadow: 0 0 0 3px #1A1817, 0 0 0 5px #F4F2ED; }
.yb__lbl {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 7px; font-size: 15px; font-weight: 600; line-height: 1.3; pointer-events: none;
  background: rgba(22, 20, 19, 0.82); color: #F4F2ED;
}
.yb__lbl--a { left: 12px; }
.yb__lbl--b { right: 12px; }
/* the hint, on the picture under the handle; it goes once the reader has moved the handle */
.yb__ip {
  position: absolute; left: 50%; bottom: 14px; z-index: 1; max-width: calc(100% - 24px); box-sizing: border-box; margin: 0;
  padding: 6px 12px 7px; border-radius: 8px; transform: translateX(-50%); text-align: center;
  background: rgba(22, 20, 19, 0.82); color: #F4F2ED; font-size: 15px; line-height: 1.35; pointer-events: none;
  transition: opacity 320ms var(--sc-ease-out, ease-out);
}
.yb.is-oynadi .yb__ip { opacity: 0; }
/* the slim row under the picture: its name on the left, the way through the pictures on the right */
.yb__cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding: 10px 4px 0; }
.yb__ad { min-width: 0; display: grid; gap: 2px; }
.yb__h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-family: var(--sc-font-display); font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: #F4F2ED; }
.yb__h svg { flex: none; width: 18px; height: 18px; }
.yb__bilgi { margin: 0; font-family: var(--sc-font-num); font-variant-numeric: lining-nums; font-size: 15px; color: #C4C9CF; }
.yb__bilgi[hidden] { display: none; }
.yb__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.yb__sira { min-width: 60px; text-align: center; font-family: var(--sc-font-num); font-variant-numeric: tabular-nums lining-nums; font-size: 15px; color: #C4C9CF; }
.yb__kapat { margin-left: 8px; }
/* the buttons' look and effects are UST's (dugme.css: btn btn--cam, data-zemin="koyu") */
.yb .btn:focus-visible { outline: 2px solid #F4F2ED; outline-offset: 3px; }

/* a phone: the picture as wide as the screen allows; the row breaks under the name */
@media (max-width: 520px) {
  .yb__in { padding: 6px; }
  .yb__kart { --ybw: min(calc(100vw - 24px), calc((100svh - 150px) * var(--ar)), 1920px); padding: 6px 6px 10px; border-radius: 12px; }
  .yb__lbl { top: 8px; padding: 3px 8px; font-size: 13px; }
  .yb__lbl--a { left: 8px; }
  .yb__lbl--b { right: 8px; }
  .yb__ip { bottom: 8px; padding: 4px 9px 5px; font-size: 13px; }
  .yb__h { font-size: 18px; }
  .yb__nav { width: 100%; margin-left: 0; justify-content: space-between; }
  .yb__kapat { margin-left: 0; flex: 1 0 100%; }
}
/* a short screen (a phone on its side): a little more room for the row */
@media (max-height: 500px) {
  .yb__kart { --ybw: min(calc(100vw - 48px), calc((100svh - 150px) * var(--ar)), 1920px); }
}

@media (prefers-reduced-motion: reduce) {
  .sm__kunye, .sm__hepsi span, .yb__ip { transition: none; }
}
