@font-face {
  font-family: Poppins;
  src: url('../assets/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url('../assets/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url('../assets/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #171715;
  --yellow: #ffb800;
  --yellow-ink: #7a4d00;
  --cream: #fff8df;
  --muted: #77766f;
  --line: #e8e6df;
  --surface: #fff;
  --page: #fff;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Poppins, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(5.5vw, 24px);
  border-bottom: 1px solid rgba(23, 23, 21, .08);
  background: rgba(255, 255, 255, .96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -1px;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 40px;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy b {
  font-weight: 700;
}

.brand-tagline {
  margin-top: 2px;
  color: var(--ink);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
}

.environment-label {
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--yellow-ink);
  font-size: 11px;
  font-weight: 600;
}

.page-shell {
  display: grid;
  width: min(100% - 48px, 1240px);
  min-height: calc(100vh - 164px);
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  align-items: center;
  gap: clamp(38px, 7vw, 100px);
  margin: 0 auto;
  padding: clamp(62px, 8vw, 100px) 0;
}

.intro {
  max-width: 620px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 21px;
  color: var(--yellow-ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
}

.eyebrow::before {
  width: 30px;
  height: 2px;
  background: var(--yellow);
  content: '';
}

h1 {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 5.7vw, 72px);
  font-weight: 600;
  letter-spacing: -4px;
  line-height: 1.08;
}

h1 span {
  color: var(--yellow-ink);
}

.intro-copy {
  max-width: 500px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.chat-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(23, 23, 21, .09);
}

.chat-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 19px;
  background: var(--yellow);
  color: var(--ink);
}

.assistant-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
}

.assistant-avatar img {
  width: 28px;
  height: 32px;
  object-fit: contain;
}

.chat-heading h2,
.chat-heading p {
  margin: 0;
}

.chat-heading h2 {
  font-size: 14px;
  font-weight: 600;
}

.chat-heading p {
  margin-top: 4px;
  color: #39362f;
  font-size: 11px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: #20784c;
}

.message-list {
  display: flex;
  min-height: 310px;
  max-height: min(54vh, 500px);
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 22px 18px;
  background: var(--cream);
}

.message {
  width: fit-content;
  max-width: 88%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 5px 14px 14px 14px;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message--assistant {
  align-self: flex-start;
  border: 1px solid var(--line);
  background: #fff;
}

.message--user {
  align-self: flex-end;
  border-radius: 14px 5px 14px 14px;
  background: var(--ink);
  color: var(--surface);
}

.message--error {
  align-self: flex-start;
  border: 1px solid #e7b9ad;
  background: #fff4f1;
  color: #8b2e1d;
}

.chat-form {
  display: flex;
  gap: 9px;
  padding: 14px 16px 8px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #d8d5cd;
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.chat-form input:focus-visible,
.send-button:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid var(--yellow-ink);
  outline-offset: 2px;
}

.send-button {
  display: inline-flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 3px;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: background .18s ease, transform .18s ease;
}

.send-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #e7a600;
}

.send-button:disabled {
  cursor: wait;
  opacity: .65;
}

.test-note {
  margin: 0;
  padding: 4px 18px 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.chat-privacy-note {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.chat-privacy-note a {
  color: var(--yellow-ink);
  font-weight: 600;
  text-underline-offset: 2px;
}

.whatsapp-handoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 18px 18px;
  padding: 13px 15px;
  border: 1px solid #cfe1d5;
  border-radius: 4px;
  background: #edf6f0;
  color: #174e3b;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.whatsapp-handoff[hidden] {
  display: none;
}

.whatsapp-handoff:hover {
  transform: translateY(-1px);
  background: #e2f0e7;
}

.whatsapp-handoff > span {
  color: #536b5d;
  font-size: 10px;
}

.whatsapp-handoff strong {
  flex: 0 0 auto;
  font-size: 11px;
}

.site-footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px max(5.5vw, 24px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
}

.site-footer a {
  color: var(--ink);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 760px) {
  .page-shell {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 54px 0 64px;
  }

  .intro {
    max-width: 620px;
  }

  .chat-card {
    width: min(100%, 560px);
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .site-header {
    min-height: 72px;
    padding-inline: 16px;
  }

  .page-shell {
    width: calc(100% - 32px);
    padding-top: 42px;
  }

  .brand {
    font-size: 16px;
  }

  .brand img {
    width: 30px;
    height: 36px;
  }

  .environment-label {
    padding: 7px 10px;
    font-size: 10px;
  }

  h1 {
    font-size: clamp(38px, 11vw, 50px);
    letter-spacing: -2.4px;
  }

  .message-list {
    min-height: 260px;
  }

  .chat-form {
    gap: 7px;
    padding-inline: 12px;
  }

  .send-button {
    padding-inline: 12px;
  }

  .whatsapp-handoff {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-inline: 16px;
  }
}

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