:root {
  --cream: #FFF8F0;
  --oak: #D4A574;
  --terracotta: #C4704B;
  --sage: #8B9E7B;
  --teal: #2DD4BF;
  --teal-glow: rgba(45, 212, 191, 0.35);
  --bg: #FFF8F0;
  --card: rgba(255, 248, 240, 0.9);
  --text: #3E2C1C;
  --text-muted: #7A6550;
  --border: rgba(180, 140, 100, 0.25);
  --accent: #C4704B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; font-size: 1.1rem; color: var(--terracotta); }
.location { font-size: 0.85rem; opacity: 0.7; }

main { min-height: 100vh; }

/* Lobby */
.lobby {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: url('/office_background.jpeg') center / cover no-repeat;
  overflow: hidden;
}

.lobby-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,248,240,0.1) 0%, rgba(255,248,240,0.65) 40%, rgba(255,248,240,0.75) 100%);
  z-index: 1;
}

/* Concierge — bigger + blended */
.concierge-layer {
  position: absolute;
  left: 12%;
  bottom: 18%;
  z-index: 3;
  transform: translateX(-50%);
  /* Bottom fade: feet dissolve into lobby floor */
  -webkit-mask-image: linear-gradient(to bottom, black 65%, rgba(0,0,0,0.55) 80%, transparent 92%);
  mask-image: linear-gradient(to bottom, black 65%, rgba(0,0,0,0.55) 80%, transparent 92%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: breathe 4s ease-in-out infinite;
}

.concierge {
  width: 460px;
  height: auto;
  filter: drop-shadow(0 16px 48px rgba(0,0,0,0.30)) drop-shadow(0 0 20px rgba(0,0,0,0.08));
  border-radius: 0 0 10px 10px;
}

/* Floor shadow under feet */
.concierge-layer::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 18px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.18) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
}

/* Cat — 8-frame sprite walk cycle (extracted from kitten-strip.png, transparent) */
.cat-layer {
  position: absolute;
  bottom: 15%;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100px;
  pointer-events: none;
}

.kitten-wrap {
  position: absolute;
  left: -140px;
  bottom: 0;
  animation: walk 14s linear infinite;
  will-change: transform;
}

.kitten {
  --fw: 110px;
  display: block;
  width: var(--fw);
  height: 89px;
  background: url('/kitten-strip.png') 0 0 / calc(8 * var(--fw)) 100% repeat-x;
  animation: frame 0.7s steps(8) infinite;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25));
}

@keyframes frame {
  from { background-position: 0 0; }
  to { background-position: calc(-8 * var(--fw)) 0; }
}

@keyframes walk {
  0% { transform: translateX(-100px); }
  100% { transform: translateX(calc(100vw + 100px)); }
}

@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

@keyframes breathe {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 0 60px rgba(45,212,191,0.35); }
  50% { box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 0 85px rgba(45,212,191,0.55); }
}
@keyframes floatText {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Hero text */
.hero-text {
  position: absolute;
  top: 105px; /* 0063 rev: 5-option menu grew 50px (bottom-anchored, upward) — 105 gives +35px gap */
  right: 5%;
  z-index: 4;
  max-width: 420px;
  text-align: right;
  animation: floatText 6s ease-in-out infinite;
}

.hero-text h1 {
  font-size: 2.4rem;
  color: var(--text);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(255,255,255,0.6);
}

.hero-text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-under {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
a.pill { text-decoration: none; display: inline-block; }

/* chat-error fallback link (0060) */
.msg.bot a { color: var(--terracotta); }

/* Intake form (0060) — reuses .pill / accent palette */
.intake-page { max-width: 640px; margin: 5.5rem auto 3rem; padding: 0 1.25rem; }
.intake-page .sub { color: var(--text-muted); margin-bottom: 1.5rem; }
.intake-page form { display: flex; flex-direction: column; gap: 0.75rem; }
.intake-page label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.intake-page .opt { font-weight: 400; color: var(--text-muted); }
.intake-page input,
.intake-page select,
.intake-page textarea {
  font: inherit;
  font-weight: 400;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 0.65rem;
}
.intake-page textarea { min-height: 120px; resize: vertical; }
.intake-page button[type="submit"] {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 600;
}
.intake-page .status { min-height: 1.4em; font-size: 0.95rem; margin: 0; }
.intake-page .status.err { color: var(--terracotta); }
.intake-page .alt { margin-top: 1.25rem; font-size: 0.9rem; }

/* Chat panel — 50% wider (340→510) */
.chat-panel {
  position: absolute;
  right: 2.5%;
  bottom: 5%;
  width: 510px;
  max-width: calc(100vw - 4%);
  background: rgba(255, 248, 240, 0.82);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-top: 1px solid var(--sage);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 0 80px rgba(45,212,191,0.45);
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: glowPulse 3.5s ease-in-out infinite;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--terracotta);
  background: rgba(255,248,240,0.95);
}

.chat-head button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
}

.chat-body {
  height: 280px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.msg {
  max-width: 85%;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.user {
  align-self: flex-end;
  background: var(--terracotta);
  color: #fff;
}

.msg.bot {
  align-self: flex-start;
  background: var(--border);
}

.msg.typing { opacity: 0.6; font-style: italic; }

/* FAQ pills */
.faq-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
  background: rgba(255,248,240,0.7);
}

.pill {
  background: var(--cream);
  border: 1px solid var(--oak);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  transition: all 0.2s;
}

.pill:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

/* "I have a project" CTA pill (0055) */
.pill-cta {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 600;
}
.pill-cta:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

/* Input */
.chat-input {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem;
  border-top: 1px solid var(--border);
  background: rgba(255,248,240,0.95);
}

.chat-input input {
  flex: 1;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
}

.chat-input button {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
}

/* Order panel */
.order-panel {
  background: var(--border);
  border: 1px solid var(--teal);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.order-panel p { margin: 0.2rem 0; }
.order-panel .btn {
  margin-top: 0.5rem;
  width: 100%;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

/* 0061: option menu — chatbox footprint, chat hidden until last option */
/* 0062: raised from chat-panel's bottom:5% for vertical centering after hero pills removed */
.option-menu { gap: 0.5rem; padding: 1rem; bottom: 22%; }
.option-menu .pill {
  display: block;
  width: 100%;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  text-align: center;
}
[hidden] { display: none !important; } /* author display:flex beats UA [hidden] otherwise */

/* 0061: static content pages — global * reset strips UA heading/list spacing */
.content-page h1 { margin-bottom: 0.5rem; }
.content-page h2 { margin: 1.5rem 0 0.5rem; font-size: 1.15rem; color: var(--terracotta); }
.content-page p { margin-bottom: 0.75rem; }
.content-page ul, .content-page ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.content-page li { margin-bottom: 0.35rem; }

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  opacity: 0.7;
  font-size: 0.85rem;
  background: var(--cream);
}

/* Responsive */
/* 0070: short viewports — bottom-anchored menu (22%) rises into top-anchored hero
   below ~855px height. 12% clears hero at 800/768px; 1440x900 (22%) untouched. */
@media (max-height: 860px) {
  .option-menu { bottom: 12%; }
}

@media (max-width: 768px) {
  .concierge { width: 280px; }
  .concierge-layer {
    left: 50%;
    bottom: 20%;
    transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.50) 78%, transparent 90%);
    mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.50) 78%, transparent 90%);
  }
  .concierge-layer::after { bottom: -12px; height: 12px; width: 50%; }
  .hero-text { top: 15%; right: 5%; left: 5%; text-align: center; max-width: 100%; }
  .hero-text h1 { font-size: 1.6rem; }
  .chat-panel {
    right: 2%;
    bottom: 2%;
    width: calc(100vw - 4%);
    max-height: 70vh;
  }
  .kitten { --fw: 80px; height: 65px; }
  .lobby { min-height: 100vh; background-size: cover; }
}
