/* ==========================================
   FLOWZY v2 — Design System
   Ironhill-inspired, Copper accent
   ========================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --dark: #1A2214;
  --dark-mid: #243020;
  --eucalyptus: #2D3B2D;
  --cream: #F1EFE3;
  --cream-warm: #F4EDDD;
  --accent: #B87333;
  --accent-dark: #9A5F2A;
  --accent-light: #D4955A;
  --muted: #8B9A7E;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', 'Inter', Helvetica, Arial, sans-serif;

  --h1-size: clamp(2.5rem, 7vw, 5.5rem);
  --h2-size: clamp(2.25rem, 5vw, 4.5rem);
  --h3-size: clamp(1.25rem, 2vw, 1.75rem);
  --body-size: 1.0625rem;
  --label-size: 0.75rem;

  --section-pad: clamp(80px, 12vh, 160px);
  --container-max: 1200px;
  --transition-speed: 80px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--body-size);
  line-height: 1.7;
  color: var(--eucalyptus);
  background: var(--dark);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  position: relative;
  z-index: 2;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

/* ---------- Overline Label ---------- */
.overline {
  font-family: var(--font-sans);
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.overline--cream { color: var(--cream); }
.overline--dark { color: var(--eucalyptus); }

/* ---------- Section Headings ---------- */
.section-heading {
  font-family: var(--font-serif);
  font-size: var(--h2-size);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 3rem;
  text-align: center;
}
.section-heading--accent { color: var(--accent); }
.section-heading--cream { color: var(--cream); }
.section-heading--dark { color: var(--eucalyptus); }

/* ---------- Accent Glow ---------- */
.accent-glow {
  color: var(--accent);
  font-size: 1.2em;
  text-shadow: 0 0 30px rgba(184, 115, 51, 0.3);
}

/* ==========================================
   WINDING PATH SVG
   ========================================== */
.winding-path-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.winding-path-svg {
  position: absolute;
  top: 0;
  left: 40px;
  width: 120px;
  height: 100%;
  opacity: 0.8;
}

.winding-path {
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

/* ==========================================
   NAVIGATION
   ========================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(20px, 4vw, 40px);
  transition: background 0.4s ease, padding 0.3s ease;
}

.nav--scrolled {
  background: rgba(20, 26, 15, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem clamp(20px, 4vw, 40px);
}

.nav__logo-img {
  height: 60px;
  width: auto;
  transition: height 0.3s ease;
}
.nav--scrolled .nav__logo-img {
  height: 45px;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}
.nav__hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--cream);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__menu {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav__link {
  font-family: var(--font-sans);
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--cream);
  transition: color 0.3s ease;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav__link:hover::after { width: 100%; }
.nav__link:hover { color: var(--accent); }

.nav__cta {
  font-family: var(--font-sans);
  font-size: var(--label-size);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--dark);
  background: var(--accent);
  padding: 0.6rem 1.25rem;
  border-radius: 3px;
  transition: background 0.3s ease, transform 0.2s ease;
}
.nav__cta:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--dark);
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Subtle pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(184, 115, 51, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(184, 115, 51, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(45, 59, 45, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: var(--h1-size);
  font-weight: 900;
  line-height: 1.05;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--cream);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto;
  opacity: 0.85;
}


/* ==========================================
   SECTIONS (base)
   ========================================== */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section--dark {
  background: var(--dark);
  color: var(--cream);
}

.section--cream {
  background: var(--cream);
  color: var(--eucalyptus);
}

.section--cream-warm {
  background: var(--cream-warm);
  color: var(--eucalyptus);
}


/* ==========================================
   PROBLEM STATEMENT
   ========================================== */
.problem-lines {
  text-align: center;
  margin-bottom: 3rem;
}

.problem-line {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--eucalyptus);
  margin-bottom: 0.5rem;
}

.problem-body {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: var(--eucalyptus);
  opacity: 0.8;
}

/* ---------- Copper Section Divider ---------- */
.section-divider {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border: none;
  margin: 0 auto;
  opacity: 0.5;
  /* Remove any default hr spacing — sits between same-bg sections */
  padding: 0;
  display: block;
}

/* ==========================================
   SOLUTION / SCROLL-REVEAL TEXT
   ========================================== */
.solution-text,
.industries-text {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto 4rem;
  color: var(--eucalyptus);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Word spans created by JS */
.word-span {
  display: inline-block;
  opacity: 0.12;
  transition: opacity 0.5s ease;
  margin-right: 0.3em;
}
.word-span.revealed {
  opacity: 1;
}

/* ==========================================
   SOLUTION LAYOUT (2-column: text left, cards right)
   ========================================== */
.solution-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.solution-layout .solution-text {
  text-align: left;
  margin: 0;
}

.solution-line {
  display: block;
  margin-bottom: 0.15em;
}

.solution-line:nth-child(1) { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
.solution-line:nth-child(2) { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
.solution-line:nth-child(3) { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.solution-line:nth-child(4) { font-size: clamp(1.25rem, 2.5vw, 1.85rem); }
.solution-line:nth-child(5) { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }

.solution-line.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ==========================================
   FEATURE CARDS
   ========================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: transparent;
  border: 1px solid rgba(45, 59, 45, 0.15);
  border-radius: 4px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.25rem;
  color: var(--accent);
}

.feature-card__icon svg {
  width: 100%;
  height: 100%;
}

.feature-card__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--eucalyptus);
  margin-bottom: 0.5rem;
}

.feature-card__desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================
   TIMELINE (How It Works)
   ========================================== */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 32px;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-dark), transparent);
}

.timeline__step {
  display: flex;
  gap: 2rem;
  padding: 2rem 0;
  position: relative;
}

.timeline__number {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
  min-width: 64px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.timeline__number::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(184, 115, 51, 0.4);
}

.timeline__title {
  font-family: var(--font-serif);
  font-size: var(--h3-size);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.timeline__desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ==========================================
   DEMO CARDS
   ========================================== */
.demos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.demo-card {
  background: var(--cream-warm);
  border: 1px solid rgba(45, 59, 45, 0.12);
  border-radius: 6px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.demo-card__btn {
  margin-top: auto;
}

.demo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
  pointer-events: none;
}

.demo-card:hover::before {
  border-color: var(--accent);
}

.demo-card__btn {
  position: relative;
  z-index: 2;
}

.demo-card:hover {
  box-shadow: 0 20px 60px rgba(45, 59, 45, 0.15);
}

.demo-card__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  color: var(--eucalyptus);
}

.demo-card__icon svg {
  width: 100%;
  height: 100%;
}

.demo-card__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--eucalyptus);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.demo-card__subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.demo-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}

.demo-card__features li {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--eucalyptus);
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  line-height: 1.4;
}

.demo-card__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.demo-card__btn {
  font-family: var(--font-sans);
  font-size: var(--label-size);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--eucalyptus);
  padding: 0.75rem 1.5rem;
  border-radius: 3px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.demo-card__btn:hover {
  background: var(--accent);
  transform: scale(1.02);
}

/* ==========================================
   DEMO MODAL OVERLAY
   ========================================== */
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.demo-modal.active {
  display: flex;
}

.demo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 34, 20, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.demo-modal__container {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 480px;
  height: 80vh;
  max-height: 680px;
  background: #1E2A18;
  border: 1.5px solid rgba(184, 115, 51, 0.25);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(184, 115, 51, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

.demo-modal__header {
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid rgba(184, 115, 51, 0.12);
  position: relative;
  background: linear-gradient(180deg, rgba(184, 115, 51, 0.06) 0%, transparent 100%);
}

.demo-modal__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.demo-modal__subtitle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.demo-modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--muted);
  background: rgba(241, 239, 227, 0.06);
  border: 1px solid rgba(241, 239, 227, 0.1);
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
  cursor: pointer;
}

.demo-modal__close:hover {
  color: var(--cream);
  background: rgba(184, 115, 51, 0.15);
  border-color: rgba(184, 115, 51, 0.3);
}

.demo-modal__chat {
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---- n8n Chat Widget Overrides (inside modal) ---- */

/* Ensure all n8n elements use border-box */
.demo-modal__chat *,
.demo-modal__chat *::before,
.demo-modal__chat *::after {
  box-sizing: border-box !important;
}

/* Hide the n8n built-in header (we have our own) */
.demo-modal__chat .chat-header {
  display: none !important;
}

/* Overall chat layout — flex column like WhatsApp */
.demo-modal__chat .chat-layout,
.demo-modal__chat .chat-wrapper,
.demo-modal__chat .n8n-chat {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  background: #1E2A18 !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: var(--font-sans) !important;
  overflow: hidden !important;
}

/* Messages area — fills all space, scrolls */
.demo-modal__chat .chat-body {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  background: #1E2A18 !important;
  padding: 1.25rem !important;
}

.demo-modal__chat .chat-messages-list {
  background: #1E2A18 !important;
}

/* Input footer — pinned at bottom, never grows */
.demo-modal__chat .chat-footer {
  flex: 0 0 auto !important;
  background: #1A2214 !important;
  border-top: 1px solid rgba(184, 115, 51, 0.12) !important;
  padding: 1rem 1.5rem 1.25rem !important;
  border-radius: 0 0 14.5px 14.5px !important;
  box-sizing: border-box !important;
}

/* Bot messages */
.demo-modal__chat .chat-message-from-bot,
.demo-modal__chat .chat-message.from-bot {
  color: var(--cream) !important;
}

.demo-modal__chat .chat-message-from-bot .chat-message-markdown,
.demo-modal__chat .chat-message-from-bot .chat-message-body,
.demo-modal__chat .chat-message.from-bot .chat-message-body {
  background: #243020 !important;
  color: var(--cream) !important;
  border-radius: 2px 12px 12px 12px !important;
  padding: 0.875rem 1.125rem !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  border: 1px solid rgba(184, 115, 51, 0.08) !important;
}

.demo-modal__chat .chat-message-from-bot .chat-message-markdown p,
.demo-modal__chat .chat-message-from-bot p {
  color: var(--cream) !important;
}

/* User messages */
.demo-modal__chat .chat-message-from-user,
.demo-modal__chat .chat-message.from-user {
  color: #1A2214 !important;
}

.demo-modal__chat .chat-message-from-user .chat-message-markdown,
.demo-modal__chat .chat-message-from-user .chat-message-body,
.demo-modal__chat .chat-message.from-user .chat-message-body {
  background: var(--accent) !important;
  color: #1A2214 !important;
  border-radius: 12px 12px 2px 12px !important;
  padding: 0.875rem 1.125rem !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
}

.demo-modal__chat .chat-message-from-user .chat-message-markdown p,
.demo-modal__chat .chat-message-from-user p {
  color: #1A2214 !important;
}

/* Input area */
.demo-modal__chat .chat-input {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.demo-modal__chat .chat-inputs {
  display: flex !important;
  align-items: flex-end !important;
  width: 100% !important;
  background: #243020 !important;
  border: 1px solid rgba(184, 115, 51, 0.15) !important;
  border-radius: 12px !important;
  padding: 4px 4px 4px 0 !important;
  gap: 0 !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.demo-modal__chat .chat-inputs:focus-within {
  border-color: rgba(184, 115, 51, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.08) !important;
}

.demo-modal__chat .chat-input textarea,
.demo-modal__chat .chat-input input[type="text"],
.demo-modal__chat .chat-input input {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  background: transparent !important;
  color: var(--cream) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.625rem 1rem !important;
  font-family: var(--font-sans) !important;
  font-size: 0.875rem !important;
  resize: none !important;
  outline: none !important;
}

.demo-modal__chat .chat-input textarea:focus,
.demo-modal__chat .chat-input input:focus {
  border: none !important;
  box-shadow: none !important;
}

.demo-modal__chat .chat-input textarea::placeholder,
.demo-modal__chat .chat-input input::placeholder {
  color: var(--muted) !important;
  opacity: 0.6 !important;
}

/* Send button */
.demo-modal__chat .chat-input-send-button,
.demo-modal__chat .chat-input button {
  flex: 0 0 auto !important;
  background: var(--accent) !important;
  color: #1A2214 !important;
  border: none !important;
  border-radius: 10px !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  margin: 0 2px 0 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.demo-modal__chat .chat-input-send-button:hover,
.demo-modal__chat .chat-input button:hover {
  background: var(--accent-dark) !important;
  transform: scale(1.05) !important;
}

.demo-modal__chat .chat-input-send-button svg {
  width: 18px !important;
  height: 18px !important;
}

/* Scrollbar inside chat */
.demo-modal__chat .chat-messages-list::-webkit-scrollbar,
.demo-modal__chat .chat-body::-webkit-scrollbar {
  width: 4px;
}

.demo-modal__chat .chat-messages-list::-webkit-scrollbar-track,
.demo-modal__chat .chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.demo-modal__chat .chat-messages-list::-webkit-scrollbar-thumb,
.demo-modal__chat .chat-body::-webkit-scrollbar-thumb {
  background: rgba(184, 115, 51, 0.2);
  border-radius: 4px;
}

/* n8n branding link — hide (keep the input area) */
.demo-modal__chat .n8n-chat-footer {
  display: none !important;
}

/* ==========================================
   CUSTOM CHAT UI (button-based demos)
   ========================================== */

/* Main container — fills modal chat area */
.cc {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1E2A18;
  font-family: var(--font-sans);
}

/* Messages area — scrollable */
.cc__messages {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cc__messages::-webkit-scrollbar { width: 4px; }
.cc__messages::-webkit-scrollbar-track { background: transparent; }
.cc__messages::-webkit-scrollbar-thumb { background: rgba(184, 115, 51, 0.2); border-radius: 4px; }

/* Message row */
.cc__msg {
  display: flex;
  max-width: 85%;
  animation: ccFadeIn 0.3s ease;
}

.cc__msg--bot { align-self: flex-start; }
.cc__msg--user { align-self: flex-end; }

@keyframes ccFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Message bubbles */
.cc__bubble {
  padding: 0.875rem 1.125rem;
  font-size: 0.9rem;
  line-height: 1.6;
  word-break: break-word;
}

.cc__bubble--bot {
  background: #243020;
  color: var(--cream);
  border-radius: 2px 12px 12px 12px;
  border: 1px solid rgba(184, 115, 51, 0.08);
}

.cc__bubble--user {
  background: var(--accent);
  color: #1A2214;
  border-radius: 12px 12px 2px 12px;
  font-weight: 500;
}

/* Markdown inside bot bubbles */
.cc__bubble--bot p { margin: 0 0 0.5rem 0; color: var(--cream); }
.cc__bubble--bot p:last-child { margin-bottom: 0; }
.cc__bubble--bot strong { color: var(--accent); font-weight: 600; }

/* ---- Clickable Button Grid ---- */
.chat-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(184, 115, 51, 0.1);
  color: var(--cream);
  border: 1px solid rgba(184, 115, 51, 0.25);
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.chat-btn:hover {
  background: rgba(184, 115, 51, 0.2);
  border-color: rgba(184, 115, 51, 0.5);
  transform: translateY(-1px);
}

.chat-btn:active {
  transform: translateY(0);
}

.chat-btn--selected {
  background: var(--accent) !important;
  color: #1A2214 !important;
  border-color: var(--accent) !important;
  font-weight: 600;
}

.chat-btn--disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
  transform: none !important;
}

/* Full-width action buttons (for confirm/restart) */
.chat-btn--wide {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 0.85rem;
}

.chat-btn--primary {
  background: var(--accent);
  color: #1A2214;
  border-color: var(--accent);
  font-weight: 600;
}

.chat-btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--muted);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Footer — input area */
.cc__footer {
  flex: 0 0 auto;
  background: #1A2214;
  border-top: 1px solid rgba(184, 115, 51, 0.12);
  padding: 1rem 1.5rem 1.25rem;
}

.cc__input-wrap {
  display: flex;
  align-items: flex-end;
  background: #243020;
  border: 1px solid rgba(184, 115, 51, 0.15);
  border-radius: 12px;
  padding: 4px 4px 4px 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cc__input-wrap:focus-within {
  border-color: rgba(184, 115, 51, 0.4);
  box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.08);
}

.cc__textarea {
  flex: 1 1 0%;
  min-width: 0;
  background: transparent;
  color: var(--cream);
  border: none;
  border-radius: 0;
  padding: 0.625rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  resize: none;
  outline: none;
  max-height: 100px;
}

.cc__textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.cc__send {
  flex: 0 0 auto;
  background: var(--accent);
  color: #1A2214;
  border: none;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  margin: 0 2px 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc__send:hover {
  background: var(--accent-dark);
  transform: scale(1.05);
}

/* ---- Summary card (for booking confirmation) ---- */
.chat-summary {
  background: rgba(184, 115, 51, 0.06);
  border: 1px solid rgba(184, 115, 51, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
  font-size: 0.82rem;
  line-height: 1.7;
}

.chat-summary strong {
  color: var(--accent);
}

/* ---- Salon Visual Cards ---- */

/* Service category cards (2-col grid) */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.svc-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  background: rgba(184, 115, 51, 0.06);
  border: 1px solid rgba(184, 115, 51, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.svc-cat:hover {
  background: rgba(184, 115, 51, 0.14);
  border-color: rgba(184, 115, 51, 0.4);
  transform: translateY(-2px);
}

.svc-cat--selected {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

.svc-cat--selected .svc-cat__name,
.svc-cat--selected .svc-cat__count {
  color: #1A2214 !important;
}

.svc-cat--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.svc-cat__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.svc-cat__name {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.svc-cat__count {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Service item cards (stacked list) */
.svc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.svc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(184, 115, 51, 0.06);
  border: 1px solid rgba(184, 115, 51, 0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.svc-item:hover {
  background: rgba(184, 115, 51, 0.14);
  border-color: rgba(184, 115, 51, 0.35);
}

.svc-item--selected {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

.svc-item--selected .svc-item__name,
.svc-item--selected .svc-item__meta {
  color: #1A2214 !important;
}

.svc-item--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.svc-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.svc-item__name {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cream);
}

.svc-item__meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.svc-item__price {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.svc-item--selected .svc-item__price {
  color: #1A2214 !important;
}

/* Stylist profile cards */
.stylist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.stylist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px 14px;
  background: rgba(184, 115, 51, 0.06);
  border: 1px solid rgba(184, 115, 51, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.stylist-card:hover {
  background: rgba(184, 115, 51, 0.14);
  border-color: rgba(184, 115, 51, 0.4);
  transform: translateY(-2px);
}

.stylist-card--selected {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

.stylist-card--selected .stylist-card__name,
.stylist-card--selected .stylist-card__specialty {
  color: #1A2214 !important;
}

.stylist-card--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.stylist-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(184, 115, 51, 0.12);
  border: 2px solid rgba(184, 115, 51, 0.25);
}

.stylist-card--selected .stylist-card__avatar {
  background: rgba(26, 34, 20, 0.15);
  border-color: rgba(26, 34, 20, 0.3);
}

.stylist-card__name {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cream);
}

.stylist-card__specialty {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

/* ==========================================
   CONTACT + FAQ SIDE-BY-SIDE
   ========================================== */
.contact-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-col,
.faq-col {
  position: relative;
}

/* ---------- Inquiry Form ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(241, 239, 227, 0.06);
  border: 1px solid rgba(241, 239, 227, 0.15);
  border-radius: 4px;
  color: var(--cream);
  font-size: 0.95rem;
  transition: border-color 0.3s ease, background 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  background: rgba(241, 239, 227, 0.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%238B9A7E'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-select option {
  background: var(--dark);
  color: var(--cream);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: var(--dark);
  font-family: var(--font-sans);
  font-size: var(--label-size);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  transition: background 0.3s ease, transform 0.2s ease;
  margin-top: 0.5rem;
}

.form-submit:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.5em;
}

.form-status--success { color: var(--accent-light); }
.form-status--error { color: #e57373; }

.contact-note {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1.5rem;
  font-style: italic;
}

/* ---------- FAQ Accordion ---------- */
.faq-accordion {
  border-top: 1px solid rgba(241, 239, 227, 0.1);
}

.faq-item {
  border-bottom: 1px solid rgba(241, 239, 227, 0.1);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--cream);
  text-align: left;
  transition: color 0.3s ease;
  gap: 1rem;
}

.faq-question:hover { color: var(--accent); }

.faq-icon {
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: #141A0F;
  padding: 0 0 3rem;
  position: relative;
  overflow: hidden;
  border-top: 2px solid rgba(184, 115, 51, 0.25);
}

.footer__brand {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 15vw, 14rem);
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(184, 115, 51, 0.25);
  text-align: center;
  line-height: 1;
  padding: 2rem 0 0;
  user-select: none;
  pointer-events: none;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.footer__heading {
  font-family: var(--font-sans);
  font-size: var(--label-size);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.footer__link {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer__link:hover { color: var(--cream); }

.footer__bottom {
  border-top: 1px solid rgba(241, 239, 227, 0.08);
  padding-top: 2rem;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .solution-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .solution-layout .solution-text {
    text-align: center;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin: 0 auto;
  }
  .demos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav__hamburger { display: flex; }

  .nav__menu {
    position: fixed;
    inset: 0;
    background: rgba(26, 34, 20, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
  }

  .nav__menu.active {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1.25rem;
    letter-spacing: 0.2em;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 500px;
  }

  .demos-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 3rem auto 0;
  }

  .contact-faq-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline__number {
    min-width: 40px;
    font-size: 1.25rem;
  }

  .hero__title {
    font-size: clamp(2rem, 6vw, 3.5rem);
  }

  .problem-line {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  .solution-text,
  .industries-text {
    font-size: clamp(1.25rem, 4vw, 2rem);
  }

  .demo-modal__container {
    width: 95%;
    height: 85vh;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 5rem 1rem 4rem;
  }

  .nav__logo-img {
    height: 45px;
  }
  .nav--scrolled .nav__logo-img {
    height: 36px;
  }

  .feature-card {
    padding: 2rem 1rem;
  }
}