.contact-page {
  background: #f7f3ec;
  color: #1a120b;
  min-height: 100vh;
}

.contact-shell {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.contact-hero {
  min-height: 72vh;
  background-size: cover;
  background-position: center;
}

.contact-hero-overlay {
  min-height: 72vh;
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(7, 21, 15, 0.82), rgba(7, 21, 15, 0.42), rgba(7, 21, 15, 0.18)),
    linear-gradient(180deg, rgba(7, 21, 15, 0.08), rgba(7, 21, 15, 0.78));
}

.contact-hero-copy {
  padding-bottom: clamp(70px, 9vw, 118px);
  color: #fffaf0;
}

.contact-hero-copy .eyebrow {
  color: #d8bf86;
  margin-bottom: 18px;
}

.contact-hero-copy h1 {
  max-width: 10ch;
  margin: 0;
  font: 600 clamp(3.4rem, 7vw, 6.6rem) / 0.88 var(--font-display);
}

.contact-hero-copy p:last-child {
  max-width: 54ch;
  margin-top: 20px;
  color: rgba(255, 250, 240, 0.88);
  font: 400 1.08rem/1.7 var(--font-sans);
}

.contact-intro-section,
.contact-form-section {
  padding: clamp(70px, 8vw, 104px) 0;
}

.contact-intro-grid,
.contact-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: start;
}

.contact-intro-copy h2,
.contact-form-panel h2 {
  margin: 0;
  color: #1a120b;
  font: 600 clamp(2.4rem, 4.8vw, 4.35rem) / 0.95 var(--font-display);
}

.contact-intro-copy p:last-child {
  margin-top: 22px;
  color: #47544d;
  font: 400 1.05rem/1.85 var(--font-sans);
}

.contact-info-stack {
  display: grid;
  gap: 14px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 22px;
  background: #fffdf8;
  border: 1px solid #e4dac8;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(26, 18, 11, 0.06);
}

.contact-info-item i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a120b;
  color: #fffaf0;
  border-radius: 999px;
}

.contact-info-item span {
  color: #9c6f35;
  font: 800 0.7rem/1 var(--font-sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.contact-info-item p {
  margin-top: 6px;
  color: #3f3325;
  font: 600 0.95rem/1.4 var(--font-sans);
}

.contact-form-section {
  background: #fffdf8;
}

.contact-form-panel {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 42px);
  background: #f7f3ec;
  border: 1px solid #e0d6c7;
  border-radius: 8px;
}

.contact-form-panel label {
  display: grid;
  gap: 8px;
}

.contact-form-panel label span {
  color: #6f5b45;
  font: 800 0.7rem/1 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-form-panel input,
.contact-form-panel textarea,
.chat-form-card input,
.chat-form-card textarea {
  width: 100%;
  border: 1px solid #d9cfbf;
  background: #fffdf8;
  color: #1a120b;
  border-radius: 6px;
  padding: 14px 15px;
  font: 500 0.95rem/1.4 var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form-panel textarea,
.chat-form-card textarea {
  resize: vertical;
}

.contact-form-panel input:focus,
.contact-form-panel textarea:focus,
.chat-form-card input:focus,
.chat-form-card textarea:focus {
  border-color: #b48645;
  box-shadow: 0 0 0 4px rgba(180, 134, 69, 0.14);
}

.contact-submit {
  width: fit-content;
  border: none;
  border-radius: 6px;
  background: #1a120b;
  color: #ffffff;
  padding: 15px 24px;
  font: 800 0.78rem/1 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.contact-submit:hover {
  background: #9c6f35;
  transform: translateY(-2px);
}

.contact-success {
  color: #356949;
  font: 700 0.88rem/1.5 var(--font-sans);
}

.contact-error,
.chat-error {
  color: #b33a2f;
  font: 700 0.82rem/1.5 var(--font-sans);
}

.contact-image-panel {
  position: sticky;
  top: 92px;
  overflow: hidden;
  border-radius: 8px;
  background: #1a120b;
}

.contact-image-panel img {
  display: block;
  width: 100%;
  min-height: 560px;
  object-fit: cover;
  opacity: 0.9;
}

.contact-image-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 20px;
  background: rgba(14, 12, 9, 0.76);
  color: #fffaf0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.contact-image-caption p {
  font: 500 0.96rem/1.7 var(--font-sans);
}

.contact-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: grid;
  justify-items: end;
  gap: 14px;
}

.chat-window {
  width: min(390px, calc(100vw - 32px));
  height: min(660px, calc(100vh - 116px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 84, 35, 0.18);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
  animation: chatRise 0.28s ease both;
}

.chat-header {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  min-height: 68px;
  background: linear-gradient(120deg, #005423 0%, #0a6a39 100%);
  color: #ffffff;
  text-align: center;
}

.chat-header-home {
  padding-bottom: 16px;
}

.chat-header button,
.chat-launcher {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-header button {
  width: 38px;
  height: 38px;
  background: transparent;
  color: #ffffff;
  border-radius: 999px;
  font-size: 1rem;
}

.chat-header h2 {
  margin: 0;
  font: 800 1rem/1.2 var(--font-sans);
}

.chat-header p {
  margin: 4px auto 0;
  max-width: 230px;
  font: 600 0.7rem/1.25 var(--font-sans);
  opacity: 0.86;
}

.chat-brand-avatar {
  width: 40px;
  height: 40px;
  margin: 0 auto 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f0;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #005423;
  font-size: 1.2rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.chat-home-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #eff3f0 0%, #e2e9e4 100%);
  overflow: hidden;
}

.recent-card {
  margin: 20px;
  padding: 17px 16px 18px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16), 0 12px 24px rgba(0, 0, 0, 0.08);
  animation: chatCardIn 0.34s ease both;
}

.recent-card h3 {
  margin: 0 0 16px;
  color: #646464;
  font: 800 0.86rem/1.2 var(--font-sans);
}

.recent-list {
  display: grid;
  gap: 8px;
}

.recent-conversation {
  width: 100%;
  min-height: 54px;
  border: none;
  background: transparent;
  padding: 0;
  display: grid;
  grid-template-columns: 22px 24px 1fr auto;
  gap: 7px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  color: #6d6d6d;
}

.recent-conversation:hover .recent-copy strong {
  color: #343434;
}

.recent-icon {
  color: #d0d0d0;
  font-size: 1rem;
}

.recent-mini-avatar {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0f7b46;
  color: #ffffff;
  font-size: 0.78rem;
}

.recent-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.recent-copy strong {
  color: #777777;
  font: 700 0.86rem/1.2 var(--font-sans);
  transition: color 0.2s;
}

.recent-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a8a8a;
  font: 500 0.8rem/1.2 var(--font-sans);
}

.recent-conversation time {
  align-self: start;
  color: #9a9a9a;
  font: 500 0.7rem/1.2 var(--font-sans);
  white-space: nowrap;
}

.recent-empty {
  color: #8a8a8a;
  font: 600 0.84rem/1.4 var(--font-sans);
}

.chat-home-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding: 12px 20px 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(222, 221, 220, 0.9);
}

.chat-home-footer button {
  border: none;
  min-width: 153px;
  border-radius: 999px;
  background: #0f7b46;
  color: #ffffff;
  padding: 10px 18px;
  cursor: pointer;
  font: 800 0.82rem/1 var(--font-sans);
  transition: background 0.2s, transform 0.2s;
}

.chat-home-footer button:hover {
  background: #0b6238;
  transform: translateY(-1px);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 24px;
  background: #ffffff;
}

.chat-history-link {
  width: 100%;
  border: none;
  background: transparent;
  color: #008b42;
  margin: 0 0 16px;
  padding: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0;
  font: 800 0.77rem/1.2 var(--font-sans);
}

.chat-message-enter {
  animation: chatMessageIn 0.32s cubic-bezier(0.2, 0.72, 0.24, 1) both;
}

.chat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.bot-row {
  align-items: flex-end;
}

.user-row {
  justify-content: flex-end;
}

.chat-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f0;
  border: 2px solid #b61422;
  color: #005423;
  font-size: 0.92rem;
}

.chat-bubble,
.chat-form-card {
  max-width: 288px;
  border-radius: 8px;
  box-shadow: none;
}

.bot-bubble {
  background: #f1f3f5;
  color: #172033;
  padding: 12px 14px;
}

.bot-bubble p,
.chat-form-card p {
  margin: 0 0 10px;
  font: 500 0.84rem/1.45 var(--font-sans);
}

.bot-bubble p:last-child,
.chat-form-card p:last-child {
  margin-bottom: 0;
}

.bot-bubble button,
.chat-form-card button {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: #009b52;
  color: #ffffff;
  padding: 12px 18px;
  font: 800 0.9rem/1 var(--font-sans);
  cursor: pointer;
}

.bot-bubble button:disabled,
.chat-form-card button:disabled,
.contact-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.user-bubble {
  background: #009b52;
  color: #ffffff;
  padding: 13px 15px;
  font: 800 0.84rem/1.3 var(--font-sans);
  border-bottom-right-radius: 3px;
}

.chat-meta {
  margin-top: 5px;
  color: #172033;
  font: 600 0.68rem/1.2 var(--font-sans);
  text-align: center;
}

.user-row .chat-meta {
  text-align: right;
}

.chat-form-card {
  display: grid;
  gap: 10px;
  background: #ffffff;
  padding: 10px 10px 12px;
  border: 1px solid #e0e8e3;
}

.chat-form-card input,
.chat-form-card textarea {
  width: 100%;
  border: 1px solid #c8d7cf;
  border-radius: 8px;
  box-shadow: none;
  padding: 11px 12px;
  background: #ffffff;
  color: #172033;
  font: 500 0.88rem/1.2 var(--font-sans);
}

.chat-form-card input:focus,
.chat-form-card textarea:focus {
  border-color: #0f7b46;
  box-shadow: 0 0 0 3px rgba(15, 123, 70, 0.16);
  outline: 0;
}

.chat-form-card textarea {
  min-height: 72px;
  resize: vertical;
}

.chat-consent {
  display: block;
  border-radius: 8px;
  background: #f1f3f5;
  color: #172033;
  padding: 12px;
  font: 500 0.68rem/1.45 var(--font-sans);
}

.chat-form-card button {
  justify-self: center;
  width: auto;
  min-width: 104px;
  margin-top: 2px;
}

.chat-form-card button span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.typing-dots {
  justify-self: center;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 14px;
}

.typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #009b52;
  animation: typingPulse 0.9s ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: 0.12s;
}

.typing-dots i:nth-child(3) {
  animation-delay: 0.24s;
}

.chat-launcher {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #005423;
  color: #ffffff;
  font-size: 1.55rem;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s, background 0.2s;
}

.chat-launcher:hover {
  background: #007033;
  transform: translateY(-2px);
}

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

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

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

@keyframes typingPulse {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 860px) {
  .contact-intro-grid,
  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-image-panel {
    position: relative;
    top: auto;
  }

  .contact-image-panel img {
    min-height: 360px;
  }
}

@media (max-width: 580px) {
  .contact-hero,
  .contact-hero-overlay {
    min-height: 62vh;
  }

  .contact-hero-copy {
    padding-bottom: 54px;
  }

  .contact-hero-copy h1 {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .contact-form-panel {
    padding: 22px;
  }

  .contact-chat {
    right: 12px;
    bottom: 12px;
  }

  .chat-window {
    width: calc(100vw - 24px);
    height: min(620px, calc(100vh - 94px));
  }

  .chat-bubble,
  .chat-form-card {
    max-width: calc(100vw - 96px);
  }
}
