:root {
  --sand: #f5f0e8;
  --cream: #faf7f2;
  --warm-white: #fffdf9;
  --beige: #e8dfd0;
  --beige-dark: #d4c8b4;
  --clay: #b8a898;
  --terracotta: #c4866a;
  --terra-light: #d4a088;
  --brown: #5c4a3a;
  --text: #2c241c;
  --text-muted: #8c7a6a;
  --text-light: #b0a090;
  --border: rgba(92,74,58,0.1);
  --border-warm: rgba(180,160,136,0.25);
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  background: var(--text);
  color: var(--text);
}

/* ---------- Logo ---------- */
.logo {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 9000;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
  transition: opacity 0.3s;
  user-select: none;
}
.logo:hover { opacity: 0.75; }

/* ---------- Menu overlay ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: rgba(28, 22, 17, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}
.menu-overlay.open { opacity: 1; visibility: visible; }

.menu-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
}
.menu-close:hover { opacity: 1; transform: rotate(90deg); }

.menu-list {
  list-style: none;
  text-align: center;
}
.menu-list li {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 6vw, 58px);
  color: var(--cream);
  padding: 12px 0;
  cursor: pointer;
  transition: color 0.35s;
}
.menu-list li:hover { color: var(--terra-light); }

/* ---------- Views ---------- */
main { position: relative; height: 100%; }

.view {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.view.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.slideshow { position: absolute; inset: 0; background: var(--text); }

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.slide.active { opacity: 1; }

.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.35) 100%);
}

.caption {
  position: absolute;
  bottom: 40px;
  left: 40px;
  z-index: 2;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

/* ---------- Hero ---------- */
.hero-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.hero-center h1 {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 8vw, 90px);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero-sub {
  margin-top: 14px;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
}

/* ---------- O nama ---------- */
.onama {
  background: var(--warm-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.onama-content {
  max-width: 620px;
  padding: 0 32px;
  text-align: center;
}
.onama h2 {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 48px);
  color: var(--text);
  margin-bottom: 28px;
}
.onama p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  font-weight: 300;
}
.onama-quote {
  margin-top: 24px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--text-muted);
}
.contact-line {
  margin-top: 40px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-line a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.contact-line a:hover { border-color: var(--terracotta); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .logo { top: 20px; left: 20px; font-size: 12px; }
  .menu-close { top: 16px; right: 20px; }
  .caption { left: 20px; bottom: 24px; font-size: 18px; }
  #fs-chat-box { width: calc(100vw - 32px); right: 16px; bottom: 88px; }
  #fs-chat-btn { right: 16px; bottom: 16px; }
}

/* ================================================================
   AI Chat widget — preneseno sa postojećeg sajta, koristi isti
   Cloudflare Worker backend, ne menjati WORKER_URL u script.js
   ================================================================ */
#fs-chat-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 8000;
  width: 56px;
  height: 56px;
  background: var(--terracotta);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(196,134,106,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}
#fs-chat-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(196,134,106,0.55); }
#fs-chat-btn svg { width: 24px; height: 24px; fill: white; transition: 0.3s; }
#fs-chat-btn.open svg.icon-chat { display: none; }
#fs-chat-btn.open svg.icon-close { display: block !important; }

#fs-chat-box {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 8000;
  width: 340px;
  background: var(--warm-white);
  border: 1px solid var(--border-warm);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(92,74,58,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s cubic-bezier(.16,1,.3,1);
  transform-origin: bottom right;
}
#fs-chat-box.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }

#fs-chat-header { background: var(--terracotta); padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.fs-avatar { width: 36px; height: 36px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'DM Serif Display', serif; font-size: 14px; color: white; flex-shrink: 0; }
.fs-header-name { font-family: 'DM Serif Display', serif; font-size: 15px; color: white; line-height: 1; }
.fs-header-status { font-size: 10px; color: rgba(255,255,255,0.7); letter-spacing: 0.1em; margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.fs-status-dot { width: 6px; height: 6px; background: #a8e6a0; border-radius: 50%; animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

#fs-chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 280px; min-height: 180px; }
#fs-chat-msgs::-webkit-scrollbar { width: 4px; }
#fs-chat-msgs::-webkit-scrollbar-track { background: transparent; }
#fs-chat-msgs::-webkit-scrollbar-thumb { background: var(--beige-dark); border-radius: 2px; }

.fs-msg { max-width: 82%; padding: 10px 13px; border-radius: 10px; font-size: 13px; line-height: 1.55; animation: msgIn 0.25s ease; }
@keyframes msgIn { from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:translateY(0)} }
.fs-msg.bot { background: var(--sand); color: var(--text); border-bottom-left-radius: 3px; align-self: flex-start; }
.fs-msg.user { background: var(--terracotta); color: white; border-bottom-right-radius: 3px; align-self: flex-end; }
.fs-msg.forwarded { background: #f0ede8; color: var(--text-muted); font-size: 11px; font-style: italic; border-left: 2px solid var(--terracotta); padding-left: 10px; max-width: 100%; align-self: flex-start; }

.fs-typing { display: flex; gap: 4px; align-items: center; padding: 10px 13px; background: var(--sand); border-radius: 10px 10px 10px 3px; align-self: flex-start; }
.fs-typing span { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: dot 1.2s infinite ease; }
.fs-typing span:nth-child(2) { animation-delay: 0.2s; }
.fs-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot { 0%,60%,100%{opacity:0.3; transform:translateY(0)} 30%{opacity:1; transform:translateY(-3px)} }

#fs-chat-footer { padding: 12px; border-top: 1px solid var(--border-warm); display: flex; gap: 8px; }
#fs-chat-input { flex: 1; border: 1px solid var(--border-warm); background: var(--sand); color: var(--text); font-family: 'Lato', sans-serif; font-size: 13px; font-weight: 300; padding: 9px 12px; border-radius: 6px; outline: none; resize: none; transition: border-color 0.3s; line-height: 1.4; }
#fs-chat-input:focus { border-color: var(--terracotta); }
#fs-chat-send { background: var(--terracotta); border: none; border-radius: 6px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.3s; }
#fs-chat-send:hover { background: var(--brown); }
#fs-chat-send svg { width: 16px; height: 16px; fill: white; }
