@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Plus+Jakarta+Sans:wght@300;400;500&display=swap');

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

:root {
  /* Dark warm palette — like a lamp in a quiet corner after a long shift */
  --bg:          #0D0B09;
  --bg-2:        #141009;
  --bg-3:        #1C1610;
  --bg-4:        #252015;
  --bg-5:        #2E2818;

  /* Text */
  --cream:       #F2E8D6;
  --cream-2:     #C8AA88;
  --cream-3:     #886850;
  --cream-4:     #504030;

  /* Accents */
  --amber:       #C89050;
  --amber-lt:    #E8B870;
  --amber-dim:   rgba(200,144,80,0.14);
  --amber-glow:  rgba(200,144,80,0.08);
  --teal:        #5A9E88;
  --teal-dim:    rgba(90,158,136,0.12);
  --rose:        #C07868;

  /* Borders */
  --border:      rgba(200,144,80,0.11);
  --border-2:    rgba(200,144,80,0.20);
  --border-3:    rgba(200,144,80,0.32);

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--cream);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Typography ── */
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.2; color: var(--cream); }
h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; color: var(--cream); }
h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; color: var(--cream); }
p  { color: var(--cream-2); }
em { font-style: italic; color: var(--amber-lt); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; border: none; border-radius: var(--r-xl);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: transform .12s, opacity .15s;
  text-decoration: none; white-space: nowrap; letter-spacing: .2px;
}
.btn:hover   { opacity: .85; transform: translateY(-1px); }
.btn:active  { transform: scale(.97); opacity: 1; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-amber   { background: var(--amber); color: #0D0B09; font-weight: 500; }
.btn-outline { background: transparent; color: var(--amber); border: 1px solid var(--border-2); }
.btn-ghost   { background: var(--bg-4); color: var(--cream-2); border: 0.5px solid var(--border); }
.btn-teal    { background: var(--teal); color: #0D0B09; }
.btn-sm      { padding: 8px 18px; font-size: 13px; border-radius: 20px; }
.btn-full    { width: 100%; }

/* ── Nav ── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 62px;
  background: rgba(13,11,9,.92); backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; }
.nav-logo-text { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--cream); letter-spacing: .5px; }
.nav-links { display: flex; gap: 1.75rem; align-items: center; }
.nav-link { background: none; border: none; font-family: var(--font-body); font-size: 13.5px; color: var(--cream-3); cursor: pointer; padding: 4px 0; text-decoration: none; transition: color .15s; }
.nav-link:hover { color: var(--amber); }

/* ── Avatar ── */
.rae-wrap { border-radius: 50%; overflow: hidden; background: var(--bg-4); flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 0.5px solid var(--border); }

/* ── Sections ── */
.section { padding: 5rem 2rem; }
.container { max-width: 960px; margin: 0 auto; }
.text-center { text-align: center; }
.eyebrow { font-size: 11px; letter-spacing: 3px; color: var(--amber); text-transform: uppercase; margin-bottom: 1rem; font-weight: 400; }

/* ── Hero ── */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; padding: 5rem 2rem 4rem; max-width: 960px; margin: 0 auto; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2rem; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 0.5px solid var(--border); }
.stat-num { font-family: var(--font-display); font-size: 26px; color: var(--cream); }
.stat-lbl { font-size: 11px; color: var(--cream-3); letter-spacing: .5px; margin-top: 2px; }

.hero-visual { display: flex; justify-content: center; align-items: center; position: relative; min-height: 300px; }
.hero-ring { position: absolute; border-radius: 50%; border: 0.5px solid var(--border); }
.hero-badge {
  position: absolute; background: var(--bg-4); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 8px 14px; font-size: 12px; color: var(--cream-2);
  white-space: nowrap;
}

/* ── Pain points (truth section) ── */
.pain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.pain-card {
  background: var(--bg-3); border: 0.5px solid var(--border);
  border-radius: var(--r-md); padding: 1.4rem;
  border-left: 2px solid var(--amber);
}
.pain-quote { font-family: var(--font-display); font-style: italic; font-size: 16px; color: var(--cream); line-height: 1.7; }
.pain-tag { font-size: 11px; color: var(--amber); margin-top: .75rem; letter-spacing: .5px; }

/* ── Features ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature-card { background: var(--bg-3); border: 0.5px solid var(--border); border-radius: var(--r-md); padding: 1.4rem; }
.feature-icon { font-size: 24px; margin-bottom: .75rem; }
.feature-title { font-family: var(--font-display); font-size: 18px; color: var(--cream); margin-bottom: .4rem; }

/* ── Specialties ── */
.specialty-tags { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.5rem; }
.spec-tag {
  background: var(--bg-3); border: 0.5px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  font-size: 12.5px; color: var(--cream-2); font-weight: 400;
}

/* ── Testimonials ── */
.test-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.test-card { background: var(--bg-3); border: 0.5px solid var(--border); border-radius: var(--r-md); padding: 1.4rem; }
.test-quote { font-family: var(--font-display); font-style: italic; font-size: 15.5px; color: var(--cream); line-height: 1.8; margin-bottom: 1rem; }
.test-name { font-size: 13px; font-weight: 500; color: var(--cream-2); }
.test-unit { font-size: 11.5px; color: var(--cream-3); }

/* ── Pricing ── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: start; }
.pricing-card { background: var(--bg-3); border: 0.5px solid var(--border); border-radius: var(--r-lg); padding: 2rem; position: relative; }
.pricing-card.featured { background: var(--bg-4); border-color: var(--amber); transform: translateY(-8px); }
.pricing-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--amber); color: var(--bg); font-size: 10px; font-weight: 500; padding: 4px 14px; border-radius: 8px; letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap; }
.pricing-tier { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--cream-3); margin-bottom: .25rem; }
.pricing-price { font-family: var(--font-display); font-size: 44px; color: var(--cream); line-height: 1; }
.pricing-dur { display: inline-block; font-size: 11.5px; color: var(--amber); background: var(--amber-dim); padding: 3px 10px; border-radius: 6px; margin: .75rem 0; font-weight: 500; }
.pricing-features { list-style: none; margin: 1.25rem 0 1.5rem; }
.pricing-features li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 9px; font-size: 13px; color: var(--cream-2); }
.pricing-features li::before { content: '✓'; color: var(--amber); flex-shrink: 0; margin-top: 1px; }

/* ── CTA Banner ── */
.cta-banner { background: var(--bg-3); border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); padding: 5rem 2rem; text-align: center; }

/* ── Booking modal overlay ── */
.booking-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.booking-modal {
  background: var(--bg-3); border: 0.5px solid var(--border-2);
  border-radius: var(--r-lg); padding: 2rem; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
}
.booking-modal h2 { font-size: 1.6rem; margin-bottom: .25rem; }
.booking-modal p  { font-size: 13.5px; margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 12px; color: var(--cream-3); letter-spacing: 1px; text-transform: uppercase; margin-bottom: .4rem; margin-top: 1rem; }
.form-select, .form-input {
  width: 100%; background: var(--bg-4); border: 0.5px solid var(--border-2);
  border-radius: var(--r-sm); padding: 11px 14px; color: var(--cream);
  font-family: var(--font-body); font-size: 14px; font-weight: 300;
  appearance: none;
}
.form-select:focus, .form-input:focus { outline: none; border-color: var(--amber); }
.form-select option { background: var(--bg-4); }
.anon-row { display: flex; align-items: center; gap: 10px; margin-top: 1.25rem; padding: 10px 14px; background: var(--bg-4); border-radius: var(--r-sm); border: 0.5px solid var(--border); cursor: pointer; }
.anon-row input[type=checkbox] { accent-color: var(--amber); width: 16px; height: 16px; flex-shrink: 0; }
.anon-label { font-size: 13px; color: var(--cream-2); }
.plan-row { display: flex; gap: 1rem; margin-top: .5rem; }
.plan-opt { flex: 1; border: 0.5px solid var(--border-2); border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer; transition: border-color .15s, background .15s; text-align: center; }
.plan-opt.selected { border-color: var(--amber); background: var(--amber-dim); }
.plan-opt-name { font-size: 13px; color: var(--cream); font-weight: 500; }
.plan-opt-price { font-family: var(--font-display); font-size: 20px; color: var(--amber); margin: 3px 0; }
.plan-opt-dur { font-size: 11px; color: var(--cream-3); }
.stripe-note { font-size: 11.5px; color: var(--cream-3); text-align: center; margin-top: 1rem; }
.loading-state { text-align: center; padding: 1rem; font-size: 14px; color: var(--cream-2); }

/* ── CHAT PAGE ── */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - 62px); max-width: 720px; margin: 0 auto; padding: 0 1.25rem; }
.chat-header { display: flex; align-items: center; gap: 14px; padding: 1rem 0; border-bottom: 0.5px solid var(--border); }
.chat-header-info h3 { font-family: var(--font-display); font-size: 19px; color: var(--cream); }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); display: inline-block; }
.online-label { font-size: 12px; color: var(--cream-3); }
.session-timer { font-size: 12px; color: var(--cream-3); background: var(--bg-3); padding: 5px 13px; border-radius: 16px; border: 0.5px solid var(--border); }
.messages-area { flex: 1; overflow-y: auto; padding: 1.25rem 0; display: flex; flex-direction: column; gap: 1rem; }
.messages-area::-webkit-scrollbar { width: 3px; }
.messages-area::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
.message-row { display: flex; gap: 8px; align-items: flex-end; }
.message-row.user { justify-content: flex-end; }
.bubble { max-width: 72%; padding: 11px 15px; font-size: 14.5px; line-height: 1.68; font-weight: 300; animation: fadeIn .2s ease; }
.message-row.user .bubble { background: var(--amber-dim); color: var(--cream); border: 0.5px solid var(--border-2); border-radius: 18px 18px 4px 18px; }
.message-row.assistant .bubble { background: var(--bg-3); color: var(--cream); border: 0.5px solid var(--border); border-radius: 4px 18px 18px 18px; }
.typing-bubble { display: flex; gap: 4px; align-items: center; padding: 12px 16px; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: bounce 1.1s ease infinite; }
.typing-dot:nth-child(2) { animation-delay: .18s; }
.typing-dot:nth-child(3) { animation-delay: .36s; }
.chat-input-area { padding: 1rem 0 1.5rem; border-top: 0.5px solid var(--border); display: flex; gap: 10px; align-items: flex-end; }
.chat-textarea { flex: 1; border: 0.5px solid var(--border-2); border-radius: 14px; padding: 12px 15px; resize: none; background: var(--bg-3); font-family: var(--font-body); font-size: 14px; color: var(--cream); line-height: 1.6; font-weight: 300; min-height: 48px; max-height: 140px; }
.chat-textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }
.chat-textarea::placeholder { color: var(--cream-3); }
.send-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--amber); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; color: var(--bg); transition: background .15s, transform .12s; }
.send-btn:hover:not(:disabled) { background: var(--amber-lt); transform: scale(1.06); }
.send-btn:disabled { background: var(--bg-5); color: var(--cream-4); cursor: not-allowed; }

/* ── Success / loading page ── */
.success-page { min-height: calc(100vh - 62px); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.success-card { background: var(--bg-3); border: 0.5px solid var(--border); border-radius: var(--r-lg); padding: 2.5rem; max-width: 420px; width: 100%; text-align: center; }
.success-icon { font-size: 48px; margin-bottom: 1rem; }

/* ── ADMIN ── */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar { width: 300px; background: var(--bg-2); border-right: 0.5px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.admin-sidebar-top { padding: 1.25rem; border-bottom: 0.5px solid var(--border); }
.admin-sidebar-top h2 { font-family: var(--font-display); font-size: 20px; color: var(--cream); }
.admin-stat-row { display: flex; gap: 1.25rem; margin-top: 1rem; }
.admin-stat-num { font-family: var(--font-display); font-size: 22px; color: var(--cream); }
.admin-stat-lbl { font-size: 10px; color: var(--cream-3); letter-spacing: .5px; }
.session-list { flex: 1; overflow-y: auto; }
.session-item { padding: .9rem 1.25rem; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background .12s; }
.session-item:hover { background: var(--bg-3); }
.session-item.active { background: var(--amber-dim); border-left: 2px solid var(--amber); }
.session-item-id { font-size: 10.5px; color: var(--cream-3); font-family: monospace; margin-bottom: 3px; }
.session-item-preview { font-size: 12.5px; color: var(--cream-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-meta-tags { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.s-tag { font-size: 10px; padding: 2px 8px; border-radius: 6px; font-weight: 400; }
.tag-paid   { background: rgba(90,158,136,.2); color: var(--teal); }
.tag-live   { background: rgba(200,144,80,.2); color: var(--amber); animation: pulse 1.5s ease infinite; }
.tag-ai     { background: rgba(100,100,200,.15); color: #8888CC; }
.tag-ended  { background: rgba(80,60,40,.4); color: var(--cream-3); }
.tag-new    { background: rgba(200,144,80,.25); color: var(--amber); animation: pulse 2s ease infinite; }
.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-main-header { padding: 1rem 1.5rem; background: var(--bg-2); border-bottom: 0.5px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.admin-session-id { font-size: 10.5px; color: var(--cream-3); font-family: monospace; }
.admin-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-chat { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .8rem; }
.admin-chat::-webkit-scrollbar { width: 3px; }
.admin-chat::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
.admin-msg { display: flex; flex-direction: column; max-width: 76%; }
.admin-msg.user { align-self: flex-end; }
.admin-msg.assistant { align-self: flex-start; }
.admin-bubble { padding: 9px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.65; font-weight: 300; }
.admin-msg.user .admin-bubble { background: var(--amber-dim); color: var(--cream); border: 0.5px solid var(--border-2); border-radius: 10px 10px 4px 10px; }
.admin-msg.assistant .admin-bubble { background: var(--bg-3); color: var(--cream); border: 0.5px solid var(--border); border-radius: 4px 10px 10px 10px; }
.admin-msg-meta { font-size: 10px; color: var(--cream-3); margin-top: 3px; }
.admin-msg.user .admin-msg-meta { text-align: right; }
.admin-input-row { padding: 1rem 1.5rem; background: var(--bg-2); border-top: 0.5px solid var(--border); display: flex; flex-direction: column; gap: .6rem; }
.admin-notes { width: 100%; background: var(--bg-3); border: 0.5px solid var(--border); border-radius: var(--r-sm); padding: 9px 12px; color: var(--cream-2); font-family: var(--font-body); font-size: 12px; resize: none; }
.admin-notes:focus { outline: none; border-color: var(--amber); }
.admin-notes::placeholder { color: var(--cream-4); }
.admin-type-row { display: flex; gap: 8px; }
.admin-textarea { flex: 1; background: var(--bg-3); border: 0.5px solid var(--border-2); border-radius: var(--r-sm); padding: 10px 13px; color: var(--cream); font-family: var(--font-body); font-size: 13.5px; resize: none; font-weight: 300; }
.admin-textarea:focus { outline: none; border-color: var(--amber); }
.admin-textarea::placeholder { color: var(--cream-4); }
.admin-send-btn { background: var(--amber); border: none; border-radius: var(--r-sm); padding: 10px 18px; color: var(--bg); font-family: var(--font-body); font-size: 13px; font-weight: 500; cursor: pointer; }
.admin-send-btn:hover { background: var(--amber-lt); }
.takeover-btn { padding: 8px 16px; border-radius: var(--r-sm); border: none; cursor: pointer; font-family: var(--font-body); font-size: 13px; font-weight: 500; transition: all .15s; }
.takeover-btn.off { background: var(--bg-4); color: var(--amber); border: 0.5px solid var(--border-2); }
.takeover-btn.on  { background: var(--amber); color: var(--bg); animation: pulse 2s ease infinite; }
.mode-pill { font-size: 11px; padding: 3px 10px; border-radius: 6px; }
.mode-ai   { background: rgba(100,100,200,.15); color: #8888CC; }
.mode-live { background: rgba(200,144,80,.2); color: var(--amber); }
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--cream-3); font-size: 13px; line-height: 2; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.auth-card { background: var(--bg-3); border: 0.5px solid var(--border); border-radius: var(--r-lg); padding: 2.5rem; width: 340px; text-align: center; }
.auth-card h1 { font-size: 2rem; margin-bottom: .4rem; }
.auth-input { width: 100%; background: var(--bg-4); border: 0.5px solid var(--border-2); border-radius: var(--r-sm); padding: 12px 15px; color: var(--cream); font-family: var(--font-body); font-size: 14px; margin: 1rem 0; }
.auth-input:focus { outline: none; border-color: var(--amber); }
.auth-error { color: var(--rose); font-size: 13px; margin-top: .5rem; }
.toast { position: fixed; top: 16px; right: 16px; z-index: 999; background: var(--bg-4); border: 0.5px solid var(--border-2); border-radius: 10px; padding: 11px 18px; font-size: 13px; color: var(--cream-2); animation: fadeIn .2s ease; max-width: 280px; line-height: 1.5; }

/* ── Footer ── */
.footer { background: var(--bg-2); border-top: 0.5px solid var(--border); padding: 2rem; text-align: center; }
.footer p { font-size: 12px; color: var(--cream-3); line-height: 1.9; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }

/* ── Utils ── */
.hidden { display: none !important; }
.divider { height: 0.5px; background: var(--border); margin: 2rem 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 1.25rem; }
  .hero-visual { display: none; }
  .pain-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .test-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .plan-row { flex-direction: column; }
  .admin-sidebar { width: 260px; }
  .nav-links .nav-link:not(.btn) { display: none; }
}
@media (max-width: 520px) {
  .features-grid { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; max-height: 220px; }
}
