/* ====================================================
   Fieldwork — SMS Demo page styles
   iMessage-style conversation UI + page layout.
   ==================================================== */

/* ---- SMS Hero ---- */
.sms-hero {
  padding: 72px var(--pad-x) 80px;
  border-bottom: 1px solid var(--border);
}
.sms-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.sms-hero-badge {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-warm);
  background: rgba(196,98,45,0.1);
  border: 1px solid rgba(196,98,45,0.25);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 28px;
}
.sms-hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--fg);
  margin-bottom: 20px;
  max-width: 700px;
}
.sms-hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 28px;
}

/* ---- SMS Threads section ---- */
.sms-threads {
  padding: 80px var(--pad-x);
  border-bottom: 1px solid var(--border);
}
.sms-threads-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.sms-threads-header {
  max-width: 640px;
  margin-bottom: 52px;
}

/* 2-column grid on desktop */
.sms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 720px) {
  .sms-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Thread card ---- */
.sms-thread-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.sms-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.sms-thread-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sms-thread-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}
.sms-avatar--tech   { background: var(--accent); }
.sms-avatar--client { background: #5E5CE6; }

.sms-thread-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sms-thread-subtitle {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 1px;
}

/* Scenario tags */
.sms-thread-tag {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sms-tag--dispatch   { background: #E8F5E9; color: #2E7D32; }
.sms-tag--eta        { background: #E3F2FD; color: #1565C0; }
.sms-tag--issue      { background: #FFF3E0; color: #BF6000; }
.sms-tag--reschedule { background: #F3E5F5; color: #6A1B9A; }

/* ---- Bubbles area ---- */
.sms-bubbles {
  flex: 1;
  padding: 18px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
}

/* Base bubble */
.sms-bubble-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}
.sms-bubble-row--visible {
  opacity: 1;
  transform: translateY(0);
}
.sms-bubble-row--outgoing { align-items: flex-end; }
.sms-bubble-row--incoming { align-items: flex-start; }

/* Sender label */
.sms-sender-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
  padding: 0 4px;
}
.sms-bubble-row--outgoing .sms-sender-label { color: #1D6FD0; }
.sms-bubble-row--incoming .sms-sender-label { color: var(--fg-muted); }

/* Bubble body */
.sms-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 80%;
  word-break: break-word;
}

/* Outgoing (AI) — blue, right side */
.sms-bubble--outgoing {
  background: #1D6FD0;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Incoming (tech/client) — gray, left side */
.sms-bubble--incoming {
  background: #E9E9EB;
  color: #1A1A1A;
  border-bottom-left-radius: 4px;
}

/* Timestamp */
.sms-timestamp {
  font-size: 10px;
  color: #999;
  padding: 0 4px;
}

/* ---- Typing indicator ---- */
.sms-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 18px 8px;
}
.sms-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #C7C7CC;
  animation: sms-typing-bounce 1.2s infinite ease-in-out;
}
.sms-typing-dot:nth-child(1) { animation-delay: 0s; }
.sms-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.sms-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes sms-typing-bounce {
  0%,80%,100% { transform: translateY(0); opacity: 0.5; }
  40%         { transform: translateY(-5px); opacity: 1; }
}

/* ---- Thread footer ---- */
.sms-thread-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  gap: 10px;
}
.sms-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.sms-play-btn:hover:not(:disabled) { background: #14301A; transform: translateY(-1px); }
.sms-play-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.sms-reset-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.sms-reset-btn:hover { color: var(--fg); border-color: #aaa; }

/* Caption below grid */
.sms-caption {
  text-align: center;
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 36px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
  font-style: italic;
}

/* ---- How it works section ---- */
.sms-how {
  padding: 80px var(--pad-x);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.sms-how-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.sms-how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 48px;
}
@media (min-width: 640px) {
  .sms-how-grid { grid-template-columns: repeat(3, 1fr); }
}
.sms-how-icon {
  font-size: 28px;
  margin-bottom: 14px;
}
.sms-how-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.sms-how-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ---- CTA section ---- */
.sms-cta-section {
  padding: 80px var(--pad-x);
  background: var(--bg-dark);
}
.sms-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.sms-cta-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4.5vw, 42px);
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.15;
}
.sms-cta-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin-bottom: 32px;
}
.sms-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
@media (min-width: 480px) {
  .sms-cta-actions { flex-direction: row; justify-content: center; }
}
.sms-cta-demos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sms-cta-demo-link {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.15s;
}
a.sms-cta-demo-link:hover { color: rgba(255,255,255,0.8); }
