:root {
  --ink: #101718;
  --slate: #334447;
  --muted: #647477;
  --mint: #24dfc6;
  --mint-dark: #029378;
  --paper: #f3f7f6;
  --white: #ffffff;
  --line: #dce6e4;
  --danger: #b42318;
  --shadow: 0 24px 60px rgba(16, 23, 24, .16);
}

* { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 45%, rgba(36, 223, 198, .055) 45% 45.3%, transparent 45.3%),
    linear-gradient(118deg, transparent 0 71%, rgba(255, 255, 255, .03) 71% 71.2%, transparent 71.2%);
}

::selection { background: var(--mint); color: var(--ink); }

.shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(460px, .95fr);
}

.brief {
  min-height: 100vh;
  padding: clamp(32px, 5vw, 78px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--white);
}

.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.guru-logo { width: 188px; height: auto; filter: brightness(0) invert(1); }
.demo-label { max-width: 240px; color: #b9c9c6; font-size: .75rem; line-height: 1.45; text-align: right; letter-spacing: .04em; }

.thesis { margin-top: clamp(58px, 11vh, 130px); max-width: 780px; }
.thesis h1 { margin: 0; max-width: 720px; font-size: clamp(2.7rem, 5.3vw, 5.8rem); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.thesis p { margin: 28px 0 0; max-width: 650px; color: #c6d3d1; font-size: clamp(1rem, 1.35vw, 1.22rem); line-height: 1.65; }
.whatsapp-cta { width: fit-content; margin-top: 28px; padding: 14px 18px; display: inline-flex; align-items: center; gap: 14px; border-radius: 12px; background: var(--mint); color: var(--ink); font-size: .82rem; font-weight: 800; text-decoration: none; box-shadow: 0 12px 30px rgba(0, 0, 0, .22); }
.whatsapp-cta:hover { background: #43ecd5; }
.whatsapp-cta svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.vehicle-line { margin: auto -6% 18px 8%; color: var(--mint); opacity: .8; }
.vehicle-line svg { width: 100%; max-height: 230px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.capabilities { display: grid; grid-template-columns: .75fr 1.25fr 1fr; border-top: 1px solid #425153; border-bottom: 1px solid #425153; }
.capabilities div { padding: 20px 20px 20px 0; display: flex; flex-direction: column; gap: 4px; }
.capabilities div + div { padding-left: 24px; border-left: 1px solid #425153; }
.capabilities strong { color: var(--mint); font-size: .94rem; }
.capabilities span { color: #b9c9c6; font-size: .78rem; line-height: 1.4; }

.flow { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: #b9c9c6; font-size: .75rem; }
.flow svg { width: 15px; stroke: var(--mint); fill: none; stroke-width: 2; }
.source-note { max-width: 700px; margin: 22px 0 0; color: #748886; font-size: .65rem; line-height: 1.55; }

.chat-panel {
  height: calc(100vh - 48px);
  min-height: calc(100vh - 48px);
  margin: 24px 24px 24px 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.chat-header { min-height: 86px; padding: 18px 22px; display: flex; align-items: center; gap: 14px; background: var(--white); border-bottom: 1px solid var(--line); }
.agent-mark { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: var(--ink); color: var(--mint); font-weight: 800; font-size: .84rem; letter-spacing: -.02em; }
.chat-header h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.02em; }
.chat-header p { margin: 4px 0 0; color: #536562; font-size: .75rem; }
.online-dot { width: 7px; height: 7px; display: inline-block; margin-right: 4px; border-radius: 50%; background: var(--mint-dark); }
.reset-button { width: 40px; height: 40px; margin-left: auto; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; }
.reset-button:hover { background: var(--paper); color: var(--ink); }
.reset-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.messages { min-height: 0; padding: 26px 22px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #b8c7c4 transparent; }
.message { width: fit-content; max-width: min(84%, 520px); margin-bottom: 12px; padding: 13px 15px; font-size: .9rem; line-height: 1.55; box-shadow: 0 5px 18px rgba(16, 23, 24, .055); }
.message.assistant { border-radius: 5px 15px 15px 15px; background: var(--white); }
.message.user { margin-left: auto; border-radius: 15px 5px 15px 15px; background: var(--slate); color: var(--white); }
.message.error { color: var(--danger); border: 1px solid #f4c7c3; box-shadow: none; }
.typing { display: flex; gap: 5px; padding: 16px 18px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .12s; }
.typing span:nth-child(3) { animation-delay: .24s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

.quick-replies { padding: 4px 22px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.quick-replies button { padding: 9px 13px; border: 1px solid #9bafab; border-radius: 999px; background: transparent; color: var(--slate); font: 700 .73rem/1 "Manrope", sans-serif; cursor: pointer; }
.quick-replies button:hover { border-color: var(--mint-dark); background: #e3f8f3; color: #006c59; }

.composer { margin: 0 14px 8px; padding: 8px 8px 8px 15px; display: flex; align-items: end; gap: 10px; background: var(--white); border: 1px solid #cddad8; border-radius: 15px; box-shadow: 0 8px 26px rgba(16, 23, 24, .07); }
.composer:focus-within { border-color: var(--mint-dark); box-shadow: 0 0 0 3px rgba(2, 147, 120, .12), 0 8px 26px rgba(16, 23, 24, .07); }
.composer textarea { width: 100%; min-height: 42px; max-height: 120px; padding: 10px 0 7px; resize: none; overflow-y: auto; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 .87rem/1.45 "Manrope", sans-serif; caret-color: var(--mint-dark); }
.composer textarea::placeholder { color: #71817f; }
.composer button { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 12px; background: var(--mint); color: var(--ink); cursor: pointer; }
.composer button:hover { background: #3cebd3; }
.composer button:disabled { cursor: wait; opacity: .5; }
.composer button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.handoff-status { margin: 0 14px 8px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; background: #daf7f1; border-radius: 12px; color: #075f50; }
.handoff-status[hidden] { display: none; }
.handoff-status img { width: 26px; height: 26px; }
.handoff-status div { display: flex; flex-direction: column; gap: 2px; }
.handoff-status strong { font-size: .76rem; }
.handoff-status span { font-size: .68rem; line-height: 1.4; }
.privacy { margin: 0 18px 12px; color: #566764; font-size: .68rem; text-align: center; }

button, textarea { transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease; }
button:focus-visible, textarea:focus-visible { outline: 3px solid rgba(36, 223, 198, .5); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .brief { min-height: auto; padding: 26px 22px 34px; }
  .brand-row { align-items: flex-start; }
  .guru-logo { width: 145px; }
  .demo-label { max-width: 170px; font-size: .7rem; }
  .thesis { margin-top: 44px; }
  .thesis h1 { font-size: clamp(2.3rem, 11vw, 4.2rem); }
  .vehicle-line { margin: 30px -8% 8px 4%; }
  .flow, .source-note { display: none; }
  .chat-panel { height: min(82vh, 760px); min-height: 620px; margin: 0; border-radius: 16px 16px 0 0; }
}

@media (max-width: 560px) {
  .thesis p { font-size: .9rem; margin-top: 18px; }
  .whatsapp-cta { margin-top: 20px; }
  .vehicle-line { display: none; }
  .capabilities { margin-top: 34px; grid-template-columns: 1fr 1fr; }
  .capabilities div:last-child { display: none; }
  .capabilities div { padding: 14px 12px 14px 0; }
  .capabilities div + div { padding-left: 16px; }
  .chat-panel { height: 88vh; min-height: 620px; }
  .chat-header { min-height: 76px; padding: 14px 16px; }
  .chat-header p { max-width: 230px; }
  .messages { padding: 20px 14px 10px; }
  .quick-replies { padding-inline: 14px; }
  .message { max-width: 90%; font-size: .86rem; }
}

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