/* ============================================
   FOYER LANDING PAGE — DESIGN SYSTEM & STYLES
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #f0f6fa;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-accent: rgba(59, 130, 246, 0.15);

  --accent-amber: #3b82f6; /* Main blue accent */
  --accent-amber-dim: rgba(59, 130, 246, 0.08);
  --accent-blue: #2563eb;
  --accent-blue-dim: rgba(37, 99, 235, 0.08);
  --accent-green: #10b981;
  --accent-red: #f43f5e;
  --accent-purple: #6366f1;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 100px; /* Rounded pill style */
  --radius-lg: 24px;
  --radius-xl: 32px;

  --timing-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --timing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*,
*::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-family);
  background-color: var(--bg-primary);
  background-image: radial-gradient(at 0% 0%, #ebf3f9 0px, transparent 50%),
                    radial-gradient(at 100% 0%, #e2eef7 0px, transparent 50%),
                    radial-gradient(at 50% 100%, #ffffff 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Utility --- */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--timing-smooth);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-amber);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  background: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.btn-outline:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.1);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.85rem;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 24px 0;
  transition: all 0.4s var(--timing-smooth);
}

.nav.scrolled {
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  color: var(--accent-amber);
  font-size: 1.15rem;
}


/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero-columns {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
  text-align: left;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.03) 40%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--accent-amber-dim);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-amber);
  margin-bottom: 32px;
  letter-spacing: 0.01em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-amber);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  text-align: left;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 40px;
  line-height: 1.7;
  text-align: left;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Hero Video Showcase */
.hero-video-container {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 60px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.4);
  overflow: hidden;
  box-shadow: 
    0 24px 64px rgba(34, 65, 116, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.6);
}

.hero-ux-video {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero Metrics Card */
.hero-metric-card {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 40px;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 24px 64px rgba(34, 65, 116, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.metric-value {
  font-size: clamp(3.2rem, 7vw, 5.2rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 24px;
  transform: translateY(24px);
  opacity: 0;
  letter-spacing: -0.02em;
}

.metric-scene-active .metric-value {
  animation: metric-total-in 6000ms var(--timing-smooth) forwards;
}

.metric-sparkline {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.metric-sparkline svg {
  display: block;
  width: 100%;
  height: 120px;
  overflow: visible;
}

.spark-path {
  fill: none;
  stroke: var(--accent-amber);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
}

.metric-scene-active .spark-path {
  animation: metric-line-draw 14000ms 4000ms var(--timing-smooth) forwards;
}

.spark-area {
  fill: rgba(59, 130, 246, 0.05);
  opacity: 0;
}

.metric-scene-active .spark-area {
  animation: metric-area-fade 10000ms 8000ms ease-in-out forwards;
}

.spark-dot {
  position: absolute;
  right: 0px;
  top: 10px;
  width: 14px;
  height: 14px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
  transform: scale(0);
}

.metric-scene-active .spark-dot {
  animation: metric-dot-in 3800ms 16600ms var(--timing-bounce) forwards;
}

/* Keyframe definitions matching clone exactly */
@keyframes metric-total-in {
  to { transform: translateY(0); opacity: 1; }
}

@keyframes metric-line-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes metric-area-fade {
  to { opacity: 1; }
}

@keyframes metric-dot-in {
  to { transform: scale(1); }
}

.metric-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.metric-meta strong {
  color: var(--accent-amber);
}

/* Demo Intro Card */
.demo-intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.foyer-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.demo-intro-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.demo-intro-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pulse-ring {
  width: 8px;
  height: 8px;
  background: var(--accent-amber);
  border-radius: 50%;
  position: relative;
}

.pulse-ring::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 1px solid var(--accent-amber);
  border-radius: 50%;
  animation: pulse-ring-expand 1.5s ease-out infinite;
  opacity: 0;
}

@keyframes pulse-ring-expand {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}


/* ============================================
   SECTION COMMON
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-blue-dim);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================
   DEMO SECTION
   ============================================ */
.demo {
  padding: 120px 0;
  position: relative;
}

.demo-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ============================================
   iPHONE-STYLE CHAT
   ============================================ */
.demo-chat {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 40px;
  border: 4px solid #e2e8f0;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.02),
    0 24px 64px rgba(34, 65, 116, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
}

.phone-notch {
  width: 120px;
  height: 28px;
  background: #f1f5f9;
  margin: 0 auto;
  border-radius: 0 0 18px 18px;
  position: relative;
  z-index: 2;
  border: 1px solid #e2e8f0;
  border-top: none;
}

.phone-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: -6px;
}

.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
}

.signal {
  letter-spacing: -2px;
  font-size: 0.5rem;
}

.phone-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.phone-header-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.phone-header-members {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.chat-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 420px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: none;
}

.chat-body::-webkit-scrollbar {
  display: none;
}

/* iPhone Chat Bubbles */
.chat-msg {
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(10px);
  animation: msg-appear 0.4s var(--timing-smooth) forwards;
}

.chat-msg.incoming {
  align-items: flex-start;
}

.chat-msg.outgoing {
  align-items: flex-end;
}

.chat-msg.foyer-msg {
  align-items: flex-start;
}

.chat-sender {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
  padding: 0 12px;
}

.incoming .chat-sender {
  color: var(--text-muted);
}

.outgoing .chat-sender {
  color: var(--accent-blue);
}

.foyer-msg .chat-sender {
  color: var(--accent-amber);
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  position: relative;
}

.incoming .chat-bubble {
  background: #f1f5f9;
  color: var(--text-primary);
  border-radius: 18px 18px 18px 6px;
}

.outgoing .chat-bubble {
  background: var(--accent-blue);
  color: #ffffff;
  border-radius: 18px 18px 6px 18px;
}

.foyer-msg .chat-bubble {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.03));
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--text-primary);
  border-radius: 18px 18px 18px 6px;
}

.chat-time {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 12px;
}

/* Foyer bubble analysis lines */
.foyer-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.foyer-line.visible {
  opacity: 1;
}

.foyer-line .check {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.75rem;
}

.foyer-action-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 2px;
  font-size: 0.82rem;
  color: var(--accent-blue);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.foyer-action-line.visible {
  opacity: 1;
}

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

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out;
}

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

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes msg-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   DASHBOARD PANEL
   ============================================ */
.demo-dashboard {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 520px;
  box-shadow: 0 20px 48px rgba(34, 65, 116, 0.04);
}

.dash-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dash-panel-icon {
  color: var(--accent-amber);
  font-size: 0.9rem;
}

.dash-panel-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  flex: 1;
}

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

.dashboard-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 460px;
}

/* Dashboard Cards */
.dash-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 16px;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  animation: card-appear 0.5s var(--timing-smooth) forwards;
  box-shadow: 0 10px 25px rgba(34, 65, 116, 0.03);
}

@keyframes card-appear {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.severity-badge {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.severity-badge.critical {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.incident-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.incident-detail {
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
}

.incident-detail .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.incident-detail .value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Draft Document Cards */
.draft-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  opacity: 0;
  transform: translateX(20px);
  animation: notify-appear 0.5s var(--timing-smooth) forwards;
  box-shadow: 0 8px 24px rgba(34, 65, 116, 0.03);
}

@keyframes notify-appear {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.draft-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: #f1f5f9;
}

.draft-body {
  flex: 1;
  min-width: 0;
}

.draft-body .draft-to {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-blue);
  margin-bottom: 3px;
}

.draft-body .draft-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.draft-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.draft-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.draft-action-btn.review-btn {
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent-amber);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.draft-action-btn.review-btn:hover {
  background: rgba(59, 130, 246, 0.15);
}

.draft-action-btn.legal-btn {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-blue);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.draft-action-btn.legal-btn:hover {
  background: rgba(37, 99, 235, 0.15);
}

.draft-action-btn.expert-btn {
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent-purple);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.draft-action-btn.expert-btn:hover {
  background: rgba(99, 102, 241, 0.15);
}

/* Risk Bar */
.risk-bar-container {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  opacity: 0;
  animation: card-appear 0.5s var(--timing-smooth) forwards;
  box-shadow: 0 8px 24px rgba(34, 65, 116, 0.03);
}

.risk-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.risk-bar-label span:first-child {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
}

.risk-bar-label span:last-child {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-blue);
}

.risk-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}

.risk-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-green), #fbbf24, var(--accent-red));
  transition: width 1.5s var(--timing-smooth);
}

/* Dashboard waiting state */
.dash-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dash-waiting-icon {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-amber);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   DOCUMENT REVIEW SECTION
   ============================================ */
/* ============================================
   SHOWCASE GRID SECTION (Autopilot & Integration)
   ============================================ */
.showcase-section {
  padding: 120px 0;
  position: relative;
  background-color: var(--bg-primary);
}

.showcase-header {
  text-align: center;
  margin-bottom: 64px;
}

.showcase-title {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.showcase-title .muted-text {
  color: var(--text-muted);
}

.showcase-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.showcase-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(34, 65, 116, 0.03);
  transition: transform 0.3s var(--timing-smooth), box-shadow 0.3s;
}

.showcase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 72px rgba(34, 65, 116, 0.06);
}

.showcase-card-visual {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 40px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.showcase-card-info {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.showcase-card-info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.showcase-card-info p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.showcase-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s;
}

.showcase-card:hover .showcase-link {
  color: var(--accent-amber);
}

/* Flow Builder Visual Mock */
.flow-builder-mock {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(34, 65, 116, 0.03);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.flow-step strong {
  color: var(--text-primary);
}

.flow-step .step-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.flow-step .step-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.flow-step .step-icon.gray { background: #f1f5f9; color: var(--text-muted); }
.flow-step .step-icon.gold { background: var(--accent-amber-dim); color: var(--accent-amber); }
.flow-step .step-icon.purple { background: rgba(99, 102, 241, 0.15); color: var(--accent-purple); }

.flow-arrow-down {
  width: 2px;
  height: 16px;
  background: #e2e8f0;
  position: relative;
}

.flow-arrow-down::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-style: solid;
  border-width: 4px 4px 0 4px;
  border-color: #e2e8f0 transparent transparent transparent;
}

/* Integration Board Mock */
.integration-board-mock {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.integration-core {
  background: #ffffff;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent-amber);
  z-index: 5;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  gap: 6px;
}

.core-icon {
  font-size: 0.95rem;
}

.integration-node {
  position: absolute;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 100px; /* Pill nodes */
  padding: 8px 16px;
  font-size: 0.72rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
  box-shadow: 0 8px 20px rgba(34, 65, 116, 0.04);
}

.integration-node.procore { top: 10%; left: 5%; }
.integration-node.autodesk { top: 10%; right: 5%; }
.integration-node.email { bottom: 10%; left: 5%; }
.integration-node.storage { bottom: 10%; right: 5%; }

.connection-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.connection-line-glow {
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  animation: stroke-flow 4s linear infinite;
}

.connection-line-glow.blue { stroke: var(--accent-blue); opacity: 0.7; }
.connection-line-glow.amber { stroke: var(--accent-amber); opacity: 0.8; }
.connection-line-glow.green { stroke: var(--accent-green); opacity: 0.7; }
.connection-line-glow.purple { stroke: var(--accent-purple); opacity: 0.7; }

@keyframes stroke-flow {
  to {
    stroke-dashoffset: -20;
  }
}

/* ============================================
   STAKEHOLDER NETWORK
   ============================================ */
.stakeholder-section {
  padding: 120px 0;
}

.stakeholder-graph {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 64px rgba(34, 65, 116, 0.04);
}

.stakeholder-graph img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline-section {
  padding: 120px 0;
  position: relative;
}

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 60px;
}

.timeline-line {
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.timeline-line-fill {
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--accent-amber), var(--accent-blue));
  border-radius: 2px;
  transition: height 0.1s linear;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.timeline-item {
  position: relative;
  padding: 0 0 48px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-node {
  position: absolute;
  left: -48px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  transition: all 0.4s var(--timing-smooth);
  z-index: 2;
}

.timeline-item.is-active .timeline-node {
  border-color: var(--accent-amber);
  background: var(--accent-amber);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.4);
}

.timeline-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  transition: all 0.4s var(--timing-smooth);
  box-shadow: 0 8px 24px rgba(34, 65, 116, 0.03);
}

.timeline-item.is-active .timeline-content {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.02);
  box-shadow: 0 12px 36px rgba(34, 65, 116, 0.06);
}

.timeline-timestamp {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-amber);
  background: var(--accent-amber-dim);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   CTA
   ============================================ */
.cta-section {
  padding: 120px 0;
}

.cta-card {
  position: relative;
  text-align: center;
  padding: 80px 48px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(34, 65, 116, 0.03);
}

.cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  position: relative;
}

.cta-card > p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-form {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
}

.input-group {
  display: flex;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 6px;
  transition: border-color 0.3s;
}

.input-group:focus-within {
  border-color: var(--accent-amber);
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9rem;
  padding: 10px 14px;
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-group .btn {
  padding: 10px 24px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cta-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--timing-smooth), transform 0.8s var(--timing-smooth);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-timeline {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--timing-smooth), transform 0.6s var(--timing-smooth);
}

.reveal-timeline.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-timeline {
    transition-duration: 0.01s;
  }

  .chat-msg,
  .dash-card,
  .draft-card,
  .risk-bar-container,
  .routing-msg {
    animation-duration: 0.01s;
  }

  .badge-dot,
  .typing-indicator span,
  .dash-waiting-icon,
  .dash-status-dot {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
  .hero-columns {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-title, .hero-subtitle {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .demo-container {
    grid-template-columns: 1fr;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .showcase-card-visual {
    height: 280px;
    padding: 20px;
  }

  .phone-frame {
    max-width: 380px;
  }

  .action-group-primary,
  .action-group-review {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 100px 0 60px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }

  .input-group {
    flex-direction: column;
  }

  .input-group .btn {
    width: 100%;
  }

  .timeline {
    padding-left: 50px;
  }

  .timeline-node {
    left: -38px;
  }

  .timeline-line {
    left: 18px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .cta-card {
    padding: 48px 24px;
  }

  .review-doc-header {
    flex-direction: column;
  }

  .review-doc-header,
  .review-doc-body,
  .review-doc-actions {
    padding-left: 20px;
    padding-right: 20px;
  }

  .demo, .showcase-section, .timeline-section, .cta-section {
    padding: 80px 0;
  }

  .phone-frame {
    max-width: 100%;
    border-radius: 32px;
  }
}

/* ============================================
   ROTATING HERO TEXT
   ============================================ */
.rotating-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
  max-width: 100%;
  overflow: hidden; /* Clips any exiting/entering elements to prevent cross-row rendering bleed */
  padding-bottom: 8px; /* Extra padding to prevent clipping of text descenders (like g, p, y) */
  margin-bottom: -8px;
}

.rotating-wrapper .rotating-text {
  display: inline-block;
  opacity: 0;
  visibility: hidden; /* Hide completely when inactive to prevent gradient clip bleed rendering bugs */
  transform: translateY(20px);
  position: absolute;
  left: 0;
  top: 0;
  white-space: normal; /* Allow text wrapping */
  max-width: 100%;
  
  /* Statically clip inactive items to 0px height/width to resolve WebKit background-clip text gradient bleed bugs */
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.rotating-wrapper .rotating-text.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  position: relative;
  
  height: auto;
  width: auto;
  overflow: visible;
  pointer-events: auto;
  
  transition: 
    opacity 0.5s var(--timing-smooth), 
    transform 0.5s var(--timing-smooth),
    visibility 0.5s var(--timing-smooth);
}

.rotating-wrapper .rotating-text.exit {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  
  height: auto;
  width: auto;
  overflow: visible;
  
  transition: 
    opacity 0.5s var(--timing-smooth), 
    transform 0.5s var(--timing-smooth),
    visibility 0.5s var(--timing-smooth);
}

/* Ensure the gradient still works on rotating text inside .text-gradient */
.text-gradient .rotating-wrapper .rotating-text {
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================
   CHAT ATTACHMENTS — FILE STACK (iOS-style)
   ============================================ */
.chat-attachments {
  margin-top: 10px;
}

.file-stack {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  max-width: 240px;
  box-shadow: 0 4px 12px rgba(34, 65, 116, 0.02);
}

.file-stack-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.file-stack-icon {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

/* Stacked folder layers */
.file-stack-layer {
  position: absolute;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.file-stack-layer:nth-child(1) {
  width: 28px;
  height: 22px;
  bottom: 0;
  left: 0;
  background: rgba(59, 130, 246, 0.2);
  z-index: 3;
}

.file-stack-layer:nth-child(2) {
  width: 26px;
  height: 20px;
  bottom: 4px;
  left: 3px;
  background: rgba(59, 130, 246, 0.12);
  z-index: 2;
}

.file-stack-layer:nth-child(3) {
  width: 24px;
  height: 18px;
  bottom: 8px;
  left: 6px;
  background: rgba(59, 130, 246, 0.06);
  z-index: 1;
}

.file-stack-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--accent-amber);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.file-stack-meta {
  min-width: 0;
}

.file-stack-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.file-stack-subtitle {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.file-stack-items {
  padding: 0;
}

.file-stack-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.file-stack-item:last-child {
  border-bottom: none;
}

.file-item-icon {
  font-size: 0.95rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.file-item-info {
  flex: 1;
  min-width: 0;
}

.file-item-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.file-item-chevron {
  font-size: 0.6rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================
   CHAT ATTACHMENTS — VOICE MEMO
   ============================================ */
.chat-voice-memo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  max-width: 220px;
}

.voice-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-play-btn::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 2px;
}

.voice-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  height: 24px;
}

.voice-waveform-bar {
  width: 3px;
  border-radius: 2px;
  background: var(--accent-amber);
  opacity: 0.5;
  animation: wave-idle 1.5s ease-in-out infinite;
}

.voice-waveform-bar:nth-child(odd) {
  animation-delay: 0.1s;
}

.voice-waveform-bar:nth-child(3n) {
  animation-delay: 0.3s;
}

.voice-waveform-bar:nth-child(5n) {
  animation-delay: 0.5s;
}

@keyframes wave-idle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

.voice-duration {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
