/* Meşhur Karataş Aspava — QR menü "gece menüsü" (Emir'in verdiği tasarım: Aspava Gece Menüsü.html).
   Siyah zemin, üstte sıcak ışık; başta altın logo; 380 px tek sütun, kategori adı
   altın küçük başlık, ürün adı ile fiyat arasında ince altın çizgi; altta ikram cümlesi. Veri /api/menu (menu-gece.js).
   Başta altın logo (Emir'in isteğiyle dönen halka ve italik "Aspava" kaldırıldı).
   Efektler yalnız html.fx altında (hareket azaltma kapalıyken; menu.html başındaki satır ekler):
   açılış (logo bulanıktan gelir, alt başlık toplanır), logonun üstünden geçen altın parıltı, yıldızlarda ışıltı, nefes alan
   logo parlaması, titreyen üst ışık, kıvılcım arka planı (canvas: toz, köz, kuyruklu kıvılcım, alttan fışkırma; altta köz ışığı), kaydırınca bulanıktan netleşen satırlar + soldan çizilen
   altın çizgi + kayan fiyat ve parıltı, aralığı toplanan kategori başlıkları, kelime kelime ikram cümlesi, üzerine gelince /
   dokununca parlayan satır ve altın dalga, masaüstünde imleci izleyen fener ışığı, dil değişiminde yumuşak geçiş.
   Kategori şeridi (üstte, başlık geçilince iner) efekt kapalıyken de çalışır; yalnız geçişleri kapanır. */
:root {
  --ink: #000; --glow: #2a2419; --cream: #efe6d4; --gold: #cbb07a; --dim: #a99a7c; --soft: #bfb39a; --foot: #7d725d;
  --light: #fff3d6;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
html.fx { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--cream); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
h1, h2, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 20; padding: 8px 14px; background: var(--gold); color: #000; font-family: var(--sans); font-size: 13px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- sayfa, üst ışık, kıvılcım katmanı, fener ---------- */
.page {
  position: relative; isolation: isolate; overflow-x: clip;
  min-height: 100vh; min-height: 100svh;
  padding: max(48px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(56px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.page::before { /* sıcak üst ışık (ocak başı) */
  content: ""; position: absolute; z-index: -3; left: 0; right: 0; top: 0; height: min(100%, 1700px); pointer-events: none;
  background: radial-gradient(ellipse 90% 50% at 50% 6%, var(--glow) 0%, rgba(42, 36, 25, .55) 35%, rgba(0, 0, 0, 0) 72%);
}
.fx .page::before { animation: titre 7s ease-in-out infinite; }
@keyframes titre { 0%, 100% { opacity: 1; } 14% { opacity: .84; } 19% { opacity: .97; } 41% { opacity: .88; } 46% { opacity: 1; } 68% { opacity: .9; } 83% { opacity: .98; } }
.ates { /* alttan köz ışığı: ekranın dibinde sıcak, nefes alan kızıllık */
  position: fixed; left: 0; right: 0; bottom: 0; height: 52vh; z-index: -3; pointer-events: none;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, rgba(214, 108, 40, .22) 0%, rgba(150, 66, 22, .09) 42%, rgba(0, 0, 0, 0) 74%);
}
.fx .ates { animation: korNefes 4.8s ease-in-out infinite; }
@keyframes korNefes { 0%, 100% { opacity: .72; } 21% { opacity: 1; } 34% { opacity: .8; } 57% { opacity: .97; } 79% { opacity: .68; } }
.koz { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; display: none; }
.fx .koz { display: block; }
.page::after { /* masaüstü: imleci izleyen fener */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -500px), rgba(203, 176, 122, .13), rgba(203, 176, 122, 0) 70%);
}
.fener .page::after { opacity: 1; }

/* ---------- logo (Emir'in isteğiyle dönen halka ve italik "Aspava" yerine) ---------- */
h1 { margin: 0; }
.logo { position: relative; width: clamp(180px, 54vw, 220px); line-height: 0; }
.logo img { display: block; width: 100%; height: auto; }
.fx .logo img { animation: logoGel 1.5s var(--ease) .15s both, logoNefes 5s ease-in-out 2.2s infinite; }
@keyframes logoGel { from { opacity: 0; transform: translateY(12px) scale(.94); filter: blur(12px) brightness(1.8); } 70% { filter: blur(0) brightness(1.15); } }
@keyframes logoNefes { 0%, 100% { filter: drop-shadow(0 0 0 rgba(232, 190, 100, 0)); } 50% { filter: drop-shadow(0 0 14px rgba(232, 190, 100, .38)); } }
.logo__isik { /* logonun yalnız altın kısmının üstünden geçen parıltı (logo maskesiyle) */
  position: absolute; inset: 0; pointer-events: none; display: none;
  -webkit-mask: url("/images/logo-600.webp") center / 100% 100% no-repeat; mask: url("/images/logo-600.webp") center / 100% 100% no-repeat;
  background: linear-gradient(105deg, rgba(255, 250, 232, 0) 40%, rgba(255, 250, 232, .85) 50%, rgba(255, 250, 232, 0) 60%) 100% 0 / 260% 100% no-repeat;
  mix-blend-mode: overlay;
}
.fx .logo__isik { display: block; animation: logoIsik 6.5s ease-in-out 1.7s infinite; }
@keyframes logoIsik { 0% { background-position: 100% 0; } 30%, 100% { background-position: 0% 0; } }
.yildiz { /* yıldızlarda göz kırpan dört köşeli ışıltı */
  position: absolute; left: var(--x); top: var(--y); width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; display: none;
  background:
    radial-gradient(circle, rgba(255, 250, 230, .95) 0, rgba(255, 236, 180, .5) 9%, rgba(255, 220, 150, 0) 30%),
    linear-gradient(90deg, rgba(255, 244, 210, 0) 0, rgba(255, 244, 210, .9) 50%, rgba(255, 244, 210, 0) 100%) center / 100% 1.5px no-repeat,
    linear-gradient(0deg, rgba(255, 244, 210, 0) 0, rgba(255, 244, 210, .9) 50%, rgba(255, 244, 210, 0) 100%) center / 1.5px 100% no-repeat;
  transform: scale(0) rotate(0deg); opacity: 0;
}
.fx .yildiz { display: block; animation: yildiz 4.2s ease-in-out infinite; animation-delay: calc(1.9s + var(--k) * .55s); }
@keyframes yildiz { 0%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 8% { transform: scale(1) rotate(45deg); opacity: 1; } 18% { transform: scale(0) rotate(90deg); opacity: 0; } }
.sub { font-family: var(--sans); font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: var(--dim); }
.fx .sub { animation: topla 1.5s var(--ease) .9s both; }
@keyframes topla { from { opacity: 0; letter-spacing: .5em; filter: blur(4px); } }
.preview { font-family: var(--sans); font-size: .72rem; color: var(--dim); }

/* ---------- menü ---------- */
main { width: 100%; max-width: 380px; display: grid; gap: 26px; margin-top: 10px; transition: opacity .3s ease; }
main.solgun { opacity: 0; }
main[aria-busy="true"] { min-height: 100vh; } /* yüklenirken alt bilgi ekranın ortasında görünmesin */
.fx main { animation: belir .8s ease 1.3s backwards; } /* backwards: bitince .solgun (dil geçişi) yine çalışır */
.fx.derin main { animation: none; } /* /menu#… ile gelen beklemeden görür */
@keyframes belir { from { opacity: 0; } }
.state { padding: 40px 0; font-style: italic; font-size: 1.1rem; color: var(--dim); }
.state button { margin-top: 14px; padding: 8px 18px; border: 1px solid var(--gold); background: none; color: var(--gold); font-family: var(--sans); font-size: .78rem; cursor: pointer; }
section { display: grid; gap: 6px; scroll-margin-top: 64px; }
h2 { margin: 0 0 4px; font-family: var(--sans); font-weight: 600; font-size: .68rem; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.fx section h2 { opacity: 0; letter-spacing: .7em; transition: opacity 1s ease, letter-spacing 1.2s var(--ease); }
.fx section.in h2 { opacity: 1; letter-spacing: .32em; }
ul.items { display: grid; gap: 14px; }

.item { --d: 0ms; position: relative; scroll-margin-top: 90px; text-align: left; -webkit-tap-highlight-color: transparent; }
.fx .item { opacity: 0; transform: translateY(16px); filter: blur(5px); transition: opacity .8s ease var(--d), transform .95s var(--ease) var(--d), filter .8s ease var(--d); }
.fx .item.in { opacity: 1; transform: none; filter: none; }
.row { display: flex; align-items: baseline; gap: 8px; font-size: 1.22rem; }
.row > span:first-child { transition: transform .4s var(--ease), color .4s ease; }
.lead {
  flex: 1; min-width: 14px; border-bottom: 1px solid var(--gold); opacity: .35; transform: translateY(-4px); transform-origin: left center;
  transition: transform 1.05s cubic-bezier(.65, 0, .35, 1) calc(var(--d) + .2s), opacity .35s ease, box-shadow .35s ease;
}
.fx .item .lead { transform: translateY(-4px) scaleX(0); }
.fx .item.in .lead { transform: translateY(-4px) scaleX(1); }
.price { color: var(--gold); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; transition: opacity .6s ease calc(var(--d) + .75s), transform .7s var(--ease) calc(var(--d) + .75s), filter .35s ease; }
.fx .price {
  background: linear-gradient(100deg, var(--gold) 40%, var(--light) 50%, var(--gold) 60%) 100% 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fx .item .price { opacity: 0; transform: translateX(10px); }
.fx .item.in .price { opacity: 1; transform: none; animation: parla 1.3s ease calc(var(--d) + 1.15s) both; }
@keyframes parla { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.opt { padding-left: 14px; font-size: 1.05rem; color: var(--soft); }
/* ürün açıklaması: küçük boyda italik serif zor okunuyordu (Emir: "font daha okunaklı olsun") → düz Manrope, daha açık renk */
.note { margin-top: 4px; font-family: var(--sans); font-weight: 500; font-size: .84rem; letter-spacing: .005em; color: var(--soft); line-height: 1.5; transition: color .4s ease; }

/* üzerine gelince (fare) ya da dokununca (.dokun): ad hafif kayar, çizgi ve fiyat ışır */
@media (hover: hover) {
  .item:hover .row > span:first-child { transform: translateX(4px); color: #fff6e6; }
  .item:hover .lead { opacity: .95; box-shadow: 0 1px 8px rgba(203, 176, 122, .55); }
  .item:hover .price { filter: drop-shadow(0 0 7px rgba(203, 176, 122, .7)); }
  .item:hover .note { color: var(--cream); }
}
.item.dokun .row > span:first-child { transform: translateX(4px); color: #fff6e6; }
.item.dokun .lead { opacity: .95; box-shadow: 0 1px 8px rgba(203, 176, 122, .55); }
.item.dokun .price { filter: drop-shadow(0 0 7px rgba(203, 176, 122, .7)); }
.dalga { position: absolute; z-index: -1; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(203, 176, 122, .32), rgba(203, 176, 122, 0) 70%); animation: dalga .8s ease-out forwards; }
@keyframes dalga { to { transform: scale(22); opacity: 0; } }

.item.is-target { animation: hedef 2.4s ease .2s both; }
@keyframes hedef { 0%, 55% { background: rgba(203, 176, 122, .14); box-shadow: 0 0 0 6px rgba(203, 176, 122, .14), 0 0 34px rgba(203, 176, 122, .25); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent, 0 0 34px transparent; } }

/* ---------- alt kısım ---------- */
.ikram { margin: 8px 0 0; max-width: 32ch; font-size: 1.08rem; font-style: italic; color: var(--soft); line-height: 1.5; text-wrap: balance; }
.fx .ikram .k { opacity: 0; filter: blur(6px); transition: opacity .7s ease, filter .7s ease; transition-delay: calc(var(--k) * 45ms); }
.fx .ikram.in .k { opacity: 1; filter: none; }
footer { margin-top: 14px; display: grid; gap: 6px; font-family: var(--sans); font-size: .72rem; color: var(--foot); letter-spacing: .04em; line-height: 1.6; }
footer a { color: var(--dim); text-decoration: none; transition: color .3s ease; }
footer a:hover { color: var(--gold); }
.lang { display: inline-flex; gap: 2px; }
.lang button { padding: 2px 6px; border: 0; background: none; font-family: var(--sans); font-size: .72rem; letter-spacing: .04em; color: var(--foot); cursor: pointer; transition: color .3s ease; }
.lang button[aria-pressed="true"] { color: var(--gold); }

/* ---------- kategori şeridi: başlık geçilince üstten iner ---------- */
.serit {
  position: fixed; z-index: 10; top: 0; left: 0; right: 0;
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, .74); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(203, 176, 122, .12);
  transform: translateY(-110%); transition: transform .55s var(--ease);
}
.serit.acik { transform: none; }
.serit__ic { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 4px; }
.serit__logo { flex: none; display: grid; place-items: center; width: 52px; height: 44px; }
.serit__logo img { width: 42px; height: auto; display: block; }
.cips {
  position: relative; flex: 1; min-width: 0; display: flex; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 22px), transparent);
}
.cips::-webkit-scrollbar { display: none; }
.cips a {
  flex: none; padding: 15px 10px 14px; font-family: var(--sans); font-size: .64rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--foot); text-decoration: none; white-space: nowrap; transition: color .35s ease;
}
.cips a:hover { color: var(--soft); }
.cips a[aria-current="true"] { color: var(--gold); }
.gosterge { position: absolute; left: 0; bottom: 8px; width: 0; height: 1px; background: var(--gold); box-shadow: 0 0 6px rgba(203, 176, 122, .8); pointer-events: none; transition: transform .5s var(--ease), width .5s var(--ease); }
.ilerleme { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, rgba(203, 176, 122, 0), var(--gold)); transform-origin: left center; transform: scaleX(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .item.is-target { animation: none; background: rgba(203, 176, 122, .1); }
  .serit, .gosterge, .row > span:first-child { transition: none; }
  .item:hover .row > span:first-child, .item.dokun .row > span:first-child { transform: none; }
}
