:root {
  --pine: #17483f;
  --leaf: #6e8b3d;
  --rose: #bd6f5a;
  --gold: #d7ad4b;
  --ink: #24302f;
  --paper: #fbfaf6;
  --mist: #eef2ee;
  --line: #d9ddd4;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(24, 37, 34, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

textarea {
  resize: vertical;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
}

.hero {
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 5vw, 72px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(23, 72, 63, 0.92), rgba(23, 72, 63, 0.35)),
    url("https://images.unsplash.com/photo-1517486808906-6ca8b3f04846?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #f1d892;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.55;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--pine);
  background: var(--gold);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.content-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
  gap: 32px;
  padding: clamp(32px, 5vw, 72px);
  background: var(--white);
}

.section-copy h2 {
  margin-bottom: 10px;
  color: var(--pine);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.section-copy p,
.living-grid p {
  line-height: 1.6;
}

.living-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.living-grid article {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
}

.living-grid span {
  color: var(--rose);
  font-weight: 900;
}

.living-grid h3 {
  margin: 24px 0 8px;
  color: var(--pine);
}

.chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--pine);
  box-shadow: var(--shadow);
  font-weight: 900;
}

.chat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 30;
  width: min(420px, calc(100vw - 24px));
  height: min(720px, calc(100vh - 112px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(23, 72, 63, 0.18);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.chat-panel.open {
  display: flex;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  color: var(--white);
  background: var(--pine);
}

.chat-header p {
  margin-bottom: 2px;
  color: #f1d892;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.35rem;
}

.segment-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  background: var(--mist);
}

.segment {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--pine);
  background: var(--white);
  font-weight: 800;
}

.segment.active {
  color: var(--white);
  border-color: var(--pine);
  background: var(--pine);
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fcfcf9;
}

.message {
  width: fit-content;
  max-width: 86%;
  margin-bottom: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.message.bot {
  color: var(--ink);
  background: var(--mist);
}

.message.user {
  margin-left: auto;
  color: var(--white);
  background: var(--leaf);
}

.suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.suggestions button {
  flex: 0 0 auto;
  max-width: 250px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--pine);
  background: var(--white);
  font-weight: 700;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.composer textarea {
  min-width: 0;
  min-height: 78px;
  max-height: 150px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.4;
}

.composer button,
.action-bar button,
.primary-action {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: var(--white);
  background: var(--pine);
  font-weight: 900;
}

.composer button {
  padding: 0 16px;
}

.action-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 8px;
}

.action-bar button:last-child {
  background: var(--rose);
}

.secondary-routes {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 12px 12px;
}

.secondary-routes button {
  border: 0;
  color: rgba(23, 72, 63, 0.74);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.secondary-routes button:hover {
  color: var(--pine);
}

dialog {
  width: min(440px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(18, 30, 27, 0.45);
}

.dialog-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.dialog-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--pine);
}

.dialog-card header h2 {
  margin: 0;
}

.dialog-card .icon-button {
  color: var(--pine);
  background: var(--mist);
}

label {
  display: grid;
  gap: 6px;
  color: var(--pine);
  font-weight: 800;
}

label input,
label select,
label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: var(--ink);
  background: var(--white);
}

@media (max-width: 760px) {
  .hero {
    min-height: 68vh;
    padding: 28px;
  }

  .content-band,
  .living-grid {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    right: 12px;
    bottom: 76px;
    height: calc(100vh - 92px);
  }

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

