/* =========================================================
   Digitale Speisekarte – Gaststätte Blauflesch
   styles.css (FULL) – Desktop & Mobile polished
   - Stable dark/blue background (reduced banding)
   - Clean horizontal category nav with arrows + fade, scrollbar hidden
   - Mobile header actions layout fixed
   - Search/filters hard overrides (theme-safe)
   - Scroll-to-top button (#toTop)
   ========================================================= */

:root{
  --bg: #070A0F;

  --panel: rgba(255,255,255,0.04);
  --panel2: rgba(255,255,255,0.06);
  --stroke: rgba(255,255,255,0.10);

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.66);

  --blue: #0A63B8;
  --silver: rgba(205,214,224,0.92);

  --radius: 18px;
  --shadow: 0 10px 40px rgba(0,0,0,0.45);

  /* verhindert helle native Form-Controls */
  color-scheme: dark;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
html{ scroll-behavior:smooth; }
body{
  margin:0 !important;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background-color: var(--bg);
  overflow-x:hidden;

  /* Base background (stable) */
  background-image:
    radial-gradient(1200px 720px at 15% -10%, rgba(10,99,184,0.18), transparent 62%),
    radial-gradient(980px 720px at 88% 0%, rgba(205,214,224,0.10), transparent 60%),
    radial-gradient(1000px 900px at 40% 120%, rgba(10,99,184,0.10), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 35%, rgba(0,0,0,0.14));
  background-repeat:no-repeat;
  background-size:cover;
}

/* Noise / dither layer against banding */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: soft-light;
  opacity: 0.18;
}

/* soft vignette */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 0;
  background:
    radial-gradient(1200px 800px at 50% 20%, rgba(0,0,0,0.00), rgba(0,0,0,0.30) 60%, rgba(0,0,0,0.55));
  opacity: .7;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

.container{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* Accessibility skip link */
.skip{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;height:1px;
  overflow:hidden;
}
.skip:focus{
  left:16px; top:16px;
  width:auto; height:auto;
  padding:10px 12px;
  background: var(--panel2);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  z-index: 9999;
}

/* Ensure content is above background layers */
.header, .main{
  position: relative;
  z-index: 1;
}

/* =========================================================
   Header
   ========================================================= */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7,10,15,0.70);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header__inner{
  display:flex;
  gap: 18px;
  align-items:center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: 14px;
  min-width: 0;
}
.brand__logo{
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.55));
}
.brand__text{ line-height: 1.1; }
.brand__kicker{
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
}
.brand__name{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand__sub{
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.header__actions{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.menuSwitch{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill{
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--silver);
  white-space: nowrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  font-weight: 650;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
  white-space: nowrap;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
}
.btn:active{ transform: translateY(0); }
.btn--ghost{ background: transparent; }

.btn.isActive{
  border-color: rgba(10,99,184,0.65);
  background: rgba(10,99,184,0.16);
}

/* =========================================================
   Category Nav (CLEAN)
   ========================================================= */
.nav{
  border-top: 1px solid rgba(255,255,255,0.06);
}

.nav__wrap{
  position: relative;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 0 12px;
}

/* scroll container */
.nav__inner{
  display:flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 2px 8px;
  margin: 0 -8px;
  scroll-snap-type: x proximity;

  /* hide scrollbar */
  scrollbar-width: none;
}
.nav__inner::-webkit-scrollbar{ height:0; width:0; }

/* fades */
.nav__wrap::before,
.nav__wrap::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width: 44px;
  pointer-events:none;
  z-index: 2;
}
.nav__wrap::before{
  left: 0;
  background: linear-gradient(90deg, rgba(7,10,15,0.92), rgba(7,10,15,0));
}
.nav__wrap::after{
  right: 0;
  background: linear-gradient(270deg, rgba(7,10,15,0.92), rgba(7,10,15,0));
}

/* arrows */
.nav__arrow{
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  color: rgba(205,214,224,0.92);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  z-index: 3;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, opacity 140ms ease;
  user-select:none;
}
.nav__arrow:hover{
  transform: translateY(-1px);
  border-color: rgba(10,99,184,0.55);
  background: rgba(10,99,184,0.14);
}
.nav__arrow:active{ transform: translateY(0); }
.nav__arrow.isDisabled{
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* chips */
.chip{
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration:none;
  font-size: 12px;
  color: var(--silver);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
  white-space: nowrap;
  scroll-snap-align: start;
}
.chip:hover{
  transform: translateY(-1px);
  border-color: rgba(10,99,184,0.55);
  background: linear-gradient(180deg, rgba(10,99,184,0.14), rgba(255,255,255,0.02));
}
.chip.isActive{
  border-color: rgba(10,99,184,0.75);
  background: rgba(10,99,184,0.18);
}

/* =========================================================
   Main + Hero
   ========================================================= */
.main{ padding: 26px 0 56px; }

.hero{ margin: 12px 0 16px; }
.hero__card{
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(900px 280px at 30% 0%, rgba(10,99,184,0.25), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  box-shadow: var(--shadow);
}
.hero__top{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hero h1{
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: 0.01em;
}
.muted{ color: var(--muted); }

.badge{
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(10,99,184,0.45);
  background: rgba(10,99,184,0.16);
  color: var(--silver);
  white-space: nowrap;
}

.hero__meta{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.meta{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}
.meta__label{
  font-size: 12px;
  color: var(--silver);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.meta__value{ margin-top: 6px; color: var(--muted); font-size: 13px; }

/* =========================================================
   Tools: Search + Filters (hard overrides)
   ========================================================= */
.tools{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}
.tools__left{ display:flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tools__right{ display:flex; gap: 10px; }

.search input,
#searchInput{
  width: min(520px, 80vw);
  padding: 11px 12px !important;
  border-radius: 14px !important;

  -webkit-appearance: none !important;
  appearance: none !important;

  border: 1px solid rgba(255,255,255,0.10) !important;
  background-color: rgba(0,0,0,0.20) !important;
  color: var(--text) !important;

  outline: none !important;
  box-shadow: none !important;

  font-size: 16px; /* iOS zoom off */
  line-height: 1.2;
}

#searchInput::placeholder{
  color: rgba(255,255,255,0.45) !important;
}

#searchInput:focus,
#searchInput:focus-visible{
  border-color: rgba(10,99,184,0.55) !important;
  box-shadow: 0 0 0 3px rgba(10,99,184,0.18) !important;
}

/* Filter buttons */
.filters{ display:flex; gap: 8px; flex-wrap: wrap; }

.filters .chipBtn{
  cursor:pointer;
  padding: 9px 10px !important;
  border-radius: 999px !important;

  -webkit-appearance: none !important;
  appearance: none !important;

  border: 1px solid rgba(255,255,255,0.10) !important;
  background-color: rgba(255,255,255,0.04) !important;
  color: var(--silver) !important;

  font-size: 12px;
  line-height: 1.1;

  box-shadow: none !important;
  text-shadow: none !important;

  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.filters .chipBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(10,99,184,0.55) !important;
}
.filters .chipBtn:focus,
.filters .chipBtn:focus-visible{
  outline: none !important;
  border-color: rgba(10,99,184,0.65) !important;
  box-shadow: 0 0 0 3px rgba(10,99,184,0.18) !important;
}
.filters .chipBtn.isActive{
  border-color: rgba(10,99,184,0.65) !important;
  background-color: rgba(10,99,184,0.16) !important;
}

/* =========================================================
   Sections + Items
   ========================================================= */
.section{ margin: 26px 0; }
.section__head{
  display:flex;
  align-items:center;
  gap: 14px;
  margin-bottom: 12px;
}
.section h2{
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.section__line{
  height: 1px;
  flex:1;
  background: linear-gradient(90deg, rgba(10,99,184,0.55), rgba(255,255,255,0.06), transparent);
}

.note{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(10,99,184,0.25);
  background: rgba(10,99,184,0.10);
  color: var(--silver);
  margin: 10px 0 14px;
}
.note.small{
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.item{
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  box-shadow: 0 8px 26px rgba(0,0,0,0.28);
}
.item__top{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.item__name{
  font-weight: 800;
  letter-spacing: 0.01em;
}
.nr{
  color: rgba(205,214,224,0.75);
  font-weight: 800;
  margin-right: 6px;
}
.item__price{
  font-weight: 900;
  color: var(--silver);
  white-space: nowrap;
}
.item__desc{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tags{
  margin-top: 10px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag{
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.78);
}
.tag--blue{
  border-color: rgba(10,99,184,0.45);
  background: rgba(10,99,184,0.15);
  color: var(--silver);
}

/* =========================================================
   Footer
   ========================================================= */
.footer{
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.footer__grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
}
.footer__title{
  font-weight: 900;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.footer__bottom{
  margin-top: 16px;
  font-size: 12px;
  padding: 12px 0 0;
}

.link{
  color: rgba(10,99,184,0.95);
  text-decoration: none;
}
.link:hover{ text-decoration: underline; }

/* =========================================================
   Toast
   ========================================================= */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  color: var(--silver);
  z-index: 9999;
}

/* =========================================================
   Scroll-to-top button
   ========================================================= */
#toTop{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  color: var(--silver);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  z-index: 9998;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, background 140ms ease, border-color 140ms ease;
}
#toTop.show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#toTop:hover{
  border-color: rgba(10,99,184,0.55);
  background: rgba(10,99,184,0.14);
}

/* =========================================================
   Responsive tweaks
   ========================================================= */
@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr; }
  .footer__grid{ grid-template-columns: 1fr; }
  .hero__meta{ grid-template-columns: 1fr; }

  /* Header layout fix on mobile */
  .header__inner{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .brand{
    justify-content: flex-start;
  }
  .brand__logo{ width: 52px; height: 52px; }
  .brand__name{ font-size: 20px; }
  .hero h1{ font-size: 30px; }

  .header__actions{
    justify-content: flex-start;
    width: 100%;
  }
  .pill{ order: 1; }
  .menuSwitch{
    order: 2;
    width: 100%;
  }
  .menuSwitch a.btn{
    flex: 1 1 auto;
    justify-content: center;
  }
  .header__actions > a.btn{
    order: 3;
    width: 100%;
    justify-content: center;
  }

  /* Category nav: keep arrows, but tighter */
  .nav__arrow{ width: 34px; height: 34px; }
  .chip{ padding: 9px 11px; }
}

/* Very small phones */
@media (max-width: 420px){
  .menuSwitch a.btn{
    padding: 10px 10px;
    font-size: 12px;
  }
}
