/* —— basic reset —— */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-main: #ffffff;
  --bg-panel: #ffffff;
  --bg-header: #ffffff;
  --text-main: #000000;
  --text-soft: #000000;
  --gold: #e3a535;
  --red-accent: #ff003b;
  --border-soft: #000000;
}

/* —— body + fonts —— */
body {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)),
    url("img/title 2.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.page-wrapper {
  width: 90%;
  max-width: 920px;
  padding-top: 10px;
  padding-bottom: 28px;
}

/* header */
.site-header {
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid var(--gold);
  margin-top: 24px;
  padding: 30px 20px 22px;
  border-radius: 10px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(227, 165, 53, 0.22);
}

.brand-logo {
  width: min(420px, 88%);
  height: auto;
  display: block;
  margin: 0 auto 14px;
}

.site-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.site-subtitle {
  font-size: 16px;
  color: var(--red-accent);
}

/* chat window */
.chatbox {
  margin: 40px 0;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #f2d7a4;
  border-radius: 10px;
  padding: 20px;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.chatbox:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.1),
    0 3px 10px rgba(0, 0, 0, 0.12);
}

.chat-window {
  height: 360px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 20px;
  font-size: 18px;
  line-height: 1.5;
  overflow-y: auto;
  background: var(--bg-panel);
  color: var(--text-main);
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.07);
  white-space: pre-line;
}

/* messages */
.msg {
  margin-bottom: 14px;
  line-height: 1.5;
}

.msg.user {
  color: var(--red-accent);
}

.msg.ai {
  color: var(--text-main);
}

/* input row */
.chat-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.chat-form input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.chat-form input::placeholder {
  color: #666666;
}

.chat-form input:focus {
  border-color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(227, 165, 53, 0.2);
}

.chat-form button {
  font-size: 18px;
  background: var(--red-accent);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(255, 0, 59, 0.3);
  transition:
    background 0.3s,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.chat-form button .material-icons {
  font-size: 24px;
}

.chat-form button:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
}

.chat-form button:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* visually hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* footer */
.site-footer {
  margin: 60px 0 40px;
  padding-top: 20px;
  border-top: 1px solid #f2d7a4;
  text-align: center;
  font-size: 14px;
  color: var(--text-main);
}

.site-footer nav {
  margin-top: 12px;
}

.site-footer a {
  margin: 0 8px;
  color: var(--red-accent);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

@media (max-width: 640px) {
  .site-header {
    padding: 24px 14px 20px;
  }

  .site-title {
    font-size: 24px;
  }

  .chat-window {
    height: 320px;
    font-size: 16px;
  }
}
