/* ============================================================
   SAFİ İSTANBUL — QR Menü
   Brand-driven · mobile-first
   ============================================================ */

:root {
  /* Brand colors — brandbook */
  --bg:        #ECE9E3;
  --ink:       #38476A;
  --ink-deep:  #2A3654;
  --burgundy:  #6F3A46;
  --tan:       #C6A68E;
  --gold:      #F0DBA4;
  --sage:      #ACB6B6;
  --mute:      #9E8380;
  --line:      rgba(56, 71, 106, 0.14);
  --line-soft: rgba(56, 71, 106, 0.07);

  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  --pad: clamp(16px, 5vw, 28px);
  --hdr-h: 56px;
  --ease: cubic-bezier(0.6, 0.05, 0.1, 0.95);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--ink); color: var(--bg); }

html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: var(--safe-b);
}

/* subtle film grain — analog/premium */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.22  0 0 0 0 0.28  0 0 0 0 0.42  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; color: inherit; }

/* ===== HEADER ===== */
.hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--hdr-h);
  background: rgba(236, 233, 227, 0.86);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s;
}
.hdr.is-stuck { border-bottom-color: var(--line); }
.hdr__inner {
  height: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hdr__logo { display: flex; align-items: center; }
.hdr__logo img { width: 46px; height: auto; mix-blend-mode: multiply; }

.lang {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.3s, background 0.3s;
}
.lang:active { background: rgba(56,71,106,0.05); }
.lang span { color: var(--ink); opacity: 0.4; transition: opacity 0.3s; }
.lang .is-active { opacity: 1; }
.lang__sep { opacity: 0.3 !important; font-weight: 400; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  padding: 28px var(--pad) 30px;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.62) contrast(0.98) brightness(1.03);
  transform: scale(1.04);
}
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(236,233,227,0.30) 0%,
    rgba(236,233,227,0.34) 35%,
    rgba(236,233,227,0.78) 78%,
    rgba(236,233,227,1) 100%);
}
.hero__body { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; width: 100%; }
.hero__eyebrow {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 12px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 15vw, 4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero__title span { display: block; }
.hero__title em { font-style: italic; color: var(--burgundy); }
.hero__lead {
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  opacity: 0.78;
}

/* ===== SEARCH ===== */
.search {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px var(--pad) 4px;
}
.search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 48px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.3s, background 0.3s;
}
.search__field:focus-within {
  border-color: var(--ink);
  background: rgba(255,255,255,0.8);
}
.search__field svg { color: var(--ink); opacity: 0.5; flex-shrink: 0; }
.search__field input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 0.95rem;
  min-width: 0;
}
.search__field input::placeholder { color: var(--mute); opacity: 0.8; }
.search__field input[type="search"]::-webkit-search-cancel-button { display: none; }
.search__clear {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--mute);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.search__clear:active { background: rgba(56,71,106,0.06); }
.search__clear[hidden] { display: none; }

/* ===== CATEGORY TABS (underline-indicator · distinct from corporate) ===== */
.chips {
  position: sticky;
  top: var(--hdr-h);
  z-index: 90;
  display: flex;
  gap: 4px;
  padding: 4px var(--pad) 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(236, 233, 227, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  scroll-padding-inline: var(--pad);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  position: relative;
  padding: 13px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--ink);
  opacity: 0.45;
  white-space: nowrap;
  background: none;
  transition: opacity 0.25s, color 0.25s;
}
.chip::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--burgundy);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease-out);
}
.chip.is-active {
  opacity: 1;
  color: var(--ink-deep);
  font-weight: 600;
}
.chip.is-active::after { transform: scaleX(1); }

/* ===== MENU ===== */
.menu {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px var(--pad) 0;
}
.cat { padding-top: 36px; scroll-margin-top: calc(var(--hdr-h) + 58px); }
.cat__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.cat__num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.7rem;
  color: var(--burgundy);
  line-height: 1;
}
.cat__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: -0.015em;
  line-height: 1;
}
.cat__hours {
  margin-left: auto;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  text-align: right;
  max-width: 40%;
  line-height: 1.4;
}

.items { list-style: none; }
.item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  transition: background 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.item:active { background: rgba(56,71,106,0.03); }
.item.is-tapped { animation: tap-flash 0.5s var(--ease-out); }
@keyframes tap-flash {
  0% { background: rgba(240, 219, 164, 0.35); }
  100% { background: transparent; }
}
.item__line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.item__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.08rem;
  letter-spacing: -0.005em;
  color: var(--ink);
  flex-shrink: 1;
}
.item__dots {
  flex: 1;
  border-bottom: 1.5px dotted rgba(56, 71, 106, 0.28);
  transform: translateY(-4px);
  min-width: 14px;
}
.item__price {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  color: var(--burgundy);
  white-space: nowrap;
  flex-shrink: 0;
}
.item__desc {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.72;
  margin-top: 5px;
  max-width: 56ch;
}
mark {
  background: var(--gold);
  color: var(--ink-deep);
  border-radius: 2px;
  padding: 0 1px;
}

/* ===== EMPTY STATE ===== */
.empty {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px var(--pad);
  text-align: center;
}
.empty p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
  opacity: 0.7;
  margin-bottom: 18px;
}
.empty__reset {
  padding: 11px 22px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
}
.empty__reset:active { background: var(--ink); color: var(--bg); }

/* ===== NOTICE ===== */
.notice {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px var(--pad) 0;
  text-align: center;
}
.notice p {
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--ink);
  opacity: 0.55;
  max-width: 52ch;
  margin: 0 auto;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

/* ===== INFO FOOTER ===== */
.info {
  background: var(--ink);
  color: var(--bg);
  margin-top: 48px;
  padding: 44px var(--pad) 40px;
  text-align: center;
}
.info__logo {
  width: 84px;
  height: auto;
  margin: 0 auto 10px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.info__tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  opacity: 0.8;
  margin-bottom: 26px;
}
.info__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  max-width: 360px;
  margin: 0 auto;
  padding: 12px 0;
  border-bottom: 1px solid rgba(236,233,227,0.14);
  text-align: left;
}
.info__row span {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
  flex-shrink: 0;
}
.info__row strong {
  font-weight: 500;
  font-size: 0.9rem;
  text-align: right;
}
.info__row--addr strong { font-size: 0.82rem; opacity: 0.9; }
.info__social {
  margin-top: 26px;
}
.info__social a {
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(240,219,164,0.5);
  padding-bottom: 2px;
  color: var(--gold);
}
.info__copy {
  margin-top: 26px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* ===== SCROLL TOP ===== */
.totop {
  position: fixed;
  right: var(--pad);
  bottom: calc(20px + var(--safe-b));
  z-index: 110;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(42, 54, 84, 0.28);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.totop.is-show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* ===== CATEGORY FAB (thumb-zone trigger) ===== */
.catfab {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-b));
  transform: translate(-50%, 0);
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(42, 54, 84, 0.32);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.catfab svg { opacity: 0.9; }
.catfab__label { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catfab:active { transform: translate(-50%, 0) scale(0.96); }
.catfab.is-hidden { opacity: 0; transform: translate(-50%, 24px); pointer-events: none; }

/* ===== BOTTOM SHEET ===== */
.sheet { position: fixed; inset: 0; z-index: 140; }
.sheet[hidden] { display: none; }
.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(42, 54, 84, 0.45);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 10px var(--pad) calc(16px + var(--safe-b));
  box-shadow: 0 -16px 50px rgba(42, 54, 84, 0.25);
  transform: translateY(100%);
  transition: transform 0.42s var(--ease-out);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__handle {
  width: 42px; height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 6px auto 4px;
  flex-shrink: 0;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  flex-shrink: 0;
}
.sheet__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.sheet__close {
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.sheet__close:active { background: rgba(56,71,106,0.06); }
.sheet__list {
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet__row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 15px 6px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s;
}
.sheet__row:active { background: rgba(56,71,106,0.04); }
.sheet__row-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--burgundy);
  width: 26px;
  flex-shrink: 0;
}
.sheet__row-name {
  flex: 1;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.sheet__row-count {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.sheet__row.is-active .sheet__row-name { color: var(--burgundy); }
.sheet__row.is-active .sheet__row-count {
  color: var(--ink);
  background: var(--gold);
  padding: 2px 9px;
  border-radius: 999px;
}

/* ===== TABLET / DESKTOP polish ===== */
@media (min-width: 640px) {
  .hero { min-height: 40vh; }
  .items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
  }
}

/* compact drinks: keep single column even on desktop is fine; let grid auto-balance */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
