:root {
  color-scheme: light;
  --bg: #fff8f2;
  --panel: #ffffff;
  --text: #2f3033;
  --muted: #6f6963;
  --line: #eadfd6;
  --primary: #f47a22;
  --primary-dark: #b95512;
  --purple-deep: #28154f;
  --purple: #5c2f91;
  --purple-soft: #9577c7;
  --button: #d9cff7;
  --button-text: #3d2f68;
  --button-disabled: #ded8e8;
  --assistant: #fff1e5;
  --user: #ffe4cf;
  --user-text: #4b2b18;
  --surface-warm: #fffaf6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #fffaf6 0%, var(--bg) 55%, #f7f5f2 100%);
  color: var(--text);
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 14px max(28px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 250, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--purple-deep);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border-radius: 6px;
  overflow: hidden;
}

.brand-mark span:first-child {
  grid-row: span 2;
  background: var(--purple);
}

.brand-mark span:nth-child(2) {
  background: var(--primary);
}

.brand-mark span:nth-child(3) {
  background: #f26a2e;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #4f4858;
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--primary-dark);
}

.hero-section {
  min-height: calc(100vh - 72px);
  padding: 72px max(28px, calc((100vw - 1160px) / 2)) 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  align-items: center;
  gap: 56px;
  background: linear-gradient(125deg, #28154f 0%, #4b2678 52%, #7650a5 100%);
  color: #ffffff;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-section .eyebrow {
  color: #ffd5b6;
}

.hero-section h1,
.section-heading h2,
.split-section h2,
.contact-band h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero-section h1 {
  max-width: 760px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
  color: #ffffff;
}

.hero-section p:not(.eyebrow) {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-link,
.secondary-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 800;
}

.primary-link {
  background: #ffffff;
  color: var(--purple-deep);
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.hero-visual {
  display: grid;
  gap: 14px;
}

.signal-card {
  min-height: 116px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 18px 42px rgba(20, 9, 44, 0.18);
}

.signal-card.main {
  min-height: 160px;
  background: rgba(255, 255, 255, 0.2);
}

.signal-card span {
  color: #ffd5b6;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.signal-card strong {
  display: block;
  margin-top: 12px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.25;
}

.content-section,
.split-section,
.contact-band {
  padding: 70px max(28px, calc((100vw - 1160px) / 2));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.split-section h2,
.contact-band h2 {
  color: var(--purple-deep);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
}

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

.service-grid article {
  min-height: 184px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.service-grid h3 {
  margin: 0 0 10px;
  color: var(--purple-deep);
  font-size: 19px;
}

.service-grid p,
.split-section p,
.contact-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  align-items: center;
  gap: 34px;
  background: #ffffff;
  border-block: 1px solid var(--line);
}

.split-section p {
  margin-top: 18px;
  font-size: 17px;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.stack-list span {
  padding: 16px 18px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: var(--surface-warm);
  color: var(--purple-deep);
  font-weight: 700;
}

.products-section {
  background: linear-gradient(180deg, #fffaf6, #ffffff);
}

.product-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-row span {
  border: 1px solid #e5d8f5;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f7f1ff;
  color: var(--purple-deep);
  font-weight: 800;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  background: var(--purple-deep);
  color: #ffffff;
}

.contact-band h2 {
  color: #ffffff;
}

.contact-band p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.contact-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.contact-actions a {
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 62px;
  height: 62px;
  min-width: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #e85a2a 0%, #f47a22 58%, #ff9a4a 100%);
  color: #ffffff;
  box-shadow: 0 18px 35px rgba(232, 90, 42, 0.34);
  cursor: pointer;
}

#chat-launcher[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.chat-launcher-prompt {
  position: fixed;
  right: 96px;
  bottom: 34px;
  z-index: 60;
  max-width: 230px;
  padding: 12px 14px;
  border: 1px solid #f8d8bf;
  border-radius: 8px;
  background: var(--assistant);
  color: var(--text);
  box-shadow: 0 14px 30px rgba(40, 21, 79, 0.16);
  font-size: 14px;
  line-height: 1.35;
}

.chat-launcher-prompt.hidden {
  display: none;
}

.chat-launcher-prompt::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 18px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #f8d8bf;
  border-right: 1px solid #f8d8bf;
  background: var(--assistant);
  transform: rotate(45deg);
}

.chat-icon {
  position: relative;
  width: 30px;
  height: 22px;
  border: 3px solid currentColor;
  border-radius: 8px;
  display: block;
}

.chat-icon::before,
.chat-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor;
}

.chat-icon::before {
  left: 5px;
}

.chat-icon::after {
  left: 6px;
  top: auto;
  bottom: -8px;
  width: 10px;
  height: 10px;
  border-radius: 0 0 0 8px;
  background: transparent;
  box-shadow: -3px -2px 0 -1px currentColor;
  transform: rotate(-18deg);
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 55;
  width: min(440px, calc(100vw - 32px));
  height: min(680px, calc(100vh - 124px));
  display: none;
}

.chat-widget.open {
  display: block;
}

.chat-panel {
  width: 100%;
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(40, 21, 79, 0.22);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(100deg, var(--purple-deep) 0%, var(--purple) 58%, var(--purple-soft) 100%);
  color: #ffffff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-picker {
  display: grid;
  gap: 4px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
}

.model-picker select {
  width: 170px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
}

.chat-panel h1 {
  margin: 0;
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
}

.status {
  white-space: nowrap;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.chat-close {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.messages {
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.message.user {
  align-items: flex-end;
}

.bubble {
  max-width: min(720px, 90%);
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.48;
  font-size: 14px;
  border: 1px solid transparent;
  white-space: pre-wrap;
}

.message-text {
  white-space: pre-wrap;
}

.bullet-line {
  display: inline-block;
  position: relative;
  padding-left: 20px;
}

.bullet-line::before {
  content: "\2022";
  position: absolute;
  left: 4px;
  color: var(--primary-dark);
}

.phone-link {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.assistant .bubble {
  background: var(--assistant);
  border-color: #f8d8bf;
}

.user .bubble {
  background: var(--user);
  color: var(--user-text);
  border-color: #f6c6a2;
}

.typing-bubble {
  width: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px;
}

.typing-bubble span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: blink-dot 1.2s infinite ease-in-out;
}

.typing-bubble span:nth-child(2) {
  animation-delay: 0.18s;
}

.typing-bubble span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes blink-dot {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.sources {
  margin-top: 10px;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
  border: 1px solid rgba(185, 85, 18, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff8f2;
}

.sources-title {
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
}

.sources a {
  color: var(--primary-dark);
}

.source-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-link-icon {
  color: var(--primary-dark);
  width: 14px;
  height: 14px;
  display: inline-flex;
  flex: 0 0 auto;
}

.source-link-icon svg,
.message-tool svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  margin-left: 10px;
}

.message-tool {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 5px;
  background: transparent;
  color: #8b8792;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 400;
  display: inline-grid;
  place-items: center;
}

.message-tool:hover,
.message-tool.active {
  background: #f3edf8;
  border-color: #ded1ee;
  color: #4c2878;
}

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

textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  line-height: 1.4;
  background: #fffdfb;
  color: var(--text);
}

textarea:focus {
  outline: 2px solid rgba(244, 122, 34, 0.18);
  border-color: var(--primary);
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-text);
  font-weight: 800;
  padding: 0 18px;
  min-width: 82px;
  cursor: pointer;
}

button:disabled {
  background: var(--button-disabled);
  cursor: wait;
}

#send-button {
  background: linear-gradient(135deg, #28154f 0%, #5c2f91 58%, #9577c7 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(92, 47, 145, 0.22);
}

#send-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #21103f 0%, #51247f 58%, #8562b8 100%);
}

#send-button:disabled {
  background: linear-gradient(135deg, #d7cdec 0%, #e3dcf4 100%);
  color: #7a6c94;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .hero-section,
  .split-section,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 54px;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-actions {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero-section,
  .content-section,
  .split-section,
  .contact-band {
    padding-left: 18px;
    padding-right: 18px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-section h1 {
    font-size: 36px;
  }

  .chat-widget {
    inset: 0;
    width: 100%;
    height: 100%;
    bottom: auto;
    right: auto;
  }


  .chat-launcher-prompt {

    right: 88px;
    bottom: 30px;
    max-width: calc(100vw - 120px);
  }

  .chat-panel {
    border-radius: 0;
  }

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

  .topbar-controls,
  .model-picker,
  .model-picker select {
    width: 100%;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  button {
    min-height: 44px;
  }
}
