/* ═══════════════════════════════════════════════════════════
   IRIS CAFFE — Digital Menu Stylesheet
   ═══════════════════════════════════════════════════════════ */

:root {
  /* K7045 Satin / Pantone 7527 C family — warm greige, prosvetljeno */
  --color-bg:          #5E5A53;
  --color-bg-card:     #6C6760;
  --color-bg-subtle:   #524E48;
  --color-ink:         #FFFFFF;
  --color-ink-mid:     #ECE8E1;
  --color-ink-light:   #D6CFC3;
  --color-divider:     #9A948A;
  --color-accent:      #F2EBE2;
  --color-accent-soft: #7A756C;
  --color-accent-text: #FFFDF8;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-futura:  'Orbitron', monospace, sans-serif;

  --text-hero:      clamp(36px, 9vw, 54px);
  --text-tagline:   clamp(14px, 3.8vw, 17px);
  --text-section:   clamp(26px, 6vw, 34px);
  --text-item-name: 21px;
  --text-item-desc: 15px;
  --text-price:     17px;
  --text-tab:       13px;

  --content-width: 600px;
  --side-pad:      clamp(20px, 5vw, 32px);
  --nav-h:         52px;
  --card-radius:   16px;

  /* Logo kao pozadina — ceo sajt, moderan dijagonalni raster */
  --pattern-logo-w: 52px;
  --pattern-opacity: 0.082;
  --pattern-opacity-shift: 0.055;
  --pattern-rotate: -7deg;
}

/* ── Reset ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: 68px;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

/* Sloj 1: red-po-red mreža logoa, blago rotirano — pokriva ceo ekran */
body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 240vmax;
  height: 240vmax;
  margin: -120vmax 0 0 -120vmax;
  background-image: url('../img/logo.png');
  background-repeat: repeat;
  background-size: var(--pattern-logo-w) auto;
  background-position: 0 0;
  opacity: var(--pattern-opacity);
  filter: invert(1) brightness(1.2);
  transform: rotate(var(--pattern-rotate));
  pointer-events: none;
}

/* Sloj 2: isti raster, pomeren za pola ćelije — „brick“ niz, diskretniji */
body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 240vmax;
  height: 240vmax;
  margin: -120vmax 0 0 -120vmax;
  background-image: url('../img/logo.png');
  background-repeat: repeat;
  background-size: var(--pattern-logo-w) auto;
  background-position: calc(var(--pattern-logo-w) * 0.52) calc(var(--pattern-logo-w) * 0.32);
  opacity: var(--pattern-opacity-shift);
  filter: invert(1) brightness(1.15);
  transform: rotate(var(--pattern-rotate));
  pointer-events: none;
  mix-blend-mode: soft-light;
}

/* ── Scrollbar hide ── */
body::-webkit-scrollbar { width: 0; }
body { -ms-overflow-style: none; scrollbar-width: none; }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

@keyframes fadeRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes langSwap {
  0%   { opacity: 1; }
  40%  { opacity: 0; }
  60%  { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes pulseSubtle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */

.page-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
  text-align: center;
  padding: 56px 0 28px;
  animation: fadeRise 600ms ease both;
}

.hero-logo {
  display: block;
  width: 96px;
  max-width: 28vw;
  height: auto;
  margin: 0 auto 22px;
  opacity: 1;
  filter:
    invert(1)
    brightness(1.55)
    contrast(1.08)
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.45))
    drop-shadow(0 2px 14px rgba(0, 0, 0, 0.2));
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: 10px;
  text-shadow: 0 1px 3px rgba(35, 32, 28, 0.4);
}

.hero-tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-tagline);
  color: var(--color-ink-mid);
  letter-spacing: 0.04em;
}

.hero-rule {
  width: 48px;
  height: 1.5px;
  background: var(--color-accent);
  border: none;
  margin: 20px auto;
  border-radius: 1px;
}

.hero-hours {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 4vw, 18px);
  color: var(--color-ink-mid);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════════════════════════ */

.lang-switcher {
  display: flex;
  justify-content: center;
  margin: 24px 0 8px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg-subtle);
  border-radius: 24px;
  padding: 3px;
  position: relative;
  border: 1px solid var(--color-divider);
}

.lang-btn {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 18px;
  border: none;
  background: transparent;
  color: var(--color-ink-mid);
  cursor: pointer;
  border-radius: 20px;
  transition: color 260ms ease;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn.active { color: var(--color-ink); }

.lang-pill {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  width: calc(50% - 3px);
  background: var(--color-bg-card);
  border-radius: 20px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.lang-pill.en { transform: translateX(100%); }

.lang-transitioning [data-i18n] {
  animation: langSwap 320ms ease both;
}

/* ═══════════════════════════════════════════════════════════
   STICKY NAV
   ═══════════════════════════════════════════════════════════ */

.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(94, 90, 83, 0.94);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--color-divider);
  transform: translateZ(0);
}

.sticky-nav-inner {
  display: flex;
  align-items: center;
  max-width: var(--content-width);
  margin: 0 auto;
  padding-left: var(--side-pad);
  gap: 10px;
  min-height: var(--nav-h);
}

.nav-mini-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  filter:
    invert(1)
    brightness(1.45)
    contrast(1.06)
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

.tab-bar {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--side-pad) 0 0;
  gap: 6px;
  min-height: var(--nav-h);
  height: var(--nav-h);
  align-items: stretch;
  flex: 1;
  min-width: 0;
}

.tab-bar::-webkit-scrollbar { display: none; }
.tab-bar { -ms-overflow-style: none; scrollbar-width: none; }

.tab-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-tab);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-mid);
  border: none;
  background: transparent;
  border-bottom: 2.5px solid transparent;
  padding: 0 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 220ms ease, border-color 220ms ease;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.tab-btn:hover { color: var(--color-ink); }

.tab-btn.active {
  color: var(--color-ink);
  border-bottom-color: var(--color-accent);
}

/* ═══════════════════════════════════════════════════════════
   MENU CARDS
   ═══════════════════════════════════════════════════════════ */

.menu-section {
  padding-top: 24px;
}

.menu-card {
  background:
    linear-gradient(
      174deg,
      rgba(122, 116, 108, 0.9)  0%,
      rgba(115, 109, 101, 0.9) 35%,
      rgba(107, 102, 94, 0.9) 70%,
      rgba(100, 96, 88, 0.9) 100%
    );
  border-radius: var(--card-radius);
  padding: 28px var(--side-pad) 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(201, 189, 174, 0.35);
  box-shadow:
    0 2px 4px  rgba(45, 42, 38, 0.08),
    0 6px 20px rgba(45, 42, 38, 0.1),
    0 14px 44px rgba(45, 42, 38, 0.08);
  position: relative;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-section);
  color: var(--color-ink);
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(35, 32, 28, 0.35);
  flex: 1;
  min-width: 0;
}

.section-accent {
  width: 3px;
  align-self: stretch;
  background: var(--color-accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-divider {
  height: 1px;
  background: var(--color-divider);
  margin: 8px 0 4px;
  border: none;
}

.menu-subtitle {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 20px 0 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(201, 189, 174, 0.28);
  line-height: 1.35;
}

.section-divider + .menu-subtitle {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(201, 189, 174, 0.22);
  min-height: 56px;
  transition: background 180ms ease;
}

.menu-item:last-child { border-bottom: none; }

.item-info { flex: 1; padding-right: 20px; }

.item-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-item-name);
  color: var(--color-ink);
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(35, 32, 28, 0.3);
}

.item-desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-item-desc);
  color: var(--color-ink-light);
  margin-top: 3px;
  line-height: 1.45;
}

.item-price {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-price);
  color: var(--color-accent);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 3px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   JS-DRIVEN ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

.js-ready .menu-card {
  opacity: 0;
  transform: translateY(18px);
  will-change: transform, opacity;
}

.js-ready .menu-card.revealed {
  animation: cardIn 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  will-change: auto;
}

.js-ready .menu-item {
  opacity: 0;
  transform: translateY(8px);
}

.js-ready .menu-item.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: auto;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.site-footer {
  margin-top: 64px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--color-divider);
  text-align: center;
}

.footer-mini-logo {
  display: block;
  width: 52px;
  height: auto;
  margin: 0 auto 16px;
  object-fit: contain;
  filter:
    invert(1)
    brightness(1.5)
    contrast(1.06)
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.35))
    drop-shadow(0 2px 10px rgba(0, 0, 0, 0.15));
}

.footer-text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: var(--color-ink-mid);
  line-height: 1.6;
}

.matrix-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
}

.matrix-powered {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-ink-mid);
  opacity: 0.85;
}

.matrix-logo {
  font-family: 'Orbitron', monospace, sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-shadow:
    0 0 7px  rgba(221, 213, 201, 0.5),
    0 0 20px rgba(201, 189, 174, 0.25);
  transition: text-shadow 400ms ease, color 400ms ease;
}

.matrix-logo:hover {
  color: #fff;
  text-shadow:
    0 0 8px  rgba(250, 248, 244, 0.45),
    0 0 24px rgba(201, 189, 174, 0.35),
    0 0 48px rgba(201, 189, 174, 0.15);
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════ */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.tab-btn:focus:not(:focus-visible),
.lang-btn:focus:not(:focus-visible) {
  outline: none;
}

/* ═══════════════════════════════════════════════════════════
   DESKTOP
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 640px) {
  .menu-item:hover {
    background: rgba(201, 189, 174, 0.14);
    margin: 0 -16px;
    padding: 14px 16px;
    border-radius: 6px;
  }

  .menu-card {
    transition: box-shadow 400ms ease;
  }
  .menu-card:hover {
    box-shadow:
      0 2px 4px  rgba(45, 42, 38, 0.1),
      0 8px 28px rgba(45, 42, 38, 0.12),
      0 20px 56px rgba(45, 42, 38, 0.1);
  }
}
