/* ============================================================
   TOWN EAST AUTOMOTIVE — Digital Service Writer Concierge
   Confianza framework + HR Navigator question flow
   Engage first. Qualify through questions. Collect info last.
   ============================================================ */

:root {
  --terra:       #C0622F;
  --terra-lt:    #D4784A;
  --terra-dk:    #8C3E18;
  --gold:        #C9A84C;
  --gold-lt:     #E2C878;
  --cream:       #F5EFE6;
  --charcoal:    #181818;
  --charcoal-md: #242424;
  --charcoal-lt: #303030;
  --charcoal-bd: #3A3A3A;
  --text-muted:  rgba(245,239,230,0.50);
  --text-dim:    rgba(245,239,230,0.70);
  --green:       #4CAF50;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--charcoal);
  color: var(--cream);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 10% 0%,   rgba(192,98,47,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(201,168,76,0.07) 0%, transparent 45%);
}

header { display: none; }

/* ── Page Shell ───────────────────────────────────────────── */
.page-shell {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 0;
}

.top-bar-brand {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}

.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--charcoal-md);
  border: 1px solid var(--charcoal-bd);
  border-radius: 6px;
  overflow: hidden;
}

.lang-btn {
  padding: 6px 13px;
  font-family: 'Lato', sans-serif;
  font-size: 0.72em;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-btn.active, .lang-btn:hover {
  background: var(--terra);
  color: var(--cream);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 36px 0 24px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.70em;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.hero-icon {
  font-size: 3em;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(192,98,47,0.4));
}

.hero-headline {
  font-family: 'Playfair Display', serif;
  font-size: 2.3em;
  font-weight: 900;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero-headline em {
  font-style: italic;
  color: var(--terra-lt);
}

.hero-sub {
  font-size: 0.92em;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto 14px;
}

.hero-quote {
  font-size: 0.78em;
  font-style: italic;
  color: var(--text-muted);
}

.rule {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 22px auto;
  border: none;
}

/* ── Section Label ────────────────────────────────────────── */
.section-label {
  font-size: 0.70em;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ── Service Tile Grid ────────────────────────────────────── */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.service-tile {
  background: var(--charcoal-md);
  border: 1px solid var(--charcoal-bd);
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.service-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,98,47,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.service-tile:hover {
  border-color: rgba(192,98,47,0.55);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.service-tile:hover::after { opacity: 1; }

.tile-icon  { font-size: 1.8em; line-height: 1; margin-bottom: 10px; display: block; }
.tile-title { font-size: 0.88em; font-weight: 700; color: var(--cream); margin-bottom: 3px; line-height: 1.3; }
.tile-sub   { font-size: 0.70em; color: var(--text-muted); line-height: 1.4; }

.service-tile-wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.service-tile-wide .tile-icon { margin-bottom: 0; flex-shrink: 0; }
.service-tile-wide .tile-copy { flex: 1; }
.service-tile-wide .tile-arrow { font-size: 1.3em; color: var(--gold); flex-shrink: 0; }

/* ── Status Bar ───────────────────────────────────────────── */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--charcoal-md);
  border: 1px solid var(--charcoal-bd);
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 16px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px rgba(76,175,80,0.6); }
  50%       { box-shadow: 0 0 10px rgba(76,175,80,0.9); }
}

.status-text { font-size: 0.78em; color: var(--text-dim); }

/* ── Direct Chat Banner ───────────────────────────────────── */
.chat-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(201,168,76,0.07);
  border: 1px solid rgba(201,168,76,0.20);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 4px;
}
.chat-banner:hover {
  background: rgba(201,168,76,0.13);
  border-color: rgba(201,168,76,0.35);
}
.chat-banner-text { font-size: 0.82em; font-weight: 700; color: var(--gold-lt); }
.chat-banner-arrow { font-size: 0.80em; color: var(--text-muted); flex-shrink: 0; }

/* ── Service Flow Panel ───────────────────────────────────── */
.flow-panel { display: none; }
.flow-panel.active {
  display: block;
  animation: slideIn 0.28s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Flow header */
.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78em;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--gold); }

/* Progress bar */
.progress-wrap {
  flex: 1;
  margin: 0 16px;
}
.progress-label {
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-align: right;
}
.progress-bar {
  height: 3px;
  background: var(--charcoal-bd);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--terra), var(--gold));
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ── Question Card ────────────────────────────────────────── */
.question-card {
  background: var(--charcoal-md);
  border: 1px solid var(--charcoal-bd);
  border-radius: 14px;
  padding: 28px 24px 32px;
  margin-bottom: 16px;
  animation: fadeUp 0.3s ease;
}

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

.question-service-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.question-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.35em;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.3;
  margin-bottom: 24px;
}

/* Answer buttons */
.answer-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-btn {
  width: 100%;
  padding: 14px 18px;
  font-family: 'Lato', sans-serif;
  font-size: 0.90em;
  font-weight: 400;
  color: var(--cream);
  background: var(--charcoal-lt);
  border: 1px solid var(--charcoal-bd);
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  line-height: 1.4;
}

.answer-btn:hover {
  border-color: var(--terra);
  background: rgba(192,98,47,0.10);
  transform: translateX(4px);
}

.answer-btn.selected {
  border-color: var(--terra);
  background: rgba(192,98,47,0.15);
  color: var(--cream);
  font-weight: 700;
}

/* Two-column answer buttons for short options */
.answer-buttons.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.answer-buttons.two-col .answer-btn {
  text-align: center;
}

/* ── Summary Card ─────────────────────────────────────────── */
.summary-card {
  background: linear-gradient(135deg, rgba(192,98,47,0.10) 0%, rgba(201,168,76,0.06) 100%);
  border: 1px solid rgba(192,98,47,0.30);
  border-left: 4px solid var(--terra);
  border-radius: 12px;
  padding: 24px 22px;
  margin-bottom: 20px;
  animation: fadeUp 0.35s ease;
}

.summary-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88em;
  line-height: 1.5;
}

.summary-label {
  font-weight: 700;
  color: var(--gold);
  min-width: 90px;
  flex-shrink: 0;
}

.summary-value { color: var(--text-dim); }

/* ── Intake Form ──────────────────────────────────────────── */
.intake-card {
  background: var(--charcoal-md);
  border: 1px solid var(--charcoal-bd);
  border-radius: 14px;
  padding: 28px 24px;
  margin-bottom: 16px;
  animation: fadeUp 0.3s ease;
}

.intake-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25em;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 6px;
}

.intake-sub {
  font-size: 0.82em;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

.intake-field {
  margin-bottom: 14px;
}

.intake-label {
  display: block;
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 7px;
}

.intake-input {
  width: 100%;
  padding: 12px 14px;
  font-family: 'Lato', sans-serif;
  font-size: 0.93em;
  color: var(--cream);
  background: var(--charcoal-lt);
  border: 1px solid var(--charcoal-bd);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.intake-input::placeholder { color: var(--text-muted); }
.intake-input:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(192,98,47,0.18);
}

.intake-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── CTA Button ───────────────────────────────────────────── */
.cta-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  font-family: 'Lato', sans-serif;
  font-size: 0.88em;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--terra) 0%, var(--terra-dk) 100%);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(192,98,47,0.40);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192,98,47,0.52);
}
.cta-btn:active { transform: translateY(0); }

/* ── Confirmation Card ────────────────────────────────────── */
.confirm-card {
  background: var(--charcoal-md);
  border: 1px solid rgba(76,175,80,0.30);
  border-top: 4px solid var(--green);
  border-radius: 14px;
  padding: 36px 28px;
  text-align: center;
  animation: fadeUp 0.4s ease;
}

.confirm-icon { font-size: 3em; margin-bottom: 16px; display: block; }

.confirm-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6em;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 10px;
}

.confirm-sub {
  font-size: 0.90em;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 24px;
}

.start-over-btn {
  display: inline-block;
  padding: 10px 24px;
  font-family: 'Lato', sans-serif;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--charcoal-bd);
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.start-over-btn:hover { color: var(--gold); border-color: var(--gold); }

/* ── Direct Chat Panel ────────────────────────────────────── */
.chat-panel { display: none; }
.chat-panel.active { display: block; animation: slideIn 0.28s ease; }

.chat-messages-area {
  background: var(--charcoal-md);
  border: 1px solid var(--charcoal-bd);
  border-radius: 12px;
  padding: 20px;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 12px;
  scroll-behavior: smooth;
}

.chat-msg {
  margin-bottom: 14px;
  animation: fadeUp 0.2s ease;
}

.chat-msg.bot .chat-bubble {
  background: var(--charcoal-lt);
  border: 1px solid var(--charcoal-bd);
  border-radius: 12px 12px 12px 4px;
  padding: 12px 16px;
  font-size: 0.90em;
  line-height: 1.6;
  color: var(--cream);
  max-width: 85%;
  display: inline-block;
}

.chat-msg.user {
  text-align: right;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--terra) 0%, var(--terra-dk) 100%);
  border-radius: 12px 12px 4px 12px;
  padding: 12px 16px;
  font-size: 0.90em;
  line-height: 1.6;
  color: #fff;
  max-width: 85%;
  display: inline-block;
}

.chat-input-row {
  display: flex;
  gap: 10px;
}

.chat-input-field {
  flex: 1;
  padding: 13px 16px;
  font-family: 'Lato', sans-serif;
  font-size: 0.92em;
  color: var(--cream);
  background: var(--charcoal-lt);
  border: 1px solid var(--charcoal-bd);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-field::placeholder { color: var(--text-muted); }
.chat-input-field:focus { border-color: var(--terra); }

.chat-send-btn {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--terra) 0%, var(--terra-dk) 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1.1em;
  cursor: pointer;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.chat-send-btn:hover { transform: scale(1.05); }

/* ── Trust Footer ─────────────────────────────────────────── */
.trust-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--charcoal-bd);
}
.trust-footer p {
  font-size: 0.68em;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  line-height: 1.7;
}
.trust-footer a { color: var(--gold); text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero-headline      { font-size: 1.9em; }
  .service-grid       { gap: 10px; }
  .service-tile       { padding: 16px 13px; }
  .question-card      { padding: 22px 18px 26px; }
  .intake-row         { grid-template-columns: 1fr; }
  .answer-buttons.two-col { grid-template-columns: 1fr; }
}

/* ===== Town East additions ===== */
button.service-tile, button.chat-banner { font: inherit; color: inherit; width: 100%; -webkit-appearance: none; appearance: none; text-align: left; }
button.service-tile { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; }
.intake-row { row-gap: 0; }
button.chat-banner { display: flex; }
.top-bar-brand { cursor: default; }
.hero-shop { font-family: 'Playfair Display', serif; font-size: 1.05em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.push-start { text-align: center; font-size: 0.95em; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-lt); margin: 0 0 18px; animation: tea-text 2.4s ease-in-out infinite; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.2em; margin: 4px 0 6px; font-size: 0.82em; color: #ff9d7a; }
.call-btn { display: block; text-align: center; text-decoration: none; margin: 0 0 16px; padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(201,168,76,0.35); color: var(--gold-lt); font-weight: 700; font-size: 0.88em; letter-spacing: 0.03em; }
.chat-actions { margin-top: 12px; }
.chat-actions .cta-btn { margin-top: 0; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Pulsing light behind every button */
@keyframes tea-pulse {
  0%, 100% { box-shadow: inset 0 0 6px rgba(192,98,47,0.10), 0 0 4px rgba(192,98,47,0.15); border-color: var(--charcoal-bd); }
  50%      { box-shadow: inset 0 0 22px rgba(224,140,80,0.34), 0 0 14px rgba(201,168,76,0.38); border-color: rgba(201,168,76,0.60); }
}
@keyframes tea-pulse-cta {
  0%, 100% { box-shadow: 0 4px 20px rgba(192,98,47,0.40), inset 0 0 6px rgba(255,220,160,0.10); }
  50%      { box-shadow: 0 4px 30px rgba(224,140,80,0.80), inset 0 0 22px rgba(255,220,160,0.32); }
}
@keyframes tea-text { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }
.service-tile, .answer-btn, .chat-banner, .start-over-btn, .lang-btn.active { animation: tea-pulse 2.6s ease-in-out infinite; }
.cta-btn, .chat-send-btn { animation: tea-pulse-cta 2.6s ease-in-out infinite; }
.service-grid > :nth-child(2n) { animation-delay: 0.45s; }
.service-grid > :nth-child(3n) { animation-delay: 0.9s; }
.answer-buttons > :nth-child(2n) { animation-delay: 0.5s; }
.answer-buttons > :nth-child(3n) { animation-delay: 1s; }
@media (prefers-reduced-motion: reduce) {
  .service-tile, .answer-btn, .chat-banner, .start-over-btn, .lang-btn.active, .cta-btn, .chat-send-btn, .push-start { animation: none; }
}
