/* ---------- İlerleyen gece (shared by the TR, EN and ES pages) ----------
   The page is one night. Scroll moves the clock from 23:47 to dawn; the light follows it.
   --karanlik: 0..1 (deepest around 03:00) · --safak: 0..1 (from 04:30 to sunrise) */

/* light layer: edges sink into the dark, the reading column stays open; dawn rises from below */
.gece-isik { position: fixed; inset: 0; z-index: 44; pointer-events: none; contain: strict; }
.gece-isik i { position: absolute; inset: 0; will-change: opacity; }
.gi-karanlik {
  background:
    radial-gradient(ellipse 115% 95% at 50% 46%, transparent 52%, rgba(1,2,3,.92) 100%),
    linear-gradient(rgba(3,6,10,.16), rgba(3,6,10,.16));
  opacity: .25;
}
/* plain alpha, no blend mode: blending a full-screen layer repaints the whole page each frame */
.gi-safak {
  background:
    linear-gradient(to top, rgba(150,174,208,.34) 0%, rgba(214,160,168,.2) 20%, rgba(214,160,168,.07) 40%, transparent 64%);
  opacity: 0;
}

/* time rail: the night on one line, only where the page leaves room for it */
.gece-ray { display: none; }
@media (min-width: 1400px) {
  .gece-ray { display: block; position: fixed; z-index: 46; right: 22px; top: 130px; bottom: 120px; width: 64px; pointer-events: none;
    font: 400 .6rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--lead); }
  .gece-ray::before { content: ""; position: absolute; right: 10px; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(#1C2428, #2a3438 70%, rgba(201,150,160,.55)); }
  .ray-saat { position: absolute; right: 18px; transform: translateY(-50%); opacity: .8; font-variant-numeric: tabular-nums; }
  .ray-saat::after { content: ""; position: absolute; right: -11px; top: 50%; width: 5px; height: 1px; background: #3a464b; }
  .ray-durak { position: absolute; right: -1px; width: 22px; height: 22px; margin-top: -11px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; }
  .ray-durak::before { content: ""; position: absolute; inset: 7.5px; border-radius: 50%; border: 1px solid #56636a; background: var(--void); transition: background .3s, border-color .3s, transform .2s; }
  .ray-durak:hover::before, .ray-durak:focus-visible::before { border-color: var(--fog); transform: scale(1.25); }
  .ray-durak.gecildi::before { background: #56636a; }
  .ray-durak span { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 5px 7px; background: rgba(7,9,11,.92); border: 1px solid var(--frame);
    color: var(--fog); opacity: 0; transition: opacity .2s; pointer-events: none; }
  .ray-durak:hover span, .ray-durak:focus-visible span { opacity: 1; }
  .ray-imlec { position: absolute; top: 0; right: 0; width: 34px; height: 1px; background: #e04a3f; box-shadow: 0 0 8px rgba(224,74,63,.8); will-change: transform; }
  .ray-imlec b { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); font-weight: 400; color: var(--fog); font-size: .7rem; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
  .gece-ray.safak .ray-imlec { background: #e8b4a8; box-shadow: 0 0 10px rgba(232,180,168,.9); }
}

/* below the time rail's breakpoint: a small time chip once the hero is passed */
.gece-cip { position: fixed; z-index: 46; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: none; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; background: rgba(7,9,11,.9); border: 1px solid var(--frame);
  font: 400 .74rem/1 var(--mono); letter-spacing: .12em; color: var(--fog); font-variant-numeric: tabular-nums; pointer-events: none;
  opacity: 0; transition: opacity .3s; will-change: opacity; }
.gece-cip i { width: 6px; height: 6px; border-radius: 50%; background: #e04a3f; }
.gece-cip.safak i { background: #e8b4a8; }
@media (max-width: 1399px) { .gece-cip { display: inline-flex; } .gece-cip.gorunur { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .gece-cip { transition: none; }
}
